Add scenario access list support with placeholder resolution#588
Open
jelias2 wants to merge 1 commit into
Open
Add scenario access list support with placeholder resolution#588jelias2 wants to merge 1 commit into
jelias2 wants to merge 1 commit into
Conversation
7 tasks
Supersedes flashbots#581. Adds an `access_list` field to FunctionCallDefinition that accepts {placeholder} strings in `address` and `storageKeys`, resolved during the loose-to-strict conversion via the existing templater + DB map. Coexists with max_priority_fee_per_gas (flashbots#580) and alloy 2.0 (flashbots#561).
77f485b to
8cf063a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on #581 to address @zeroXbrock's reviewer feedback: allow
{placeholder}strings in access listaddressandstorageKeys.PR #581 currently uses alloy's typed
AccessListItemon both the loose and strict sides, which cannot hold placeholder strings during the loose-to-strict conversion phase. This PR:LooseAccessListItem { address: String, storage_keys: Vec<String> }on the loose side (keepsstorageKeyscamelCase from Add scenario access list support #581).AccessListItem(per @zeroXbrock's design).make_strict_callvia the existing templater + DB-driven map, parsing intoAddress/B256.find_fncall_placeholdersto scan access list strings so the DB lookup pre-populates referenced contract addresses.openrpc.jsonregenerated bycli/build.rs.Example
Relationship to #581
This branch was built on top of #581 (
scenario-access-list-support, head6460cb4). If #581 is the preferred merge vehicle, this PR could be re-targeted at karlfloersch's branch so the placeholder support lands inside the existing review thread. Filing here againstmainas the more flexible default — happy to retarget.Tests
cargo +1.94 test -p contender_core access_list --lib— 3 passedcargo +1.94 test -p contender_testfile --lib— 22 passedcargo +1.94 fmt --check— cleanaccess_list_parses_placeholders_from_toml(contender_core)parses_spam_tx_access_list_with_placeholders_toml(contender_testfile)Test plan
cargo fmt --checkcleanaccess_liststill build and broadcast correctly{Contract}placeholder for address resolve correctly{slot}placeholder for storage keys resolve correctly