Skip to content

Commit

Permalink
Get rid of the hardcoded list of chains in config_arbitrum.go (geth) …
Browse files Browse the repository at this point in the history
…instead use arbitrum_chain_info.json (nitro)
  • Loading branch information
ganeshvanahalli committed Sep 11, 2024
1 parent fb79423 commit 797bfd6
Showing 1 changed file with 0 additions and 213 deletions.
213 changes: 0 additions & 213 deletions params/config_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,66 +79,6 @@ func (c *ChainConfig) checkArbitrumCompatible(newcfg *ChainConfig, head *big.Int
return nil
}

func ArbitrumOneParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
AllowDebugPrecompiles: false,
DataAvailabilityCommittee: false,
InitialArbOSVersion: 6,
InitialChainOwner: common.HexToAddress("0xd345e41ae2cb00311956aa7109fc801ae8c81a52"),
}
}

func ArbitrumNovaParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
AllowDebugPrecompiles: false,
DataAvailabilityCommittee: true,
InitialArbOSVersion: 1,
InitialChainOwner: common.HexToAddress("0x9C040726F2A657226Ed95712245DeE84b650A1b5"),
}
}

func ArbitrumRollupGoerliTestnetParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
AllowDebugPrecompiles: false,
DataAvailabilityCommittee: false,
InitialArbOSVersion: 2,
InitialChainOwner: common.HexToAddress("0x186B56023d42B2B4E7616589a5C62EEf5FCa21DD"),
}
}

func ArbitrumDevTestParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
AllowDebugPrecompiles: true,
DataAvailabilityCommittee: false,
InitialArbOSVersion: 31,
InitialChainOwner: common.Address{},
}
}

func ArbitrumDevTestDASParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
AllowDebugPrecompiles: true,
DataAvailabilityCommittee: true,
InitialArbOSVersion: 31,
InitialChainOwner: common.Address{},
}
}

func ArbitrumAnytrustGoerliTestnetParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
AllowDebugPrecompiles: false,
DataAvailabilityCommittee: true,
InitialArbOSVersion: 2,
InitialChainOwner: common.HexToAddress("0x186B56023d42B2B4E7616589a5C62EEf5FCa21DD"),
}
}

func DisableArbitrumParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: false,
Expand All @@ -148,156 +88,3 @@ func DisableArbitrumParams() ArbitrumChainParams {
InitialChainOwner: common.Address{},
}
}

func ArbitrumOneChainConfig() *ChainConfig {
return &ChainConfig{
ChainID: big.NewInt(42161),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
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(0),
LondonBlock: big.NewInt(0),
ArbitrumChainParams: ArbitrumOneParams(),
Clique: &CliqueConfig{
Period: 0,
Epoch: 0,
},
}
}

func ArbitrumNovaChainConfig() *ChainConfig {
return &ChainConfig{
ChainID: big.NewInt(42170),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
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(0),
LondonBlock: big.NewInt(0),
ArbitrumChainParams: ArbitrumNovaParams(),
Clique: &CliqueConfig{
Period: 0,
Epoch: 0,
},
}
}

func ArbitrumRollupGoerliTestnetChainConfig() *ChainConfig {
return &ChainConfig{
ChainID: big.NewInt(421613),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
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(0),
LondonBlock: big.NewInt(0),
ArbitrumChainParams: ArbitrumRollupGoerliTestnetParams(),
Clique: &CliqueConfig{
Period: 0,
Epoch: 0,
},
}
}

func ArbitrumDevTestChainConfig() *ChainConfig {
return &ChainConfig{
ChainID: big.NewInt(412346),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
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(0),
LondonBlock: big.NewInt(0),
ArbitrumChainParams: ArbitrumDevTestParams(),
Clique: &CliqueConfig{
Period: 0,
Epoch: 0,
},
}
}

func ArbitrumDevTestDASChainConfig() *ChainConfig {
return &ChainConfig{
ChainID: big.NewInt(412347),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
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(0),
LondonBlock: big.NewInt(0),
ArbitrumChainParams: ArbitrumDevTestDASParams(),
Clique: &CliqueConfig{
Period: 0,
Epoch: 0,
},
}
}

func ArbitrumAnytrustGoerliTestnetChainConfig() *ChainConfig {
return &ChainConfig{
ChainID: big.NewInt(421703),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
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(0),
LondonBlock: big.NewInt(0),
ArbitrumChainParams: ArbitrumAnytrustGoerliTestnetParams(),
Clique: &CliqueConfig{
Period: 0,
Epoch: 0,
},
}
}

var ArbitrumSupportedChainConfigs = []*ChainConfig{
ArbitrumOneChainConfig(),
ArbitrumNovaChainConfig(),
ArbitrumRollupGoerliTestnetChainConfig(),
ArbitrumDevTestChainConfig(),
ArbitrumDevTestDASChainConfig(),
ArbitrumAnytrustGoerliTestnetChainConfig(),
}

0 comments on commit 797bfd6

Please sign in to comment.