Closed m-Peter closed 2 weeks ago
The pull request introduces changes to the GetBlockReceipts
method in the BlockChainAPI
class, modifying its parameter and return types to enhance data representation. Additionally, a new test case is added to validate the functionality of retrieving block receipts and ensuring consistency with transaction receipts. These modifications aim to improve the API's usability and testing framework.
File | Change Summary |
---|---|
api/api.go |
Modified GetBlockReceipts method signature and return type, updated logic for transaction retrieval. |
tests/web3js/eth_non_interactive_test.js |
Added a test case to validate retrieval and consistency of block receipts and transaction receipts. |
Objective | Addressed | Explanation |
---|---|---|
Same datatype shouldn't have multiple representations (#531) | ❌ | The changes do not address the inconsistency in data representation. |
GetBlockReceipts
method's error handling are related to the modifications in the error handling logic for the GetBlockReceipts
method in this PR, which also aims to standardize error reporting across API methods.GetTransactionByHash
function may relate to the handling of block receipts and transactions.StorageReceiptV0
type could connect with how receipts are processed.CumulativeGasUsed
may relate to the handling of receipts and transactions.Improvement
, Testing
🐰 In the code where rabbits hop,
Changes made, we won't stop!
Receipts now in maps, so neat,
Testing flows, a joyful feat!
With every byte, we dance and play,
Enhancing APIs, hip-hip-hooray! 🎉
Closes: https://github.com/onflow/flow-evm-gateway/issues/531
Description
We were not using the
MarshalReceipt
method, which is used foreth_getTransactionReceipt
, and the various fields had inconsistent representations. The proper representation can be found in: https://docs.infura.io/api/networks/ethereum/json-rpc-methods/eth_getblockreceiptsFor contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
Summary by CodeRabbit
New Features
GetBlockReceipts
method to improve data representation and flexibility in API responses.Bug Fixes
GetBlockReceipts
method.