chore: add rate limit message (#971)

This commit is contained in:
Matthias Seitz 2022-02-27 16:41:26 +01:00 committed by GitHub
parent 10fcf60791
commit d6d66b37dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -279,6 +279,12 @@ fn get_etherscan_contract(address: Address, domain: &str) -> Result<String> {
if abi.starts_with("Contract source code not verified") { if abi.starts_with("Contract source code not verified") {
eyre::bail!("Contract source code not verified: {:?}", address); eyre::bail!("Contract source code not verified: {:?}", address);
} }
if abi.starts_with('{') && abi.contains("Max rate limit reached") {
eyre::bail!(
"Max rate limit reached, please use etherscan API Key for higher rate limit: {:?}",
address
);
}
Ok(abi) Ok(abi)
} }