Format, prettify, and analyze smart contract Application Binary Interfaces
An Application Binary Interface (ABI) is a JSON representation of a smart contract's interface. It defines how to interact with the contract, including its functions, events, and data structures.
The ABI acts as a bridge between your application and the smart contract on the blockchain. It tells your code:
Functions define operations you can perform on the contract. Each function includes:
Events are logs emitted by the contract during transactions. They're used to:
The constructor is called once when the contract is deployed. It initializes the contract's state.
Formatted ABIs are much easier to read and understand, especially when reviewing complex contracts or debugging issues.
Well-formatted ABIs help developers quickly identify available functions and their parameters when building integrations.
Security auditors use formatted ABIs to verify contract interfaces and ensure expected functionality.
Minified ABIs reduce file size for production deployments and storage efficiency.
Web3 libraries like ethers.js and web3.js require the ABI to interact with contracts:
const contract = new ethers.Contract(address, abi, signer);
await contract.transfer(recipient, amount);
Generate TypeScript interfaces or Python classes from ABIs for type-safe contract interactions.
Extract function signatures and events to create contract documentation automatically.
Compare ABIs to verify contract implementations match expected interfaces.
You can obtain contract ABIs from: