-
Notifications
You must be signed in to change notification settings - Fork 303
Feat: EIP-7966 #2542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: EIP-7966 #2542
Conversation
3604b28 to
ad8a0a4
Compare
ed5dd9a to
6fb5486
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements EIP-7966 by introducing the eth_sendRawTransactionSync RPC endpoint, which submits a transaction and synchronously waits for its receipt with a configurable timeout. The implementation refactors the existing transaction submission logic into reusable helper functions and adds EIP-7966-specific error codes (4 for timeout, 5 for unready transactions).
Key Changes:
- Adds
eth_sendRawTransactionSyncmethod that polls for transaction receipts with timeout support - Refactors
eth_sendRawTransactioninto modular functions (validate_and_decode_tx,submit_to_txpool) for code reuse - Introduces configurable timeout parameters (default: 2s, max: 10s) with CLI arguments
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| monad-rpc/src/handlers/eth/txn.rs | Core implementation: adds monad_eth_sendRawTransactionSync with polling logic, refactors transaction validation/submission into helper functions, includes basic validation tests |
| monad-rpc/src/jsonrpc.rs | Adds EIP-7966 error constructors: tx_sync_timeout() (code 4) and tx_sync_unready() (code 5) |
| monad-rpc/src/handlers/mod.rs | Registers new eth_sendRawTransactionSync method and wires it to the handler |
| monad-rpc/src/handlers/resources.rs | Adds timeout configuration fields to MonadRpcResources struct and constructor |
| monad-rpc/src/cli.rs | Adds CLI arguments for default (2000ms) and max (10000ms) timeout configuration |
| monad-rpc/src/main.rs | Passes timeout configuration parameters to resources in main and test setup |
| monad-rpc/src/websocket/handler.rs | Updates test configuration with timeout parameter values |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
78a15b7 to
3a6f194
Compare
3a6f194 to
03af2c8
Compare
This PR introduce the
eth_sendRawTransactionSyncRPC endpoint.For more details: https://eips.ethereum.org/EIPS/eip-7966
Closes https://github.com/category-labs/category-external/issues/119