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
c3db334f
Unverified
Commit
c3db334f
authored
Nov 02, 2021
by
Maurelian
Committed by
Kelvin Fichter
Nov 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(contracts): Always print dictator contract instructions
parent
7b5ccb36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
77 deletions
+76
-77
011-set-addresses.ts
packages/contracts/deploy/011-set-addresses.ts
+39
-40
014-OVM_L1StandardBridge.deploy.ts
packages/contracts/deploy/014-OVM_L1StandardBridge.deploy.ts
+37
-37
No files found.
packages/contracts/deploy/011-set-addresses.ts
View file @
c3db334f
...
@@ -32,6 +32,45 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -32,6 +32,45 @@ const deployFn: DeployFunction = async (hre) => {
const
finalOwner
=
await
AddressDictator
.
finalOwner
()
const
finalOwner
=
await
AddressDictator
.
finalOwner
()
const
currentOwner
=
await
Lib_AddressManager
.
owner
()
const
currentOwner
=
await
Lib_AddressManager
.
owner
()
console
.
log
(
`
The AddressDictator contract (glory to Arstotzka) has been deployed.
FOLLOW THESE INSTRUCTIONS CAREFULLY!
(1) Review the Contract Name / Contract Address pairs below and confirm that they match
the addresses found in the contract artifacts of your current deployment.
${
namedAddresses
.
map
((
namedAddress
)
=>
{
const
padding
=
'
'
.
repeat
(
40
-
namedAddress
.
name
.
length
)
return
`
${
namedAddress
.
name
}${
padding
}
${
namedAddress
.
addr
}
`
})
.
join
(
'
\n
'
)}
(2) Review the CURRENT and FINAL AddressManager owners and verify that these are the expected values:
Current AddressManager owner: (
${
currentOwner
}
)
Final AddressManager owner: (
${
finalOwner
}
)
[
${
currentOwner
===
finalOwner
?
'
THESE ARE THE SAME ADDRESSES
'
:
'
THESE ARE >>>NOT<<< THE SAME ADDRESSES
'
}
]
(3) Transfer ownership of the AddressManager located at (
${
Lib_AddressManager
.
address
}
)
to the AddressDictator contract located at the following address:
TRANSFER OWNERSHIP TO THE FOLLOWING ADDRESS ONLY:
>>>>> (
${
AddressDictator
.
address
}
) <<<<<
(4) Wait for the deploy process to continue.
`
)
// Check if the hardhat runtime environment has the owner of the AddressManager. This will only
// Check if the hardhat runtime environment has the owner of the AddressManager. This will only
// happen in CI. If this is the case, we can skip directly to transferring ownership over to the
// happen in CI. If this is the case, we can skip directly to transferring ownership over to the
// AddressDictator contract.
// AddressDictator contract.
...
@@ -39,52 +78,12 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -39,52 +78,12 @@ const deployFn: DeployFunction = async (hre) => {
const
hreHasOwner
=
hreSigners
.
some
((
signer
)
=>
{
const
hreHasOwner
=
hreSigners
.
some
((
signer
)
=>
{
return
hexStringEquals
(
signer
.
address
,
currentOwner
)
return
hexStringEquals
(
signer
.
address
,
currentOwner
)
})
})
if
(
hreHasOwner
)
{
if
(
hreHasOwner
)
{
// Hardhat has the owner loaded into it, we can skip directly to transferOwnership.
// Hardhat has the owner loaded into it, we can skip directly to transferOwnership.
const
owner
=
await
hre
.
ethers
.
getSigner
(
currentOwner
)
const
owner
=
await
hre
.
ethers
.
getSigner
(
currentOwner
)
await
Lib_AddressManager
.
connect
(
owner
).
transferOwnership
(
await
Lib_AddressManager
.
connect
(
owner
).
transferOwnership
(
AddressDictator
.
address
AddressDictator
.
address
)
)
}
else
{
console
.
log
(
`
The AddressDictator contract (glory to Arstotzka) has been deployed.
FOLLOW THESE INSTRUCTIONS CAREFULLY!
(1) Review the Contract Name / Contract Address pairs below and confirm that they match
the addresses found in the contract artifacts of your current deployment.
${
namedAddresses
.
map
((
namedAddress
)
=>
{
const
padding
=
'
'
.
repeat
(
40
-
namedAddress
.
name
.
length
)
return
`
${
namedAddress
.
name
}${
padding
}
${
namedAddress
.
addr
}
`
})
.
join
(
'
\n
'
)}
(2) Review the CURRENT and FINAL AddressManager owners and verify that these are the expected values:
Current AddressManager owner: (
${
currentOwner
}
)
Final AddressManager owner: (
${
finalOwner
}
)
[
${
currentOwner
===
finalOwner
?
'
THESE ARE THE SAME ADDRESSES
'
:
'
THESE ARE >>>NOT<<< THE SAME ADDRESSES
'
}
]
(3) Transfer ownership of the AddressManager located at (
${
Lib_AddressManager
.
address
}
)
to the AddressDictator contract located at the following address:
TRANSFER OWNERSHIP TO THE FOLLOWING ADDRESS ONLY:
>>>>> (
${
AddressDictator
.
address
}
) <<<<<
(4) Wait for the deploy process to continue.
`
)
}
}
// Wait for ownership to be transferred to the AddressDictator contract.
// Wait for ownership to be transferred to the AddressDictator contract.
...
...
packages/contracts/deploy/014-OVM_L1StandardBridge.deploy.ts
View file @
c3db334f
...
@@ -45,6 +45,43 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -45,6 +45,43 @@ const deployFn: DeployFunction = async (hre) => {
})
})
const
finalOwner
=
await
ChugSplashDictator
.
finalOwner
()
const
finalOwner
=
await
ChugSplashDictator
.
finalOwner
()
const
messengerSlotKey
=
await
ChugSplashDictator
.
messengerSlotKey
()
const
messengerSlotVal
=
await
ChugSplashDictator
.
messengerSlotVal
()
const
bridgeSlotKey
=
await
ChugSplashDictator
.
bridgeSlotKey
()
const
bridgeSlotVal
=
await
ChugSplashDictator
.
bridgeSlotVal
()
console
.
log
(
`
The ChugSplashDictator contract (glory to Arstotzka) has been deployed.
FOLLOW THESE INSTRUCTIONS CAREFULLY!
(1) Review the storage key/value pairs below and make sure they match the expected values:
${
messengerSlotKey
}
:
${
messengerSlotVal
}
${
bridgeSlotKey
}
:
${
bridgeSlotVal
}
(2) Review the CURRENT and FINAL proxy owners and verify that these are the expected values:
Current proxy owner: (
${
currentOwner
}
)
Final proxy owner: (
${
finalOwner
}
)
[
${
currentOwner
===
finalOwner
?
'
THESE ARE THE SAME ADDRESSES
'
:
'
THESE ARE >>>NOT<<< THE SAME ADDRESSES
'
}
]
(3) Transfer ownership of the L1ChugSplashProxy located at (
${
Proxy__OVM_L1StandardBridge
.
address
}
)
to the ChugSplashDictator contract located at the following address:
TRANSFER OWNERSHIP TO THE FOLLOWING ADDRESS ONLY:
>>>>> (
${
ChugSplashDictator
.
address
}
) <<<<<
(4) Wait for the deploy process to continue.
`
)
// Check if the hardhat runtime environment has the owner of the proxy. This will only
// Check if the hardhat runtime environment has the owner of the proxy. This will only
// happen in CI. If this is the case, we can skip directly to transferring ownership over to the
// happen in CI. If this is the case, we can skip directly to transferring ownership over to the
// ChugSplashDictator contract.
// ChugSplashDictator contract.
...
@@ -59,43 +96,6 @@ const deployFn: DeployFunction = async (hre) => {
...
@@ -59,43 +96,6 @@ const deployFn: DeployFunction = async (hre) => {
await
Proxy__OVM_L1StandardBridge
.
connect
(
owner
).
setOwner
(
await
Proxy__OVM_L1StandardBridge
.
connect
(
owner
).
setOwner
(
ChugSplashDictator
.
address
ChugSplashDictator
.
address
)
)
}
else
{
const
messengerSlotKey
=
await
ChugSplashDictator
.
messengerSlotKey
()
const
messengerSlotVal
=
await
ChugSplashDictator
.
messengerSlotVal
()
const
bridgeSlotKey
=
await
ChugSplashDictator
.
bridgeSlotKey
()
const
bridgeSlotVal
=
await
ChugSplashDictator
.
bridgeSlotVal
()
console
.
log
(
`
The ChugSplashDictator contract (glory to Arstotzka) has been deployed.
FOLLOW THESE INSTRUCTIONS CAREFULLY!
(1) Review the storage key/value pairs below and make sure they match the expected values:
${
messengerSlotKey
}
:
${
messengerSlotVal
}
${
bridgeSlotKey
}
:
${
bridgeSlotVal
}
(2) Review the CURRENT and FINAL proxy owners and verify that these are the expected values:
Current proxy owner: (
${
currentOwner
}
)
Final proxy owner: (
${
finalOwner
}
)
[
${
currentOwner
===
finalOwner
?
'
THESE ARE THE SAME ADDRESSES
'
:
'
THESE ARE >>>NOT<<< THE SAME ADDRESSES
'
}
]
(3) Transfer ownership of the L1ChugSplashProxy located at (
${
Proxy__OVM_L1StandardBridge
.
address
}
)
to the ChugSplashDictator contract located at the following address:
TRANSFER OWNERSHIP TO THE FOLLOWING ADDRESS ONLY:
>>>>> (
${
ChugSplashDictator
.
address
}
) <<<<<
(4) Wait for the deploy process to continue.
`
)
}
}
// Wait for ownership to be transferred to the AddressDictator contract.
// Wait for ownership to be transferred to the AddressDictator contract.
...
...
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