-
-
Save sevazhidkov/0aaef3621339fa47298aa0ab33570605 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ethers_core::types::Chain; | |
use ethers_contract::MULTICALL_SUPPORTED_CHAIN_IDS; | |
#[tokio::main] | |
async fn main() { | |
let response: serde_json::Value = | |
reqwest::get("https://raw.githubusercontent.com/mds1/multicall/main/deployments.json") | |
.await | |
.unwrap() | |
.json() | |
.await | |
.unwrap(); | |
for chain in response.as_array().unwrap() { | |
// Skip chains with custom contract addresses | |
if chain.as_object().unwrap().contains_key("address") { | |
continue; | |
} | |
let chain_id = chain["chainId"].as_u64().unwrap(); | |
let ethers_chain: Option<Chain> = chain_id.try_into().ok(); | |
if !MULTICALL_SUPPORTED_CHAIN_IDS.contains(&chain_id) && ethers_chain.is_none() { | |
println!("{}: {:?} {:?}", chain_id, chain, ethers_chain); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment