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
34d1dadb
Unverified
Commit
34d1dadb
authored
Jul 29, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-program: Add chain config for MainNet to op-program.
parent
b17c4077
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
main_test.go
op-program/host/cmd/main_test.go
+0
-5
chaincfg.go
op-program/host/config/chaincfg.go
+29
-0
No files found.
op-program/host/cmd/main_test.go
View file @
34d1dadb
...
@@ -80,11 +80,6 @@ func TestNetwork(t *testing.T) {
...
@@ -80,11 +80,6 @@ func TestNetwork(t *testing.T) {
name
:=
name
name
:=
name
expected
:=
cfg
expected
:=
cfg
t
.
Run
(
"Network_"
+
name
,
func
(
t
*
testing
.
T
)
{
t
.
Run
(
"Network_"
+
name
,
func
(
t
*
testing
.
T
)
{
// TODO(CLI-3936) Re-enable test for other networks once bedrock migration is complete
if
name
==
"mainnet"
{
t
.
Skipf
(
"Not requiring chain config for network %s"
,
name
)
return
}
args
:=
replaceRequiredArg
(
"--network"
,
name
)
args
:=
replaceRequiredArg
(
"--network"
,
name
)
cfg
:=
configForArgs
(
t
,
args
)
cfg
:=
configForArgs
(
t
,
args
)
require
.
Equal
(
t
,
expected
,
*
cfg
.
Rollup
)
require
.
Equal
(
t
,
expected
,
*
cfg
.
Rollup
)
...
...
op-program/host/config/chaincfg.go
View file @
34d1dadb
...
@@ -64,7 +64,36 @@ var OPSepoliaChainConfig = ¶ms.ChainConfig{
...
@@ -64,7 +64,36 @@ var OPSepoliaChainConfig = ¶ms.ChainConfig{
},
},
}
}
var
OPMainnetChainConfig
=
&
params
.
ChainConfig
{
ChainID
:
big
.
NewInt
(
10
),
HomesteadBlock
:
big
.
NewInt
(
0
),
DAOForkBlock
:
nil
,
DAOForkSupport
:
false
,
EIP150Block
:
big
.
NewInt
(
0
),
EIP155Block
:
big
.
NewInt
(
0
),
EIP158Block
:
big
.
NewInt
(
0
),
ByzantiumBlock
:
big
.
NewInt
(
0
),
ConstantinopleBlock
:
big
.
NewInt
(
0
),
PetersburgBlock
:
big
.
NewInt
(
0
),
IstanbulBlock
:
big
.
NewInt
(
0
),
MuirGlacierBlock
:
big
.
NewInt
(
0
),
BerlinBlock
:
big
.
NewInt
(
3950000
),
LondonBlock
:
big
.
NewInt
(
105235063
),
ArrowGlacierBlock
:
big
.
NewInt
(
105235063
),
GrayGlacierBlock
:
big
.
NewInt
(
105235063
),
MergeNetsplitBlock
:
big
.
NewInt
(
105235063
),
BedrockBlock
:
big
.
NewInt
(
105235063
),
RegolithTime
:
&
enabledFromBedrockBlock
,
TerminalTotalDifficulty
:
big
.
NewInt
(
0
),
TerminalTotalDifficultyPassed
:
true
,
Optimism
:
&
params
.
OptimismConfig
{
EIP1559Elasticity
:
6
,
EIP1559Denominator
:
50
,
},
}
var
L2ChainConfigsByName
=
map
[
string
]
*
params
.
ChainConfig
{
var
L2ChainConfigsByName
=
map
[
string
]
*
params
.
ChainConfig
{
"goerli"
:
OPGoerliChainConfig
,
"goerli"
:
OPGoerliChainConfig
,
"sepolia"
:
OPSepoliaChainConfig
,
"sepolia"
:
OPSepoliaChainConfig
,
"mainnet"
:
OPMainnetChainConfig
,
}
}
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