How to Call Smart Contract Functions Using an ABI
The ABI tells your tools what functions exist on a contract. Here's how to use it to call any function — read or write — directly from your browser.
What Is an ABI?
An ABI (Application Binary Interface) is a JSON array that describes a smart contract's functions, events, and their parameters. It's the bridge between human-readable function names and the bytecode the EVM understands.
[
{
"type": "function",
"name": "balanceOf",
"stateMutability": "view",
"inputs": [{ "name": "account", "type": "address" }],
"outputs": [{ "name": "", "type": "uint256" }]
}
]Where to Get Your ABI
- Etherscan — go to the "Contract" tab of a verified contract and copy the ABI JSON
- Hardhat — find it in artifacts/contracts/YourContract.sol/YourContract.json under the "abi" key
- Foundry — find it in out/YourContract.sol/YourContract.json
- Remix IDE — after compiling, copy the ABI from the "Compilation Details" panel
Read Functions vs Write Functions
| Aspect | Read (view/pure) | Write (nonpayable/payable) |
|---|---|---|
| Gas cost | Free | Requires gas |
| Wallet needed | No | Yes |
| Changes state | No | Yes |
| Returns data | Immediately | After confirmation |
Step-by-Step: Call a Function
Get your ABI JSON
Copy the ABI from Etherscan's "Contract" tab, your Hardhat/Foundry build artifacts, or Remix IDE.
Open ABI Page Builder
Go to abipagebuilder.com and paste the ABI JSON into the text area.
Enter contract address
Paste the deployed contract address (0x...) into the address field.
Select a network
Choose from built-in presets (Ethereum, Polygon, Arbitrum, etc.) or enter a custom RPC URL and chain ID.
Call a view function
Click "Generate Page." All read functions appear as cards. Fill in parameters (if any) and click "Read" to see the result — no wallet needed.
Send a write transaction
Connect your wallet (MetaMask, WalletConnect, etc.), fill in function parameters, and click "Write" to submit the transaction.
Tips: Custom RPC for Private or Testnet Chains
If your contract is deployed on a chain not in the preset list — a private devnet, an L2 testnet, or any custom EVM network — select "Custom RPC" in the network dropdown. Enter your RPC URL and chain ID, and ABI Page Builder will route all calls through your endpoint. This works with any JSON-RPC compatible node.
👉 Ready to call your first function?
Try It Now