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
Show 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,21 +32,6 @@ const deployFn: DeployFunction = async (hre) => {
const
finalOwner
=
await
AddressDictator
.
finalOwner
()
const
currentOwner
=
await
Lib_AddressManager
.
owner
()
// 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
// AddressDictator contract.
const
hreSigners
=
await
hre
.
ethers
.
getSigners
()
const
hreHasOwner
=
hreSigners
.
some
((
signer
)
=>
{
return
hexStringEquals
(
signer
.
address
,
currentOwner
)
})
if
(
hreHasOwner
)
{
// Hardhat has the owner loaded into it, we can skip directly to transferOwnership.
const
owner
=
await
hre
.
ethers
.
getSigner
(
currentOwner
)
await
Lib_AddressManager
.
connect
(
owner
).
transferOwnership
(
AddressDictator
.
address
)
}
else
{
console
.
log
(
`
The AddressDictator contract (glory to Arstotzka) has been deployed.
...
...
@@ -85,6 +70,20 @@ const deployFn: DeployFunction = async (hre) => {
(4) Wait for the deploy process to continue.
`
)
// 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
// AddressDictator contract.
const
hreSigners
=
await
hre
.
ethers
.
getSigners
()
const
hreHasOwner
=
hreSigners
.
some
((
signer
)
=>
{
return
hexStringEquals
(
signer
.
address
,
currentOwner
)
})
if
(
hreHasOwner
)
{
// Hardhat has the owner loaded into it, we can skip directly to transferOwnership.
const
owner
=
await
hre
.
ethers
.
getSigner
(
currentOwner
)
await
Lib_AddressManager
.
connect
(
owner
).
transferOwnership
(
AddressDictator
.
address
)
}
// Wait for ownership to be transferred to the AddressDictator contract.
...
...
packages/contracts/deploy/014-OVM_L1StandardBridge.deploy.ts
View file @
c3db334f
...
...
@@ -45,21 +45,6 @@ const deployFn: DeployFunction = async (hre) => {
})
const
finalOwner
=
await
ChugSplashDictator
.
finalOwner
()
// 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
// ChugSplashDictator contract.
const
hreSigners
=
await
hre
.
ethers
.
getSigners
()
const
hreHasOwner
=
hreSigners
.
some
((
signer
)
=>
{
return
hexStringEquals
(
signer
.
address
,
currentOwner
)
})
if
(
hreHasOwner
)
{
// Hardhat has the owner loaded into it, we can skip directly to transferOwnership.
const
owner
=
await
hre
.
ethers
.
getSigner
(
currentOwner
)
await
Proxy__OVM_L1StandardBridge
.
connect
(
owner
).
setOwner
(
ChugSplashDictator
.
address
)
}
else
{
const
messengerSlotKey
=
await
ChugSplashDictator
.
messengerSlotKey
()
const
messengerSlotVal
=
await
ChugSplashDictator
.
messengerSlotVal
()
const
bridgeSlotKey
=
await
ChugSplashDictator
.
bridgeSlotKey
()
...
...
@@ -96,6 +81,21 @@ const deployFn: DeployFunction = async (hre) => {
(4) Wait for the deploy process to continue.
`
)
// 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
// ChugSplashDictator contract.
const
hreSigners
=
await
hre
.
ethers
.
getSigners
()
const
hreHasOwner
=
hreSigners
.
some
((
signer
)
=>
{
return
hexStringEquals
(
signer
.
address
,
currentOwner
)
})
if
(
hreHasOwner
)
{
// Hardhat has the owner loaded into it, we can skip directly to transferOwnership.
const
owner
=
await
hre
.
ethers
.
getSigner
(
currentOwner
)
await
Proxy__OVM_L1StandardBridge
.
connect
(
owner
).
setOwner
(
ChugSplashDictator
.
address
)
}
// 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