revert constructor arg change (#916)

This commit is contained in:
Roman Krasiuk 2022-02-16 01:29:19 -08:00 committed by GitHub
parent 272c1a15af
commit 78161f07e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -26,7 +26,8 @@ pub struct VerifyContract {
optimization_used: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub runs: Option<String>,
#[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<String>,
#[serde(rename = "evmversion")]
pub evm_version: Option<String>,
@ -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
}