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 moreSource§impl Debug for VerifyContract
impl Debug for VerifyContract
Source§impl<'de> Deserialize<'de> for VerifyContract
impl<'de> Deserialize<'de> for VerifyContract
Source§fn 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>,
Auto Trait Implementations§
impl Freeze for VerifyContract
impl RefUnwindSafe for VerifyContract
impl Send for VerifyContract
impl Sync for VerifyContract
impl Unpin for VerifyContract
impl UnwindSafe for VerifyContract
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more