Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit fe14adb

Browse files
authored
Add support for Ancient8 network (#359)
1 parent 4a71814 commit fe14adb

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

internal/config/constants.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package config
22

3-
import "math/big"
3+
import (
4+
"math/big"
5+
6+
mapset "github.com/deckarep/golang-set/v2"
7+
)
48

59
var (
610
EthereumChainID = big.NewInt(1)
@@ -17,4 +21,17 @@ var (
1721
BaseSepoliaChainID = big.NewInt(84532)
1822
LyraChainID = big.NewInt(957)
1923
LyraSepoliaChainID = big.NewInt(902)
24+
Ancient8SepoliaChainID = big.NewInt(2863311531)
25+
26+
OpStackChains = mapset.NewSet[*big.Int](
27+
OptimismChainID,
28+
OptimismGoerliChainID,
29+
OptimismSepoliaChainID,
30+
BaseChainID,
31+
BaseGoerliChainID,
32+
BaseSepoliaChainID,
33+
LyraChainID,
34+
LyraSepoliaChainID,
35+
Ancient8SepoliaChainID,
36+
)
2037
)

internal/start/private.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,8 @@ func PrivateMode() {
8989
ov.SetCalcPreVerificationGasFunc(gas.CalcArbitrumPVGWithEthClient(rpc, conf.SupportedEntryPoints[0]))
9090
ov.SetPreVerificationGasBufferFactor(16)
9191
}
92-
if chain.Cmp(config.OptimismChainID) == 0 ||
93-
chain.Cmp(config.OptimismGoerliChainID) == 0 ||
94-
chain.Cmp(config.OptimismSepoliaChainID) == 0 ||
95-
chain.Cmp(config.BaseChainID) == 0 ||
96-
chain.Cmp(config.BaseGoerliChainID) == 0 ||
97-
chain.Cmp(config.BaseSepoliaChainID) == 0 ||
98-
chain.Cmp(config.LyraChainID) == 0 ||
99-
chain.Cmp(config.LyraSepoliaChainID) == 0 {
92+
93+
if config.OpStackChains.Contains(chain) {
10094
ov.SetCalcPreVerificationGasFunc(
10195
gas.CalcOptimismPVGWithEthClient(rpc, chain, conf.SupportedEntryPoints[0]),
10296
)

0 commit comments

Comments
 (0)