Apply access list to tracing executor for 'cast call --trace' by svenski123 · Pull Request #10161 · foundry-rs/foundry (original) (raw)

Motivation

Specifying an access list via the --access-list command line option did not show any change in gas cost in cast call --trace, whereas with cast call without tracing and cast send the expected gas cost changes were observed.

On closer inspection, it became apparent that the --trace option to cast call actually caused the command to spawn an internal forked EVM to run the transaction, and the access list wasn't configured in the tracing EVM.

Solution

Set the access list in the executor's environment.

PR Checklist