diff --git a/ethers-contract/ethers-contract-abigen/src/source.rs b/ethers-contract/ethers-contract-abigen/src/source.rs index a3fc1819..346a4b94 100644 --- a/ethers-contract/ethers-contract-abigen/src/source.rs +++ b/ethers-contract/ethers-contract-abigen/src/source.rs @@ -279,6 +279,12 @@ fn get_etherscan_contract(address: Address, domain: &str) -> Result { if abi.starts_with("Contract source code not verified") { 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) }