From 9987ead6610df2c388f4ce2fd85bc8bb4c153652 Mon Sep 17 00:00:00 2001 From: Yevheniia Berdnyk Date: Wed, 25 Jan 2023 01:14:28 +0200 Subject: [PATCH 1/3] Added more methods to validate json --- api/__init__.py | 2 +- api/schemas/debug_traceBlockByNumber.json | 314 ++++++----- api/schemas/erigon_blockNumber.json | 44 ++ api/schemas/erigon_forks.json | 88 +++ api/schemas/eth_accounts.json | 65 +++ api/schemas/eth_blockNumber.json | 44 ++ api/schemas/eth_call.json | 44 ++ api/schemas/eth_chainId.json | 44 ++ api/schemas/eth_coinbase.json | 43 ++ api/schemas/eth_estimateGas.json | 44 ++ api/schemas/eth_feeHistory.json | 140 +++++ api/schemas/eth_gasPrice.json | 44 ++ api/schemas/eth_getBalance.json | 44 ++ api/schemas/eth_getBlockByHash.json | 501 ++++++++++++++++++ api/schemas/eth_getBlockByNumber.json | 501 ++++++++++++++++++ api/schemas/eth_getBlockReceipts.json | 262 +++++++++ .../eth_getBlockTransactionCountByHash.json | 43 ++ .../eth_getBlockTransactionCountByNumber.json | 43 ++ api/schemas/eth_getLogs.json | 193 +++++++ api/schemas/eth_getStorageAt.json | 44 ++ ...eth_getTransactionByBlockHashAndIndex.json | 223 ++++++++ ...h_getTransactionByBlockNumberAndIndex.json | 223 ++++++++ api/schemas/eth_getTransactionByHash.json | 223 ++++++++ api/schemas/eth_getTransactionCount.json | 44 ++ api/schemas/eth_maxPriorityFeePerGas.json | 44 ++ api/schemas/eth_newBlockFilter.json | 44 ++ api/schemas/eth_newFilter.json | 44 ++ .../eth_newPendingTransactionFilter.json | 44 ++ api/schemas/eth_protocolVersion.json | 44 ++ api/schemas/eth_signTypedData.json | 65 +++ api/schemas/eth_syncing.json | 44 ++ api/schemas/eth_uninstallFilter.json | 43 ++ api/schemas/trace_block.json | 330 ++++++++++++ tests/base_api_test_case.py | 13 +- tests/test_api_requests.py | 105 +++- 35 files changed, 3903 insertions(+), 177 deletions(-) create mode 100644 api/schemas/erigon_blockNumber.json create mode 100644 api/schemas/erigon_forks.json create mode 100644 api/schemas/eth_accounts.json create mode 100644 api/schemas/eth_blockNumber.json create mode 100644 api/schemas/eth_call.json create mode 100644 api/schemas/eth_chainId.json create mode 100644 api/schemas/eth_coinbase.json create mode 100644 api/schemas/eth_estimateGas.json create mode 100644 api/schemas/eth_feeHistory.json create mode 100644 api/schemas/eth_gasPrice.json create mode 100644 api/schemas/eth_getBalance.json create mode 100644 api/schemas/eth_getBlockByHash.json create mode 100644 api/schemas/eth_getBlockByNumber.json create mode 100644 api/schemas/eth_getBlockReceipts.json create mode 100644 api/schemas/eth_getBlockTransactionCountByHash.json create mode 100644 api/schemas/eth_getBlockTransactionCountByNumber.json create mode 100644 api/schemas/eth_getLogs.json create mode 100644 api/schemas/eth_getStorageAt.json create mode 100644 api/schemas/eth_getTransactionByBlockHashAndIndex.json create mode 100644 api/schemas/eth_getTransactionByBlockNumberAndIndex.json create mode 100644 api/schemas/eth_getTransactionByHash.json create mode 100644 api/schemas/eth_getTransactionCount.json create mode 100644 api/schemas/eth_maxPriorityFeePerGas.json create mode 100644 api/schemas/eth_newBlockFilter.json create mode 100644 api/schemas/eth_newFilter.json create mode 100644 api/schemas/eth_newPendingTransactionFilter.json create mode 100644 api/schemas/eth_protocolVersion.json create mode 100644 api/schemas/eth_signTypedData.json create mode 100644 api/schemas/eth_syncing.json create mode 100644 api/schemas/eth_uninstallFilter.json create mode 100644 api/schemas/trace_block.json diff --git a/api/__init__.py b/api/__init__.py index 68592ec..fe1bcd2 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -1,3 +1,3 @@ import os -schema_path = f'{os.path.dirname(__file__)}/schemas' +schema_path = os.path.join(os.path.dirname(__file__), 'schemas') diff --git a/api/schemas/debug_traceBlockByNumber.json b/api/schemas/debug_traceBlockByNumber.json index 984304f..f7ee426 100644 --- a/api/schemas/debug_traceBlockByNumber.json +++ b/api/schemas/debug_traceBlockByNumber.json @@ -1,175 +1,165 @@ { - "$schema": "https://json-schema.org/schema", - "$id": "http://example.com/example.json", - "type": "object", - "default": {}, - "title": "Root Schema", - "required": [ - "jsonrpc", - "id", - "result" - ], - "properties": { - "jsonrpc": { - "type": "string", - "default": "", - "title": "The jsonrpc Schema", - "examples": [ - "2.0" - ] - }, - "id": { - "type": [ - "integer", - "string" - ], - "default": 0, - "title": "The id Schema", - "examples": [ - 1 - ] - }, - "result": { - "type": "array", - "default": [], - "title": "The result Schema", - "items": { - "type": "object", - "default": {}, - "title": "A Schema", - "required": [ - "type", - "from", - "to", - "value", - "gas", - "gasUsed", - "input", - "output", - "time" - ], - "properties": { - "type": { - "type": "string", - "default": "", - "title": "The type Schema", - "examples": [ - "CALL" - ] - }, - "from": { - "type": "string", - "default": "", - "title": "The from Schema", - "examples": [ - "0x67b1d87101671b127f5f8714789c7192f7ad340e" - ] - }, - "to": { - "type": "string", - "default": "", - "title": "The to Schema", - "examples": [ - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" - ] - }, - "value": { - "type": "string", - "default": "", - "title": "The value Schema", - "examples": [ - "0x470de4df820000" - ] - }, - "gas": { - "type": "string", - "default": "", - "title": "The gas Schema", - "examples": [ - "0x0" - ] - }, - "gasUsed": { - "type": "string", - "default": "", - "title": "The gasUsed Schema", - "examples": [ - "0x0" - ] - }, - "input": { + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { "type": "string", "default": "", - "title": "The input Schema", + "title": "The jsonrpc Schema", "examples": [ - "0x" + "2.0" ] - }, - "output": { + }, + "id": { "type": "string", "default": "", - "title": "The output Schema", + "title": "The id Schema", "examples": [ - "0x" + "0x4d" ] - }, - "time": { - "type": "string", - "default": "", - "title": "The time Schema", + }, + "result": { + "type": "array", + "default": [], + "title": "The result Schema", + "items": { + "type": "object", + "default": {}, + "title": "A Schema", + "required": [ + "result" + ], + "properties": { + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "from", + "gas", + "gasUsed", + "to", + "input", + "value", + "type" + ], + "properties": { + "from": { + "type": "string", + "default": "", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "gas": { + "type": "string", + "default": "", + "title": "The gas Schema", + "examples": [ + "0x5b376c" + ] + }, + "gasUsed": { + "type": "string", + "default": "", + "title": "The gasUsed Schema", + "examples": [ + "0xd907" + ] + }, + "to": { + "type": "string", + "default": "", + "title": "The to Schema", + "examples": [ + "0x78bc89afcb4c804e5013948e63dabf055e6ac076" + ] + }, + "input": { + "type": "string", + "default": "", + "title": "The input Schema", + "examples": [ + "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" + ] + }, + "value": { + "type": "string", + "default": "", + "title": "The value Schema", + "examples": [ + "0x0" + ] + }, + "type": { + "type": "string", + "default": "", + "title": "The type Schema", + "examples": [ + "CALL" + ] + } + }, + "examples": [{ + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5b376c", + "gasUsed": "0xd907", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "value": "0x0", + "type": "CALL" + }] + } + }, + "examples": [{ + "result": { + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5b376c", + "gasUsed": "0xd907", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "value": "0x0", + "type": "CALL" + } + }] + }, "examples": [ - "2.707µs" + [{ + "result": { + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5b376c", + "gasUsed": "0xd907", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "value": "0x0", + "type": "CALL" + } + }] ] - } - }, - "examples": [ - { - "type": "CALL", - "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", - "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value": "0x470de4df820000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x", - "time": "2.707µs" - } - ] - }, - "examples": [ - [ - { - "type": "CALL", - "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", - "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value": "0x470de4df820000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x", - "time": "2.707µs" - } - ] - ] - } - }, - "examples": [ - { - "jsonrpc": "2.0", - "id": 1, - "result": [ - { - "type": "CALL", - "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", - "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value": "0x470de4df820000", - "gas": "0x0", - "gasUsed": "0x0", - "input": "0x", - "output": "0x", - "time": "2.707µs" } - ] - } - ] + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": [{ + "result": { + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5b376c", + "gasUsed": "0xd907", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "value": "0x0", + "type": "CALL" + } + }] + }] } \ No newline at end of file diff --git a/api/schemas/erigon_blockNumber.json b/api/schemas/erigon_blockNumber.json new file mode 100644 index 0000000..e67b57a --- /dev/null +++ b/api/schemas/erigon_blockNumber.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x6" + ], + "minLength": 3 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x6" + }] +} \ No newline at end of file diff --git a/api/schemas/erigon_forks.json b/api/schemas/erigon_forks.json new file mode 100644 index 0000000..18a8ef2 --- /dev/null +++ b/api/schemas/erigon_forks.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "genesis" + ], + "properties": { + "forks": { + "type": "array", + "default": [], + "title": "The forks Schema", + "items": {}, + "examples": [ + [] + ] + }, + "genesis": { + "type": "string", + "default": "", + "title": "The genesis Schema", + "examples": [ + "0xc493151b4991dd1bf459952509bba9bc3fb2b706299e18e36e6b78781835065d" + ] + }, + "heightForks": { + "type": "array", + "default": [], + "title": "The heightForks Schema", + "items": {}, + "examples": [ + [] + ] + }, + "timeForks": { + "type": "null", + "default": "", + "title": "The timeForks Schema", + "examples": [ + null + ] + } + }, + "examples": [{ + "forks": [], + "genesis": "0xc493151b4991dd1bf459952509bba9bc3fb2b706299e18e36e6b78781835065d" + }] + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": { + "forks": [], + "genesis": "0xc493151b4991dd1bf459952509bba9bc3fb2b706299e18e36e6b78781835065d", + "heightForks": [], + "timeForks":null + } + }] +} \ No newline at end of file diff --git a/api/schemas/eth_accounts.json b/api/schemas/eth_accounts.json new file mode 100644 index 0000000..d7614a1 --- /dev/null +++ b/api/schemas/eth_accounts.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "error", + "id", + "jsonrpc" + ], + "properties": { + "error": { + "type": "object", + "default": {}, + "title": "The error Schema", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "const": -32000, + "title": "The code Schema" + }, + "message": { + "type": "string", + "const": "the method has been deprecated: eth_accounts", + "title": "The message Schema" + } + }, + "examples": [{ + "code": + -32000, + "message": "the method has been deprecated: eth_accounts" + }] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + } + }, + "examples": [{ + "error": { + "code": + -32000, + "message": "the method has been deprecated: eth_accounts" + }, + "id": "0x4d", + "jsonrpc": "2.0" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_blockNumber.json b/api/schemas/eth_blockNumber.json new file mode 100644 index 0000000..e67b57a --- /dev/null +++ b/api/schemas/eth_blockNumber.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x6" + ], + "minLength": 3 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x6" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_call.json b/api/schemas/eth_call.json new file mode 100644 index 0000000..8a57d79 --- /dev/null +++ b/api/schemas/eth_call.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x0" + ], + "minLength": 2 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x0" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_chainId.json b/api/schemas/eth_chainId.json new file mode 100644 index 0000000..4e45781 --- /dev/null +++ b/api/schemas/eth_chainId.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x539" + ], + "minLength": 5 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x539" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_coinbase.json b/api/schemas/eth_coinbase.json new file mode 100644 index 0000000..2b3b36a --- /dev/null +++ b/api/schemas/eth_coinbase.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x67b1d87101671b127f5f8714789c7192f7ad340e" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_estimateGas.json b/api/schemas/eth_estimateGas.json new file mode 100644 index 0000000..4e03a85 --- /dev/null +++ b/api/schemas/eth_estimateGas.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x5208" + ], + "minLength": 5 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x5208" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_feeHistory.json b/api/schemas/eth_feeHistory.json new file mode 100644 index 0000000..6ddd241 --- /dev/null +++ b/api/schemas/eth_feeHistory.json @@ -0,0 +1,140 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "baseFeePerGas", + "gasUsedRatio", + "oldestBlock" + ], + "properties": { + "baseFeePerGas": { + "type": "array", + "default": [], + "title": "The baseFeePerGas Schema", + "items": { + "type": "string", + "title": "A Schema", + "examples": [ + "0xa816ead", + "0x934444f", + "0x85cf66c", + "0x753e0ce", + "0x66a3b7e", + "0x5ac5ce9" + ] + }, + "examples": [ + ["0xa816ead", + "0x934444f", + "0x85cf66c", + "0x753e0ce", + "0x66a3b7e", + "0x5ac5ce9" + ] + ] + }, + "gasUsedRatio": { + "type": "array", + "default": [], + "title": "The gasUsedRatio Schema", + "items": { + "type": "number", + "title": "A Schema", + "examples": [ + 0.004482045501771731, + 0.13449938183063492, + 0.004737830629739461, + 0.0017890421170331718, + 0.03753323414686831 + ] + }, + "examples": [ + [0.004482045501771731, + 0.13449938183063492, + 0.004737830629739461, + 0.0017890421170331718, + 0.03753323414686831 + ] + ] + }, + "oldestBlock": { + "type": "string", + "default": "", + "title": "The oldestBlock Schema", + "examples": [ + "0x12" + ] + } + }, + "examples": [{ + "baseFeePerGas": [ + "0xa816ead", + "0x934444f", + "0x85cf66c", + "0x753e0ce", + "0x66a3b7e", + "0x5ac5ce9" + ], + "gasUsedRatio": [ + 0.004482045501771731, + 0.13449938183063492, + 0.004737830629739461, + 0.0017890421170331718, + 0.03753323414686831 + ], + "oldestBlock": "0x12" + }] + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": { + "baseFeePerGas": [ + "0xa816ead", + "0x934444f", + "0x85cf66c", + "0x753e0ce", + "0x66a3b7e", + "0x5ac5ce9" + ], + "gasUsedRatio": [ + 0.004482045501771731, + 0.13449938183063492, + 0.004737830629739461, + 0.0017890421170331718, + 0.03753323414686831 + ], + "oldestBlock": "0x12" + } + }] +} \ No newline at end of file diff --git a/api/schemas/eth_gasPrice.json b/api/schemas/eth_gasPrice.json new file mode 100644 index 0000000..ca23556 --- /dev/null +++ b/api/schemas/eth_gasPrice.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x17b26230" + ], + "minLength": 10 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x17b26230" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getBalance.json b/api/schemas/eth_getBalance.json new file mode 100644 index 0000000..750c097 --- /dev/null +++ b/api/schemas/eth_getBalance.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x21cb9bfdfc6a4139b8b" + ], + "minLength": 15 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x21cb9bfdfc6a4139b8b" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getBlockByHash.json b/api/schemas/eth_getBlockByHash.json new file mode 100644 index 0000000..93e4c1f --- /dev/null +++ b/api/schemas/eth_getBlockByHash.json @@ -0,0 +1,501 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": ["integer", "string"], + "default": 0, + "title": "The id Schema", + "examples": [ + 11 + ] + }, + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "baseFeePerGas", + "difficulty", + "extraData", + "gasLimit", + "gasUsed", + "hash", + "logsBloom", + "miner", + "mixHash", + "nonce", + "number", + "parentHash", + "receiptsRoot", + "sha3Uncles", + "size", + "stateRoot", + "timestamp", + "totalDifficulty", + "transactions", + "transactionsRoot", + "uncles" + ], + "properties": { + "baseFeePerGas": { + "type": "string", + "default": "", + "title": "The baseFeePerGas Schema", + "examples": [ + "0x753e0ce" + ] + }, + "difficulty": { + "type": "string", + "default": "", + "title": "The difficulty Schema", + "examples": [ + "0x2" + ] + }, + "extraData": { + "type": "string", + "default": "", + "title": "The extraData Schema", + "examples": [ + "0x000000000000000000000000000000000000000000000000000000000000000009d44257b81bceef40edd5647a0772e4101309e5029f4545ef0d18eeefecf4eb52196fcf7e47574a94f7bbd5c444531fedf589ead231daa0662589faa9881c7f00" + ] + }, + "gasLimit": { + "type": "string", + "default": "", + "title": "The gasLimit Schema", + "examples": [ + "0xb31c0d" + ] + }, + "gasUsed": { + "type": "string", + "default": "", + "title": "The gasUsed Schema", + "examples": [ + "0x5208" + ] + }, + "hash": { + "type": "string", + "default": "", + "title": "The hash Schema", + "examples": [ + "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8" + ] + }, + "logsBloom": { + "type": "string", + "default": "", + "title": "The logsBloom Schema", + "examples": [ + "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "miner": { + "type": "string", + "default": "", + "title": "The miner Schema", + "examples": [ + "0x0000000000000000000000000000000000000000" + ] + }, + "mixHash": { + "type": "string", + "default": "", + "title": "The mixHash Schema", + "examples": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "nonce": { + "type": "string", + "default": "", + "title": "The nonce Schema", + "examples": [ + "0x0000000000000000" + ] + }, + "number": { + "type": "string", + "default": "", + "title": "The number Schema", + "examples": [ + "0x15" + ] + }, + "parentHash": { + "type": "string", + "default": "", + "title": "The parentHash Schema", + "examples": [ + "0x4e852717cc4505d2100a139e390e5df00762a87cbfb23c17bf1569703fddec95" + ] + }, + "receiptsRoot": { + "type": "string", + "default": "", + "title": "The receiptsRoot Schema", + "examples": [ + "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2" + ] + }, + "sha3Uncles": { + "type": "string", + "default": "", + "title": "The sha3Uncles Schema", + "examples": [ + "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + ] + }, + "size": { + "type": "string", + "default": "", + "title": "The size Schema", + "examples": [ + "0x2d6" + ] + }, + "stateRoot": { + "type": "string", + "default": "", + "title": "The stateRoot Schema", + "examples": [ + "0xeba1e334bd0fdf754d339a5304613c48dbbe631b5bf28d179f8a5a90f93a0754" + ] + }, + "timestamp": { + "type": "string", + "default": "", + "title": "The timestamp Schema", + "examples": [ + "0x63923380" + ] + }, + "totalDifficulty": { + "type": "string", + "default": "", + "title": "The totalDifficulty Schema", + "examples": [ + "0x2b" + ] + }, + "transactions": { + "type": "array", + "default": [], + "title": "The transactions Schema", + "items": { + "type": "object", + "default": {}, + "title": "A Schema", + "required": [ + "blockHash", + "blockNumber", + "from", + "gas", + "gasPrice", + "hash", + "input", + "nonce", + "to", + "transactionIndex", + "value", + "type", + "chainId", + "v", + "r", + "s" + ], + "properties": { + "blockHash": { + "type": "string", + "default": "", + "title": "The blockHash Schema", + "examples": [ + "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8" + ] + }, + "blockNumber": { + "type": "string", + "default": "", + "title": "The blockNumber Schema", + "examples": [ + "0x15" + ] + }, + "from": { + "type": "string", + "default": "", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "gas": { + "type": "string", + "default": "", + "title": "The gas Schema", + "examples": [ + "0x5208" + ] + }, + "gasPrice": { + "type": "string", + "default": "", + "title": "The gasPrice Schema", + "examples": [ + "0x4cef575a" + ] + }, + "hash": { + "type": "string", + "default": "", + "title": "The hash Schema", + "examples": [ + "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb" + ] + }, + "input": { + "type": "string", + "default": "", + "title": "The input Schema", + "examples": [ + "0x" + ] + }, + "nonce": { + "type": "string", + "default": "", + "title": "The nonce Schema", + "examples": [ + "0x4e4" + ] + }, + "to": { + "type": "string", + "default": "", + "title": "The to Schema", + "examples": [ + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + ] + }, + "transactionIndex": { + "type": "string", + "default": "", + "title": "The transactionIndex Schema", + "examples": [ + "0x0" + ] + }, + "value": { + "type": "string", + "default": "", + "title": "The value Schema", + "examples": [ + "0x470de4df820000" + ] + }, + "type": { + "type": "string", + "default": "", + "title": "The type Schema", + "examples": [ + "0x0" + ] + }, + "chainId": { + "type": "string", + "default": "", + "title": "The chainId Schema", + "examples": [ + "0x539" + ] + }, + "v": { + "type": "string", + "default": "", + "title": "The v Schema", + "examples": [ + "0xa95" + ] + }, + "r": { + "type": "string", + "default": "", + "title": "The r Schema", + "examples": [ + "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea" + ] + }, + "s": { + "type": "string", + "default": "", + "title": "The s Schema", + "examples": [ + "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + ] + } + }, + "examples": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }] + }, + "examples": [ + [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }] + ] + }, + "transactionsRoot": { + "type": "string", + "default": "", + "title": "The transactionsRoot Schema", + "examples": [ + "0x54aa0318aa4c991c3c330b05c05280ee260ea8259185145337854a984ed67c8c" + ] + }, + "uncles": { + "type": "array", + "default": [], + "title": "The uncles Schema", + "items": {}, + "examples": [ + [] + ] + } + }, + "examples": [{ + "baseFeePerGas": "0x753e0ce", + "difficulty": "0x2", + "extraData": "0x000000000000000000000000000000000000000000000000000000000000000009d44257b81bceef40edd5647a0772e4101309e5029f4545ef0d18eeefecf4eb52196fcf7e47574a94f7bbd5c444531fedf589ead231daa0662589faa9881c7f00", + "gasLimit": "0xb31c0d", + "gasUsed": "0x5208", + "hash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x15", + "parentHash": "0x4e852717cc4505d2100a139e390e5df00762a87cbfb23c17bf1569703fddec95", + "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x2d6", + "stateRoot": "0xeba1e334bd0fdf754d339a5304613c48dbbe631b5bf28d179f8a5a90f93a0754", + "timestamp": "0x63923380", + "totalDifficulty": "0x2b", + "transactions": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }], + "transactionsRoot": "0x54aa0318aa4c991c3c330b05c05280ee260ea8259185145337854a984ed67c8c", + "uncles": [] + }] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": 11, + "result": { + "baseFeePerGas": "0x753e0ce", + "difficulty": "0x2", + "extraData": "0x000000000000000000000000000000000000000000000000000000000000000009d44257b81bceef40edd5647a0772e4101309e5029f4545ef0d18eeefecf4eb52196fcf7e47574a94f7bbd5c444531fedf589ead231daa0662589faa9881c7f00", + "gasLimit": "0xb31c0d", + "gasUsed": "0x5208", + "hash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x15", + "parentHash": "0x4e852717cc4505d2100a139e390e5df00762a87cbfb23c17bf1569703fddec95", + "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x2d6", + "stateRoot": "0xeba1e334bd0fdf754d339a5304613c48dbbe631b5bf28d179f8a5a90f93a0754", + "timestamp": "0x63923380", + "totalDifficulty": "0x2b", + "transactions": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }], + "transactionsRoot": "0x54aa0318aa4c991c3c330b05c05280ee260ea8259185145337854a984ed67c8c", + "uncles": [] + } + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getBlockByNumber.json b/api/schemas/eth_getBlockByNumber.json new file mode 100644 index 0000000..93e4c1f --- /dev/null +++ b/api/schemas/eth_getBlockByNumber.json @@ -0,0 +1,501 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": ["integer", "string"], + "default": 0, + "title": "The id Schema", + "examples": [ + 11 + ] + }, + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "baseFeePerGas", + "difficulty", + "extraData", + "gasLimit", + "gasUsed", + "hash", + "logsBloom", + "miner", + "mixHash", + "nonce", + "number", + "parentHash", + "receiptsRoot", + "sha3Uncles", + "size", + "stateRoot", + "timestamp", + "totalDifficulty", + "transactions", + "transactionsRoot", + "uncles" + ], + "properties": { + "baseFeePerGas": { + "type": "string", + "default": "", + "title": "The baseFeePerGas Schema", + "examples": [ + "0x753e0ce" + ] + }, + "difficulty": { + "type": "string", + "default": "", + "title": "The difficulty Schema", + "examples": [ + "0x2" + ] + }, + "extraData": { + "type": "string", + "default": "", + "title": "The extraData Schema", + "examples": [ + "0x000000000000000000000000000000000000000000000000000000000000000009d44257b81bceef40edd5647a0772e4101309e5029f4545ef0d18eeefecf4eb52196fcf7e47574a94f7bbd5c444531fedf589ead231daa0662589faa9881c7f00" + ] + }, + "gasLimit": { + "type": "string", + "default": "", + "title": "The gasLimit Schema", + "examples": [ + "0xb31c0d" + ] + }, + "gasUsed": { + "type": "string", + "default": "", + "title": "The gasUsed Schema", + "examples": [ + "0x5208" + ] + }, + "hash": { + "type": "string", + "default": "", + "title": "The hash Schema", + "examples": [ + "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8" + ] + }, + "logsBloom": { + "type": "string", + "default": "", + "title": "The logsBloom Schema", + "examples": [ + "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "miner": { + "type": "string", + "default": "", + "title": "The miner Schema", + "examples": [ + "0x0000000000000000000000000000000000000000" + ] + }, + "mixHash": { + "type": "string", + "default": "", + "title": "The mixHash Schema", + "examples": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "nonce": { + "type": "string", + "default": "", + "title": "The nonce Schema", + "examples": [ + "0x0000000000000000" + ] + }, + "number": { + "type": "string", + "default": "", + "title": "The number Schema", + "examples": [ + "0x15" + ] + }, + "parentHash": { + "type": "string", + "default": "", + "title": "The parentHash Schema", + "examples": [ + "0x4e852717cc4505d2100a139e390e5df00762a87cbfb23c17bf1569703fddec95" + ] + }, + "receiptsRoot": { + "type": "string", + "default": "", + "title": "The receiptsRoot Schema", + "examples": [ + "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2" + ] + }, + "sha3Uncles": { + "type": "string", + "default": "", + "title": "The sha3Uncles Schema", + "examples": [ + "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + ] + }, + "size": { + "type": "string", + "default": "", + "title": "The size Schema", + "examples": [ + "0x2d6" + ] + }, + "stateRoot": { + "type": "string", + "default": "", + "title": "The stateRoot Schema", + "examples": [ + "0xeba1e334bd0fdf754d339a5304613c48dbbe631b5bf28d179f8a5a90f93a0754" + ] + }, + "timestamp": { + "type": "string", + "default": "", + "title": "The timestamp Schema", + "examples": [ + "0x63923380" + ] + }, + "totalDifficulty": { + "type": "string", + "default": "", + "title": "The totalDifficulty Schema", + "examples": [ + "0x2b" + ] + }, + "transactions": { + "type": "array", + "default": [], + "title": "The transactions Schema", + "items": { + "type": "object", + "default": {}, + "title": "A Schema", + "required": [ + "blockHash", + "blockNumber", + "from", + "gas", + "gasPrice", + "hash", + "input", + "nonce", + "to", + "transactionIndex", + "value", + "type", + "chainId", + "v", + "r", + "s" + ], + "properties": { + "blockHash": { + "type": "string", + "default": "", + "title": "The blockHash Schema", + "examples": [ + "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8" + ] + }, + "blockNumber": { + "type": "string", + "default": "", + "title": "The blockNumber Schema", + "examples": [ + "0x15" + ] + }, + "from": { + "type": "string", + "default": "", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "gas": { + "type": "string", + "default": "", + "title": "The gas Schema", + "examples": [ + "0x5208" + ] + }, + "gasPrice": { + "type": "string", + "default": "", + "title": "The gasPrice Schema", + "examples": [ + "0x4cef575a" + ] + }, + "hash": { + "type": "string", + "default": "", + "title": "The hash Schema", + "examples": [ + "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb" + ] + }, + "input": { + "type": "string", + "default": "", + "title": "The input Schema", + "examples": [ + "0x" + ] + }, + "nonce": { + "type": "string", + "default": "", + "title": "The nonce Schema", + "examples": [ + "0x4e4" + ] + }, + "to": { + "type": "string", + "default": "", + "title": "The to Schema", + "examples": [ + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + ] + }, + "transactionIndex": { + "type": "string", + "default": "", + "title": "The transactionIndex Schema", + "examples": [ + "0x0" + ] + }, + "value": { + "type": "string", + "default": "", + "title": "The value Schema", + "examples": [ + "0x470de4df820000" + ] + }, + "type": { + "type": "string", + "default": "", + "title": "The type Schema", + "examples": [ + "0x0" + ] + }, + "chainId": { + "type": "string", + "default": "", + "title": "The chainId Schema", + "examples": [ + "0x539" + ] + }, + "v": { + "type": "string", + "default": "", + "title": "The v Schema", + "examples": [ + "0xa95" + ] + }, + "r": { + "type": "string", + "default": "", + "title": "The r Schema", + "examples": [ + "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea" + ] + }, + "s": { + "type": "string", + "default": "", + "title": "The s Schema", + "examples": [ + "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + ] + } + }, + "examples": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }] + }, + "examples": [ + [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }] + ] + }, + "transactionsRoot": { + "type": "string", + "default": "", + "title": "The transactionsRoot Schema", + "examples": [ + "0x54aa0318aa4c991c3c330b05c05280ee260ea8259185145337854a984ed67c8c" + ] + }, + "uncles": { + "type": "array", + "default": [], + "title": "The uncles Schema", + "items": {}, + "examples": [ + [] + ] + } + }, + "examples": [{ + "baseFeePerGas": "0x753e0ce", + "difficulty": "0x2", + "extraData": "0x000000000000000000000000000000000000000000000000000000000000000009d44257b81bceef40edd5647a0772e4101309e5029f4545ef0d18eeefecf4eb52196fcf7e47574a94f7bbd5c444531fedf589ead231daa0662589faa9881c7f00", + "gasLimit": "0xb31c0d", + "gasUsed": "0x5208", + "hash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x15", + "parentHash": "0x4e852717cc4505d2100a139e390e5df00762a87cbfb23c17bf1569703fddec95", + "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x2d6", + "stateRoot": "0xeba1e334bd0fdf754d339a5304613c48dbbe631b5bf28d179f8a5a90f93a0754", + "timestamp": "0x63923380", + "totalDifficulty": "0x2b", + "transactions": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }], + "transactionsRoot": "0x54aa0318aa4c991c3c330b05c05280ee260ea8259185145337854a984ed67c8c", + "uncles": [] + }] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": 11, + "result": { + "baseFeePerGas": "0x753e0ce", + "difficulty": "0x2", + "extraData": "0x000000000000000000000000000000000000000000000000000000000000000009d44257b81bceef40edd5647a0772e4101309e5029f4545ef0d18eeefecf4eb52196fcf7e47574a94f7bbd5c444531fedf589ead231daa0662589faa9881c7f00", + "gasLimit": "0xb31c0d", + "gasUsed": "0x5208", + "hash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x15", + "parentHash": "0x4e852717cc4505d2100a139e390e5df00762a87cbfb23c17bf1569703fddec95", + "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x2d6", + "stateRoot": "0xeba1e334bd0fdf754d339a5304613c48dbbe631b5bf28d179f8a5a90f93a0754", + "timestamp": "0x63923380", + "totalDifficulty": "0x2b", + "transactions": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }], + "transactionsRoot": "0x54aa0318aa4c991c3c330b05c05280ee260ea8259185145337854a984ed67c8c", + "uncles": [] + } + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getBlockReceipts.json b/api/schemas/eth_getBlockReceipts.json new file mode 100644 index 0000000..aec634a --- /dev/null +++ b/api/schemas/eth_getBlockReceipts.json @@ -0,0 +1,262 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "array", + "default": [], + "title": "The result Schema", + "items": { + "type": "object", + "title": "A Schema", + "required": [ + "blockHash", + "blockNumber", + "contractAddress", + "cumulativeGasUsed", + "effectiveGasPrice", + "from", + "gasUsed", + "logs", + "logsBloom", + "status", + "to", + "transactionHash", + "transactionIndex", + "type" + ], + "properties": { + "blockHash": { + "type": "string", + "title": "The blockHash Schema", + "examples": [ + "0xefc9ebd2f5be144f5c422584825406dd3c3b8eb26d4a0549481c4d79615365a8" + ] + }, + "blockNumber": { + "type": "string", + "title": "The blockNumber Schema", + "examples": [ + "0x16" + ] + }, + "contractAddress": { + "type": "null", + "title": "The contractAddress Schema", + "examples": [ + null + ] + }, + "cumulativeGasUsed": { + "type": "string", + "title": "The cumulativeGasUsed Schema", + "examples": [ + "0x5208", + "0xa410" + ] + }, + "effectiveGasPrice": { + "type": "string", + "title": "The effectiveGasPrice Schema", + "examples": [ + "0x189c0780" + ] + }, + "from": { + "type": "string", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "gasUsed": { + "type": "string", + "title": "The gasUsed Schema", + "examples": [ + "0x5208" + ] + }, + "logs": { + "type": "array", + "title": "The logs Schema", + "items": {}, + "examples": [ + [], + [] + ] + }, + "logsBloom": { + "type": "string", + "title": "The logsBloom Schema", + "examples": [ + "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "status": { + "type": "string", + "title": "The status Schema", + "examples": [ + "0x1" + ] + }, + "to": { + "type": "string", + "title": "The to Schema", + "examples": [ + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + ] + }, + "transactionHash": { + "type": "string", + "title": "The transactionHash Schema", + "examples": [ + "0x31346debde3be008f70fc9c9b4d0f98d845985cd401a2559e3c5546c0eff9fe1", + "0x3e4fa32673462677605f62741e5a76c6b74ea4666fae5bf8a6a8e371c6838370" + ] + }, + "transactionIndex": { + "type": "string", + "title": "The transactionIndex Schema", + "examples": [ + "0x0", + "0x1" + ] + }, + "type": { + "type": "string", + "title": "The type Schema", + "examples": [ + "0x0" + ] + } + }, + "examples": [{ + "blockHash": "0xefc9ebd2f5be144f5c422584825406dd3c3b8eb26d4a0549481c4d79615365a8", + "blockNumber": "0x16", + "contractAddress": null, + "cumulativeGasUsed": "0x5208", + "effectiveGasPrice": "0x189c0780", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionHash": "0x31346debde3be008f70fc9c9b4d0f98d845985cd401a2559e3c5546c0eff9fe1", + "transactionIndex": "0x0", + "type": "0x0" + }, + { + "blockHash": "0xefc9ebd2f5be144f5c422584825406dd3c3b8eb26d4a0549481c4d79615365a8", + "blockNumber": "0x16", + "contractAddress": null, + "cumulativeGasUsed": "0xa410", + "effectiveGasPrice": "0x189c0780", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionHash": "0x3e4fa32673462677605f62741e5a76c6b74ea4666fae5bf8a6a8e371c6838370", + "transactionIndex": "0x1", + "type": "0x0" + }] + }, + "examples": [ + [{ + "blockHash": "0xefc9ebd2f5be144f5c422584825406dd3c3b8eb26d4a0549481c4d79615365a8", + "blockNumber": "0x16", + "contractAddress": null, + "cumulativeGasUsed": "0x5208", + "effectiveGasPrice": "0x189c0780", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionHash": "0x31346debde3be008f70fc9c9b4d0f98d845985cd401a2559e3c5546c0eff9fe1", + "transactionIndex": "0x0", + "type": "0x0" + }, + { + "blockHash": "0xefc9ebd2f5be144f5c422584825406dd3c3b8eb26d4a0549481c4d79615365a8", + "blockNumber": "0x16", + "contractAddress": null, + "cumulativeGasUsed": "0xa410", + "effectiveGasPrice": "0x189c0780", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionHash": "0x3e4fa32673462677605f62741e5a76c6b74ea4666fae5bf8a6a8e371c6838370", + "transactionIndex": "0x1", + "type": "0x0" + }] + ] + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": [{ + "blockHash": "0xefc9ebd2f5be144f5c422584825406dd3c3b8eb26d4a0549481c4d79615365a8", + "blockNumber": "0x16", + "contractAddress": null, + "cumulativeGasUsed": "0x5208", + "effectiveGasPrice": "0x189c0780", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionHash": "0x31346debde3be008f70fc9c9b4d0f98d845985cd401a2559e3c5546c0eff9fe1", + "transactionIndex": "0x0", + "type": "0x0" + }, + { + "blockHash": "0xefc9ebd2f5be144f5c422584825406dd3c3b8eb26d4a0549481c4d79615365a8", + "blockNumber": "0x16", + "contractAddress": null, + "cumulativeGasUsed": "0xa410", + "effectiveGasPrice": "0x189c0780", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionHash": "0x3e4fa32673462677605f62741e5a76c6b74ea4666fae5bf8a6a8e371c6838370", + "transactionIndex": "0x1", + "type": "0x0" + }] + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getBlockTransactionCountByHash.json b/api/schemas/eth_getBlockTransactionCountByHash.json new file mode 100644 index 0000000..a5e345c --- /dev/null +++ b/api/schemas/eth_getBlockTransactionCountByHash.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x1" + ] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": "0x1" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getBlockTransactionCountByNumber.json b/api/schemas/eth_getBlockTransactionCountByNumber.json new file mode 100644 index 0000000..a5e345c --- /dev/null +++ b/api/schemas/eth_getBlockTransactionCountByNumber.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x1" + ] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": "0x1" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getLogs.json b/api/schemas/eth_getLogs.json new file mode 100644 index 0000000..42f8608 --- /dev/null +++ b/api/schemas/eth_getLogs.json @@ -0,0 +1,193 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "result": { + "type": "array", + "default": [], + "title": "The result Schema", + "items": { + "type": "object", + "default": {}, + "title": "A Schema", + "required": [ + "address", + "topics", + "data", + "blockNumber", + "transactionHash", + "transactionIndex", + "blockHash", + "logIndex", + "removed" + ], + "properties": { + "address": { + "type": "string", + "default": "", + "title": "The address Schema", + "examples": [ + "0x78bc89afcb4c804e5013948e63dabf055e6ac076" + ] + }, + "topics": { + "type": "array", + "default": [], + "title": "The topics Schema", + "items": { + "type": "string", + "title": "A Schema", + "examples": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e", + "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" + ] + }, + "examples": [ + ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e", + "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" + ] + ] + }, + "data": { + "type": "string", + "default": "", + "title": "The data Schema", + "examples": [ + "0x" + ] + }, + "blockNumber": { + "type": "string", + "default": "", + "title": "The blockNumber Schema", + "examples": [ + "0xe" + ] + }, + "transactionHash": { + "type": "string", + "default": "", + "title": "The transactionHash Schema", + "examples": [ + "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d" + ] + }, + "transactionIndex": { + "type": "string", + "default": "", + "title": "The transactionIndex Schema", + "examples": [ + "0x0" + ] + }, + "blockHash": { + "type": "string", + "default": "", + "title": "The blockHash Schema", + "examples": [ + "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5" + ] + }, + "logIndex": { + "type": "string", + "default": "", + "title": "The logIndex Schema", + "examples": [ + "0x0" + ] + }, + "removed": { + "type": "boolean", + "default": false, + "title": "The removed Schema", + "examples": [ + false + ] + } + }, + "examples": [{ + "address": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e", + "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" + ], + "data": "0x", + "blockNumber": "0xe", + "transactionHash": "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d", + "transactionIndex": "0x0", + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "logIndex": "0x0", + "removed": false + }] + }, + "examples": [ + [{ + "address": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e", + "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" + ], + "data": "0x", + "blockNumber": "0xe", + "transactionHash": "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d", + "transactionIndex": "0x0", + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "logIndex": "0x0", + "removed": false + }] + ] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": [{ + "address": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e", + "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" + ], + "data": "0x", + "blockNumber": "0xe", + "transactionHash": "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d", + "transactionIndex": "0x0", + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "logIndex": "0x0", + "removed": false + }] + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getStorageAt.json b/api/schemas/eth_getStorageAt.json new file mode 100644 index 0000000..288f2a2 --- /dev/null +++ b/api/schemas/eth_getStorageAt.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "minLength": 66 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x0000000000000000000000000000000000000000000000000000000000000000" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getTransactionByBlockHashAndIndex.json b/api/schemas/eth_getTransactionByBlockHashAndIndex.json new file mode 100644 index 0000000..bca3aad --- /dev/null +++ b/api/schemas/eth_getTransactionByBlockHashAndIndex.json @@ -0,0 +1,223 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "blockHash", + "blockNumber", + "from", + "gas", + "gasPrice", + "hash", + "input", + "nonce", + "to", + "transactionIndex", + "value", + "type", + "chainId", + "v", + "r", + "s" + ], + "properties": { + "blockHash": { + "type": "string", + "default": "", + "title": "The blockHash Schema", + "examples": [ + "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8" + ] + }, + "blockNumber": { + "type": "string", + "default": "", + "title": "The blockNumber Schema", + "examples": [ + "0x15" + ] + }, + "from": { + "type": "string", + "default": "", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "gas": { + "type": "string", + "default": "", + "title": "The gas Schema", + "examples": [ + "0x5208" + ] + }, + "gasPrice": { + "type": "string", + "default": "", + "title": "The gasPrice Schema", + "examples": [ + "0x4cef575a" + ] + }, + "hash": { + "type": "string", + "default": "", + "title": "The hash Schema", + "examples": [ + "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb" + ] + }, + "input": { + "type": "string", + "default": "", + "title": "The input Schema", + "examples": [ + "0x" + ] + }, + "nonce": { + "type": "string", + "default": "", + "title": "The nonce Schema", + "examples": [ + "0x4e4" + ] + }, + "to": { + "type": "string", + "default": "", + "title": "The to Schema", + "examples": [ + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + ] + }, + "transactionIndex": { + "type": "string", + "default": "", + "title": "The transactionIndex Schema", + "examples": [ + "0x0" + ] + }, + "value": { + "type": "string", + "default": "", + "title": "The value Schema", + "examples": [ + "0x470de4df820000" + ] + }, + "type": { + "type": "string", + "default": "", + "title": "The type Schema", + "examples": [ + "0x0" + ] + }, + "chainId": { + "type": "string", + "default": "", + "title": "The chainId Schema", + "examples": [ + "0x539" + ] + }, + "v": { + "type": "string", + "default": "", + "title": "The v Schema", + "examples": [ + "0xa95" + ] + }, + "r": { + "type": "string", + "default": "", + "title": "The r Schema", + "examples": [ + "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea" + ] + }, + "s": { + "type": "string", + "default": "", + "title": "The s Schema", + "examples": [ + "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + ] + } + }, + "examples": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": { + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + } + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getTransactionByBlockNumberAndIndex.json b/api/schemas/eth_getTransactionByBlockNumberAndIndex.json new file mode 100644 index 0000000..bca3aad --- /dev/null +++ b/api/schemas/eth_getTransactionByBlockNumberAndIndex.json @@ -0,0 +1,223 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "blockHash", + "blockNumber", + "from", + "gas", + "gasPrice", + "hash", + "input", + "nonce", + "to", + "transactionIndex", + "value", + "type", + "chainId", + "v", + "r", + "s" + ], + "properties": { + "blockHash": { + "type": "string", + "default": "", + "title": "The blockHash Schema", + "examples": [ + "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8" + ] + }, + "blockNumber": { + "type": "string", + "default": "", + "title": "The blockNumber Schema", + "examples": [ + "0x15" + ] + }, + "from": { + "type": "string", + "default": "", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "gas": { + "type": "string", + "default": "", + "title": "The gas Schema", + "examples": [ + "0x5208" + ] + }, + "gasPrice": { + "type": "string", + "default": "", + "title": "The gasPrice Schema", + "examples": [ + "0x4cef575a" + ] + }, + "hash": { + "type": "string", + "default": "", + "title": "The hash Schema", + "examples": [ + "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb" + ] + }, + "input": { + "type": "string", + "default": "", + "title": "The input Schema", + "examples": [ + "0x" + ] + }, + "nonce": { + "type": "string", + "default": "", + "title": "The nonce Schema", + "examples": [ + "0x4e4" + ] + }, + "to": { + "type": "string", + "default": "", + "title": "The to Schema", + "examples": [ + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + ] + }, + "transactionIndex": { + "type": "string", + "default": "", + "title": "The transactionIndex Schema", + "examples": [ + "0x0" + ] + }, + "value": { + "type": "string", + "default": "", + "title": "The value Schema", + "examples": [ + "0x470de4df820000" + ] + }, + "type": { + "type": "string", + "default": "", + "title": "The type Schema", + "examples": [ + "0x0" + ] + }, + "chainId": { + "type": "string", + "default": "", + "title": "The chainId Schema", + "examples": [ + "0x539" + ] + }, + "v": { + "type": "string", + "default": "", + "title": "The v Schema", + "examples": [ + "0xa95" + ] + }, + "r": { + "type": "string", + "default": "", + "title": "The r Schema", + "examples": [ + "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea" + ] + }, + "s": { + "type": "string", + "default": "", + "title": "The s Schema", + "examples": [ + "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + ] + } + }, + "examples": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": { + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + } + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getTransactionByHash.json b/api/schemas/eth_getTransactionByHash.json new file mode 100644 index 0000000..bca3aad --- /dev/null +++ b/api/schemas/eth_getTransactionByHash.json @@ -0,0 +1,223 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "result": { + "type": "object", + "default": {}, + "title": "The result Schema", + "required": [ + "blockHash", + "blockNumber", + "from", + "gas", + "gasPrice", + "hash", + "input", + "nonce", + "to", + "transactionIndex", + "value", + "type", + "chainId", + "v", + "r", + "s" + ], + "properties": { + "blockHash": { + "type": "string", + "default": "", + "title": "The blockHash Schema", + "examples": [ + "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8" + ] + }, + "blockNumber": { + "type": "string", + "default": "", + "title": "The blockNumber Schema", + "examples": [ + "0x15" + ] + }, + "from": { + "type": "string", + "default": "", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "gas": { + "type": "string", + "default": "", + "title": "The gas Schema", + "examples": [ + "0x5208" + ] + }, + "gasPrice": { + "type": "string", + "default": "", + "title": "The gasPrice Schema", + "examples": [ + "0x4cef575a" + ] + }, + "hash": { + "type": "string", + "default": "", + "title": "The hash Schema", + "examples": [ + "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb" + ] + }, + "input": { + "type": "string", + "default": "", + "title": "The input Schema", + "examples": [ + "0x" + ] + }, + "nonce": { + "type": "string", + "default": "", + "title": "The nonce Schema", + "examples": [ + "0x4e4" + ] + }, + "to": { + "type": "string", + "default": "", + "title": "The to Schema", + "examples": [ + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + ] + }, + "transactionIndex": { + "type": "string", + "default": "", + "title": "The transactionIndex Schema", + "examples": [ + "0x0" + ] + }, + "value": { + "type": "string", + "default": "", + "title": "The value Schema", + "examples": [ + "0x470de4df820000" + ] + }, + "type": { + "type": "string", + "default": "", + "title": "The type Schema", + "examples": [ + "0x0" + ] + }, + "chainId": { + "type": "string", + "default": "", + "title": "The chainId Schema", + "examples": [ + "0x539" + ] + }, + "v": { + "type": "string", + "default": "", + "title": "The v Schema", + "examples": [ + "0xa95" + ] + }, + "r": { + "type": "string", + "default": "", + "title": "The r Schema", + "examples": [ + "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea" + ] + }, + "s": { + "type": "string", + "default": "", + "title": "The s Schema", + "examples": [ + "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + ] + } + }, + "examples": [{ + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + }] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": { + "blockHash": "0x897eb052d78627992ffced3a69da797d0bb51c6704aa6ab6c831bbe0dd4232d8", + "blockNumber": "0x15", + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "gas": "0x5208", + "gasPrice": "0x4cef575a", + "hash": "0xd534261916dd41e4032185226eb44ba7d05057c8fa10955f19fffeb99a7f43cb", + "input": "0x", + "nonce": "0x4e4", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "transactionIndex": "0x0", + "value": "0x470de4df820000", + "type": "0x0", + "chainId": "0x539", + "v": "0xa95", + "r": "0xcbb16cd7069bc7e58c3c5095c00a557d9827ad36fb9a7a1d78e18b5aceb74aea", + "s": "0x55e0bb7333928b66637d816156e405dda026e2f460de532e266933d2b3eceac8" + } + }] +} \ No newline at end of file diff --git a/api/schemas/eth_getTransactionCount.json b/api/schemas/eth_getTransactionCount.json new file mode 100644 index 0000000..0dea122 --- /dev/null +++ b/api/schemas/eth_getTransactionCount.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x4fa" + ], + "minLength": 3 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x4fa" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_maxPriorityFeePerGas.json b/api/schemas/eth_maxPriorityFeePerGas.json new file mode 100644 index 0000000..d674dd4 --- /dev/null +++ b/api/schemas/eth_maxPriorityFeePerGas.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x114826b2" + ], + "minLength": 9 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x114826b2" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_newBlockFilter.json b/api/schemas/eth_newBlockFilter.json new file mode 100644 index 0000000..d7906e7 --- /dev/null +++ b/api/schemas/eth_newBlockFilter.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x0838db7c9a059e973c8831a83fedfec0defa37151e75fd811ddc32310606c77d" + ], + "minLength": 18 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x0838db7c9a059e973c8831a83fedfec0defa37151e75fd811ddc32310606c77d" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_newFilter.json b/api/schemas/eth_newFilter.json new file mode 100644 index 0000000..5a3cd16 --- /dev/null +++ b/api/schemas/eth_newFilter.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x2" + ], + "minLength": 3 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x2" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_newPendingTransactionFilter.json b/api/schemas/eth_newPendingTransactionFilter.json new file mode 100644 index 0000000..5a2a277 --- /dev/null +++ b/api/schemas/eth_newPendingTransactionFilter.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x21bbc0f75b853d20dd8b8517e4db75404a253fd00db244c6ef36e65c17b3b5eb" + ], + "minLength": 18 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x21bbc0f75b853d20dd8b8517e4db75404a253fd00db244c6ef36e65c17b3b5eb" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_protocolVersion.json b/api/schemas/eth_protocolVersion.json new file mode 100644 index 0000000..6d07a0e --- /dev/null +++ b/api/schemas/eth_protocolVersion.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "string", + "default": "", + "title": "The result Schema", + "examples": [ + "0x42" + ], + "minLength": 4 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": "0x42" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_signTypedData.json b/api/schemas/eth_signTypedData.json new file mode 100644 index 0000000..19a4838 --- /dev/null +++ b/api/schemas/eth_signTypedData.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "error", + "id", + "jsonrpc" + ], + "properties": { + "error": { + "type": "object", + "default": {}, + "title": "The error Schema", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "const": -32601, + "title": "The code Schema" + }, + "message": { + "type": "string", + "const": "the method eth_signTypedData does not exist/is not available", + "title": "The message Schema" + } + }, + "examples": [{ + "code": + -32601, + "message": "the method eth_signTypedData does not exist/is not available" + }] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + } + }, + "examples": [{ + "error": { + "code": + -32601, + "message": "the method eth_signTypedData does not exist/is not available" + }, + "id": "0x4d", + "jsonrpc": "2.0" + }] +} \ No newline at end of file diff --git a/api/schemas/eth_syncing.json b/api/schemas/eth_syncing.json new file mode 100644 index 0000000..5f460d2 --- /dev/null +++ b/api/schemas/eth_syncing.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "boolean", + "default": "", + "title": "The result Schema", + "examples": [ + false + ], + "minLength": 4 + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": false + }] +} \ No newline at end of file diff --git a/api/schemas/eth_uninstallFilter.json b/api/schemas/eth_uninstallFilter.json new file mode 100644 index 0000000..64ea046 --- /dev/null +++ b/api/schemas/eth_uninstallFilter.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "id", + "jsonrpc", + "result" + ], + "properties": { + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "result": { + "type": "boolean", + "default": false, + "title": "The result Schema", + "examples": [ + true + ] + } + }, + "examples": [{ + "id": "0x4d", + "jsonrpc": "2.0", + "result": true + }] +} \ No newline at end of file diff --git a/api/schemas/trace_block.json b/api/schemas/trace_block.json new file mode 100644 index 0000000..1255c1c --- /dev/null +++ b/api/schemas/trace_block.json @@ -0,0 +1,330 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://example.com/example.json", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "jsonrpc", + "id", + "result" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "", + "title": "The jsonrpc Schema", + "examples": [ + "2.0" + ] + }, + "id": { + "type": "string", + "default": "", + "title": "The id Schema", + "examples": [ + "0x4d" + ] + }, + "result": { + "type": "array", + "default": [], + "title": "The result Schema", + "items": { + "type": "object", + "title": "A Schema", + "required": [ + "action", + "blockHash", + "blockNumber", + "result", + "subtraces", + "traceAddress", + "type" + ], + "properties": { + "action": { + "type": "object", + "title": "The action Schema", + "properties": { + "from": { + "type": "string", + "default": "", + "title": "The from Schema", + "examples": [ + "0x67b1d87101671b127f5f8714789c7192f7ad340e" + ] + }, + "callType": { + "type": "string", + "default": "", + "title": "The callType Schema", + "examples": [ + "call" + ] + }, + "gas": { + "type": "string", + "default": "", + "title": "The gas Schema", + "examples": [ + "0x5b376c" + ] + }, + "input": { + "type": "string", + "default": "", + "title": "The input Schema", + "examples": [ + "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" + ] + }, + "to": { + "type": "string", + "default": "", + "title": "The to Schema", + "examples": [ + "0x78bc89afcb4c804e5013948e63dabf055e6ac076" + ] + }, + "value": { + "type": "string", + "title": "The value Schema", + "examples": [ + "0x0", + "0x1bc16d674ec80000" + ] + }, + "author": { + "type": "string", + "default": "", + "title": "The author Schema", + "examples": [ + "0x0000000000000000000000000000000000000000" + ] + }, + "rewardType": { + "type": "string", + "default": "", + "title": "The rewardType Schema", + "examples": [ + "block" + ] + } + }, + "examples": [{ + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "callType": "call", + "gas": "0x5b376c", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "value": "0x0" + }, + { + "author": "0x0000000000000000000000000000000000000000", + "rewardType": "block", + "value": "0x1bc16d674ec80000" + }] + }, + "blockHash": { + "type": "string", + "title": "The blockHash Schema", + "examples": [ + "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5" + ] + }, + "blockNumber": { + "type": "integer", + "title": "The blockNumber Schema", + "examples": [ + 14 + ] + }, + "result": { + "type": [ + "object", + "null" + ], + "title": "The result Schema", + "required": [ + "gasUsed", + "output" + ], + "properties": { + "gasUsed": { + "type": "string", + "default": "", + "title": "The gasUsed Schema", + "examples": [ + "0x95b3" + ] + }, + "output": { + "type": "string", + "default": "", + "title": "The output Schema", + "examples": [ + "0x" + ] + } + }, + "examples": [{ + "gasUsed": "0x95b3", + "output": "0x" + }, + null + ] + }, + "subtraces": { + "type": "integer", + "title": "The subtraces Schema", + "examples": [ + 0 + ] + }, + "traceAddress": { + "type": "array", + "title": "The traceAddress Schema", + "items": {}, + "examples": [ + [], + [] + ] + }, + "transactionHash": { + "type": "string", + "default": "", + "title": "The transactionHash Schema", + "examples": [ + "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d" + ] + }, + "transactionPosition": { + "type": "integer", + "default": 0, + "title": "The transactionPosition Schema", + "examples": [ + 0 + ] + }, + "type": { + "type": "string", + "title": "The type Schema", + "examples": [ + "call", + "reward" + ] + } + }, + "examples": [{ + "action": { + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "callType": "call", + "gas": "0x5b376c", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "value": "0x0" + }, + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "blockNumber": 14, + "result": { + "gasUsed": "0x95b3", + "output": "0x" + }, + "subtraces": 0, + "traceAddress": [], + "transactionHash": "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d", + "transactionPosition": 0, + "type": "call" + }, + { + "action": { + "author": "0x0000000000000000000000000000000000000000", + "rewardType": "block", + "value": "0x1bc16d674ec80000" + }, + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "blockNumber": 14, + "result": null, + "subtraces": 0, + "traceAddress": [], + "type": "reward" + }] + }, + "examples": [ + [{ + "action": { + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "callType": "call", + "gas": "0x5b376c", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "value": "0x0" + }, + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "blockNumber": 14, + "result": { + "gasUsed": "0x95b3", + "output": "0x" + }, + "subtraces": 0, + "traceAddress": [], + "transactionHash": "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d", + "transactionPosition": 0, + "type": "call" + }, + { + "action": { + "author": "0x0000000000000000000000000000000000000000", + "rewardType": "block", + "value": "0x1bc16d674ec80000" + }, + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "blockNumber": 14, + "result": null, + "subtraces": 0, + "traceAddress": [], + "type": "reward" + }] + ] + } + }, + "examples": [{ + "jsonrpc": "2.0", + "id": "0x4d", + "result": [{ + "action": { + "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", + "callType": "call", + "gas": "0x5b376c", + "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", + "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", + "value": "0x0" + }, + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "blockNumber": 14, + "result": { + "gasUsed": "0x95b3", + "output": "0x" + }, + "subtraces": 0, + "traceAddress": [], + "transactionHash": "0x893987db9ab8033c1f8d05fb256f979b62fc932ca5b09eec12ef9ddacf53776d", + "transactionPosition": 0, + "type": "call" + }, + { + "action": { + "author": "0x0000000000000000000000000000000000000000", + "rewardType": "block", + "value": "0x1bc16d674ec80000" + }, + "blockHash": "0xdb1662207b6c3f9114accdd5195d8e49cc1ea3fa27c8941827206d1a724850c5", + "blockNumber": 14, + "result": null, + "subtraces": 0, + "traceAddress": [], + "type": "reward" + }] + }] +} \ No newline at end of file diff --git a/tests/base_api_test_case.py b/tests/base_api_test_case.py index 63a3235..7646f36 100644 --- a/tests/base_api_test_case.py +++ b/tests/base_api_test_case.py @@ -1,5 +1,6 @@ import json import logging +import os.path import jsonschema import requests @@ -31,11 +32,7 @@ def post(self, request_id, method, params=None, session=None): logging.info(f"Got response:\n {response.content}") return response - def validate_schema(self, response, file_name): - path = f"{schema_path}/{file_name}.json" - with open(path, "r", encoding='utf-8') as schema: - # try: - response = response.json() - # except AttributeError: - # pass - jsonschema.validate(instance=response, schema=json.load(schema)) + @staticmethod + def validate_schema(response, file_name): + with open(os.path.join(schema_path, file_name + ".json"), "r", encoding='utf-8') as schema: + jsonschema.validate(instance=response.json(), schema=json.load(schema)) diff --git a/tests/test_api_requests.py b/tests/test_api_requests.py index 3fe8e8f..2724964 100644 --- a/tests/test_api_requests.py +++ b/tests/test_api_requests.py @@ -20,15 +20,28 @@ def get_block_info(): params=[hex(int(latest_block_number, 16) - i - 1), True], session=session ).json()["result"] - number = block_info["number"] + block_number = block_info["number"] + block_hash = block_info["hash"] try: to_address = block_info["transactions"][0]["to"] transaction_hash = block_info["transactions"][0]["hash"] - return number, to_address, transaction_hash + return block_number, block_hash, to_address, transaction_hash except IndexError: continue else: - return "latest", None, None + return "latest", None, None, None + + +def get_filter(): + try: + return BaseApiTestCase().post( + request_id=11, + method="eth_newPendingTransactionFilter", + params=[], + session=requests.Session() + ).json()["result"] + except KeyError: + return None class TestApiRequest(BaseApiTestCase): @@ -36,7 +49,8 @@ class TestApiRequest(BaseApiTestCase): @classmethod def setup_class(cls): super().setup_class() - cls.block_number, cls.to_address, cls.transaction_hash = get_block_info() + cls.block_number, cls.block_hash, cls.to_address, cls.transaction_hash = get_block_info() + cls.filter = get_filter() cls.test_data = { "debug_traceBlockByNumber": [ @@ -58,11 +72,90 @@ def setup_class(cls): ], "eth_getTransactionReceipt": [ cls.transaction_hash - ] + ], + "eth_getTransactionByHash": [ + cls.transaction_hash + ], + "trace_block": [cls.block_number], + "erigon_blockNumber": ["latest"], + "erigon_forks": [], + "eth_blockNumber": [], + "eth_chainId": [], + "eth_protocolVersion": [], + "eth_syncing": [], + "eth_gasPrice": [], + "eth_maxPriorityFeePerGas": [], + "eth_feeHistory": ["0x5", "latest", []], + "eth_getBlockByHash": [cls.block_hash, True], + "eth_getBlockByNumber": [cls.block_number, True], + "eth_getBlockTransactionCountByHash": [cls.block_hash], + "eth_getBlockTransactionCountByNumber": [cls.block_number], + "eth_getTransactionByBlockHashAndIndex": [cls.block_hash, "0x0"], + "eth_getTransactionByBlockNumberAndIndex": [cls.block_number, "0x0"], + "eth_getBlockReceipts": ["latest"], + "eth_call": [ + { + "from": '0x67b1d87101671b127f5f8714789C7192f7ad340e', + "to": '0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B' + }, + cls.block_number + ], + "eth_estimateGas": [ + { + "from": '0x67b1d87101671b127f5f8714789C7192f7ad340e', + "to": '0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B' + } + ], + "eth_getBalance": ['0x67b1d87101671b127f5f8714789C7192f7ad340e', 'latest'], + "eth_getTransactionCount": ['0x67b1d87101671b127f5f8714789C7192f7ad340e', 'latest'], + "eth_getStorageAt": ['0x67b1d87101671b127f5f8714789C7192f7ad340e', '0x0', 'latest'], + "eth_newFilter": [{"fromBlock": cls.block_number}], + "eth_newBlockFilter": [], + "eth_newPendingTransactionFilter": [], + "eth_uninstallFilter": [cls.filter], + "eth_getLogs": [{"fromBlock": cls.block_number}], + "eth_accounts": [], + "eth_signTypedData": [], + "eth_coinbase": [] + } @pytest.mark.api - @pytest.mark.parametrize("method", ("debug_traceBlockByNumber", "trace_filter", "eth_getTransactionReceipt")) + @pytest.mark.parametrize( + "method", ( + "debug_traceBlockByNumber", + "trace_filter", + "eth_getTransactionReceipt", + "trace_block", + "erigon_blockNumber", + "erigon_forks", + "eth_getTransactionByHash", + "eth_blockNumber", + "eth_chainId", + "eth_protocolVersion", + "eth_syncing", + "eth_gasPrice", + "eth_maxPriorityFeePerGas", + "eth_feeHistory", + "eth_getBlockByHash", + "eth_getBlockByNumber", + "eth_getBlockTransactionCountByHash", + "eth_getBlockTransactionCountByNumber", + "eth_call", + "eth_estimateGas", + "eth_getBalance", + "eth_getTransactionCount", + "eth_getStorageAt", + "eth_newFilter", + "eth_newBlockFilter", + "eth_newPendingTransactionFilter", + "eth_uninstallFilter", + "eth_getLogs", + "eth_accounts", + "eth_signTypedData", + "eth_coinbase" + ) + ) def test_api_response_validation(self, method): response = self.post(request_id=hex(77), method=method, params=self.test_data[method]) assert response.status_code == 200, f"Got {response.status_code}, {response}" From 4f8b5d9b8dc115338a93c54b0311a5cbbd8643f7 Mon Sep 17 00:00:00 2001 From: Yevheniia Berdnyk Date: Wed, 25 Jan 2023 02:11:02 +0200 Subject: [PATCH 2/3] updated schema --- api/schemas/debug_traceBlockByNumber.json | 168 ++++------------------ tests/test_api_requests.py | 1 - 2 files changed, 30 insertions(+), 139 deletions(-) diff --git a/api/schemas/debug_traceBlockByNumber.json b/api/schemas/debug_traceBlockByNumber.json index f7ee426..a7ca5a1 100644 --- a/api/schemas/debug_traceBlockByNumber.json +++ b/api/schemas/debug_traceBlockByNumber.json @@ -1,165 +1,57 @@ { - "$schema": "https://json-schema.org/schema", - "$id": "http://example.com/example.json", - "type": "object", - "default": {}, - "title": "Root Schema", - "required": [ - "jsonrpc", - "id", - "result" - ], + "$schema": "http://json-schema.org/schema#", "properties": { - "jsonrpc": { - "type": "string", - "default": "", - "title": "The jsonrpc Schema", - "examples": [ - "2.0" - ] - }, "id": { - "type": "string", - "default": "", - "title": "The id Schema", - "examples": [ - "0x4d" - ] + "type": "string" + }, + "jsonrpc": { + "type": "string" }, "result": { - "type": "array", - "default": [], - "title": "The result Schema", "items": { - "type": "object", - "default": {}, - "title": "A Schema", - "required": [ - "result" - ], "properties": { "result": { - "type": "object", - "default": {}, - "title": "The result Schema", - "required": [ - "from", - "gas", - "gasUsed", - "to", - "input", - "value", - "type" - ], "properties": { "from": { - "type": "string", - "default": "", - "title": "The from Schema", - "examples": [ - "0x67b1d87101671b127f5f8714789c7192f7ad340e" - ] + "type": "string" }, "gas": { - "type": "string", - "default": "", - "title": "The gas Schema", - "examples": [ - "0x5b376c" - ] + "type": "string" }, "gasUsed": { - "type": "string", - "default": "", - "title": "The gasUsed Schema", - "examples": [ - "0xd907" - ] - }, - "to": { - "type": "string", - "default": "", - "title": "The to Schema", - "examples": [ - "0x78bc89afcb4c804e5013948e63dabf055e6ac076" - ] + "type": "string" }, "input": { - "type": "string", - "default": "", - "title": "The input Schema", - "examples": [ - "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000" - ] + "type": "string" }, - "value": { - "type": "string", - "default": "", - "title": "The value Schema", - "examples": [ - "0x0" - ] + "output": { + "type": "string" + }, + "to": { + "type": "string" }, "type": { - "type": "string", - "default": "", - "title": "The type Schema", - "examples": [ - "CALL" - ] + "type": "string" + }, + "value": { + "type": "string" } }, - "examples": [{ - "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", - "gas": "0x5b376c", - "gasUsed": "0xd907", - "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", - "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", - "value": "0x0", - "type": "CALL" - }] + "type": "object" } }, - "examples": [{ - "result": { - "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", - "gas": "0x5b376c", - "gasUsed": "0xd907", - "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", - "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", - "value": "0x0", - "type": "CALL" - } - }] + "required": [ + "result" + ], + "type": "object" }, - "examples": [ - [{ - "result": { - "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", - "gas": "0x5b376c", - "gasUsed": "0xd907", - "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", - "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", - "value": "0x0", - "type": "CALL" - } - }] - ] + "type": "array" } }, - "examples": [{ - "jsonrpc": "2.0", - "id": "0x4d", - "result": [{ - "result": { - "from": "0x67b1d87101671b127f5f8714789c7192f7ad340e", - "gas": "0x5b376c", - "gasUsed": "0xd907", - "to": "0x78bc89afcb4c804e5013948e63dabf055e6ac076", - "input": "0x23b872dd00000000000000000000000067b1d87101671b127f5f8714789c7192f7ad340e000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000409f9cbc7c4a04c220000000", - "value": "0x0", - "type": "CALL" - } - }] - }] + "required": [ + "id", + "jsonrpc", + "result" + ], + "type": "object" } \ No newline at end of file diff --git a/tests/test_api_requests.py b/tests/test_api_requests.py index 2724964..6da2556 100644 --- a/tests/test_api_requests.py +++ b/tests/test_api_requests.py @@ -123,7 +123,6 @@ def setup_class(cls): @pytest.mark.api @pytest.mark.parametrize( "method", ( - "debug_traceBlockByNumber", "trace_filter", "eth_getTransactionReceipt", "trace_block", From 1b42d671eda72b433cfd0e29938d7c7c04d11ab6 Mon Sep 17 00:00:00 2001 From: Yevheniia Berdnyk Date: Fri, 27 Jan 2023 09:44:22 +0200 Subject: [PATCH 3/3] rolled back --- tests/test_api_requests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_api_requests.py b/tests/test_api_requests.py index 6da2556..2724964 100644 --- a/tests/test_api_requests.py +++ b/tests/test_api_requests.py @@ -123,6 +123,7 @@ def setup_class(cls): @pytest.mark.api @pytest.mark.parametrize( "method", ( + "debug_traceBlockByNumber", "trace_filter", "eth_getTransactionReceipt", "trace_block",