Closed m-Peter closed 1 month ago
The changes enhance error handling and robustness in the Ethereum Web3 API by introducing validations for block numbers in the GetTransactionByBlockNumberAndIndex
and GetBlockTransactionCountByNumber
methods. These updates ensure the API smoothly manages scenarios with invalid or special block numbers. Additionally, new tests bolster coverage by validating transaction retrieval and count functionalities across various block identifiers.
File | Change Summary |
---|---|
api/api.go |
Enhanced error handling in transaction retrieval methods for block numbers; reformatted comments. |
tests/web3js/eth_non_interactive_test.js |
Added test suites for validating transaction counts and retrieval from blocks using diverse identifiers. |
Objective | Addressed | Explanation |
---|---|---|
Block tags are not supported for eth_getTransactionByBlockNumberAndIndex (#419) |
✅ | |
Block tags are not supported in eth_getBlockTransactionCountByNumber (#418) |
✅ |
🐇 In the meadow where bunnies play,
Changes make our code more spry and gay!
With robust checks for blocks so fine,
Transactions now dance in perfect line.
Hooray for tests that help us see,
Our API's strong as it can be! 🌼✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Closes: https://github.com/onflow/flow-evm-gateway/issues/419 Closes: https://github.com/onflow/flow-evm-gateway/issues/418
Description
The special block tags (
earliest
,latest
etc) were not supported for these endpoints:eth_getTransactionByBlockNumberAndIndex
eth_getBlockTransactionCountByNumber
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Tests