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
a421d757
Commit
a421d757
authored
Nov 08, 2022
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: clean up config usage
parent
697f16cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
cmd.go
op-node/cmd/genesis/cmd.go
+13
-20
No files found.
op-node/cmd/genesis/cmd.go
View file @
a421d757
...
...
@@ -52,6 +52,10 @@ var Subcommands = cli.Commands{
return
err
}
if
err
:=
config
.
Check
();
err
!=
nil
{
return
err
}
l1Genesis
,
err
:=
genesis
.
BuildL1DeveloperGenesis
(
config
)
if
err
!=
nil
{
return
err
...
...
@@ -134,42 +138,31 @@ var Subcommands = cli.Commands{
return
err
}
l1SBP
,
err
:=
hh
.
GetDeployment
(
"L1StandardBridgeProxy"
)
if
err
!=
nil
{
if
err
:=
config
.
GetDeployedAddresses
(
hh
);
err
!=
nil
{
return
err
}
l1XDMP
,
err
:=
hh
.
GetDeployment
(
"L1CrossDomainMessengerProxy"
)
if
err
!=
nil
{
return
err
}
portalProxy
,
err
:=
hh
.
GetDeployment
(
"OptimismPortalProxy"
)
if
err
!=
nil
{
return
err
}
sysCfgProxy
,
err
:=
hh
.
GetDeployment
(
"SystemConfigProxy"
)
if
err
!=
nil
{
return
err
}
l1ERC721BP
,
err
:=
hh
.
GetDeployment
(
"L1ERC721BridgeProxy"
)
if
err
!=
nil
{
if
err
:=
config
.
Check
();
err
!=
nil
{
return
err
}
// TODO: delete this struct as everything is now in the DeployConfig
l2Addrs
:=
&
genesis
.
L2Addresses
{
ProxyAdminOwner
:
config
.
ProxyAdminOwner
,
L1StandardBridgeProxy
:
l1SBP
.
Address
,
L1CrossDomainMessengerProxy
:
l1XDMP
.
Address
,
L1ERC721BridgeProxy
:
l1ERC721BP
.
Address
,
L1StandardBridgeProxy
:
config
.
L1StandardBridgeProxy
,
L1CrossDomainMessengerProxy
:
config
.
L1CrossDomainMessengerProxy
,
L1ERC721BridgeProxy
:
config
.
L1ERC721BridgeProxy
,
BaseFeeVaultRecipient
:
config
.
BaseFeeVaultRecipient
,
L1FeeVaultRecipient
:
config
.
L1FeeVaultRecipient
,
SequencerFeeVaultRecipient
:
config
.
SequencerFeeVaultRecipient
,
SystemConfigProxy
:
config
.
SystemConfigProxy
,
}
l2Genesis
,
err
:=
genesis
.
BuildL2DeveloperGenesis
(
config
,
l1StartBlock
,
l2Addrs
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"error creating l2 developer genesis: %w"
,
err
)
}
rollupConfig
:=
makeRollupConfig
(
config
,
l1StartBlock
,
l2Genesis
,
portalProxy
.
Address
,
sysCfgProxy
.
Address
)
rollupConfig
:=
makeRollupConfig
(
config
,
l1StartBlock
,
l2Genesis
,
config
.
OptimismPortalProxy
,
config
.
SystemConfigProxy
)
if
err
:=
rollupConfig
.
Check
();
err
!=
nil
{
return
fmt
.
Errorf
(
"generated rollup config does not pass validation: %w"
,
err
)
}
...
...
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