Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
chore: add moonbase chain id (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jun 21, 2022
1 parent 77ca64d commit c2f5a87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ pub enum Chain {
Avalanche = 43114,
AvalancheFuji = 43113,
Sepolia = 11155111,
Moonbeam = 1287,
Moonbeam = 1284,
Moonbase = 1287,
MoonbeamDev = 1281,
Moonriver = 1285,
Optimism = 10,
Expand Down Expand Up @@ -69,6 +70,7 @@ impl fmt::Display for Chain {
Chain::AvalancheFuji => "avalanche-fuji",
Chain::Sepolia => "sepolia",
Chain::Moonbeam => "moonbeam",
Chain::Moonbase => "moonbase",
Chain::MoonbeamDev => "moonbeam-dev",
Chain::Moonriver => "moonriver",
Chain::Optimism => "optimism",
Expand Down
5 changes: 4 additions & 1 deletion ethers-etherscan/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl Client {
Chain::Oasis |
Chain::Emerald |
Chain::EmeraldTestnet => String::default(),
Chain::Moonbeam | Chain::MoonbeamDev | Chain::Moonriver => {
Chain::Moonbeam | Chain::Moonbase | Chain::MoonbeamDev | Chain::Moonriver => {
std::env::var("MOONSCAN_API_KEY")?
}
Chain::AnvilHardhat | Chain::Dev => {
Expand Down Expand Up @@ -270,6 +270,9 @@ impl ClientBuilder {
Chain::Moonbeam => {
urls("https://api-moonbeam.moonscan.io/api", "https://moonbeam.moonscan.io/")
}
Chain::Moonbase => {
urls("https://api-moonbase.moonscan.io/api", "https://moonbase.moonscan.io/")
}
Chain::Moonriver => {
urls("https://api-moonriver.moonscan.io/api", "https://moonriver.moonscan.io")
}
Expand Down

0 comments on commit c2f5a87

Please sign in to comment.