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

feat: eth_call state override for contract methods #1412

Merged
merged 3 commits into from
Jan 29, 2022

Conversation

banteg
Copy link
Collaborator

@banteg banteg commented Jan 28, 2022

  • fix: inconsistency between __call__ and call arguments in OverloadedMethod
  • feat: add state override support to contract calls
  • docs: add docs about eth_call override

What I did

Added basic support for state override feature of eth_call. It allows ephemerally changing the state of any addresses before call, including balance, nonce, code, storage slots.

How I did it

Added an optional override argument to ContractCall and to everything that plugs into it.

How to verify it

See example provided in the docs.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

@iamdefinitelyahuman iamdefinitelyahuman merged commit b460a76 into eth-brownie:master Jan 29, 2022
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