diff --git a/CHANGELOG.md b/CHANGELOG.md index 86013cc1..5f0b5607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ - Add `From` and From> traits to `ValueOrArray` [#1199](https://github.com/gakonst/ethers-rs/pull/1200) - Fix handling of Websocket connection errors [#1287](https://github.com/gakonst/ethers-rs/pull/1287) - Add Arithmetic Shift Right operation for I256 [#1323](https://github.com/gakonst/ethers-rs/issues/1323) +- [#1535](https://github.com/gakonst/ethers-rs/pull/1535) Add support to Aurora and Aurora testnet networks. ## ethers-contract-abigen diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs index 1831db54..7f966268 100644 --- a/ethers-core/src/types/chain.rs +++ b/ethers-core/src/types/chain.rs @@ -56,6 +56,8 @@ pub enum Chain { EmeraldTestnet = 42261, Evmos = 9001, EvmosTestnet = 9000, + Aurora = 1313161554, + AuroraTestnet = 1313161555, } impl fmt::Display for Chain { @@ -97,6 +99,8 @@ impl fmt::Display for Chain { Chain::AnvilHardhat => "anvil-hardhat", Chain::Evmos => "evmos", Chain::EvmosTestnet => "evmos-testnet", + Chain::Aurora => "aurora", + Chain::AuroraTestnet => "aurora-testnet", }; write!(formatter, "{}", chain) @@ -162,6 +166,8 @@ impl TryFrom for Chain { 42261 => Chain::EmeraldTestnet, 9001 => Chain::Evmos, 9000 => Chain::EvmosTestnet, + 1313161554 => Chain::Aurora, + 1313161555 => Chain::AuroraTestnet, _ => return Err(ParseChainError(chain.to_string())), }) } @@ -215,6 +221,8 @@ impl FromStr for Chain { "oasis" => Chain::Oasis, "emerald" => Chain::Emerald, "emerald-testnet" => Chain::EmeraldTestnet, + "aurora" => Chain::Aurora, + "aurora-testnet" => Chain::AuroraTestnet, _ => return Err(ParseChainError(chain.to_owned())), }) } diff --git a/ethers-etherscan/src/lib.rs b/ethers-etherscan/src/lib.rs index a78483f0..1afd7189 100644 --- a/ethers-etherscan/src/lib.rs +++ b/ethers-etherscan/src/lib.rs @@ -91,7 +91,9 @@ impl Client { Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::Cronos | - Chain::CronosTestnet => std::env::var("ETHERSCAN_API_KEY")?, + Chain::CronosTestnet | + Chain::Aurora | + Chain::AuroraTestnet => std::env::var("ETHERSCAN_API_KEY")?, Chain::Fantom | Chain::FantomTestnet => { std::env::var("FTMSCAN_API_KEY").or_else(|_| std::env::var("FANTOMSCAN_API_KEY"))? }