Struct ethers_etherscan::Client[][src]

pub struct Client { /* fields omitted */ }
Expand description

The Etherscan.io API client.

Implementations

Submit Source Code for Verification

Check Source Code Verification Status with receipt received from [Self::submit_contract_verification]

Returns the contract ABI of a verified contract


    let client = Client::new(Chain::Mainnet, "API_KEY").unwrap();
    let abi = client
        .contract_abi("0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413".parse().unwrap())
        .await.unwrap();

Get Contract Source Code for Verified Contract Source Codes


    let client = Client::new(Chain::Mainnet, "API_KEY").unwrap();
    let meta = client
        .contract_source_code("0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413".parse().unwrap())
        .await.unwrap();
    let code = meta.source_code();

Returns the estimated time, in seconds, for a transaction to be confirmed on the blockchain for the specified gas price

Returns the current Safe, Proposed and Fast gas prices Post EIP-1559 changes:

  • Safe/Proposed/Fast gas price recommendations are now modeled as Priority Fees.
  • New field suggestBaseFee, the baseFee of the next pending block
  • New field gasUsedRatio, to estimate how busy the network is

Returns the status of a contract execution

Returns the status of a transaction execution: false for failed and true for successful

Create a new client with the correct endpoints based on the chain and provided API key

Create a new client with the correct endpoints based on the chain and API key from ETHERSCAN_API_KEY environment variable

Return the URL for the given block number

Return the URL for the given address

Return the URL for the given transaction hash

Return the URL for the given token hash

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more