github.com/status-im/status-go@v1.1.0/contracts/community-tokens/deployer/address.go (about) 1 package communitytokendeployer 2 3 import ( 4 "errors" 5 6 "github.com/ethereum/go-ethereum/common" 7 ) 8 9 var errorNotAvailableOnChainID = errors.New("deployer contract not available for chainID") 10 11 // addresses can be found on https://github.com/status-im/communities-contracts#deployments 12 var contractAddressByChainID = map[uint64]common.Address{ 13 1: common.HexToAddress("0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5"), // Mainnet 14 5: common.HexToAddress("0x81f4951ff8859d305F47A4574B206cF64C0d2645"), // Goerli 15 10: common.HexToAddress("0x31463D22750324C8721FF7751584EF62F2ff93b3"), // Optimism 16 420: common.HexToAddress("0xfFa8A255D905c909379859eA45B959D090DDC2d4"), // Optimism Goerli 17 42161: common.HexToAddress("0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b"), // Arbitrum 18 421613: common.HexToAddress("0x7Ff554af5b6624db2135E4364F416d1D397f43e6"), // Arbitrum Goerli 19 11155111: common.HexToAddress("0xCDE984e57cdb88c70b53437cc694345B646371f9"), // Sepolia 20 421614: common.HexToAddress("0x7Ff554af5b6624db2135E4364F416d1D397f43e6"), // Arbitrum Sepolia 21 11155420: common.HexToAddress("0xcE2A896eEA2F585BC0C3753DC8116BbE2AbaE541"), // Optimism Sepolia 22 } 23 24 func ContractAddress(chainID uint64) (common.Address, error) { 25 addr, exists := contractAddressByChainID[chainID] 26 if !exists { 27 return *new(common.Address), errorNotAvailableOnChainID 28 } 29 return addr, nil 30 }