Skip to content

Get the read-only ABI of any contract

Paste a contract address. Get its view and pure functions as ready-to-use ABI JSON, resolved to the implementation for proxies and to a best match for unverified contracts.

EthereumBaseBNB Smart ChainPolygonno signup · no wallet connect · free

Result

Fill in the form above and click "Get ABI" to see its ABI JSON here.

Run this elsewhere

Want your AI agent to run this?

Same query, no browser. Connect evmquery’s MCP server once and Claude, Cursor, ChatGPT, VS Code or Windsurf can read this contract in chat.

Then just ask

What's the ABI of 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum?

One-time setup for Claude Code

claude mcp add evmquery \
  --transport http \
  https://api.evmquery.com/mcp

The first connection opens a browser sign-in. Free tier, no credit card.

Get the read-only ABI from a contract address

The Contract ABI tool reads any contract address and returns its read-only ABI, the view and pure functions, as a plain JSON array ready to drop into viem, ethers, or a script that needs it. No hunting for a verified source file, no pasting bytecode into a decompiler, just the address and the chain.

Key facts

  • Resolves a contract’s view and pure functions server-side and returns them as a plain ABI JSON array, copy or download.
  • Follows proxy contracts (EIP-1967, UUPS, Beacon, EIP-1167, EIP-2535 diamond, Gnosis Safe, EIP-7702) to the implementation before resolving the ABI.
  • Covers unverified contracts too, falling back through code-reuse matching, metadata, known interfaces, and signature databases when no verified source exists.
  • Covers Ethereum, Base, BNB Smart Chain, and Polygon, with more EVM chains being added.
  1. Paste the contract address into the form above.
  2. Pick the chain the contract is deployed to.
  3. Run the query and read the ABI JSON in the result panel.
  4. Copy it to the clipboard or download it as a .json file.

Below the JSON block, a compact list shows every resolved method with a badge for where its ABI entry came from, so you can spot at a glance whether a method’s shape is trustworthy or a best-effort signature match.

What the ABI includes

The returned ABI covers view and pure functions only, the calls that read contract state without sending a transaction. Write functions, events, and custom errors aren’t included. For the complete ABI of a verified contract, including its write functions and events, check its Sourcify entry or the Etherscan contract tab.

Proxy contracts: the implementation’s read-only ABI, not the proxy’s

Most non-trivial contracts on Ethereum are proxies: a thin contract that forwards every call to an implementation address it can upgrade independently. The proxy’s own bytecode exposes almost nothing, a handful of admin functions at most, so reading its ABI directly gives you the wrong shape entirely. This tool resolves the proxy chain first and returns the implementation’s read-only ABI, the one that actually matches the view and pure functions you can call. If you also want to see the resolved proxy hops themselves, the Contract Inspector shows the full chain alongside the method schema.

Unverified contracts: where the ABI comes from

evmquery tries verified source first, Sourcify and Etherscan, then falls back through a chain of best-effort matches: code-reuse against known bytecode, metadata pinned to IPFS, known interfaces, and signature databases (OpenChain, 4byte, Evmole). Each resolved method carries a source, shown as a badge next to its name in the list below the JSON, so an unverified contract’s read-only ABI is still usable, just with a visible confidence signal instead of a false promise of certainty.

Use the ABI JSON in viem or ethers

The copied or downloaded array is a plain ABI covering the contract’s view and pure functions. Pass it straight to getContract in viem or the Contract constructor in ethers to read those functions, no reformatting needed. Since the ABI has no write functions, only the read side of each library applies here: viem’s contract.read or readContract, ethers’ plain call methods.

import { createPublicClient, http, getContract } from "viem";
import { mainnet } from "viem/chains";
const abi = /* paste the copied ABI JSON here */ [];
const client = createPublicClient({ chain: mainnet, transport: http() });
const contract = getContract({
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
abi,
client,
});
const supply = await contract.read.totalSupply();
import { ethers } from "ethers";
const abi = /* paste the copied ABI JSON here */ [];
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const contract = new ethers.Contract(
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
abi,
provider,
);
const supply = await contract.totalSupply();

The same resolution is available over the REST API if you would rather fetch the ABI at request time instead of pasting a static copy:

curl -X POST https://api.evmquery.com/api/v1/query/describe \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain": "evm_ethereum",
"schema": {
"contracts": { "target": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" } }
},
"include": ["resolution"]
}'

The response’s contracts[0].methods array carries each method’s abi field, the read-only ABI entry for that method, the same shape this tool returns. The free tier has no monthly cap. Get a free API key to drop this into your project.

FAQ

How do I get a contract’s ABI?

Paste the contract’s address into the tool above and pick its chain. evmquery resolves the contract’s read-only ABI server-side and shows it as a JSON array you can copy or download.

Does the ABI include events and write functions?

No. The tool returns view and pure functions only, the read side of the contract. Write functions, events, and custom errors aren’t included. For a verified contract’s complete ABI, check its Sourcify entry or the Etherscan contract tab.

Does this work for proxy contracts?

Yes. If the address is a proxy (EIP-1967, UUPS, Beacon, EIP-1167, EIP-2535 diamond, Gnosis Safe, or EIP-7702), the tool follows the proxy chain and returns the implementation’s read-only ABI, not the proxy’s own near-empty one.

What if the contract is not verified?

evmquery falls back through code-reuse matching against known bytecode, IPFS-hosted metadata, known interfaces, and signature databases (OpenChain, 4byte, Evmole). The compact method list below the JSON shows the source for each entry, so you know how much to trust it.

Can I use the ABI JSON with viem or ethers?

Yes. The copied or downloaded array is a plain ABI covering view and pure functions. Pass it directly to viem’s getContract or ethers’ Contract constructor to read those functions, no reformatting needed.

Which chains are supported?

Ethereum, Base, BNB Smart Chain, and Polygon today. More EVM chains are being added on the evmquery backend.

Can I use this from my own application?

Yes. The same request works against the public REST API. The free tier has no monthly cap. Bring your own API key and the rate limit applied to this page no longer applies.

Limits and accuracy

  • An ABI resolved from signature databases rather than verified source can carry an imprecise parameter list. Check the source badge next to a method before relying on its exact shape.
  • Proxies can be upgraded after the read, so an ABI resolved today may describe a different implementation tomorrow.
  • The demo is rate limited per browser. If you hit the limit, grab a free API key and the limit goes away.

A resolved ABI describes what a contract exposes, not whether it is safe to interact with.

Run this query in your own code

No monthly cap on the free tier. No credit card needed.