Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/contracts-bedrock/test/setup/ForkLive.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ contract ForkLive is Deployer {
/// 2. deploying the updated OPCM and implementations of the contracts.
/// 3. upgrading the system using the OPCM.upgrade() function.
function run() public {
if (bytes(vm.envString("LOAD_STATE_PATH")).length > 0) {
console.log("ForkLive: loading state from %s", vm.envString("LOAD_STATE_PATH"));
vm.loadAllocs(vm.envString("LOAD_STATE_PATH"));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    function run() public {
        if (useOpsRepo) {
            vm.loadAlloc("path/to/state.json");
            _readSuperchainRegistry();
        } else {
            // Read the superchain registry and save the addresses to the Artifacts contract.
            _readSuperchainRegistry();
            // Now deploy the updated OPCM and implementations of the contracts
            _deployNewImplementations();
        }

        // Now upgrade the contracts (if the config is set to do so)
        if (cfg.useUpgradedFork()) {
            require(!useOpsRepo, "ForkLive: cannot upgrade and use ops repo");
            console.log("ForkLive: upgrading");
            _upgrade();
        } else if (useOpsRepo) {
            console.log("ForkLive: using ops repo to upgrade");
        }
    }

open PR against mono repo

// Read the superchain registry and save the addresses to the Artifacts contract.
_readSuperchainRegistry();

Expand Down