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 Contract struct is now called JsonAbi and also contains the fallback and receive functions - the Param and EventParam structs 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:

```rust use alloyjsonabi::JsonAbi;

stringify!(

let path = "path/to/abi.json"; let json = std::fs::readtostring(path).unwrap();

);

let json = "[]";

let abi: JsonAbi = serdejson::fromstr(&json).unwrap(); for item in abi.items() { println!("{item:?}"); } ```

Resolve a Function's input type with alloy-dyn-abi:

rust,ignore todo!()