diff --git a/src/eth/block.yaml b/src/eth/block.yaml index 64e95fb7d..cfc6a1729 100644 --- a/src/eth/block.yaml +++ b/src/eth/block.yaml @@ -16,6 +16,48 @@ oneOf: - $ref: '#/components/schemas/notFound' - $ref: '#/components/schemas/Block' + examples: + - name: eth_getBlockByHash example + params: + - name: Block hash + value: '0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c' + - name: Hydrated transactions + value: false + result: + name: Block information + value: + number: '0x68b3' + hash: '0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c' + mixHash: '0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d' + parentHash: '0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d' + nonce: '0x378da40ff335b070' + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347' + logsBloom: '0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000' + transactionsRoot: '0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126' + stateRoot: '0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233' + receiptsRoot: '0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a' + miner: '0xb42b6c4a95406c78ff892d270ad20b22642e102d' + difficulty: '0x66e619a' + totalDifficulty: '0x1e875d746ae' + extraData: '0xd583010502846765746885676f312e37856c696e7578' + size: '0x334' + gasLimit: '0x47e7c4' + gasUsed: '0x37993' + timestamp: '0x5835c54d' + uncles: [] + transactions: + - '0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc' + - '0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d' + baseFeePerGas: '0x7' + withdrawalsRoot: '0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f' + withdrawals: + - index: '0x0' + validatorIndex: '0x9d8c0' + address: '0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f' + amount: '0x11a33e3760' + blobGasUsed: '0x0' + excessBlobGas: '0x0' + parentBeaconBlockRoot: '0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685' - name: eth_getBlockByNumber summary: Returns information about a block by number. params: @@ -34,6 +76,48 @@ oneOf: - $ref: '#/components/schemas/notFound' - $ref: '#/components/schemas/Block' + examples: + - name: eth_getBlockByNumber example + params: + - name: block + value: '0x68B3' + - name: Hydrated transactions + value: false + result: + name: Block information + value: + number: '0x68b3' + hash: '0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c' + mixHash: '0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d' + parentHash: '0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d' + nonce: '0x378da40ff335b070' + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347' + logsBloom: '0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000' + transactionsRoot: '0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126' + stateRoot: '0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233' + receiptsRoot: '0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a' + miner: '0xb42b6c4a95406c78ff892d270ad20b22642e102d' + difficulty: '0x66e619a' + totalDifficulty: '0x1e875d746ae' + extraData: '0xd583010502846765746885676f312e37856c696e7578' + size: '0x334' + gasLimit: '0x47e7c4' + gasUsed: '0x37993' + timestamp: '0x5835c54d' + uncles: [ ] + transactions: + - '0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc' + - '0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d' + baseFeePerGas: '0x7' + withdrawalsRoot: '0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f' + withdrawals: + - index: '0x0' + validatorIndex: '0x9d8c0' + address: '0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f' + amount: '0x11a33e3760' + blobGasUsed: '0x0' + excessBlobGas: '0x0' + parentBeaconBlockRoot: '0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685' - name: eth_getBlockTransactionCountByHash summary: Returns the number of transactions in a block from a block matching the given block hash. params: @@ -47,6 +131,14 @@ - $ref: '#/components/schemas/notFound' - title: Transaction count $ref: '#/components/schemas/uint' + examples: + - name: eth_getBlockTransactionCountByHash example + params: + - name: Block hash + value: '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238' + result: + name: Transaction count + value: '0x8' - name: eth_getBlockTransactionCountByNumber summary: Returns the number of transactions in a block matching the given block number. params: @@ -60,6 +152,14 @@ - $ref: '#/components/schemas/notFound' - title: Transaction count $ref: '#/components/schemas/uint' + examples: + - name: eth_getBlockTransactionCountByNumber example + params: + - name: Block + value: '0xe8' + result: + name: Transaction count + value: '0x8' - name: eth_getUncleCountByBlockHash summary: Returns the number of uncles in a block from a block matching the given block hash. params: @@ -73,6 +173,14 @@ - $ref: '#/components/schemas/notFound' - title: Uncle count $ref: '#/components/schemas/uint' + examples: + - name: eth_getUncleCountByBlockHash example + params: + - name: Block hash + value: '0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35' + result: + name: Uncle count + value: '0x1' - name: eth_getUncleCountByBlockNumber summary: Returns the number of transactions in a block matching the given block number. params: @@ -86,6 +194,14 @@ - $ref: '#/components/schemas/notFound' - title: Uncle count $ref: '#/components/schemas/uint' + examples: + - name: eth_getUncleCountByBlockNumber example + params: + - name: Block + value: '0xe8' + result: + name: Uncle count + value: '0x1' - name: eth_getBlockReceipts summary: Returns the receipts of a block by number or hash. params: @@ -102,3 +218,56 @@ type: array items: $ref: '#/components/schemas/ReceiptInfo' + examples: + - name: eth_getBlockReceipts example + params: + - name: Block + value: 'latest' + result: + name: Receipts information + value: + - blockHash: '0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182' + blockNumber: '0x6f55' + contractAddress: null + cumulativeGasUsed: '0x18c36' + from: '0x22896bfc68814bfd855b1a167255ee497006e730' + gasUsed: '0x18c36' + blobGasUsed: '0x20000' + effectiveGasPrice: '0x9502f907' + blobGasPrice: '0x32' + logs: + - address: '0xfd584430cafa2f451b4e2ebcf3986a21fff04350' + topics: + - '0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d' + - '0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8' + - '0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2' + - '0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730' + data: '0x' + blockNumber: '0x6f55' + transactionHash: '0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975' + transactionIndex: '0x0' + blockHash: '0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182' + logIndex: '0x0' + removed: false + logsBloom: '0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000' + status: '0x1' + to: '0xfd584430cafa2f451b4e2ebcf3986a21fff04350' + transactionHash: '0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975' + transactionIndex: '0x0' + type: '0x0' + - blockHash: '0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182' + blockNumber: '0x6f55' + contractAddress: null + cumulativeGasUsed: '0x1de3e' + from: '0x712e3a792c974b3e3dbe41229ad4290791c75a82' + gasUsed: '0x5208' + blobGasUsed: '0x20000' + effectiveGasPrice: '0x9502f907' + blobGasPrice: '0x32' + logs: [] + logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + status: '0x1' + to: '0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338' + transactionHash: '0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6' + transactionIndex: '0x1' + type: '0x2' diff --git a/src/eth/client.yaml b/src/eth/client.yaml index 0af6f83a2..416df4c0a 100644 --- a/src/eth/client.yaml +++ b/src/eth/client.yaml @@ -5,6 +5,12 @@ name: Chain ID schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_chainId example + params: [] + result: + name: Chain ID + value: '0x1' - name: eth_syncing summary: Returns an object with data about the sync status or false. params: [] @@ -12,6 +18,15 @@ name: Syncing status schema: $ref: '#/components/schemas/SyncingStatus' + examples: + - name: eth_syncing example + params: [] + result: + name: Syncing status + value: + startingBlock: '0x0' + currentBlock: '0x1518' + highestBlock: '0x9567a3' - name: eth_coinbase summary: Returns the client coinbase address. params: [] @@ -19,6 +34,12 @@ name: Coinbase address schema: $ref: '#/components/schemas/address' + examples: + - name: eth_coinbase example + params: [] + result: + name: Coinbase address + value: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73' - name: eth_accounts summary: Returns a list of addresses owned by client. params: [] @@ -29,6 +50,13 @@ type: array items: $ref: '#/components/schemas/address' + examples: + - name: eth_accounts example + params: [] + result: + name: Accounts + value: + - '0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0' - name: eth_blockNumber summary: Returns the number of most recent block. params: [] @@ -36,3 +64,9 @@ name: Block number schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_blockNumber example + params: [] + result: + name: Block number + value: '0x2377' diff --git a/src/eth/execute.yaml b/src/eth/execute.yaml index ed4b4a3af..0f7667aea 100644 --- a/src/eth/execute.yaml +++ b/src/eth/execute.yaml @@ -13,6 +13,18 @@ name: Return data schema: $ref: '#/components/schemas/bytes' + examples: + - name: eth_call example + params: + - name: Transaction + value: + to: '0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13' + value: '0x1' + - name: Block + value: 'latest' + result: + name: Return data + value: '0x' - name: eth_estimateGas summary: Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. params: @@ -28,6 +40,17 @@ name: Gas used schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_estimateGas example + params: + - name: Transaction + value: + from: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73' + to: '0x44aa93095d6749a706051658b970b941c72c1d53' + value: '0x1' + result: + name: Gas used + value: '0x5208' - name: eth_createAccessList summary: Generates an access list for a transaction. params: @@ -55,3 +78,20 @@ gasUsed: title: Gas used $ref: '#/components/schemas/uint' + examples: + - name: eth_createAccessList example + params: + - name: Transaction + value: + from: '0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63' + data: '0x608060806080608155' + - name: Block + value: 'latest' + result: + name: Gas used + value: + accessList: + - address: '0xa02457e5dfd32bda5fc7e1f1b008aa5979568150' + storageKeys: + - '0x0000000000000000000000000000000000000000000000000000000000000081' + gasUsed: '0x125f8' diff --git a/src/eth/fee_market.yaml b/src/eth/fee_market.yaml index 1ee5865bc..39b7b855e 100644 --- a/src/eth/fee_market.yaml +++ b/src/eth/fee_market.yaml @@ -6,6 +6,12 @@ schema: title: Gas price $ref: '#/components/schemas/uint' + examples: + - name: eth_gasPrice example + params: [] + result: + name: Gas price + value: '0x3e8' - name: eth_blobBaseFee summary: Returns the base fee per blob gas in wei. params: [] @@ -14,6 +20,12 @@ schema: title: Blob gas base fee $ref: '#/components/schemas/uint' + examples: + - name: eth_blobBaseFee example + params: [] + result: + name: Blob gas base fee + value: '0x3f5694c1f' - name: eth_maxPriorityFeePerGas summary: Returns the current maxPriorityFeePerGas per gas in wei. params: [] @@ -22,6 +34,12 @@ schema: title: Max priority fee per gas $ref: '#/components/schemas/uint' + examples: + - name: eth_maxPriorityFeePerGas example + params: [] + result: + name: Max priority fee per gas + value: '0x773c23ba' - name: eth_feeHistory summary: Transaction fee history description: Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range. @@ -47,7 +65,7 @@ description: Floating point value between 0 and 100. type: number result: - name: feeHistoryResult + name: Fee history result description: Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available. schema: title: feeHistoryResults @@ -99,3 +117,60 @@ title: rewardPercentile description: A given percentile sample of effective priority fees per gas from a single block in ascending order, weighted by gas used. Zeroes are returned if the block is empty. $ref: '#/components/schemas/uint' + examples: + - name: eth_feeHistory example + params: + - name: blockCount + value: '0x5' + - name: newestblock + value: 'latest' + - name: rewardPercentiles + value: + - 20 + - 30 + result: + name: Fee history result + value: + oldestblock: '0x10b52f' + baseFeePerGas: + - '0x3fa63a3f' + - '0x37f999ee' + - '0x3e36f20a' + - '0x4099f79a' + - '0x430d532d' + - '0x46fcd4a4' + baseFeePerBlobGas: + - '0x7b7609c19' + - '0x6dbe41789' + - '0x7223341d4' + - '0x6574a002c' + - '0x7223341d4' + - '0x6574a002c' + gasUsedRatio: + - 0.017712333333333333 + - 0.9458865666666667 + - 0.6534561 + - 0.6517375666666667 + - 0.7347769666666667 + blobGasUsedRatio: + - 0.0 + - 0.6666666666666666 + - 0.0 + - 1.0 + - 0.0 + reward: + - + - '0x3b9aca00' + - '0x59682f00' + - + - '0x3a13012' + - '0x3a13012' + - + - '0x3a13012' + - '0x3a13012' + - + - '0xf4240' + - '0xf4240' + - + - '0xf4240' + - '0xf4240' diff --git a/src/eth/filter.yaml b/src/eth/filter.yaml index 0138a4ee1..05477bb16 100644 --- a/src/eth/filter.yaml +++ b/src/eth/filter.yaml @@ -5,55 +5,143 @@ schema: $ref: '#/components/schemas/Filter' result: - name: Filter Identifier + name: Filter identifier schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_newFilter example + params: + - name: Filter + value: + fromBlock: '0x137d3c2' + toBlock: '0x137d3c3' + address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' + topics: [] + result: + name: Filter identifier + value: '0x01' - name: eth_newBlockFilter summary: Creates a filter in the node, to notify when a new block arrives. params: [] result: - name: Filter Identifier + name: Filter identifier schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_newBlockFilter example + params: [] + result: + name: Filter identifier + value: '0x01' - name: eth_newPendingTransactionFilter summary: Creates a filter in the node, to notify when new pending transactions arrive. params: [] result: - name: Filter Identifier + name: Filter identifier schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_newPendingTransactionFilter example + params: [] + result: + name: Filter identifier + value: '0x01' - name: eth_uninstallFilter summary: Uninstalls a filter with given id. params: - - name: Filter Identifier + - name: Filter identifier schema: $ref: '#/components/schemas/uint' result: name: Success schema: type: boolean + examples: + - name: eth_uninstallFilter example + params: + - name: Filter identifier + value: '0x01' + result: + name: Success + value: true - name: eth_getFilterChanges - summary: Polling method for a filter, which returns an array of logs which occurred since last poll. + summary: Polling method for the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since last poll. params: - - name: Filter Identifier + - name: Filter identifier schema: $ref: '#/components/schemas/uint' result: name: Log objects schema: $ref: '#/components/schemas/FilterResults' + examples: + - name: eth_getFilterChanges example + params: + - name: Filter identifier + value: '0x01' + result: + name: Log objects + value: + - logIndex: '0x0' + removed: false + blockNumber: '0x233' + blockHash: '0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5' + transactionHash: '0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d' + transactionIndex: '0x0' + address: '0x42699a7612a82f1d9c36148af9c77354759b210b' + data: '0x0000000000000000000000000000000000000000000000000000000000000004' + topics: + - '0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3' + - logIndex: '0x0' + removed: false + blockNumber: '0x238' + blockHash: '0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed' + transactionHash: '0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058' + transactionIndex: '0x0' + address: '0x42699a7612a82f1d9c36148af9c77354759b210b' + data: '0x0000000000000000000000000000000000000000000000000000000000000007' + topics: + - '0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3' - name: eth_getFilterLogs - summary: Returns an array of all logs matching filter with given id. + summary: Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`). params: - - name: Filter Identifier + - name: Filter identifier schema: $ref: '#/components/schemas/uint' result: name: Log objects schema: $ref: '#/components/schemas/FilterResults' + examples: + - name: eth_getFilterLogs example + params: + - name: Filter identifier + value: '0x01' + result: + name: Log objects + value: + - logIndex: '0x0' + removed: false + blockNumber: '0x233' + blockHash: '0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5' + transactionHash: '0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d' + transactionIndex: '0x0' + address: '0x42699a7612a82f1d9c36148af9c77354759b210b' + data: '0x0000000000000000000000000000000000000000000000000000000000000004' + topics: + - '0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3' + - logIndex: '0x0' + removed: false + blockNumber: '0x238' + blockHash: '0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed' + transactionHash: '0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058' + transactionIndex: '0x0' + address: '0x42699a7612a82f1d9c36148af9c77354759b210b' + data: '0x0000000000000000000000000000000000000000000000000000000000000007' + topics: + - '0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3' - name: eth_getLogs - summary: Returns an array of all logs matching filter with given id. + summary: Returns an array of all logs matching the specified filter. params: - name: Filter schema: @@ -62,3 +150,35 @@ name: Log objects schema: $ref: '#/components/schemas/FilterResults' + examples: + - name: eth_getLogs example + params: + - name: Filter + value: + fromBlock: '0x137d3c2' + toBlock: '0x137d3c3' + address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' + topics: [] + result: + name: Log objects + value: + - logIndex: '0x0' + removed: false + blockNumber: '0x233' + blockHash: '0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5' + transactionHash: '0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d' + transactionIndex: '0x0' + address: '0x42699a7612a82f1d9c36148af9c77354759b210b' + data: '0x0000000000000000000000000000000000000000000000000000000000000004' + topics: + - '0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3' + - logIndex: '0x0' + removed: false + blockNumber: '0x238' + blockHash: '0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed' + transactionHash: '0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058' + transactionIndex: '0x0' + address: '0x42699a7612a82f1d9c36148af9c77354759b210b' + data: '0x0000000000000000000000000000000000000000000000000000000000000007' + topics: + - '0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3' diff --git a/src/eth/sign.yaml b/src/eth/sign.yaml index 0d6f50d20..5ee2fa08d 100644 --- a/src/eth/sign.yaml +++ b/src/eth/sign.yaml @@ -13,6 +13,16 @@ name: Signature schema: $ref: '#/components/schemas/bytes65' + examples: + - name: eth_sign example + params: + - name: Address + value: '0x9b2055d370f73ec7d8a03e965129118dc8f5bf83' + - name: Message + value: '0xdeadbeaf' + result: + name: Signature + value: '0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b' - name: eth_signTransaction summary: Returns an RLP encoded transaction signed by the specified account. params: @@ -24,3 +34,17 @@ name: Encoded transaction schema: $ref: '#/components/schemas/bytes' + examples: + - name: eth_signTransaction example + params: + - name: Transaction + value: + data: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' + from: '0xb60e8dd61c5d32be8058bb8eb970870f07233155' + gas: '0x76c0' + gasPrice: '0x9184e72a000' + to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + value: '0x9184e72a' + result: + name: Encoded transaction + value: '0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b' diff --git a/src/eth/state.yaml b/src/eth/state.yaml index 2684e0ffc..f5eb9e034 100644 --- a/src/eth/state.yaml +++ b/src/eth/state.yaml @@ -13,6 +13,16 @@ name: Balance schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_getBalance example + params: + - name: Address + value: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73' + - name: Block + value: 'latest' + result: + name: Balance + value: '0x1cfe56f3795885980000' - name: eth_getStorageAt summary: Returns the value from a storage position at a given address. params: @@ -32,6 +42,18 @@ name: Value schema: $ref: '#/components/schemas/bytes' + examples: + - name: eth_getStorageAt example + params: + - name: Address + value: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73' + - name: Storage slot + value: '0x0' + - name: Block + value: 'latest' + result: + name: Value + value: '0x0000000000000000000000000000000000000000000000000000000000000000' - name: eth_getTransactionCount summary: Returns the number of transactions sent from an address. params: @@ -47,6 +69,16 @@ name: Transaction count schema: $ref: '#/components/schemas/uint' + examples: + - name: eth_getTransactionCount example + params: + - name: Address + value: '0xc94770007dda54cF92009BFF0dE90c06F603a09f' + - name: Block + value: 'latest' + result: + name: Transaction count + value: '0x1' - name: eth_getCode summary: Returns code at a given address. params: @@ -62,6 +94,16 @@ name: Bytecode schema: $ref: '#/components/schemas/bytes' + examples: + - name: eth_getCode example + params: + - name: Address + value: '0xa50a51c09a5c451c52bb714527e1974b686d8e77' + - name: Block + value: 'latest' + result: + name: Bytecode + value: '0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029' - name: eth_getProof summary: Returns the merkle proof for a given account and optionally some storage keys. params: @@ -84,3 +126,33 @@ name: Account schema: $ref: '#/components/schemas/AccountProof' + examples: + - name: eth_getProof example + params: + - name: Address + value: '0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8' + - name: StorageKeys + value: + - '0x56e81f' + - '0x283s34' + - name: Block + value: 'latest' + result: + name: Account + value: + accountProof: + - '0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280' + - '0xf90211a0d360be1e1da1a0c32bc4c105833bd531e59d110684007b7c50fb2709002973eca0cf6dd1e350a7031b4e2ab49c899fd8bd47551c8565d8fd8d1d7796c83820c3b1a0eb0a88c29bb33989a589156f7bf07d9efc74034dd9d3f5b73385c3b45c3249bea02783c25f97a6ddb8dc07adf4b176991836d39184b1f678adeda832fff15e3664a00a4e288060045e587774d8a64993a7add73068b16863145e1e8eeb4602e18e19a0340851f4046ad1298962d6e47d05c66329549c839c158748aaad7ae00b943aefa085b127bc2a3bd17604283de21b2b3c9aa8f1d4b7b85c94d8105a46fe32c77688a00f531d62b3c5435324c01009c284fe31277e8d38302b75ea01be89f09e205969a00011c8351c0e3d639ac54b9d3a59de630b16a67de8270d7d6064d0a67e93f9cca048780d32b7f2db88650b51c46f46fd0a68795edee1fd5ecee6eb3595741d9669a0c91afd74eaf8e08a997061a62b354e2516fdc494e8e26cc50ceeb8f4a175608ba0e2c07f1b48fab80eecb340f5882e8c7b32ee416e4045c61f1df646a133487303a01a1eff78435a7a29a29463bdc3486ae81364b00bea82ba0fdf67a110770f2261a04f2eb440ba71c72da5fd7f0e439018d6671dc809f747213a1ea755848124e994a074ff9f37fce99daa3ed01dd763076450022996fc729be2cc43c61ec5182c2366a0b80b36b7b621112592f52390b89748d422e9b1517c4b0203b8176a53f89d4a6680' + - '0xf90211a0b25f283bd01a8c8b2418049f9585bc37ff2c1e2e12eab4b7f64ae1f26647389aa02ad96c150d7c3c9c194d30315456852cf6a0a940e0191ae5d04007454823d4e9a0b220cf7a855e2dbcc0b973134e2e119b982d7d40dbb1b27d99816c41f40e829aa049224431da84cbf1b7ae813abcc9ef4c1dfc1760f6ddc5d57f7354bf3cbf6cc4a015191f879ac115b362f0257fd3eedb789537e836574a5b1abf1c9982ebe3bdfea07913c1b6e7282569d2d421e9fa2257f5d1698e93303bc49b941704287d7aaefea0a526576981ce6fd9f2bd48dd2ca6d5272f2fbdc85f0ee35a295f6ccd97ae8765a0313fad407f0c737c29024c02a890c4ecc12d7771c05ab7b435e5087a7cdef4d9a0d2044603cba9d4afdaf6fd2470e729ef3a65242de71276f20d59accfa6b53a7ca0457caacb9370c09b15f7d904adefd2308be94e23669ba5f43241ffff5f438a0aa09fb2dd45a383a0cc088a72b14117e1e9b7d6889218f3ac7631e8de644c5cb76da0c675dcd4d3fb692b514851c6106e2b09e6f5661d56a0a32ae02e2efc1515c235a074949a59ff1bdba87548510d6e404ec4532f4456dfdec8e753d92fda11a3088ba0a328c6ab1ab8f70db4d23e95bb163c13ba0c508f063a5b1393a4efd7ff375f05a0c722fe3ce796998269373cbb2fc229b2bdf2c43c6c2df003309422e043ce6c03a024e69343286eec44fa4744f6907209116e5383cff3fa98fe81ba06e7e8d4366680' + - '0xf90211a00e99ba2198124b8241ea304551fe973215829e2fbc0438d67922707a2a847432a0bb9ce24fd527879c5fe6dbbec1ef5a05ed9d1ca88e921d140bafbec1112f6a6aa099787fd6c7a1989229c4291ef5267335e66152ce417daea46e66d19cb6f81d1ca0e430ff4b8d5621baa5978673344e78b4d8b4df51431b6e63785267c98a24ce18a0bb3e91a825fe3d42ed270a93e9ad1aabd566c40cb28e622f7f1d7ee967c8afd6a0aa364b0056870c6507bc3262a5f851ecb13684088bdb13996d3cb2db401ce3ffa0a3732eba4c7a6e062665ab5be08acb986c3db87556fb138548cc900ff1e56995a026b088e90c9738b8ce16e853107a937a50d52726a24f9f6ce60f587762eb45a2a006c9d5bc3c064b5c1fb565bff91cace9161c64ae653a329610c1dcf34d434429a06c16df2edc70656d322d0c2403bad7d45bc790ffc3e7adeef856d98ea6afc91ba0ae05ed5d6c34b5da29c2e94d7880aeba0906f95f4ec10b132a1d4766a0701c98a01470a86aa350d1ada0c082eac75de828a851f9c8c7c4aa49b1556fe3a5574966a0334eef025100a6da1033710dd98e0475f29d3d7e397caf618ca71c336c5f4f49a0ef0b3abbebcff34d6a8a8f5cdbfbd154ab3452b58dcb09de58ec983644963675a041857e865ec38e200a13bc1a3cb71c7d69aeef7ffdee8be515c9a5b691ce091fa059edd0eb3bbec36bbf38a19802d4646c00ba821ab55fdeea12e15bab62c4e1e580' + - '0xf90211a0af0c7fa65ffcb84c31e68c1cf00e1a20bf8bb497c39883e19b66a99975b03431a0c492cab3623eb7926069794c3c718733e16c5fd0d4a13fb7c752ee9809aac7ada05003cea7132aa70d6f36731d60640a90bcd8f4fd493e4540d5ab1b4943679c0ca0fd700683405b1d2306b586dd3b5b2f92f1692fae20d17cd8b8e59d09b9c6670da01db8683910e46e56e8afeb9fe2b7c35382e5a0914d7b0dd8f0e8cb9981ba7435a0fa7f75d73aa73c35824387bec81388315caa4aee3f4f5562f971beb256c62d49a0ee478e420d83f413e8568dacfd5d83f83a5dd7c45f494b504828e5dc962f0e3ea094b95444a917ac94a675681f6bf851172ad0969801a783a63a71edafed45e7a7a0a0c46586e109abe80fe50361dd582e3f143cb416828239faa43bb2b890869501a0ae051d5d43634c68bf9c97823256cc68580f194dfdbd0c301140c7ca5853430ca0660b9365bb77ec9cdc6eb95516c162dca20727c6f828dbbeb1ae110dde4d3134a09feb1b75e84ff6722e4d837bfb6d207b6ee3b21b86844a01140ce293813b49a1a0ed58a70b04efa3bdc0babe2abfa20824a75d61d52291bfdb5cf08597800764d6a020a2d5d3a83f9e35ad9fd1c448626d90af0eb3efefaa4f2f93207b4096ef5507a0fc8efc4484dcf0a54f0574de9aaade0dcff6ec3599edb9f82efb26b6566dcaeaa032f7e79856db3fd984f72bb2c93d4dab328198d355a61c975fab1f08bdb2046580' + balance: '0x0' + codeHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470' + nonce: '0x0' + storageHash: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421' + storageProof: + - key: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421' + proof: + - '0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280' + - '0xf90191a0f0c5b800b542001597f2b7a8e106ac0e2849d2cc1df1727ac35c4ea3965f1c9180a08537f2e248702a6ae2a57e9110a5740f5772c876389739ac90debd6a0692713ea00b3a26a05b5494fb3ff6f0b3897688a5581066b20b07ebab9252d169d928717fa0a9a54d84976d134d6dba06a65064c7f3a964a75947d452db6f6bb4b6c47b43aaa01e2a1ed3d1572b872bbf09ee44d2ed737da31f01de3c0f4b4e1f046740066461a076f251d160b9a02eb0b5c1d83b61c9cdd4f37361705e79a45529bf49801fb824a0774a01a624cb14a50d17f2fe4b7ae6af8a67bbb029177ccc3dd729a734484d3ea05921b8a19aebe4fff5a36071e311778f9b93459183fdf7f6d870b401fa25dcbba0c8d71dd13d2806e2865a5c2cfa447f626471bf0b66182a8fd07230434e1cad2680a0e9864fdfaf3693b2602f56cd938ccd494b8634b1f91800ef02203a3609ca4c21a0c69d174ad6b6e58b0bd05914352839ec60915cd066dd2bee2a48016139687f21a0513dd5514fd6bad56871711441d38de2821cc6913cb192416b0385f025650731808080' + value: '0x1' diff --git a/src/eth/submit.yaml b/src/eth/submit.yaml index eec5b1d78..e88ce2d27 100644 --- a/src/eth/submit.yaml +++ b/src/eth/submit.yaml @@ -9,9 +9,26 @@ name: Transaction hash schema: $ref: '#/components/schemas/hash32' + examples: + - name: eth_sendTransaction example + params: + - name: Transaction + value: + from: '0xb60e8dd61c5d32be8058bb8eb970870f07233155' + to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567' + gas: '0x76c0' + gasPrice: '0x9184e72a000' + value: '0x9184e72a' + input: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675' + result: + name: Transaction hash + value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' - name: eth_sendRawTransaction - summary: Submits a raw transaction. For EIP-4844 transactions, the raw form - must be the network form. This means it includes the blobs, KZG + summary: Submits a raw transaction. You can create and sign a transaction + externally using a library such as [web3.js](https://web3js.readthedocs.io/) + or [ethers.js](https://docs.ethers.org/). For + [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw + form must be the network form. This means it includes the blobs, KZG commitments, and KZG proofs. params: - name: Transaction @@ -22,3 +39,11 @@ name: Transaction hash schema: $ref: '#/components/schemas/hash32' + examples: + - name: eth_sendRawTransaction example + params: + - name: Transaction + value: '0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833' + result: + name: Transaction hash + value: '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331' diff --git a/src/eth/transaction.yaml b/src/eth/transaction.yaml index 3beee7250..503dc4b1b 100644 --- a/src/eth/transaction.yaml +++ b/src/eth/transaction.yaml @@ -11,6 +11,29 @@ oneOf: - $ref: '#/components/schemas/notFound' - $ref: '#/components/schemas/TransactionInfo' + examples: + - name: eth_getTransactionByHash example + params: + - name: Transaction hash + value: '0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44' + result: + name: Transaction information + value: + blockHash: '0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda' + blockNumber: '0x422' + chainId: 2018 + from: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73' + gas: '0x5208' + gasPrice: '0x3b9aca00' + hash: '0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44' + input: '0x' + nonce: '0x1' + to: '0x627306090abab3a6e1400e9345bc60c78a8bef57' + transactionIndex: '0x0' + value: '0x4e1003b28d9280000' + v: '0xfe7' + r: '0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3' + s: '0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9' - name: eth_getTransactionByBlockHashAndIndex summary: Returns information about a transaction by block hash and transaction index position. params: @@ -28,6 +51,31 @@ oneOf: - $ref: '#/components/schemas/notFound' - $ref: '#/components/schemas/TransactionInfo' + examples: + - name: eth_getTransactionByBlockHashAndIndex example + params: + - name: Block hash + value: '0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7' + - name: Transaction index + value: '0x2' + result: + name: Transaction information + value: + blockHash: '0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda' + blockNumber: '0x422' + chainId: 2018 + from: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73' + gas: '0x5208' + gasPrice: '0x3b9aca00' + hash: '0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44' + input: '0x' + nonce: '0x1' + to: '0x627306090abab3a6e1400e9345bc60c78a8bef57' + transactionIndex: '0x0' + value: '0x4e1003b28d9280000' + v: '0xfe7' + r: '0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3' + s: '0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9' - name: eth_getTransactionByBlockNumberAndIndex summary: Returns information about a transaction by block number and transaction index position. params: @@ -45,6 +93,31 @@ oneOf: - $ref: '#/components/schemas/notFound' - $ref: '#/components/schemas/TransactionInfo' + examples: + - name: eth_getTransactionByBlockNumberAndIndex example + params: + - name: Block + value: '0x1442e' + - name: Transaction index + value: '0x2' + result: + name: Transaction information + value: + blockHash: '0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda' + blockNumber: '0x422' + chainId: 2018 + from: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73' + gas: '0x5208' + gasPrice: '0x3b9aca00' + hash: '0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44' + input: '0x' + nonce: '0x1' + to: '0x627306090abab3a6e1400e9345bc60c78a8bef57' + transactionIndex: '0x0' + value: '0x4e1003b28d9280000' + v: '0xfe7' + r: '0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3' + s: '0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9' - name: eth_getTransactionReceipt summary: Returns the receipt of a transaction by transaction hash. params: @@ -58,3 +131,26 @@ oneOf: - $ref: '#/components/schemas/notFound' - $ref: '#/components/schemas/ReceiptInfo' + examples: + - name: eth_getTransactionReceipt example + params: + - name: Transaction hash + value: '0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f' + result: + name: Receipt information + value: + blockHash: '0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a' + blockNumber: '0x50' + contractAddress: null + cumulativeGasUsed: '0x5208' + from: '0x627306090abab3a6e1400e9345bc60c78a8bef57' + gasUsed: '0x5208' + blobGasUsed: '0x20000' + effectiveGasPrice: '0x1' + blobGasPrice: '0x3' + logs: [] + logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + status: '0x1' + to: '0xf17f52151ebef6c7334fad080c5704d77216b732' + transactionHash: '0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3' + transactionIndex: '0x0' diff --git a/wordlist.txt b/wordlist.txt index 033edc2d2..0b92fb003 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -16,6 +16,7 @@ ethereumjs erigon getclientversionv interop +js json mempool merkle @@ -41,6 +42,8 @@ validator wei yaml yParity +eips +EIPS EL CL CLs