From a766458bd8772f393ce39034ded914cc6d46aea5 Mon Sep 17 00:00:00 2001 From: wuyachi Date: Fri, 24 Jun 2022 16:20:47 +0800 Subject: [PATCH] Add zkSync/Celo/Clover chain --- base/base.go | 6 ++++++ base/devnet.go | 7 +++++-- base/mainnet.go | 9 +++++++-- base/testnet.go | 6 +++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/base/base.go b/base/base.go index 8e6e433..12350f5 100644 --- a/base/base.go +++ b/base/base.go @@ -136,6 +136,12 @@ func GetChainName(id uint64) string { return "Cube" case KAVA: return "Kava" + case ZKSYNC: + return "zkSync" + case CELO: + return "Celo" + case CLOVER: + return "CLV P-Chain" default: return fmt.Sprintf("Unknown(%d)", id) } diff --git a/base/devnet.go b/base/devnet.go index ecef7c2..cd821e3 100644 --- a/base/devnet.go +++ b/base/devnet.go @@ -46,14 +46,17 @@ const ( HARMONY uint64 = 801 BCSPALETTE uint64 = 1001 STARCOIN uint64 = 318 + ZKSYNC uint64 = 940 + CELO uint64 = 960 + CLOVER uint64 = 970 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, + POLY, ETH, ONT, NEO, BSC, HECO, O3, OK, MATIC, METIS, RINKEBY, PIXIE, HSC, HARMONY, BYTOM, STARCOIN, ONTEVM, CUBE, KAVA, FLOW, ZKSYNC, CELO, CLOVER, } var ETH_CHAINS = []uint64{ - ETH, BSC, HECO, OK, MATIC, O3, METIS, RINKEBY, PIXIE, HSC, HARMONY, BYTOM, KCC, ONTEVM, CUBE, KAVA, + ETH, BSC, HECO, OK, MATIC, O3, METIS, RINKEBY, PIXIE, HSC, HARMONY, BYTOM, KCC, ONTEVM, CUBE, KAVA, ZKSYNC, CELO, CLOVER, } diff --git a/base/mainnet.go b/base/mainnet.go index 64aa86e..c738f71 100644 --- a/base/mainnet.go +++ b/base/mainnet.go @@ -52,6 +52,9 @@ const ( KAVA uint64 = 32 MILKO uint64 = 34 CUBE uint64 = 35 + ZKSYNC uint64 = 100940 + CELO uint64 = 100960 + CLOVER uint64 = 100970 // Invalid chain IDs RINKEBY uint64 = 1000000 @@ -65,9 +68,11 @@ 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, + METIS, BOBA, PIXIE, OASIS, HSC, HARMONY, BYTOM, BCSPALETTE, STARCOIN, ONTEVM, KCC, MILKO, CUBE, KAVA, FLOW, ZKSYNC, + CELO, CLOVER, } 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, + 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, } diff --git a/base/testnet.go b/base/testnet.go index e2e8d63..f5cb8a5 100644 --- a/base/testnet.go +++ b/base/testnet.go @@ -54,6 +54,9 @@ const ( FLOW uint64 = 910 KAVA uint64 = 920 CUBE uint64 = 930 + ZKSYNC uint64 = 940 + CELO uint64 = 960 + CLOVER uint64 = 970 SWITCHEO uint64 = 1000 BCSPALETTE uint64 = 1001 @@ -65,9 +68,10 @@ 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, + ZKSYNC, CELO, CLOVER, } 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, + HARMONY, HARMONY, BYTOM, BCSPALETTE, KCC, ONTEVM, MILKO, CUBE, KAVA, ZKSYNC, CELO, CLOVER, }