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
79706a9a
Commit
79706a9a
authored
Apr 05, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ctb): Wait for all MSD ownership transfers at once
parent
df38d134
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
44 deletions
+25
-44
020-SystemDictatorSteps-1.ts
...ges/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
+24
-44
deploy-utils.ts
packages/contracts-bedrock/src/deploy-utils.ts
+1
-0
No files found.
packages/contracts-bedrock/deploy/020-SystemDictatorSteps-1.ts
View file @
79706a9a
...
...
@@ -78,16 +78,6 @@ const deployFn: DeployFunction = async (hre) => {
transferFunc
:
'
transferOwnership
'
,
dictator
:
SystemDictator
,
})
// Wait for the ownership transfer to complete.
await
awaitCondition
(
async
()
=>
{
const
owner
=
await
ProxyAdmin
.
owner
()
return
owner
===
SystemDictator
.
address
},
5000
,
1000
)
}
// We don't need to transfer proxy addresses if we're already beyond the proxy transfer step.
...
...
@@ -107,16 +97,6 @@ const deployFn: DeployFunction = async (hre) => {
transferFunc
:
'
transferOwnership
'
,
dictator
:
SystemDictator
,
})
// Wait for the ownership transfer to complete.
await
awaitCondition
(
async
()
=>
{
const
owner
=
await
AddressManager
.
owner
()
return
owner
===
SystemDictator
.
address
},
5000
,
1000
)
}
else
{
console
.
log
(
`AddressManager already owned by the SystemDictator`
)
}
...
...
@@ -135,18 +115,6 @@ const deployFn: DeployFunction = async (hre) => {
transferFunc
:
'
setOwner
'
,
dictator
:
SystemDictator
,
})
// Wait for the ownership transfer to complete.
await
awaitCondition
(
async
()
=>
{
const
owner
=
await
L1StandardBridgeProxy
.
callStatic
.
getOwner
({
from
:
ethers
.
constants
.
AddressZero
,
})
return
owner
===
SystemDictator
.
address
},
5000
,
1000
)
}
else
{
console
.
log
(
`L1StandardBridge already owned by MSD`
)
}
...
...
@@ -165,22 +133,34 @@ const deployFn: DeployFunction = async (hre) => {
transferFunc
:
'
changeAdmin
'
,
dictator
:
SystemDictator
,
})
// Wait for the ownership transfer to complete.
await
awaitCondition
(
async
()
=>
{
const
owner
=
await
L1ERC721BridgeProxy
.
callStatic
.
admin
({
from
:
ethers
.
constants
.
AddressZero
,
})
return
owner
===
SystemDictator
.
address
},
5000
,
1000
)
}
else
{
console
.
log
(
`L1ERC721Bridge already owned by MSD`
)
}
// Wait for the ownership transfers to complete before continuing.
await
awaitCondition
(
async
():
Promise
<
boolean
>
=>
{
const
proxyAdminOwner
=
await
ProxyAdmin
.
owner
()
const
addressManagerOwner
=
await
AddressManager
.
owner
()
const
l1StandardBridgeOwner
=
await
L1StandardBridgeProxy
.
callStatic
.
getOwner
({
from
:
ethers
.
constants
.
AddressZero
,
})
const
l1Erc721BridgeOwner
=
await
L1ERC721BridgeProxy
.
callStatic
.
admin
({
from
:
ethers
.
constants
.
AddressZero
,
})
return
(
proxyAdminOwner
===
SystemDictator
.
address
&&
addressManagerOwner
===
SystemDictator
.
address
&&
l1StandardBridgeOwner
===
SystemDictator
.
address
&&
l1Erc721BridgeOwner
===
SystemDictator
.
address
)
},
5000
,
1000
)
await
doPhase
({
isLiveDeployer
,
SystemDictator
,
...
...
packages/contracts-bedrock/src/deploy-utils.ts
View file @
79706a9a
...
...
@@ -338,6 +338,7 @@ export const doOwnershipTransfer = async (opts: {
dictator
:
ethers
.
Contract
}):
Promise
<
void
>
=>
{
if
(
opts
.
isLiveDeployer
)
{
console
.
log
(
`Setting
${
opts
.
name
}
owner to MSD`
)
await
opts
.
proxy
[
opts
.
transferFunc
](
opts
.
dictator
.
address
)
}
else
{
const
tx
=
await
opts
.
proxy
.
populateTransaction
[
opts
.
transferFunc
](
...
...
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