{
  "$schema": "https://degreesofsatoshi.com/encyclopedia/schemas/article-v1.json",
  "schemaVersion": "1.0.0",
  "id": "ethereum-contract-abis",
  "canonical": "https://degreesofsatoshi.com/encyclopedia/ethereum-contract-abis/",
  "collection": "ethereum",
  "title": "Contract ABIs: the interface used to encode calls",
  "description": "Learn how an Ethereum ABI describes functions, arguments, results, errors and events, and why the interface does not guarantee implementation behavior.",
  "aliases": [
    "ABI",
    "application binary interface"
  ],
  "dates": {
    "published": "2026-10-02",
    "modified": "2026-10-02",
    "verified": "2026-10-02T18:12:41.505Z",
    "dataAsOf": "2026-10-02"
  },
  "authorship": {
    "publisher": "Degrees of Satoshi editorial project",
    "process": "AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied."
  },
  "quickAnswer": {
    "text": "An Ethereum Application Binary Interface, or ABI, describes how to encode calls and decode results, errors and events for a contract. It is an interface schema, not the executable code or a security guarantee. A correct ABI must match the contract implementation being used, including any proxy context.",
    "claimId": "ethereum-contract-abis-quick-answer",
    "sourceIds": [
      "solidity-abi",
      "oz-proxy"
    ]
  },
  "keyFacts": [
    {
      "label": "Functions",
      "value": "The ABI defines parameter and return types for function interfaces.",
      "sourceIds": [
        "solidity-abi"
      ],
      "id": "functions",
      "claimId": "ethereum-contract-abis-fact-functions"
    },
    {
      "label": "Events",
      "value": "Event declarations distinguish indexed topics from encoded data.",
      "sourceIds": [
        "solidity-abi"
      ],
      "id": "events",
      "claimId": "ethereum-contract-abis-fact-events"
    },
    {
      "label": "Errors",
      "value": "Custom error data can be decoded using its error signature and argument types.",
      "sourceIds": [
        "solidity-abi"
      ],
      "id": "errors",
      "claimId": "ethereum-contract-abis-fact-errors"
    }
  ],
  "prerequisites": [
    "ethereum-smart-contracts"
  ],
  "sections": [
    {
      "id": "encoding",
      "heading": "Translate a method call into bytes",
      "sourceIds": [
        "solidity-abi"
      ],
      "paragraphs": [
        "A library combines a function selector with ABI-encoded arguments. When execution returns data, the declared return types tell the library how to interpret the bytes.",
        "Dynamic values use offsets and lengths, while fixed-size values follow fixed encoding conventions. Human-readable names do not travel with every encoded argument."
      ]
    },
    {
      "id": "mismatch",
      "heading": "A plausible interface can still be the wrong interface",
      "sourceIds": [
        "solidity-abi",
        "oz-proxy"
      ],
      "paragraphs": [
        "Using an ABI from another version can mislabel selectors, misdecode data or offer functions the deployed implementation does not support. Proxy upgrades make version context particularly important.",
        "The ABI says how a function is called, not whether its implementation is honest. A function named withdraw can still contain restrictive or dangerous logic."
      ]
    },
    {
      "id": "read-write",
      "heading": "A read call and a signed transaction use different paths",
      "sourceIds": [
        "eth-jsonrpc",
        "solidity-abi"
      ],
      "paragraphs": [
        "A tool can use eth_call to execute against a selected state without publishing a transaction. A state-changing transaction requires authorization and inclusion before its effects become part of the chain.",
        "The same ABI can support both workflows. A simulation result is not a receipt for an executed transaction."
      ]
    }
  ],
  "faq": [
    {
      "question": "Does an ABI contain private keys?",
      "answer": "An ABI is an interface description and does not require private keys. Signing authority is separate from the schema used to encode or decode calls.",
      "sourceIds": [
        "solidity-abi",
        "eth-accounts"
      ]
    }
  ],
  "claims": [
    {
      "id": "ethereum-contract-abis-quick-answer",
      "articleSlug": "ethereum-contract-abis",
      "statement": "An Ethereum Application Binary Interface, or ABI, describes how to encode calls and decode results, errors and events for a contract. It is an interface schema, not the executable code or a security guarantee. A correct ABI must match the contract implementation being used, including any proxy context.",
      "sourceIds": [
        "source-6219cf92582a012d",
        "source-16bb921e662a5173"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-6219cf92582a012d",
          "locator": "Function Selector; Argument Encoding; Events; Errors; JSON"
        },
        {
          "sourceId": "source-16bb921e662a5173",
          "locator": "TransparentUpgradeableProxy; UUPSUpgradeable; ERC1967Proxy"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Read Solidity ABI Basic Design, Function Selector, argument encoding, Errors and JSON fields. ABI is non-self-describing encoding/schema, not executable semantics or key material.",
          "Checked eth_call versus published transaction and proxy version context; decoded errors/events remain interface interpretations."
        ]
      }
    },
    {
      "id": "ethereum-contract-abis-fact-functions",
      "articleSlug": "ethereum-contract-abis",
      "statement": "Functions: The ABI defines parameter and return types for function interfaces.",
      "sourceIds": [
        "source-6219cf92582a012d"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-6219cf92582a012d",
          "locator": "Function Selector; Argument Encoding; Events; Errors; JSON"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Read Solidity ABI Basic Design, Function Selector, argument encoding, Errors and JSON fields. ABI is non-self-describing encoding/schema, not executable semantics or key material.",
          "Checked eth_call versus published transaction and proxy version context; decoded errors/events remain interface interpretations."
        ]
      }
    },
    {
      "id": "ethereum-contract-abis-fact-events",
      "articleSlug": "ethereum-contract-abis",
      "statement": "Events: Event declarations distinguish indexed topics from encoded data.",
      "sourceIds": [
        "source-6219cf92582a012d"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-6219cf92582a012d",
          "locator": "Function Selector; Argument Encoding; Events; Errors; JSON"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Read Solidity ABI Basic Design, Function Selector, argument encoding, Errors and JSON fields. ABI is non-self-describing encoding/schema, not executable semantics or key material.",
          "Checked eth_call versus published transaction and proxy version context; decoded errors/events remain interface interpretations."
        ]
      }
    },
    {
      "id": "ethereum-contract-abis-fact-errors",
      "articleSlug": "ethereum-contract-abis",
      "statement": "Errors: Custom error data can be decoded using its error signature and argument types.",
      "sourceIds": [
        "source-6219cf92582a012d"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-6219cf92582a012d",
          "locator": "Function Selector; Argument Encoding; Events; Errors; JSON"
        }
      ],
      "scope": {
        "collection": "ethereum",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T18:12:41.505Z",
        "reviewer": "Codex independent automated reviewer /root/verify_ethereum_100",
        "notes": [
          "Read Solidity ABI Basic Design, Function Selector, argument encoding, Errors and JSON fields. ABI is non-self-describing encoding/schema, not executable semantics or key material.",
          "Checked eth_call versus published transaction and proxy version context; decoded errors/events remain interface interpretations."
        ]
      }
    }
  ],
  "sources": [
    {
      "id": "solidity-abi",
      "label": "Contract ABI Specification",
      "publisher": "Solidity contributors",
      "url": "https://docs.soliditylang.org/en/v0.8.30/abi-spec.html",
      "locator": "Function Selector; Argument Encoding; Events; Errors; JSON",
      "note": "ABI encoding, selectors, event topics and event data.",
      "version": "Solidity 0.8.30 documentation",
      "checkedAt": "2026-10-02T17:03:42.824Z",
      "contentSha256": "f5889011070e9e83487b6fd899f56ccecd0c08382c998cd2f8860daafd27dc7b",
      "recordId": "source-6219cf92582a012d"
    },
    {
      "id": "oz-proxy",
      "label": "Proxy contracts",
      "publisher": "OpenZeppelin",
      "url": "https://docs.openzeppelin.com/contracts/5.x/api/proxy",
      "locator": "TransparentUpgradeableProxy; UUPSUpgradeable; ERC1967Proxy",
      "note": "Proxy implementation slots, delegated execution and upgrade authority.",
      "version": "OpenZeppelin Contracts 5.x",
      "checkedAt": "2026-10-02T17:03:43.024Z",
      "contentSha256": "58fe40b9eaa6d3cf92e48caed2d8db247a790b1a3055948095a48c7f8eb77854",
      "recordId": "source-16bb921e662a5173"
    },
    {
      "id": "eth-jsonrpc",
      "label": "Ethereum JSON-RPC",
      "publisher": "ethereum.org contributors",
      "url": "https://ethereum.org/en/developers/docs/apis/json-rpc/",
      "locator": "eth_getTransactionByHash; eth_getTransactionReceipt; eth_call; eth_getLogs; eth_getCode; eth_estimateGas; eth_getBalance; eth_getStorageAt; eth_getTransactionCount; default block parameter",
      "note": "RPC response fields, transaction receipts, call simulation and log filtering.",
      "version": null,
      "checkedAt": "2026-10-02T17:03:42.060Z",
      "contentSha256": "ed13997ec4f415dff80883add0730d4e64bcc8c17b95dd4f6c27aed0241a4073",
      "recordId": "source-a5154b4118a3d15f"
    },
    {
      "id": "eth-accounts",
      "label": "Ethereum accounts",
      "publisher": "ethereum.org contributors",
      "url": "https://ethereum.org/en/developers/docs/accounts/",
      "locator": "Account types; An account examined; Account creation",
      "note": "Key-controlled and code-controlled accounts, balances, nonces and storage.",
      "version": null,
      "checkedAt": "2026-10-02T17:03:41.958Z",
      "contentSha256": "262a5694899ae6f774aacae66b13d6929b658ecc9e23c276af9e23ee9455f034",
      "recordId": "source-2fb64d6fc5cedb00"
    }
  ],
  "related": {
    "articles": [
      "function-selectors",
      "ethereum-calldata",
      "smart-contract-events"
    ],
    "dossiers": [],
    "wallets": []
  },
  "revisionHistory": [
    {
      "date": "2026-10-02",
      "kind": "published",
      "summary": "First publication after primary-source research and independent automated verification."
    }
  ],
  "citation": "Degrees of Satoshi editorial project. “Contract ABIs: the interface used to encode calls.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/ethereum-contract-abis/"
}
