Skip to content

Add scenario access list support with placeholder resolution#588

Open
jelias2 wants to merge 1 commit into
flashbots:mainfrom
jelias2:jelias/access-list-with-placeholders
Open

Add scenario access list support with placeholder resolution#588
jelias2 wants to merge 1 commit into
flashbots:mainfrom
jelias2:jelias/access-list-with-placeholders

Conversation

@jelias2
Copy link
Copy Markdown

@jelias2 jelias2 commented May 29, 2026

Summary

Builds on #581 to address @zeroXbrock's reviewer feedback: allow {placeholder} strings in access list address and storageKeys.

PR #581 currently uses alloy's typed AccessListItem on both the loose and strict sides, which cannot hold placeholder strings during the loose-to-strict conversion phase. This PR:

  • Adds LooseAccessListItem { address: String, storage_keys: Vec<String> } on the loose side (keeps storageKeys camelCase from Add scenario access list support #581).
  • Keeps the strict side as alloy's typed AccessListItem (per @zeroXbrock's design).
  • Resolves placeholders in make_strict_call via the existing templater + DB-driven map, parsing into Address / B256.
  • Extends find_fncall_placeholders to scan access list strings so the DB lookup pre-populates referenced contract addresses.
  • openrpc.json regenerated by cli/build.rs.

Example

[[spam.tx.access_list]]
address = "{SpamMe5}"
storageKeys = [
    "{testkey1}",
    "{testkey2}",
]

Relationship to #581

This branch was built on top of #581 (scenario-access-list-support, head 6460cb4). 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 against main as the more flexible default — happy to retarget.

Tests

  • cargo +1.94 test -p contender_core access_list --lib — 3 passed
  • cargo +1.94 test -p contender_testfile --lib — 22 passed
  • cargo +1.94 fmt --check — clean
  • Two new placeholder tests added:
    • access_list_parses_placeholders_from_toml (contender_core)
    • parses_spam_tx_access_list_with_placeholders_toml (contender_testfile)
  • Release binary built and smoke-tested via an external benchmarker invocation against a real devnet for backwards compatibility.

Test plan

  • Unit tests in both crates pass
  • cargo fmt --check clean
  • Backwards compat: existing scenarios without access_list still build and broadcast correctly
  • Manual: scenarios with hard-coded address + storageKeys still work (no placeholder)
  • Manual: scenarios with {Contract} placeholder for address resolve correctly
  • Manual: scenarios with {slot} placeholder for storage keys resolve correctly
  • Reviewer test against an L2 with EIP-2930 enforcement

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).
@jelias2 jelias2 force-pushed the jelias/access-list-with-placeholders branch from 77f485b to 8cf063a Compare May 29, 2026 21:11
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.

1 participant