diff --git a/contracts/directory/address.go b/contracts/directory/address.go index 892ae247f..fe6f25408 100644 --- a/contracts/directory/address.go +++ b/contracts/directory/address.go @@ -4,13 +4,14 @@ import ( "errors" "github.com/ethereum/go-ethereum/common" + wallet_common "github.com/status-im/status-go/services/wallet/common" ) var errorNotAvailableOnChainID = errors.New("not available for chainID") var contractAddressByChainID = map[uint64]common.Address{ - 10: common.HexToAddress("0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A"), // optimism mainnet - 420: common.HexToAddress("0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5"), // optimism goerli testnet + wallet_common.OptimismMainnet: common.HexToAddress("0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A"), + wallet_common.OptimismSepolia: common.HexToAddress("0x6B94e21FAB8Af38E8d89dd4A0480C04e9a5c53Ab"), } func ContractAddress(chainID uint64) (common.Address, error) { diff --git a/protocol/messenger_curated_communities.go b/protocol/messenger_curated_communities.go index 9d1f02089..03559823f 100644 --- a/protocol/messenger_curated_communities.go +++ b/protocol/messenger_curated_communities.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/communities" + "github.com/status-im/status-go/services/wallet/common" ) const ( @@ -89,9 +90,9 @@ func (m *Messenger) getCuratedCommunitiesFromContract() (*communities.CuratedCom return nil, err } - chainID := uint64(10) // Optimism Mainnet + chainID := common.OptimismMainnet if testNetworksEnabled { - chainID = 420 // Optimism Goerli + chainID = common.OptimismSepolia } directory, err := m.contractMaker.NewDirectory(chainID)