Struct ethers_etherscan::contract::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 evm_version: Option<String>,
pub other: HashMap<String, String>,
}Expand description
Arguments for verifying contracts
Fields
address: Addresssource: Stringcode_format: CodeFormatcontract_name: Stringif codeformat=solidity-standard-json-input, then expected as
erc20.sol:erc20
compiler_version: Stringoptimization_used: Option<String>applicable when codeformat=solidity-single-file
runs: Option<String>applicable when codeformat=solidity-single-file
constructor_arguments: Option<String>NOTE: there is a typo in the etherscan API constructorArguements
evm_version: Option<String>applicable when codeformat=solidity-single-file
other: HashMap<String, String>Implementations
sourceimpl 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
sourceimpl Clone for VerifyContract
impl Clone for VerifyContract
sourcefn clone(&self) -> VerifyContract
fn clone(&self) -> VerifyContract
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for VerifyContract
impl Debug for VerifyContract
sourceimpl<'de> Deserialize<'de> for VerifyContract
impl<'de> Deserialize<'de> for VerifyContract
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for VerifyContract
impl Serialize for VerifyContract
Auto Trait Implementations
impl RefUnwindSafe for VerifyContract
impl Send for VerifyContract
impl Sync for VerifyContract
impl Unpin for VerifyContract
impl UnwindSafe for VerifyContract
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more