From 161307e4681ab11aa7ab6bbf40f224143f177a4e Mon Sep 17 00:00:00 2001 From: rain-zxn <206131521@qq.com> Date: Tue, 19 Jul 2022 16:01:40 +0800 Subject: [PATCH] add conflux testnet --- base/base.go | 3 +++ base/devnet.go | 5 +++-- base/mainnet.go | 15 ++++++++------- base/testnet.go | 7 ++++--- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/base/base.go b/base/base.go index a9a44f7..3977157 100644 --- a/base/base.go +++ b/base/base.go @@ -142,6 +142,9 @@ func GetChainName(id uint64) string { return "Celo" case CLOVER: return "CLV P-Chain" + case CONFLUX: + return "Conflux" + default: return fmt.Sprintf("Unknown(%d)", id) } diff --git a/base/devnet.go b/base/devnet.go index f2ee56e..c3fd0e1 100644 --- a/base/devnet.go +++ b/base/devnet.go @@ -50,14 +50,15 @@ const ( ZKSYNC uint64 = 940 CELO uint64 = 960 CLOVER uint64 = 970 + CONFLUX uint64 = 980 ENV = "devnet" ) var CHAINS = []uint64{ - POLY, ETH, ONT, NEO, BSC, HECO, O3, OK, MATIC, METIS, RINKEBY, PIXIE, HSC, HARMONY, BYTOM, STARCOIN, ONTEVM, CUBE, KAVA, FLOW, RIPPLE, ZKSYNC, CELO, CLOVER, + POLY, ETH, ONT, NEO, BSC, HECO, O3, OK, MATIC, METIS, RINKEBY, PIXIE, HSC, HARMONY, BYTOM, STARCOIN, ONTEVM, CUBE, KAVA, FLOW, RIPPLE, ZKSYNC, CELO, CLOVER, CONFLUX, } var ETH_CHAINS = []uint64{ - ETH, BSC, HECO, OK, MATIC, O3, METIS, RINKEBY, PIXIE, HSC, HARMONY, BYTOM, KCC, ONTEVM, CUBE, KAVA, ZKSYNC, CELO, CLOVER, + ETH, BSC, HECO, OK, MATIC, O3, METIS, RINKEBY, PIXIE, HSC, HARMONY, BYTOM, KCC, ONTEVM, CUBE, KAVA, ZKSYNC, CELO, CLOVER, CONFLUX, } diff --git a/base/mainnet.go b/base/mainnet.go index 73ccad7..9922949 100644 --- a/base/mainnet.go +++ b/base/mainnet.go @@ -50,19 +50,20 @@ const ( KCC uint64 = 30 STARCOIN uint64 = 31 KAVA uint64 = 32 + MILKO uint64 = 34 + CUBE uint64 = 35 + ZKSYNC uint64 = 100940 + CELO uint64 = 36 + CLOVER uint64 = 37 // Invalid chain IDs RINKEBY uint64 = 1000000 PIXIE uint64 = 2000000 BCSPALETTE uint64 = 1001001 ONTEVM uint64 = 1001333 - MILKO uint64 = 1001335 - CUBE uint64 = 1001336 FLOW uint64 = 1000444 RIPPLE uint64 = 1001223 - ZKSYNC uint64 = 100940 - CELO uint64 = 100960 - CLOVER uint64 = 100970 + CONFLUX uint64 = 1000980 ENV = "mainnet" ) @@ -70,10 +71,10 @@ const ( var CHAINS = []uint64{ POLY, ETH, BSC, HECO, OK, ONT, NEO, NEO3, HEIMDALL, MATIC, SWITCHEO, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, AVA, METIS, BOBA, PIXIE, OASIS, HSC, HARMONY, BYTOM, BCSPALETTE, STARCOIN, ONTEVM, KCC, MILKO, CUBE, KAVA, FLOW, RIPPLE, - ZKSYNC, CELO, CLOVER, + ZKSYNC, CELO, CLOVER, CONFLUX, } var ETH_CHAINS = []uint64{ ETH, BSC, HECO, OK, MATIC, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, AVA, METIS, BOBA, PIXIE, OASIS, HSC, HARMONY, - BYTOM, BCSPALETTE, KCC, ONTEVM, MILKO, CUBE, KAVA, ZKSYNC, CELO, CLOVER, + BYTOM, BCSPALETTE, KCC, ONTEVM, MILKO, CUBE, KAVA, ZKSYNC, CELO, CLOVER, CONFLUX, } diff --git a/base/testnet.go b/base/testnet.go index 70b9016..3fce2f1 100644 --- a/base/testnet.go +++ b/base/testnet.go @@ -57,6 +57,7 @@ const ( ZKSYNC uint64 = 940 CELO uint64 = 960 CLOVER uint64 = 970 + CONFLUX uint64 = 980 SWITCHEO uint64 = 1000 BCSPALETTE uint64 = 1001 @@ -68,11 +69,11 @@ const ( var CHAINS = []uint64{ POLY, ETH, BSC, HECO, OK, ONT, NEO, NEO3, HEIMDALL, MATIC, SWITCHEO, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, AVA, - METIS, RINKEBY, BOBA, PIXIE, OASIS, HSC, HARMONY, BYTOM, BCSPALETTE, STARCOIN, ONTEVM, KCC, MILKO, CUBE, KAVA, FLOW, - RIPPLE, ZKSYNC, CELO, CLOVER, + METIS, RINKEBY, BOBA, PIXIE, OASIS, HSC, HARMONY, BYTOM, BCSPALETTE, STARCOIN, ONTEVM, KCC, MILKO, CUBE, KAVA, FLOW, + RIPPLE, ZKSYNC, CELO, CLOVER, CONFLUX, } var ETH_CHAINS = []uint64{ ETH, BSC, HECO, OK, MATIC, O3, PLT, ARBITRUM, XDAI, OPTIMISM, FANTOM, AVA, METIS, RINKEBY, BOBA, PIXIE, OASIS, HSC, - HARMONY, HARMONY, BYTOM, BCSPALETTE, KCC, ONTEVM, MILKO, CUBE, KAVA, ZKSYNC, CELO, CLOVER, + HARMONY, HARMONY, BYTOM, BCSPALETTE, KCC, ONTEVM, MILKO, CUBE, KAVA, ZKSYNC, CELO, CLOVER, CONFLUX, }