From c6842201444df039e5aed29126ede4d1454c1490 Mon Sep 17 00:00:00 2001 From: Chris Cordle Date: Fri, 6 Jan 2023 04:32:54 -0500 Subject: [PATCH] feat: Add arbitrum nova api and chain id 42170 (#2020) * Add arbitrum nova api and chain id * chore: fmt Co-authored-by: Georgios Konstantopoulos --- ethers-core/src/types/chain.rs | 5 ++++- ethers-etherscan/src/lib.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs index 11417376..8069370c 100644 --- a/ethers-core/src/types/chain.rs +++ b/ethers-core/src/types/chain.rs @@ -50,6 +50,7 @@ pub enum Chain { Arbitrum = 42161, ArbitrumTestnet = 421611, ArbitrumGoerli = 421613, + ArbitrumNova = 42170, Cronos = 25, CronosTestnet = 338, @@ -205,7 +206,7 @@ impl Chain { use Chain::*; let ms = match self { - Arbitrum | ArbitrumTestnet | ArbitrumGoerli => 1_300, + Arbitrum | ArbitrumTestnet | ArbitrumGoerli | ArbitrumNova => 1_300, Mainnet | Optimism => 13_000, Polygon | PolygonMumbai => 2_100, Moonbeam | Moonriver => 12_500, @@ -276,6 +277,7 @@ impl Chain { "https://goerli-rollup-explorer.arbitrum.io/api", "https://goerli-rollup-explorer.arbitrum.io", ), + ArbitrumNova => ("https://api-nova.arbiscan.io/api", "https://nova.arbiscan.io/"), Cronos => ("https://api.cronoscan.com/api", "https://cronoscan.com"), CronosTestnet => { ("https://api-testnet.cronoscan.com/api", "https://testnet.cronoscan.com") @@ -340,6 +342,7 @@ impl Chain { Arbitrum | ArbitrumTestnet | ArbitrumGoerli | + ArbitrumNova | Rsk | Oasis | Emerald | diff --git a/ethers-etherscan/src/lib.rs b/ethers-etherscan/src/lib.rs index 9c9930db..f8340d41 100644 --- a/ethers-etherscan/src/lib.rs +++ b/ethers-etherscan/src/lib.rs @@ -95,6 +95,7 @@ impl Client { Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli | + Chain::ArbitrumNova | Chain::Cronos | Chain::CronosTestnet | Chain::Aurora |