Skip to content

fix: EIP1193 sendTransaction value input field is Hex, not BigInt #217

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

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

Drewsapple
Copy link
Contributor

Fix KernelEIP1193Provider's implementation of eth_sendTransaction where the value field was incorrectly processed. The value field in EIP-1193 is of type Hex, not BigInt as previously assumed.

This caused double hex encoding when values were passed through the provider. For example, an incoming transaction with value 1 ETH (already hex-encoded as "0xde0b6b3a7640000") was incorrectly treated as a string and re-encoded, resulting in the corrupted value "0x3078646530623662336137363430303030".

@SahilVasava
Copy link
Collaborator

Thanks for the PR @Drewsapple ! Merging 🙏

@SahilVasava SahilVasava merged commit 444e894 into zerodevapp:main Apr 7, 2025
5 checks passed
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.

2 participants