op-deployer: Support forking live chains #12918
Merged
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.
Integrates op-deployer with the forking functionality added in #11919. With this PR, op-deployer can successfully simulate transactions against a forked remote chain. This dramatically simplifies the deployment pipeline, since there's no need to re-inject state at every step or manually craft calldata during the OP Chain deployment step.
As part of this PR, I simplified how the implementations get set post-OP Chain deployment in the event an existing OPCM is used. I created a
ReadImplementationAddresses
script that pulls the implementations from the proxies in Solidity, then use the scripting functionality in Go to call the script. This eliminated the need to perform lots of RPC calls and manually decode the results.Since op-deployer supports deploying v1.6.0, I had to backport the
ReadImplementationAddresses
script to v1.6.0. You can see the diff between the base v1.6.0 release here. I gave it the tag op-contracts-v160-artifacts-read-implementations-backport so it can be easily found in the future. I also tagged the base v1.6.0 release as op-contracts-v160-artifacts-base for the same reason.Lastly, I updated the artifacts publishing script to include the Git commit the artifacts were generated from to make determining where a given artifacts bundle was generated from easier in the future.
Closes #12855.