pub struct ContractSource {Show 14 fields
pub contract_name: String,
pub source_code: String,
pub abi: String,
pub compiler_version: String,
pub optimization_used: bool,
pub optimization_runs: u32,
pub evm_version: String,
pub license_type: String,
pub is_proxy: bool,
pub implementation_address: Option<String>,
pub constructor_arguments: String,
pub library: String,
pub swarm_source: String,
pub parsed_abi: Vec<AbiEntry>,
}Expand description
Full contract source information from a block explorer.
Fields§
§contract_name: StringContract name as registered on the explorer.
source_code: StringSolidity (or Vyper) source code. May be a single file or JSON of multiple files.
abi: StringContract ABI as a JSON string.
compiler_version: StringCompiler version used (e.g., “v0.8.19+commit.7dd6d404”).
optimization_used: boolWhether optimization was enabled.
optimization_runs: u32Optimization runs count.
evm_version: StringEVM version targeted (e.g., “paris”, “london”).
license_type: StringSPDX license identifier.
is_proxy: boolWhether Etherscan flagged this as a proxy contract.
implementation_address: Option<String>Implementation address if proxy detected by Etherscan.
constructor_arguments: StringConstructor arguments (hex-encoded).
library: StringLibrary addresses used.
swarm_source: StringSwarm/IPFS source hash.
parsed_abi: Vec<AbiEntry>Parsed ABI entries for programmatic access.
Trait Implementations§
Source§impl Clone for ContractSource
impl Clone for ContractSource
Source§impl Debug for ContractSource
impl Debug for ContractSource
Source§impl<'de> Deserialize<'de> for ContractSource
impl<'de> Deserialize<'de> for ContractSource
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContractSource
impl RefUnwindSafe for ContractSource
impl Send for ContractSource
impl Sync for ContractSource
impl Unpin for ContractSource
impl UnsafeUnpin for ContractSource
impl UnwindSafe for ContractSource
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
Mutably borrows from an owned value. Read more