From f9475a605f74c7e7fb0159ed0d6130d87ab94e59 Mon Sep 17 00:00:00 2001 From: Stefan Liu Date: Tue, 2 Nov 2021 10:52:05 +0800 Subject: [PATCH] Add avalanche chain --- base/base.go | 2 ++ base/mainnet.go | 3 ++- base/testnet.go | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/base/base.go b/base/base.go index d2cafa7..8865d4b 100644 --- a/base/base.go +++ b/base/base.go @@ -104,6 +104,8 @@ func GetChainName(id uint64) string { return "Optimism" case FANTOM: return "Fantom" + case AVA: + return "Avalanche" default: return fmt.Sprintf("Unknown(%d)", id) } diff --git a/base/mainnet.go b/base/mainnet.go index af68291..0ea7d6e 100644 --- a/base/mainnet.go +++ b/base/mainnet.go @@ -39,10 +39,11 @@ var ( XDAI uint64 = 20 OPTIMISM uint64 = 200007 FANTOM uint64 = 200008 + AVA uint64 = 200009 ENV = "mainnet" ) var CHAINS = []uint64{ - POLY, ETH, BSC, HECO, OK, ONT, NEO, NEO3, HEIMDALL, MATIC, SWITCHEO, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, + POLY, ETH, BSC, HECO, OK, ONT, NEO, NEO3, HEIMDALL, MATIC, SWITCHEO, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, AVA, } diff --git a/base/testnet.go b/base/testnet.go index 604658b..afd380a 100644 --- a/base/testnet.go +++ b/base/testnet.go @@ -38,6 +38,7 @@ var ( XDAI uint64 = 206 OPTIMISM uint64 = 207 FANTOM uint64 = 208 + AVA uint64 = 209 SWITCHEO uint64 = 1000 @@ -45,5 +46,5 @@ var ( ) var CHAINS = []uint64{ - POLY, ETH, BSC, HECO, OK, ONT, NEO, NEO3, HEIMDALL, MATIC, SWITCHEO, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, + POLY, ETH, BSC, HECO, OK, ONT, NEO, NEO3, HEIMDALL, MATIC, SWITCHEO, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, AVA, }