Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

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: erigontech/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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants