chore: add moonbase chain id (#1397)
This commit is contained in:
parent
77ca64d850
commit
c2f5a87b63
|
@ -33,7 +33,8 @@ pub enum Chain {
|
||||||
Avalanche = 43114,
|
Avalanche = 43114,
|
||||||
AvalancheFuji = 43113,
|
AvalancheFuji = 43113,
|
||||||
Sepolia = 11155111,
|
Sepolia = 11155111,
|
||||||
Moonbeam = 1287,
|
Moonbeam = 1284,
|
||||||
|
Moonbase = 1287,
|
||||||
MoonbeamDev = 1281,
|
MoonbeamDev = 1281,
|
||||||
Moonriver = 1285,
|
Moonriver = 1285,
|
||||||
Optimism = 10,
|
Optimism = 10,
|
||||||
|
@ -69,6 +70,7 @@ impl fmt::Display for Chain {
|
||||||
Chain::AvalancheFuji => "avalanche-fuji",
|
Chain::AvalancheFuji => "avalanche-fuji",
|
||||||
Chain::Sepolia => "sepolia",
|
Chain::Sepolia => "sepolia",
|
||||||
Chain::Moonbeam => "moonbeam",
|
Chain::Moonbeam => "moonbeam",
|
||||||
|
Chain::Moonbase => "moonbase",
|
||||||
Chain::MoonbeamDev => "moonbeam-dev",
|
Chain::MoonbeamDev => "moonbeam-dev",
|
||||||
Chain::Moonriver => "moonriver",
|
Chain::Moonriver => "moonriver",
|
||||||
Chain::Optimism => "optimism",
|
Chain::Optimism => "optimism",
|
||||||
|
|
|
@ -102,7 +102,7 @@ impl Client {
|
||||||
Chain::Oasis |
|
Chain::Oasis |
|
||||||
Chain::Emerald |
|
Chain::Emerald |
|
||||||
Chain::EmeraldTestnet => String::default(),
|
Chain::EmeraldTestnet => String::default(),
|
||||||
Chain::Moonbeam | Chain::MoonbeamDev | Chain::Moonriver => {
|
Chain::Moonbeam | Chain::Moonbase | Chain::MoonbeamDev | Chain::Moonriver => {
|
||||||
std::env::var("MOONSCAN_API_KEY")?
|
std::env::var("MOONSCAN_API_KEY")?
|
||||||
}
|
}
|
||||||
Chain::AnvilHardhat | Chain::Dev => {
|
Chain::AnvilHardhat | Chain::Dev => {
|
||||||
|
@ -270,6 +270,9 @@ impl ClientBuilder {
|
||||||
Chain::Moonbeam => {
|
Chain::Moonbeam => {
|
||||||
urls("https://api-moonbeam.moonscan.io/api", "https://moonbeam.moonscan.io/")
|
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 => {
|
Chain::Moonriver => {
|
||||||
urls("https://api-moonriver.moonscan.io/api", "https://moonriver.moonscan.io")
|
urls("https://api-moonriver.moonscan.io/api", "https://moonriver.moonscan.io")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue