What is ABI (Application Binary Interface)?
An ABI (Application Binary Interface) is a JSON specification that defines how to interact with a smart contract — describing its functions, parameters, return types, and events in a machine-readable format.
WHY IT MATTERS
ABIs are the API documentation of smart contracts. They tell your code what functions a contract has, what parameters they accept, and what they return. Without the ABI, you can't interact with a contract programmatically (beyond raw byte manipulation).
When you deploy a Solidity contract, the compiler generates the ABI alongside the bytecode. The ABI includes function signatures, input/output parameter types, event definitions, and error types.
For agent developers, ABIs are essential — they define how an agent calls contract functions. Libraries like ethers.js and viem use ABIs to encode function calls and decode return values automatically.