github.com/status-im/status-go@v1.1.0/contracts/gas-price-oracle/address.go (about) 1 package gaspriceoracle 2 3 import ( 4 "errors" 5 6 "github.com/ethereum/go-ethereum/common" 7 8 wallet_common "github.com/status-im/status-go/services/wallet/common" 9 ) 10 11 var ErrorNotAvailableOnChainID = errors.New("not available for chainID") 12 13 var contractAddressByChainID = map[uint64]common.Address{ 14 wallet_common.OptimismMainnet: common.HexToAddress("0x8527c030424728cF93E72bDbf7663281A44Eeb22"), 15 wallet_common.OptimismSepolia: common.HexToAddress("0x5230210c2b4995FD5084b0F5FD0D7457aebb5010"), 16 } 17 18 func ContractAddress(chainID uint64) (common.Address, error) { 19 addr, exists := contractAddressByChainID[chainID] 20 if !exists { 21 return common.Address{}, ErrorNotAvailableOnChainID 22 } 23 return addr, nil 24 }