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

Commit

Permalink
Support Arbitrum Sepolia PVG calculation (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
hazim-j authored Oct 18, 2023
1 parent 9b403d6 commit 34cd6b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
17 changes: 9 additions & 8 deletions internal/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package config
import "math/big"

var (
EthereumChainID = big.NewInt(1)
GoerliChainID = big.NewInt(5)
ArbitrumOneChainID = big.NewInt(42161)
ArbitrumGoerliChainID = big.NewInt(421613)
OptimismChainID = big.NewInt(10)
OptimismGoerliChainID = big.NewInt(420)
BaseChainID = big.NewInt(8453)
BaseGoerliChainID = big.NewInt(84531)
EthereumChainID = big.NewInt(1)
GoerliChainID = big.NewInt(5)
ArbitrumOneChainID = big.NewInt(42161)
ArbitrumGoerliChainID = big.NewInt(421613)
ArbitrumSepoliaChainID = big.NewInt(421614)
OptimismChainID = big.NewInt(10)
OptimismGoerliChainID = big.NewInt(420)
BaseChainID = big.NewInt(8453)
BaseGoerliChainID = big.NewInt(84531)
)
3 changes: 2 additions & 1 deletion internal/start/private.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func PrivateMode() {
}

ov := gas.NewDefaultOverhead()
if chain.Cmp(config.ArbitrumOneChainID) == 0 || chain.Cmp(config.ArbitrumGoerliChainID) == 0 {
if chain.Cmp(config.ArbitrumOneChainID) == 0 || chain.Cmp(config.ArbitrumGoerliChainID) == 0 ||
chain.Cmp(config.ArbitrumSepoliaChainID) == 0 {
ov.SetCalcPreVerificationGasFunc(gas.CalcArbitrumPVGWithEthClient(rpc, conf.SupportedEntryPoints[0]))
ov.SetPreVerificationGasBufferFactor(16)
}
Expand Down

0 comments on commit 34cd6b4

Please sign in to comment.