Struct ethers_etherscan::verify::VerifyContract
source · pub struct VerifyContract {
pub address: Address,
pub source: String,
pub code_format: CodeFormat,
pub contract_name: String,
pub compiler_version: String,
pub optimization_used: Option<String>,
pub runs: Option<String>,
pub constructor_arguments: Option<String>,
pub blockscout_constructor_arguments: Option<String>,
pub evm_version: Option<String>,
pub other: HashMap<String, String>,
}
Expand description
Arguments for verifying contracts
Fields§
§address: Address
§source: String
§code_format: CodeFormat
§contract_name: String
if codeformat=solidity-standard-json-input, then expected as
erc20.sol:erc20
compiler_version: String
§optimization_used: Option<String>
applicable when codeformat=solidity-single-file
runs: Option<String>
applicable when codeformat=solidity-single-file
constructor_arguments: Option<String>
The constructor arguments for the contract, if any.
NOTE: This is renamed as the misspelled ethers-etherscan/src/verify.rs
. The reason for
this is that Etherscan has had this misspelling on their API for quite a long time, and
changing it would break verification with arguments.
For instances (e.g. blockscout) that might support the proper spelling, the field
blockscout_constructor_arguments
is populated with the exact arguments passed to this
field as well.
blockscout_constructor_arguments: Option<String>
Properly spelled constructor arguments. This is needed as some blockscout instances can identify the correct spelling instead of the misspelled version above.
evm_version: Option<String>
applicable when codeformat=solidity-single-file
other: HashMap<String, String>
Implementations§
source§impl VerifyContract
impl VerifyContract
pub fn new( address: Address, contract_name: String, source: String, compiler_version: String ) -> Self
pub fn runs(self, runs: u32) -> Self
pub fn optimization(self, optimization: bool) -> Self
pub fn optimized(self) -> Self
pub fn not_optimized(self) -> Self
pub fn code_format(self, code_format: CodeFormat) -> Self
pub fn evm_version(self, evm_version: impl Into<String>) -> Self
pub fn constructor_arguments( self, constructor_arguments: Option<impl Into<String>> ) -> Self
Trait Implementations§
source§impl Clone for VerifyContract
impl Clone for VerifyContract
source§fn clone(&self) -> VerifyContract
fn clone(&self) -> VerifyContract
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more