From 78161f07e7295b203c7df9c939e4db5060cd4c1f Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Wed, 16 Feb 2022 01:29:19 -0800 Subject: [PATCH] revert constructor arg change (#916) --- ethers-etherscan/src/contract.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethers-etherscan/src/contract.rs b/ethers-etherscan/src/contract.rs index a6812e3c..9ee33bf4 100644 --- a/ethers-etherscan/src/contract.rs +++ b/ethers-etherscan/src/contract.rs @@ -26,7 +26,8 @@ pub struct VerifyContract { optimization_used: Option, #[serde(skip_serializing_if = "Option::is_none")] pub runs: Option, - #[serde(rename = "constructorArguments", skip_serializing_if = "Option::is_none")] + /// NOTE: there is a typo in the etherscan API `constructorArguements` + #[serde(rename = "constructorArguements", skip_serializing_if = "Option::is_none")] pub constructor_arguments: Option, #[serde(rename = "evmversion")] pub evm_version: Option, @@ -329,7 +330,7 @@ mod tests { .optimization(true) .runs(200); let resp = client.submit_contract_verification(&contract).await.expect("failed to send the request"); - assert_ne!(resp.result, "Error!"); + assert_ne!(resp.result, "Error!"); // `Error!` result means that request was malformatted }) .await }