Skip to content

Conversation

@haythemsellami
Copy link
Member

@haythemsellami haythemsellami commented Nov 10, 2025

This PR introduce the eth_sendRawTransactionSync RPC endpoint.
For more details: https://eips.ethereum.org/EIPS/eip-7966

Closes https://github.com/category-labs/category-external/issues/119

@haythemsellami haythemsellami force-pushed the feat/eip-7966 branch 5 times, most recently from ed5dd9a to 6fb5486 Compare November 17, 2025 10:17
@haythemsellami haythemsellami marked this pull request as ready for review November 17, 2025 10:47
Copilot AI review requested due to automatic review settings November 17, 2025 10:47
Copilot finished reviewing on behalf of haythemsellami November 17, 2025 10:50
Copy link

Copilot AI left a 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_sendRawTransactionSync method that polls for transaction receipts with timeout support
  • Refactors eth_sendRawTransaction into 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.

@haythemsellami haythemsellami changed the title Feat: EIP7966 Feat: EIP-7966 Nov 19, 2025
@haythemsellami haythemsellami added this pull request to the merge queue Nov 21, 2025
Merged via the queue into master with commit 366e808 Nov 21, 2025
6 checks passed
@haythemsellami haythemsellami deleted the feat/eip-7966 branch November 21, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants