Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/sb-change-how-we-update-chain-cr…
Browse files Browse the repository at this point in the history
…eation-params' into sb-change-how-we-update-chain-creation-params
  • Loading branch information
StanislavBreadless committed May 31, 2024
2 parents e88b065 + 56bb802 commit b1b5808
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions l1-contracts-foundry/script/DeployL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox
import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol";
import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol";
import {StateTransitionManager} from "contracts/state-transition/StateTransitionManager.sol";
import {StateTransitionManagerInitializeData} from "contracts/state-transition/IStateTransitionManager.sol";
import {StateTransitionManagerInitializeData, ChainCreationParams} from "contracts/state-transition/IStateTransitionManager.sol";
import {IStateTransitionManager} from "contracts/state-transition/IStateTransitionManager.sol";
import {Diamond} from "contracts/state-transition/libraries/Diamond.sol";
import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol";
Expand Down Expand Up @@ -428,15 +428,19 @@ contract DeployL1Script is Script {

config.contracts.diamondCutData = abi.encode(diamondCut);

StateTransitionManagerInitializeData memory diamondInitData = StateTransitionManagerInitializeData({
owner: config.ownerAddress,
validatorTimelock: addresses.validatorTimelock,
ChainCreationParams memory chainCreationParams = ChainCreationParams({
genesisUpgrade: addresses.stateTransition.genesisUpgrade,
genesisBatchHash: config.contracts.genesisRoot,
genesisIndexRepeatedStorageChanges: uint64(config.contracts.genesisRollupLeafIndex),
genesisBatchCommitment: config.contracts.genesisBatchCommitment,
diamondCut: diamondCut,
protocolVersion: config.contracts.latestProtocolVersion
});

StateTransitionManagerInitializeData memory diamondInitData = StateTransitionManagerInitializeData({
owner: config.ownerAddress,
validatorTimelock: addresses.validatorTimelock,
chainCreationParams,
protocolVersion: config.contracts.latestProtocolVersion,
});

address contractAddress = deployViaCreate2(
Expand Down

0 comments on commit b1b5808

Please sign in to comment.