Skip to content
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

op-chain-ops: Forge scripts improvements #11577

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

protolambda
Copy link
Contributor

Description

This PR isolates the forge-scripts improvements from the interop devnet work.

Changes:

  • pull in updated op-geth, to pull in the core/vm: evm options to ignore max-bytecode-size and support caller overriding op-geth#366 change
  • Add WithPrecompileAtAddress to easily attach (and cleanup) precompiles
  • Add WithScript to easily attach (and cleanup) script contracts with bindings
  • Add ResetNonce cheatcode
  • Fix unintended contract bytecode byte-slice sharing
  • Fix the prank cheatcode:
    • The caller-override in the previous approach was not being applied early enough, causing contract-creation to result in a different address than expected. With the new geth EVM caller-override hook this is now much more trivial to get right.
    • Fix the startBroacast cheatcode to properly apply the caller prank
    • Isolate the prank code from the script-host code
  • Isolate state-dump cheatcode functionality as helper method, and improve it by cleaning up known script accounts.
  • Use the improved source-map utils for better debugging
  • Make precompile-overrides all use the same precompile-map, rather than having special cases for the cheatcode and console precompile.
  • Option on host to disable the EVM bytecode-size check, to run larger scripts.
  • A few script-host convenience methods, to do common things like calls, wiping an account, etc.

Depends on #11574

Tests

Existing script test covers the basic script functionality, other more finer forge-script behavior is covered through the deployment-test (coming with interop-devnet PR).

Metadata

Separated out of #11324

@protolambda protolambda requested a review from a team as a code owner August 22, 2024 22:38
@protolambda protolambda requested review from geoknee and axelKingsley and removed request for a team and geoknee August 22, 2024 22:38
Base automatically changed from srcmaps to develop August 23, 2024 03:00
@protolambda protolambda force-pushed the forge-scripts-improvements branch from 5293b30 to eecf8fc Compare August 23, 2024 03:38
@protolambda
Copy link
Contributor Author

Rebased on develop

@protolambda protolambda enabled auto-merge August 23, 2024 03:40
@protolambda protolambda added this pull request to the merge queue Aug 23, 2024
Merged via the queue into develop with commit 85d8c86 Aug 23, 2024
62 checks passed
@protolambda protolambda deleted the forge-scripts-improvements branch August 23, 2024 04:18
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
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.

2 participants