status-go/contracts/directory/address.go

22 lines
526 B
Go
Raw Normal View History

package directory
import (
"errors"
"github.com/ethereum/go-ethereum/common"
)
var errorNotAvailableOnChainID = errors.New("not available for chainID")
var contractAddressByChainID = map[uint64]common.Address{
69: common.HexToAddress("0x33534cc18D50ab082324A98eE69A7cCe47b75C49"), // optimism kovan testnet
}
func ContractAddress(chainID uint64) (common.Address, error) {
addr, exists := contractAddressByChainID[chainID]
if !exists {
return *new(common.Address), errorNotAvailableOnChainID
}
return addr, nil
}