Struct ethers_core::abi::AbiParser[][src]

pub struct AbiParser {
    pub structs: HashMap<String, SolStruct>,
    pub struct_tuples: HashMap<String, Vec<ParamType>>,
}
Expand description

A parser that turns a “human readable abi” into a Abi

Fields

structs: HashMap<String, SolStruct>

solidity structs

struct_tuples: HashMap<String, Vec<ParamType>>

solidity structs as tuples

Implementations

Parses a “human readable abi” string

Example

let abi = AbiParser::default().parse_str(r#"[
        function setValue(string)
        function getValue() external view returns (string)
        event ValueChanged(address indexed author, string oldValue, string newValue)
    ]"#).unwrap();

Parses a “human readable abi” string vector

Example

use ethers::abi::AbiParser;

let abi = AbiParser::default().parse(&[
    "function x() external view returns (uint256)",
]).unwrap();

Link additional structs for parsing

Parses a solidity event declaration from event <name> (args*) anonymous?

Trait Implementations

Returns the “default value” for a type. 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.

Performs the conversion.

Should always be Self

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.