alloy-json-abi
Full Ethereum JSON-ABI implementation.
This crate is a re-implementation of a part of ethabi's API, with a few main differences:
- the
Contractstruct is now calledJsonAbiand also contains thefallbackandreceivefunctions - the
ParamandEventParamstructs only partially parse the type string instead of fully resolving it into a Solidity type
Examples
Parse a JSON ABI file into a JsonAbi struct:
use JsonAbi;
# stringify!;
# let json = "[]";
let abi: JsonAbi = from_str.unwrap;
for item in abi.items