From 04e99a59d0ced40c516facedf1907d1b6972e37c Mon Sep 17 00:00:00 2001 From: NickSolante Date: Mon, 8 Apr 2024 11:29:12 +1000 Subject: [PATCH] cleanup conditional --- internal/config/constants.go | 6 ++++++ internal/start/private.go | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/config/constants.go b/internal/config/constants.go index b66d486c..bbe6ebc4 100644 --- a/internal/config/constants.go +++ b/internal/config/constants.go @@ -34,4 +34,10 @@ var ( LyraSepoliaChainID.Uint64(), Ancient8SepoliaChainID.Uint64(), ) + + ArbStackChains = mapset.NewSet( + ArbitrumOneChainID.Uint64(), + ArbitrumGoerliChainID.Uint64(), + ArbitrumSepoliaChainID.Uint64(), + ) ) diff --git a/internal/start/private.go b/internal/start/private.go index 9714b5bb..23fb9982 100644 --- a/internal/start/private.go +++ b/internal/start/private.go @@ -84,9 +84,7 @@ func PrivateMode() { } ov := gas.NewDefaultOverhead() - if conf.IsArbStackNetwork || chain.Cmp(config.ArbitrumOneChainID) == 0 || - chain.Cmp(config.ArbitrumGoerliChainID) == 0 || - chain.Cmp(config.ArbitrumSepoliaChainID) == 0 { + if conf.IsArbStackNetwork || config.ArbStackChains.Contains(chain.Uint64()) { ov.SetCalcPreVerificationGasFunc(gas.CalcArbitrumPVGWithEthClient(rpc, conf.SupportedEntryPoints[0])) ov.SetPreVerificationGasBufferFactor(16) }