Add missing chains into parse method (#941)
* Add missing chains into parse method * Update changelog
This commit is contained in:
parent
3effda2804
commit
901d0c6e00
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
### Unreleased
|
### Unreleased
|
||||||
|
|
||||||
|
- Add FTM Mainet and testnet to parse method "try_from" from Chain.rs and add cronos mainet and testnet to "from_str"
|
||||||
- Add FTM mainnet and testnet Multicall addresses [927](https://github.com/gakonst/ethers-rs/pull/927)
|
- Add FTM mainnet and testnet Multicall addresses [927](https://github.com/gakonst/ethers-rs/pull/927)
|
||||||
- Add Cronos mainnet beta and testnet to the list of known chains
|
- Add Cronos mainnet beta and testnet to the list of known chains
|
||||||
[926](https://github.com/gakonst/ethers-rs/pull/926)
|
[926](https://github.com/gakonst/ethers-rs/pull/926)
|
||||||
|
|
|
@ -103,6 +103,8 @@ impl TryFrom<u64> for Chain {
|
||||||
42 => Chain::Kovan,
|
42 => Chain::Kovan,
|
||||||
100 => Chain::XDai,
|
100 => Chain::XDai,
|
||||||
137 => Chain::Polygon,
|
137 => Chain::Polygon,
|
||||||
|
250 => Chain::Fantom,
|
||||||
|
4002 => Chain::FantomTestnet,
|
||||||
80001 => Chain::PolygonMumbai,
|
80001 => Chain::PolygonMumbai,
|
||||||
43114 => Chain::Avalanche,
|
43114 => Chain::Avalanche,
|
||||||
43113 => Chain::AvalancheFuji,
|
43113 => Chain::AvalancheFuji,
|
||||||
|
@ -116,6 +118,8 @@ impl TryFrom<u64> for Chain {
|
||||||
97 => Chain::BinanceSmartChainTestnet,
|
97 => Chain::BinanceSmartChainTestnet,
|
||||||
42161 => Chain::Arbitrum,
|
42161 => Chain::Arbitrum,
|
||||||
421611 => Chain::ArbitrumTestnet,
|
421611 => Chain::ArbitrumTestnet,
|
||||||
|
25 => Chain::Cronos,
|
||||||
|
338 => Chain::CronosTestnet,
|
||||||
_ => return Err(ParseChainError(chain.to_string())),
|
_ => return Err(ParseChainError(chain.to_string())),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -147,6 +151,8 @@ impl FromStr for Chain {
|
||||||
"bsc-testnet" => Chain::BinanceSmartChainTestnet,
|
"bsc-testnet" => Chain::BinanceSmartChainTestnet,
|
||||||
"arbitrum" => Chain::Arbitrum,
|
"arbitrum" => Chain::Arbitrum,
|
||||||
"arbitrum-testnet" => Chain::ArbitrumTestnet,
|
"arbitrum-testnet" => Chain::ArbitrumTestnet,
|
||||||
|
"cronos" => Chain::Cronos,
|
||||||
|
"cronos-testnet" => Chain::CronosTestnet,
|
||||||
_ => return Err(ParseChainError(chain.to_owned())),
|
_ => return Err(ParseChainError(chain.to_owned())),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue