Skip to content

add option to load fork state#1

Draft
prat-gpt wants to merge 7 commits intodevelopfrom
feat/load-state-fork-test
Draft

add option to load fork state#1
prat-gpt wants to merge 7 commits intodevelopfrom
feat/load-state-fork-test

Conversation

@prat-gpt
Copy link

No description provided.

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

ElliotFriedman and others added 6 commits January 23, 2025 18:22
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
Signed-off-by: Elliot <elliotfriedman3@gmail.com>
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