mirror of
https://github.com/status-im/status-go.git
synced 2025-01-21 12:11:44 +00:00
27ad41ba8f
* feat_: integrate base chain Signed-off-by: Brian Sztamfater <brian@status.im> Co-authored-by: Dario Gabriel Lipicar <dario@status.im>
30 lines
1.2 KiB
Go
30 lines
1.2 KiB
Go
package balancechecker
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
)
|
|
|
|
var errorNotAvailableOnChainID = errors.New("BalanceChecker not available for chainID")
|
|
|
|
var contractDataByChainID = map[uint64]common.Address{
|
|
1: common.HexToAddress("0x040EA8bFE441597849A9456182fa46D38B75BC05"), // mainnet
|
|
10: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // optimism
|
|
42161: common.HexToAddress("0x54764eF12d29b249fDC7FC3caDc039955A396A8e"), // arbitrum
|
|
8453: common.HexToAddress("0x84A1C94fcc5EcFA292771f6aE7Fbf24ec062D34e"), // base
|
|
11155111: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // sepolia
|
|
421614: common.HexToAddress("0x54764eF12d29b249fDC7FC3caDc039955A396A8e"), // sepolia arbitrum
|
|
11155420: common.HexToAddress("0x55bD303eA3D50FC982A8a5b43972d7f38D129bbF"), // sepolia optimism
|
|
84532: common.HexToAddress("0x84A1C94fcc5EcFA292771f6aE7Fbf24ec062D34e"), // sepolia base
|
|
777333: common.HexToAddress("0x0000000000000000000000000000000010777333"), // unit tests
|
|
}
|
|
|
|
func ContractAddress(chainID uint64) (common.Address, error) {
|
|
contract, exists := contractDataByChainID[chainID]
|
|
if !exists {
|
|
return *new(common.Address), errorNotAvailableOnChainID
|
|
}
|
|
return contract, nil
|
|
}
|