Skip to content

Commit

Permalink
feat(op-node): add combo chain config
Browse files Browse the repository at this point in the history
  • Loading branch information
redhdx committed Jun 18, 2024
1 parent ae42ed7 commit 7e304da
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions op-node/chaincfg/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ var NetworksByName = map[string]rollup.Config{
"opBNBMainnet": OPBNBMainnet,
"opBNBTestnet": OPBNBTestnet,
"opBNBQANet": OPBNBQANet,
"comboMainnet": ComboMainnet,
"comboTestnet": ComboTestnet,
}

var NetworksByChainId = map[string]rollup.Config{
"204": OPBNBMainnet,
"5611": OPBNBTestnet,
"2484": OPBNBQANet,
"9980": ComboMainnet,
"1715": ComboTestnet,
}

func GetRollupConfigByNetwork(name string) (rollup.Config, error) {
Expand Down Expand Up @@ -217,6 +221,76 @@ var OPBNBQANet = rollup.Config{
EcotoneTime: u64Ptr(1714995000), // May-06-2024 11:30 AM +UTC
}

var ComboMainnet = rollup.Config{
Genesis: rollup.Genesis{
L1: eth.BlockID{
Hash: common.HexToHash("0x7743484e78e047654f5a92c5d66a25828f1c259b2c9a780a39936c001fdcbcf7"),
Number: 33768568,
},
L2: eth.BlockID{
Hash: common.HexToHash("0x92fcf9e91a4cdd7ffc7e67207e77dfba049bacf1ede5c5917a40f9537e05f4bc"),
Number: 0,
},
L2Time: 1700817067,
SystemConfig: eth.SystemConfig{
BatcherAddr: common.HexToAddress("0x6df30535bbe94a533d9f1600e69a642abb3e063f"),
Overhead: eth.Bytes32(common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000834")),
Scalar: eth.Bytes32(common.HexToHash("0x00000000000000000000000000000000000000000000000000000000000f4240")),
GasLimit: 100000000,
},
},
BlockTime: 1,
MaxSequencerDrift: 600,
SeqWindowSize: 14400,
ChannelTimeout: 1200,
L1ChainID: big.NewInt(56),
L2ChainID: big.NewInt(9980),
BatchInboxAddress: common.HexToAddress("0xff00000000000000000000000000000000009980"),
DepositContractAddress: common.HexToAddress("0x419df125e0a712db4b10209ac3055b58b840f1f4"),
L1SystemConfigAddress: common.HexToAddress("0x19d9791f6f5df45fb4ced2ea0904e48a6f9e545c"),
RegolithTime: u64Ptr(0),
Fermat: big.NewInt(0),
SnowTime: u64Ptr(1719813600), // July-01-2024 06:00 AM +UTC
CanyonTime: u64Ptr(1719814200), // July-01-2024 06:10 AM +UTC
DeltaTime: u64Ptr(1719814800), // July-01-2024 06:20 AM +UTC
EcotoneTime: u64Ptr(1719815400), // July-01-2024 06:30 AM +UTC
}

var ComboTestnet = rollup.Config{
Genesis: rollup.Genesis{
L1: eth.BlockID{
Hash: common.HexToHash("0x5c42e35d2cf086cdbf6ad194701a48688f3c1e8d2eecf57168a248e63a33be86"),
Number: 39570635,
},
L2: eth.BlockID{
Hash: common.HexToHash("0x51d565869cb1c6d7e577848ccd1f93918b99427c1cc3fed9dca628d0cffcefbb"),
Number: 0,
},
L2Time: 1713424951,
SystemConfig: eth.SystemConfig{
BatcherAddr: common.HexToAddress("0x013fce36695321d32251e58bff33292c685da696"),
Overhead: eth.Bytes32(common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000834")),
Scalar: eth.Bytes32(common.HexToHash("0x00000000000000000000000000000000000000000000000000000000000f4240")),
GasLimit: 100000000,
},
},
BlockTime: 1,
MaxSequencerDrift: 600,
SeqWindowSize: 14400,
ChannelTimeout: 1200,
L1ChainID: big.NewInt(97),
L2ChainID: big.NewInt(1715),
BatchInboxAddress: common.HexToAddress("0xff00000000000000000000000000000000001715"),
DepositContractAddress: common.HexToAddress("0x6357aeea63f9bea16a9264fad26fdfddbec559e6"),
L1SystemConfigAddress: common.HexToAddress("0x3a472819b60885f1f11ee173f56e43961460c391"),
RegolithTime: u64Ptr(0),
Fermat: big.NewInt(0),
SnowTime: u64Ptr(1719208800), // June-24-2024 06:00 AM +UTC
CanyonTime: u64Ptr(1719209400), // June-24-2024 06:10 AM +UTC
DeltaTime: u64Ptr(1719210000), // June-24-2024 06:20 AM +UTC
EcotoneTime: u64Ptr(1719210600), // June-24-2024 06:30 AM +UTC
}

func u64Ptr(v uint64) *uint64 {
return &v
}

0 comments on commit 7e304da

Please sign in to comment.