Closed rahul10puchd closed 2 years ago
This PR covers the following RPC methods: eth_getTransactionsByBlockNumber and eth_getTransactionReceiptsByBlockNumber
eth_getTransactionsByBlockNumber
eth_getTransactionReceiptsByBlockNumber
The main reason for this PR is that our partners requested us to support these RPC methods.
Examples are mocked up because we don't have a multiple transactions in the same block.
eth_getTransactionReceiptsByBlockNumber Request:
http post localhost:8545 jsonrpc=2.0 id=1 method=eth_getTransactionReceiptsByBlockNumber params:='["0x484be53"]'
Response:
{ "id": "1", "jsonrpc": "2.0", "result": [ { "blockHash": "0xf8d8f47ffc179ad75991aa98052db8b39216009a761062f1d7ea821e9fb08c08", "blockNumber": "0x483a621", "contractAddress": null, "cumulativeGasUsed": "0x0", "from": "0xecee8507d92b9ab9da0afbf794f1e6e137170899", "gasUsed": "0x7f0c", "logs": [], "logsBloom": "0x5c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c303030", "nearReceiptHash": null, "nearTransactionHash": null, "status": "0x1", "to": "0x230182ad3e21144cc091514b3ac0f5e94b8925a7", "transactionHash": "0x5be7cf824629122669d3aa8153abf84faf4bd58dc9726f6ac7ea84915c60e5c2", "transactionIndex": "0x0" }, { "blockHash": "0xf8d8f47ffc179ad75991aa98052db8b39216009a761062f1d7ea821e9fb08c08", "blockNumber": "0x483a621", "contractAddress": null, "cumulativeGasUsed": "0x0", "from": "0xecee8507d92b9ab9da0afbf794f1e6e137170899", "gasUsed": "0x7f0c", "logs": [], "logsBloom": "0x5c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c3030305c303030", "nearReceiptHash": null, "nearTransactionHash": null, "status": "0x1", "to": "0x230182ad3e21144cc091514b3ac0f5e94b8925a7", "transactionHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "transactionIndex": "0x1" } ] }
eth_getTransactionsByBlockNumber Request:
http post localhost:8545 jsonrpc=2.0 id=1 method=eth_getTransactionsByBlockNumber params:='["0x484be53"]'
{ "id": "1", "jsonrpc": "2.0", "result": [ { "blockHash": "0xf8d8f47ffc179ad75991aa98052db8b39216009a761062f1d7ea821e9fb08c08", "blockNumber": "0x483a621", "from": "0xecee8507d92b9ab9da0afbf794f1e6e137170899", "gas": "0xf4515", "gasPrice": "0x0", "hash": "0x5be7cf824629122669d3aa8153abf84faf4bd58dc9726f6ac7ea84915c60e5c2", "input": "0x7898e0c2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000431b4421e750000000000000000000000000000000000000000000000000000000061c0c21900000000000000000000000000000000000000000000000000000000000000074254432f55534400000000000000000000000000000000000000000000000000", "nonce": "0x110b", "r": "0xc85926d9a08b5e0635db6a50e86ac3a2ca271cbd47f68aad2a8ed54403c5c8d9", "s": "0x6b5f4ffcdde56b53c2b85b6f76bebc01e5dd86778496845c3fdc328adbb8f686", "to": "0x230182ad3e21144cc091514b3ac0f5e94b8925a7", "transactionIndex": "0x0", "v": "0x9c8a82ca", "value": "0x0" }, { "blockHash": "0xf8d8f47ffc179ad75991aa98052db8b39216009a761062f1d7ea821e9fb08c08", "blockNumber": "0x483a621", "from": "0xecee8507d92b9ab9da0afbf794f1e6e137170899", "gas": "0xf4515", "gasPrice": "0x0", "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "input": "0x7898e0c2000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000431b4421e750000000000000000000000000000000000000000000000000000000061c0c21900000000000000000000000000000000000000000000000000000000000000074254432f55534400000000000000000000000000000000000000000000000000", "nonce": "0x110b", "r": "0xc85926d9a08b5e0635db6a50e86ac3a2ca271cbd47f68aad2a8ed54403c5c8d9", "s": "0x6b5f4ffcdde56b53c2b85b6f76bebc01e5dd86778496845c3fdc328adbb8f686", "to": "0x230182ad3e21144cc091514b3ac0f5e94b8925a7", "transactionIndex": "0x1", "v": "0x9c8a82ca", "value": "0x0" } ] }
Ref: binance-chain#115
I am closing this PR as it outdated with the new updates of the relayer codebase. Please feel free to reopen it, if it is needed in the future.
Description
This PR covers the following RPC methods:
eth_getTransactionsByBlockNumber
andeth_getTransactionReceiptsByBlockNumber
Rational
The main reason for this PR is that our partners requested us to support these RPC methods.
Example
Examples are mocked up because we don't have a multiple transactions in the same block.
eth_getTransactionReceiptsByBlockNumber
Request:Response:
eth_getTransactionsByBlockNumber
Request:Response:
Ref: binance-chain#115