abi_inspect
List an ABI's entries with their canonical signatures and selectors.
Instructions
List an ABI's entries with their canonical signatures and selectors.
Accepts a JSON ABI or human-readable declarations and returns BOTH forms for
every entry, so it converts in either direction. Returns {count, entries,
selectors, topics}: entries carries {type, name, signature (canonical),
human, inputs, outputs} per entry plus selector for functions and errors,
topic0 and anonymous for events, and stateMutability when known;
inputs/outputs are JSON ABI shape, so feeding human-readable text in and
reading them out is the human -> JSON ABI direction, and human is the
reverse. selectors maps every 4-byte selector to its canonical signature
and topics every topic0 — the lookup table eth_calldata, eth_log_decode and
eth_revert_decode take as input. collisions is added only if two distinct
signatures share a selector. constructor/fallback/receive entries carry no
signature or selector, having none.
Example: abi_inspect("function transfer(address to, uint256 amount)") -> selectors={"0xa9059cbb": "transfer(address,uint256)"}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | Yes | A contract ABI in either representation: a JSON ABI (array of entries, or one entry object), or human-readable Solidity declarations (one string, or an array of them) such as 'function transfer(address to, uint256 amount)'. A stringified JSON array or object is accepted. |