diff --git a/src/contract.rs b/src/contract.rs index 3940b1a..42e0655 100644 --- a/src/contract.rs +++ b/src/contract.rs @@ -391,14 +391,6 @@ impl Client { self.create_query("contract", "getsourcecode", HashMap::from([("address", address)])); let response = self.get(&query).await?; - // Source code is not verified - if response.contains("Contract source code not verified") { - if let Some(ref cache) = self.cache { - cache.set_source(address, None); - } - return Err(EtherscanError::ContractCodeNotVerified(address)); - } - let response: Response = self.sanitize_response(response)?; let result = response.result; diff --git a/tests/it/contract.rs b/tests/it/contract.rs index 53608ee..80f7902 100644 --- a/tests/it/contract.rs +++ b/tests/it/contract.rs @@ -49,18 +49,6 @@ async fn can_fetch_contract_source_code() { .await } -#[tokio::test] -#[serial] -async fn can_get_error_on_unverified_contract() { - init_tracing(); - run_with_client(Chain::mainnet(), |client| async move { - let addr = "0xb5c31a0e22cae98ac08233e512bd627885aa24e5".parse().unwrap(); - let err = client.contract_source_code(addr).await.unwrap_err(); - assert!(matches!(err, EtherscanError::ContractCodeNotVerified(_))); - }) - .await -} - /// Query a contract that has a single string source entry instead of underlying JSON metadata. #[tokio::test] #[serial]