diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs index fb574c2985..a34ee0ac23 100644 --- a/ethers-core/src/types/chain.rs +++ b/ethers-core/src/types/chain.rs @@ -53,7 +53,7 @@ pub type ParseChainError = TryFromPrimitiveError; #[strum(serialize_all = "kebab-case")] #[repr(u64)] pub enum Chain { - #[strum(serialize = "ethlive", serialize = "mainnet")] + #[strum(to_string = "mainnet", serialize = "ethlive")] Mainnet = 1, Morden = 2, Ropsten = 3, @@ -598,6 +598,7 @@ mod tests { // kebab-case const ALIASES: &[(Chain, &[&str])] = &[ + (Mainnet, &["ethlive"]), (BinanceSmartChain, &["bsc", "binance-smart-chain"]), (BinanceSmartChainTestnet, &["bsc-testnet", "binance-smart-chain-testnet"]), (XDai, &["xdai", "gnosis", "gnosis-chain"]),