chore(communities)_: update curated communities testnet contract
This commit is contained in:
parent
666f07fe1e
commit
71c9299bb7
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue