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

Add optimize_gas param for create_access_list #2789

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

imbenwolf
Copy link

Motivation

To override balances when simulating transactions, we need to figure out the access list for the balanceOf of a token

On Erigon, the gas is optimized so the access list returned is empty (which is different than geth). To get it anyway, we need to pass in an additional optimizeGas boolean flag for the eth_createAccessList call. Since geth is unavailable on Gnosis chain, we need to add the functionality of the PR to achieve the desired outcome.

More information: ledgerwatch/erigon#9444

Solution

This PR adds an optional optimize_gas (defaults to true) flag for the create_access_list method, that only gets applied if the node client is Erigon.

Please let me know if it's good or if I can improve anything!

PR Checklist

  • Added Tests --> (this is erigon/gnosis specific, shall i add a test provider? it's not available on infura so lmk)
  • Added Documentation --> (didn't find any documentation for create_access_list, so didn't extend it)
  • Breaking changes

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.

None yet

2 participants