Skip to content
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

Include chainId in transactions (support EIP-155) #1056

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

iamdefinitelyahuman
Copy link
Member

What I did

Include chainId when signing transactions to support EIP-155 replay protection.

Closes #1021

How I did it

  • Add a chain_id member to Web3 that calls eth_chainId upon first access and caches the result for subsequent requests
  • In LocalAccount._transfer, add chainId before signing the transaction

How to verify it

Run the test suite.

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.

Add support for EIP-155 (ChainID)
1 participant