2023-04-18 14:33:59 +00:00
|
|
|
package common
|
|
|
|
|
2023-09-04 10:18:46 +00:00
|
|
|
import "time"
|
|
|
|
|
2023-04-18 14:33:59 +00:00
|
|
|
type ChainID uint64
|
|
|
|
|
|
|
|
const (
|
2023-07-18 15:01:53 +00:00
|
|
|
UnknownChainID uint64 = 0
|
2023-04-18 14:33:59 +00:00
|
|
|
EthereumMainnet uint64 = 1
|
|
|
|
EthereumGoerli uint64 = 5
|
|
|
|
EthereumSepolia uint64 = 11155111
|
|
|
|
OptimismMainnet uint64 = 10
|
|
|
|
OptimismGoerli uint64 = 420
|
|
|
|
ArbitrumMainnet uint64 = 42161
|
|
|
|
ArbitrumGoerli uint64 = 421613
|
|
|
|
)
|
2023-09-04 10:18:46 +00:00
|
|
|
|
|
|
|
var AverageBlockDurationForChain = map[ChainID]time.Duration{
|
|
|
|
ChainID(UnknownChainID): time.Duration(12000) * time.Millisecond,
|
|
|
|
ChainID(EthereumMainnet): time.Duration(12000) * time.Millisecond,
|
|
|
|
ChainID(EthereumGoerli): time.Duration(12000) * time.Millisecond,
|
|
|
|
ChainID(OptimismMainnet): time.Duration(400) * time.Millisecond,
|
|
|
|
ChainID(OptimismGoerli): time.Duration(2000) * time.Millisecond,
|
|
|
|
ChainID(ArbitrumMainnet): time.Duration(300) * time.Millisecond,
|
|
|
|
ChainID(ArbitrumGoerli): time.Duration(1500) * time.Millisecond,
|
|
|
|
}
|