From 71c9299bb789ca3add936c38d808db50c62f5662 Mon Sep 17 00:00:00 2001 From: Patryk Osmaczko Date: Thu, 29 Aug 2024 15:17:40 +0200 Subject: [PATCH] chore(communities)_: update curated communities testnet contract --- contracts/directory/address.go | 5 +++-- protocol/messenger_curated_communities.go | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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)