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
fe163071
Unverified
Commit
fe163071
authored
Nov 04, 2022
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ctb): add MigrationSystemDictator checks
Adds checks for the MigrationSystemDictator steps.
parent
9dad975a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
320 additions
and
95 deletions
+320
-95
017-MigrationSystemDictator.ts
...s/contracts-bedrock/deploy/017-MigrationSystemDictator.ts
+16
-0
018-MigrationSystemDictatorSteps.ts
...tracts-bedrock/deploy/018-MigrationSystemDictatorSteps.ts
+289
-95
deploy-utils.ts
packages/contracts-bedrock/src/deploy-utils.ts
+15
-0
No files found.
packages/contracts-bedrock/deploy/017-MigrationSystemDictator.ts
View file @
fe163071
...
...
@@ -46,6 +46,22 @@ const deployFn: DeployFunction = async (hre) => {
}
}
if
(
hre
.
deployConfig
.
l2OutputOracleGenesisL2Output
===
ethers
.
constants
.
HashZero
)
{
if
(
hre
.
network
.
config
.
live
===
false
)
{
console
.
log
(
`WARNING!!!`
)
console
.
log
(
`WARNING!!!`
)
console
.
log
(
`WARNING!!!`
)
console
.
log
(
`WARNING!!! A genesis L2 output was not provided.`
)
console
.
log
(
`WARNING!!! Make sure you are ONLY doing this on a test network.`
)
}
else
{
throw
new
Error
(
`must specify the finalSystemOwner on live networks`
)
}
}
const
config
=
await
makeDictatorConfig
(
hre
,
controller
,
finalOwner
,
false
)
await
deployAndVerifyAndThen
({
hre
,
...
...
packages/contracts-bedrock/deploy/018-MigrationSystemDictatorSteps.ts
View file @
fe163071
This diff is collapsed.
Click to expand it.
packages/contracts-bedrock/src/deploy-utils.ts
View file @
fe163071
...
...
@@ -299,6 +299,21 @@ export const getContractFromArtifact = async (
})
}
export
const
getContractsFromArtifacts
=
async
(
hre
:
any
,
configs
:
Array
<
{
name
:
string
iface
?:
string
signerOrProvider
?:
Signer
|
Provider
|
string
}
>
):
Promise
<
ethers
.
Contract
[]
>
=>
{
const
contracts
=
[]
for
(
const
config
of
configs
)
{
contracts
.
push
(
await
getContractFromArtifact
(
hre
,
config
.
name
,
config
))
}
return
contracts
}
export
const
isHardhatNode
=
async
(
hre
)
=>
{
return
(
await
getChainId
(
hre
.
ethers
.
provider
))
===
31337
}
...
...
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