-
Notifications
You must be signed in to change notification settings - Fork 152
fix: Access list not being taken into account in the shared balance simulator #3749 #3755
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
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
jmg-duarte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution and good job digging in to notice the eth_ call for the access list in the inner part of the code.
| query: &Query, | ||
| amount: Option<U256>, | ||
| ) -> std::result::Result<crate::account_balances::Simulation, SimulationError> { | ||
| let should_add_access_list = !query.interactions.is_empty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the method name misleading.
You can push this is out of the method and turn it into a parameter for better readability
| } | ||
|
|
||
| async fn fetch_access_list( | ||
| web3: Web3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that at this point you'd be better off using the .alloy from our Web3 type, it will provide you with a better API and most likely better tests too
|
Thank you for your contribution. Please take into account that not all chains currently support access lists. We have a config for that: #3549 |
|
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
|
Closed due to inactivity |
Description
1/ Added a shared balance simulation helper that generates access lists via eth_createAccessList and applies them to the settlement delegate call when pre-interactions are present, ensuring storage warm-up is mirrored in simulations.
2/ Reused the helper in both simulated balance retrieval and transfer validation so access lists consistently influence tradable balance checks.
3/ Added comprehensive unit tests around balance simulation access list handling, covering call serialization, RPC responses, and builder helpers to ensure eth_createAccessList requests are formed as expected.
4/ Exercised apply_access_list with non-empty, empty, and error responses to confirm only valid access lists modify the delegate call configuration.
Changes
How to test
cargo testRelated Issues
Fixes #3749