Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(transaction-request): Support HEX TransactionRequest.chain_id #344

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

kustrun
Copy link
Contributor

@kustrun kustrun commented Mar 20, 2024

Support HEX TransactionRequest.chain_id` as per Ethereum JSON-RPC specification.

Motivation

While switching between node clients (GETH and RETH) there was an inconsistency in the TransactionRequest.chain_id implementation.

To support the behavior, specified in Ethereum JSON-RPC specification the chain_id serialization was extended to support
hex input.

Specs: https://ethereum.github.io/execution-apis/api-documentation/
image

Solution

Reuse custom serializer, already implemented for nonce field to support hex input for chain_id field.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@onbjerg onbjerg added the bug Something isn't working label Mar 20, 2024
@prestwich prestwich merged commit 15529a4 into alloy-rs:main Mar 20, 2024
16 checks passed
kien-rise added a commit to kien-rise/alloy that referenced this pull request Mar 29, 2024
…n_id as per Ethereum JSON-RPC specification. (alloy-rs#344)"

This reverts commit 15529a4.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants