Commit 11135c6c authored by Maurelian's avatar Maurelian

feat(ctb): Move updateDynamicConfig before phase2 steps

parent 43424746
...@@ -90,62 +90,6 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -90,62 +90,6 @@ const deployFn: DeployFunction = async (hre) => {
disabled: process.env.DISABLE_LIVE_DEPLOYER, disabled: process.env.DISABLE_LIVE_DEPLOYER,
}) })
// Step 3 clears out some state from the AddressManager.
await doStep({
isLiveDeployer,
SystemDictator,
step: 3,
message: `
Step 3 will clear out some legacy state from the AddressManager. Once you execute this step,
you WILL NOT BE ABLE TO RESTART THE SYSTEM using exit1(). You should confirm that the L2
system is entirely operational before executing this step.
`,
checks: async () => {
const deads = [
'OVM_CanonicalTransactionChain',
'OVM_L2CrossDomainMessenger',
'OVM_DecompressionPrecompileAddress',
'OVM_Sequencer',
'OVM_Proposer',
'OVM_ChainStorageContainer-CTC-batches',
'OVM_ChainStorageContainer-CTC-queue',
'OVM_CanonicalTransactionChain',
'OVM_StateCommitmentChain',
'OVM_BondManager',
'OVM_ExecutionManager',
'OVM_FraudVerifier',
'OVM_StateManagerFactory',
'OVM_StateTransitionerFactory',
'OVM_SafetyChecker',
'OVM_L1MultiMessageRelayer',
'BondManager',
]
for (const dead of deads) {
const addr = await AddressManager.getAddress(dead)
assert(addr === ethers.constants.AddressZero)
}
},
})
// Step 4 transfers ownership of the AddressManager and L1StandardBridge to the ProxyAdmin.
await doStep({
isLiveDeployer,
SystemDictator,
step: 4,
message: `
Step 4 will transfer ownership of the AddressManager and L1StandardBridge to the ProxyAdmin.
`,
checks: async () => {
await assertContractVariable(AddressManager, 'owner', ProxyAdmin.address)
assert(
(await L1StandardBridgeProxy.callStatic.getOwner({
from: ethers.constants.AddressZero,
})) === ProxyAdmin.address
)
},
})
// Make sure the dynamic system configuration has been set. // Make sure the dynamic system configuration has been set.
if ( if (
(await isStep(SystemDictator, 5)) && (await isStep(SystemDictator, 5)) &&
...@@ -225,6 +169,62 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -225,6 +169,62 @@ const deployFn: DeployFunction = async (hre) => {
) )
} }
// Step 3 clears out some state from the AddressManager.
await doStep({
isLiveDeployer,
SystemDictator,
step: 3,
message: `
Step 3 will clear out some legacy state from the AddressManager. Once you execute this step,
you WILL NOT BE ABLE TO RESTART THE SYSTEM using exit1(). You should confirm that the L2
system is entirely operational before executing this step.
`,
checks: async () => {
const deads = [
'OVM_CanonicalTransactionChain',
'OVM_L2CrossDomainMessenger',
'OVM_DecompressionPrecompileAddress',
'OVM_Sequencer',
'OVM_Proposer',
'OVM_ChainStorageContainer-CTC-batches',
'OVM_ChainStorageContainer-CTC-queue',
'OVM_CanonicalTransactionChain',
'OVM_StateCommitmentChain',
'OVM_BondManager',
'OVM_ExecutionManager',
'OVM_FraudVerifier',
'OVM_StateManagerFactory',
'OVM_StateTransitionerFactory',
'OVM_SafetyChecker',
'OVM_L1MultiMessageRelayer',
'BondManager',
]
for (const dead of deads) {
const addr = await AddressManager.getAddress(dead)
assert(addr === ethers.constants.AddressZero)
}
},
})
// Step 4 transfers ownership of the AddressManager and L1StandardBridge to the ProxyAdmin.
await doStep({
isLiveDeployer,
SystemDictator,
step: 4,
message: `
Step 4 will transfer ownership of the AddressManager and L1StandardBridge to the ProxyAdmin.
`,
checks: async () => {
await assertContractVariable(AddressManager, 'owner', ProxyAdmin.address)
assert(
(await L1StandardBridgeProxy.callStatic.getOwner({
from: ethers.constants.AddressZero,
})) === ProxyAdmin.address
)
},
})
// Step 5 initializes all contracts. // Step 5 initializes all contracts.
await doStep({ await doStep({
isLiveDeployer, isLiveDeployer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment