feat: add evmos support (#1398)
This commit is contained in:
parent
c2f5a87b63
commit
1ce2310874
|
@ -53,6 +53,8 @@ pub enum Chain {
|
|||
Oasis = 26863,
|
||||
Emerald = 42262,
|
||||
EmeraldTestnet = 42261,
|
||||
Evmos = 9001,
|
||||
EvmosTestnet = 9000,
|
||||
}
|
||||
|
||||
impl fmt::Display for Chain {
|
||||
|
@ -91,6 +93,8 @@ impl fmt::Display for Chain {
|
|||
Chain::Emerald => "emerald",
|
||||
Chain::EmeraldTestnet => "emerald-testnet",
|
||||
Chain::AnvilHardhat => "anvil-hardhat",
|
||||
Chain::Evmos => "evmos",
|
||||
Chain::EvmosTestnet => "evmos-testnet",
|
||||
};
|
||||
|
||||
write!(formatter, "{}", chain)
|
||||
|
|
|
@ -101,7 +101,9 @@ impl Client {
|
|||
Chain::Poa |
|
||||
Chain::Oasis |
|
||||
Chain::Emerald |
|
||||
Chain::EmeraldTestnet => String::default(),
|
||||
Chain::EmeraldTestnet |
|
||||
Chain::Evmos |
|
||||
Chain::EvmosTestnet => String::default(),
|
||||
Chain::Moonbeam | Chain::Moonbase | Chain::MoonbeamDev | Chain::Moonriver => {
|
||||
std::env::var("MOONSCAN_API_KEY")?
|
||||
}
|
||||
|
@ -302,6 +304,8 @@ impl ClientBuilder {
|
|||
Chain::AnvilHardhat | Chain::Dev => {
|
||||
return Err(EtherscanError::LocalNetworksNotSupported)
|
||||
}
|
||||
Chain::Evmos => urls("https://evm.evmos.org/api", "https://evm.evmos.org/"),
|
||||
Chain::EvmosTestnet => urls("https://evm.evmos.dev/api", "https://evm.evmos.dev/"),
|
||||
chain => return Err(EtherscanError::ChainNotSupported(chain)),
|
||||
};
|
||||
self.with_api_url(etherscan_api_url?)?.with_url(etherscan_url?)
|
||||
|
|
Loading…
Reference in New Issue