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_core::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?