Verified contract ABI (Sourcify)

$0.003 per call · USDC via x402 · POST /api/contract-abi

Fetch the verified ABI for a contract address from Sourcify, plus a ready-to-use list of human-readable function signatures with their 4-byte selectors. Send POST /api/contract-abi with the required field address and pay $0.003 per call over x402 or MPP (there is no free tier). It returns a JSON object with address, network, chainId, verified, match and 3 more.

Covers 8 EVM mainnets. Unverified contracts return a structured {verified:false} miss. Pair with /api/calldata-decode to decode transactions against this ABI.

Category: Crypto & onchain data · Tags: crypto contract smart-contract abi sourcify evm selector · Also found as: contract

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
addressstringyes0x-prefixed 40-char contract address. Also accepted as addr, wallet, account.
networkstringnoethereum / base / polygon / arbitrum / optimism / bsc / gnosis / celo (default base).

Example request

curl -i -X POST https://agent402.tools/api/contract-abi \
  -H "Content-Type: application/json" \
  -d '{"address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"base"}'

Without payment this returns HTTP 402 Payment Required with the exact price for contract-abi; any x402 v2 or MPP client pays it and retries.

Example response

{
  "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "network": "base",
  "chainId": 8453,
  "verified": true,
  "match": "exact_match",
  "abi": [
    {
      "name": "implementation",
      "type": "function",
      "inputs": [],
      "outputs": [
        {
          "type": "address"
        }
      ]
    }
  ],
  "functions": [
    {
      "signature": "implementation()",
      "selector": "0x5c60da1b"
    }
  ],
  "events": [
    {
      "signature": "Upgraded(address)"
    }
  ]
}
FieldTypeAlways presentIn the example
addressstringyes0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
networkstringyesbase
chainIdnumberyes8453
verifiedbooleanyestrue
matchstringyesexact_match
abiarray of objectsyes1 item in the example
functionsarray of objectsyes1 item in the example
eventsarray of objectsyes1 item in the example

From an MCP client

catalog.call {
  "slug": "contract-abi",
  "params": {
    "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "network": "base"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for contract-abi; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/contract-abi", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "network": "base"
  }),
});

Related tools

Calldata decoder (ABI or selector DB)

$0.003 · POST /api/calldata-decode

Decode EVM smart-contract transaction calldata into the function name and typed parameters. Supply an ABI (from /api/con…

Verified contract source (Sourcify)

$0.005 · POST /api/contract-source

Fetch the verified Solidity source files and compiler metadata for a contract address from Sourcify's open verification …

Function selector / event topic lookup

$0.002 · POST /api/selector-lookup

Resolve a 4-byte function selector or a 32-byte event topic hash to its known human-readable Solidity signatures, via th…

Solidity heuristic pattern scan

FREE w/ compute · or $0.01 · POST /api/solidity-scan

Deterministic static pattern scan of Solidity smart-contract source text - a fixed ruleset flagging tx.origin authentica…

Token price by contract address

$0.005 · GET /api/coin-price-by-contract

Live price, market cap, 24h volume and 24h change for ERC-20 / SPL / other chain tokens looked up by CONTRACT ADDRESS on…

Contract bytecode check

$0.002 · GET /api/contract-code

Is this address a contract, and what code does it hold? Returns isContract, deployed bytecode size, and the keccak-256 h…