Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
8e76fac4
Commit
8e76fac4
authored
Apr 05, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ctb): Combine MSD step1 and step2 into phase1
parent
642e1dab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
20 deletions
+22
-20
SystemDictator.sol
...contracts-bedrock/contracts/deployment/SystemDictator.sol
+10
-2
020-SystemDictatorSteps-1.ts
...ges/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
+12
-18
No files found.
packages/contracts-bedrock/contracts/deployment/SystemDictator.sol
View file @
8e76fac4
...
@@ -215,7 +215,7 @@ contract SystemDictator is OwnableUpgradeable {
...
@@ -215,7 +215,7 @@ contract SystemDictator is OwnableUpgradeable {
/**
/**
* @notice Configures the ProxyAdmin contract.
* @notice Configures the ProxyAdmin contract.
*/
*/
function step1()
external
onlyOwner step(1) {
function step1()
public
onlyOwner step(1) {
// Set the AddressManager in the ProxyAdmin.
// Set the AddressManager in the ProxyAdmin.
config.globalConfig.proxyAdmin.setAddressManager(config.globalConfig.addressManager);
config.globalConfig.proxyAdmin.setAddressManager(config.globalConfig.addressManager);
...
@@ -260,7 +260,7 @@ contract SystemDictator is OwnableUpgradeable {
...
@@ -260,7 +260,7 @@ contract SystemDictator is OwnableUpgradeable {
* @notice Pauses the system by shutting down the L1CrossDomainMessenger and setting the
* @notice Pauses the system by shutting down the L1CrossDomainMessenger and setting the
* deposit halt flag to tell the Sequencer's DTL to stop accepting deposits.
* deposit halt flag to tell the Sequencer's DTL to stop accepting deposits.
*/
*/
function step2()
external
onlyOwner step(2) {
function step2()
public
onlyOwner step(2) {
// Store the address of the old L1CrossDomainMessenger implementation. We will need this
// Store the address of the old L1CrossDomainMessenger implementation. We will need this
// address in the case that we have to exit early.
// address in the case that we have to exit early.
oldL1CrossDomainMessenger = config.globalConfig.addressManager.getAddress(
oldL1CrossDomainMessenger = config.globalConfig.addressManager.getAddress(
...
@@ -410,6 +410,14 @@ contract SystemDictator is OwnableUpgradeable {
...
@@ -410,6 +410,14 @@ contract SystemDictator is OwnableUpgradeable {
);
);
}
}
/**
* @notice Calls the first 2 steps of the migration process.
*/
function phase1() external onlyOwner {
step1();
step2();
}
/**
/**
* @notice Tranfers admin ownership to the final owner.
* @notice Tranfers admin ownership to the final owner.
*/
*/
...
...
packages/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
View file @
8e76fac4
...
@@ -11,7 +11,7 @@ import {
...
@@ -11,7 +11,7 @@ import {
assertContractVariable
,
assertContractVariable
,
getContractsFromArtifacts
,
getContractsFromArtifacts
,
getDeploymentAddress
,
getDeploymentAddress
,
do
Step
,
do
Phase
,
jsonifyTransaction
,
jsonifyTransaction
,
getTenderlySimulationLink
,
getTenderlySimulationLink
,
getCastCommand
,
getCastCommand
,
...
@@ -196,16 +196,23 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -196,16 +196,23 @@ const deployFn: DeployFunction = async (hre) => {
console
.
log
(
`L1ERC721Bridge already owned by MSD`
)
console
.
log
(
`L1ERC721Bridge already owned by MSD`
)
}
}
// Step 1 is a freebie, it doesn't impact the system.
await
doPhase
({
await
doStep
({
isLiveDeployer
,
isLiveDeployer
,
SystemDictator
,
SystemDictator
,
step
:
1
,
phase
:
1
,
message
:
`
message
:
`
Phase 1 includes the following steps:
Step 1 will configure the ProxyAdmin contract, you can safely execute this step at any time
Step 1 will configure the ProxyAdmin contract, you can safely execute this step at any time
without impacting the functionality of the rest of the system.
without impacting the functionality of the rest of the system.
Step 2 will stop deposits and withdrawals via the L1CrossDomainMessenger and will stop the
DTL from syncing new deposits via the CTC, effectively shutting down the legacy system. Once
this step has been executed, you should immediately begin the L2 migration process. If you
need to restart the system, run exit1() followed by finalize().
`
,
`
,
checks
:
async
()
=>
{
checks
:
async
()
=>
{
// Step 1 checks
await
assertContractVariable
(
await
assertContractVariable
(
ProxyAdmin
,
ProxyAdmin
,
'
addressManager
'
,
'
addressManager
'
,
...
@@ -264,21 +271,8 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -264,21 +271,8 @@ const deployFn: DeployFunction = async (hre) => {
assert
(
config
.
systemTxMaxGas
===
1
_000_000
)
assert
(
config
.
systemTxMaxGas
===
1
_000_000
)
assert
(
ethers
.
utils
.
parseUnits
(
'
1
'
,
'
gwei
'
).
eq
(
config
.
minimumBaseFee
))
assert
(
ethers
.
utils
.
parseUnits
(
'
1
'
,
'
gwei
'
).
eq
(
config
.
minimumBaseFee
))
assert
(
config
.
maximumBaseFee
.
eq
(
uint128Max
))
assert
(
config
.
maximumBaseFee
.
eq
(
uint128Max
))
},
})
// Step 2 shuts down the system.
// Step 2 checks
await
doStep
({
isLiveDeployer
,
SystemDictator
,
step
:
2
,
message
:
`
Step 2 will stop deposits and withdrawals via the L1CrossDomainMessenger and will stop the
DTL from syncing new deposits via the CTC, effectively shutting down the legacy system. Once
this step has been executed, you should immediately begin the L2 migration process. If you
need to restart the system, run exit1() followed by finalize().
`
,
checks
:
async
()
=>
{
const
messenger
=
await
AddressManager
.
getAddress
(
const
messenger
=
await
AddressManager
.
getAddress
(
'
OVM_L1CrossDomainMessenger
'
'
OVM_L1CrossDomainMessenger
'
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment