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
536178b0
Commit
536178b0
authored
May 01, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ctb): Add the finalize function to MSD.phase2()
parent
a70e0c9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
26 deletions
+13
-26
SystemDictator.sol
...contracts-bedrock/contracts/deployment/SystemDictator.sol
+3
-2
021-SystemDictatorSteps-2.ts
...ges/contracts-bedrock/deploy/021-SystemDictatorSteps-2.ts
+10
-24
No files found.
packages/contracts-bedrock/contracts/deployment/SystemDictator.sol
View file @
536178b0
...
@@ -419,18 +419,19 @@ contract SystemDictator is OwnableUpgradeable {
...
@@ -419,18 +419,19 @@ contract SystemDictator is OwnableUpgradeable {
}
}
/**
/**
* @notice Calls the remaining steps of the migration process.
* @notice Calls the remaining steps of the migration process
, and finalizes
.
*/
*/
function phase2() external onlyOwner {
function phase2() external onlyOwner {
step3();
step3();
step4();
step4();
step5();
step5();
finalize();
}
}
/**
/**
* @notice Tranfers admin ownership to the final owner.
* @notice Tranfers admin ownership to the final owner.
*/
*/
function finalize()
external
onlyOwner {
function finalize()
public
onlyOwner {
// Transfer ownership of the ProxyAdmin to the final owner.
// Transfer ownership of the ProxyAdmin to the final owner.
config.globalConfig.proxyAdmin.transferOwnership(config.globalConfig.finalOwner);
config.globalConfig.proxyAdmin.transferOwnership(config.globalConfig.finalOwner);
...
...
packages/contracts-bedrock/deploy/021-SystemDictatorSteps-2.ts
View file @
536178b0
...
@@ -190,6 +190,9 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -190,6 +190,9 @@ const deployFn: DeployFunction = async (hre) => {
Step 5 will initialize all Bedrock contracts. After this step is executed, the OptimismPortal
Step 5 will initialize all Bedrock contracts. After this step is executed, the OptimismPortal
will be open for deposits but withdrawals will be paused if deploying a production network.
will be open for deposits but withdrawals will be paused if deploying a production network.
The Proposer will also be able to submit L2 outputs to the L2OutputOracle.
The Proposer will also be able to submit L2 outputs to the L2OutputOracle.
Lastly the finalize step will be executed. This will transfer ownership of the ProxyAdmin to
the final system owner as specified in the deployment configuration.
`
,
`
,
checks
:
async
()
=>
{
checks
:
async
()
=>
{
// Step 3 checks
// Step 3 checks
...
@@ -300,6 +303,13 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -300,6 +303,13 @@ const deployFn: DeployFunction = async (hre) => {
'
messenger
'
,
'
messenger
'
,
L1CrossDomainMessenger
.
address
L1CrossDomainMessenger
.
address
)
)
// finalize checks
await
assertContractVariable
(
ProxyAdmin
,
'
owner
'
,
hre
.
deployConfig
.
finalSystemOwner
)
},
},
})
})
...
@@ -335,24 +345,6 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -335,24 +345,6 @@ const deployFn: DeployFunction = async (hre) => {
await
assertContractVariable
(
OptimismPortal
,
'
paused
'
,
false
)
await
assertContractVariable
(
OptimismPortal
,
'
paused
'
,
false
)
console
.
log
(
`
You must now finalize the upgrade by calling finalize() on the SystemDictator. This will
transfer ownership of the ProxyAdmin to the final system owner as specified in the deployment
configuration.
`
)
if
(
isLiveDeployer
)
{
console
.
log
(
`Finalizing deployment...`
)
await
SystemDictator
.
finalize
()
}
else
{
const
tx
=
await
SystemDictator
.
populateTransaction
.
finalize
()
console
.
log
(
`Please finalize deployment...`
)
console
.
log
(
`MSD address:
${
SystemDictator
.
address
}
`
)
printJsonTransaction
(
tx
)
printCastCommand
(
tx
)
await
printTenderlySimulationLink
(
SystemDictator
.
provider
,
tx
)
}
await
awaitCondition
(
await
awaitCondition
(
async
()
=>
{
async
()
=>
{
return
SystemDictator
.
finalized
()
return
SystemDictator
.
finalized
()
...
@@ -360,12 +352,6 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -360,12 +352,6 @@ const deployFn: DeployFunction = async (hre) => {
5000
,
5000
,
1000
1000
)
)
await
assertContractVariable
(
ProxyAdmin
,
'
owner
'
,
hre
.
deployConfig
.
finalSystemOwner
)
}
}
}
}
...
...
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