From 18d40425ec00c4f3b79ef293c59bdf165ef39cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20=C5=BBuk?= Date: Thu, 16 Mar 2023 21:37:27 +0100 Subject: [PATCH] fix: accept ethlive as a chain name (#2268) * fix: accept ethlive as a chain name * Fix mainnet chain formatting * Drop unnecessary chain formatting tests --------- Co-authored-by: Georgios Konstantopoulos --- CHANGELOG.md | 1 + ethers-core/src/types/chain.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d31e8407..d78df792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Unreleased +- Add support for `ethlive` as a chain name [#2268](https://github.com/gakonst/ethers-rs/pull/2268) - Make `Chain` more round-trip friendly [#2270](https://github.com/gakonst/ethers-rs/pull/2270) - Add `other: OtherFields` to `TransactionReceipt` [#2209](https://github.com/gakonst/ethers-rs/pull/2209) - Add `Signature::recover_typed_data` [#2120](https://github.com/gakonst/ethers-rs/pull/2120) diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs index 979b4c98..fb574c29 100644 --- a/ethers-core/src/types/chain.rs +++ b/ethers-core/src/types/chain.rs @@ -53,6 +53,7 @@ pub type ParseChainError = TryFromPrimitiveError; #[strum(serialize_all = "kebab-case")] #[repr(u64)] pub enum Chain { + #[strum(serialize = "ethlive", serialize = "mainnet")] Mainnet = 1, Morden = 2, Ropsten = 3,