adding chiado support (#1811)
This commit is contained in:
parent
def99318bb
commit
50c7ff1d8e
|
@ -47,6 +47,7 @@ pub static MULTICALL_SUPPORTED_CHAIN_IDS: Lazy<[U256; 47]> = Lazy::new(|| {
|
||||||
U256::from(Polygon), // Polygon
|
U256::from(Polygon), // Polygon
|
||||||
U256::from(PolygonMumbai), // PolygonMumbai
|
U256::from(PolygonMumbai), // PolygonMumbai
|
||||||
U256::from(XDai), // XDai
|
U256::from(XDai), // XDai
|
||||||
|
U256::from(Chiado), // ChiadoTestnet
|
||||||
U256::from(Avalanche), // Avalanche
|
U256::from(Avalanche), // Avalanche
|
||||||
U256::from(AvalancheFuji), // AvalancheFuji
|
U256::from(AvalancheFuji), // AvalancheFuji
|
||||||
U256::from(FantomTestnet), // FantomTestnet
|
U256::from(FantomTestnet), // FantomTestnet
|
||||||
|
|
|
@ -32,6 +32,7 @@ pub enum Chain {
|
||||||
Kovan = 42,
|
Kovan = 42,
|
||||||
#[strum(serialize = "xdai")]
|
#[strum(serialize = "xdai")]
|
||||||
XDai = 100,
|
XDai = 100,
|
||||||
|
Chiado = 10200,
|
||||||
Polygon = 137,
|
Polygon = 137,
|
||||||
Fantom = 250,
|
Fantom = 250,
|
||||||
Dev = 1337,
|
Dev = 1337,
|
||||||
|
@ -103,6 +104,7 @@ impl Chain {
|
||||||
Chain::Goerli |
|
Chain::Goerli |
|
||||||
Chain::Kovan |
|
Chain::Kovan |
|
||||||
Chain::XDai |
|
Chain::XDai |
|
||||||
|
Chain::Chiado |
|
||||||
Chain::Sepolia |
|
Chain::Sepolia |
|
||||||
Chain::Moonbase |
|
Chain::Moonbase |
|
||||||
Chain::MoonbeamDev |
|
Chain::MoonbeamDev |
|
||||||
|
@ -186,6 +188,9 @@ impl Chain {
|
||||||
Chain::XDai => {
|
Chain::XDai => {
|
||||||
("https://blockscout.com/xdai/mainnet/api", "https://blockscout.com/xdai/mainnet")
|
("https://blockscout.com/xdai/mainnet/api", "https://blockscout.com/xdai/mainnet")
|
||||||
}
|
}
|
||||||
|
Chain::Chiado => {
|
||||||
|
("https://blockscout.chiadochain.net/api", "https://blockscout.chiadochain.net")
|
||||||
|
}
|
||||||
Chain::Sokol => {
|
Chain::Sokol => {
|
||||||
("https://blockscout.com/poa/sokol/api", "https://blockscout.com/poa/sokol")
|
("https://blockscout.com/poa/sokol/api", "https://blockscout.com/poa/sokol")
|
||||||
}
|
}
|
||||||
|
@ -230,6 +235,7 @@ impl fmt::Display for Chain {
|
||||||
Chain::Goerli => "goerli",
|
Chain::Goerli => "goerli",
|
||||||
Chain::Kovan => "kovan",
|
Chain::Kovan => "kovan",
|
||||||
Chain::XDai => "xdai",
|
Chain::XDai => "xdai",
|
||||||
|
Chain::Chiado => "chiado",
|
||||||
Chain::Polygon => "polygon",
|
Chain::Polygon => "polygon",
|
||||||
Chain::PolygonMumbai => "mumbai",
|
Chain::PolygonMumbai => "mumbai",
|
||||||
Chain::Avalanche => "avalanche",
|
Chain::Avalanche => "avalanche",
|
||||||
|
@ -299,6 +305,7 @@ impl TryFrom<u64> for Chain {
|
||||||
5 => Chain::Goerli,
|
5 => Chain::Goerli,
|
||||||
42 => Chain::Kovan,
|
42 => Chain::Kovan,
|
||||||
100 => Chain::XDai,
|
100 => Chain::XDai,
|
||||||
|
10200 => Chain::Chiado,
|
||||||
137 => Chain::Polygon,
|
137 => Chain::Polygon,
|
||||||
1337 => Chain::Dev,
|
1337 => Chain::Dev,
|
||||||
31337 => Chain::AnvilHardhat,
|
31337 => Chain::AnvilHardhat,
|
||||||
|
@ -359,6 +366,7 @@ impl FromStr for Chain {
|
||||||
"goerli" => Chain::Goerli,
|
"goerli" => Chain::Goerli,
|
||||||
"kovan" => Chain::Kovan,
|
"kovan" => Chain::Kovan,
|
||||||
"xdai" => Chain::XDai,
|
"xdai" => Chain::XDai,
|
||||||
|
"chiado" => Chain::Chiado,
|
||||||
"polygon" => Chain::Polygon,
|
"polygon" => Chain::Polygon,
|
||||||
"mumbai" | "polygon-mumbai" => Chain::PolygonMumbai,
|
"mumbai" | "polygon-mumbai" => Chain::PolygonMumbai,
|
||||||
"avalanche" => Chain::Avalanche,
|
"avalanche" => Chain::Avalanche,
|
||||||
|
|
|
@ -103,6 +103,7 @@ impl Client {
|
||||||
std::env::var("FTMSCAN_API_KEY").or_else(|_| std::env::var("FANTOMSCAN_API_KEY"))?
|
std::env::var("FTMSCAN_API_KEY").or_else(|_| std::env::var("FANTOMSCAN_API_KEY"))?
|
||||||
}
|
}
|
||||||
Chain::XDai |
|
Chain::XDai |
|
||||||
|
Chain::Chiado |
|
||||||
Chain::Sepolia |
|
Chain::Sepolia |
|
||||||
Chain::Rsk |
|
Chain::Rsk |
|
||||||
Chain::Sokol |
|
Chain::Sokol |
|
||||||
|
|
Loading…
Reference in New Issue