---
eip: 7512
label: ERC-7512
title: Onchain Representation for Audits
status: Draft
type: Standards Track
category: ERC
created: 2023-09-05
requires: 712
official: https://eips.ethereum.org/EIPS/eip-7512
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7512.md
canonical: https://eips.huatuo.xyz/eip-7512/
lang: en
tldr: A draft format for auditors to sign an EIP-712 summary of an audit, so contracts can check on-chain that a specific deployment was audited by a trusted party and which ERCs it implements.
tags: [audit, security, eip-712, signatures]
---

# ERC-7512: Onchain Representation for Audits

> Proposal to define a contract parseable representation of Audit reports.

**TL;DR:** A draft format for auditors to sign an EIP-712 summary of an audit, so contracts can check on-chain that a specific deployment was audited by a trusted party and which ERCs it implements.

## What problem does it solve?

Audit reports today are PDFs on a website. A contract that wants to accept only audited code, such as a bridge registering new tokens or a smart account installing modules, has no machine-readable way to check that a given deployment was reviewed, by whom, and against which standards.

ERC-7512 defines a compact, signed **audit summary** that contracts can verify. A bridge operator can, for example, list the auditor keys it trusts, and let anyone register a token by supplying a summary signed by one of those keys for that exact contract address and chain.

## How it works

The summary is a typed structure:

- **Auditor**: `name`, `uri`, and a list of `authors`.
- **Contract**: `chainId` (the [EIP-155](/eip-155/) chain ID as `bytes32`) and `deployment` address. One summary covers one contract instance.
- **AuditSummary**: auditor, `issuedAt`, `ercs` (a list of ERC numbers the contract fully implements, possibly empty), the audited contract, `auditHash` (hash of the original report) and `auditUri`.

The auditor signs the `AuditSummary` with [EIP-712](/eip-712/) typed data and attaches the result as a `SignedAuditSummary` with `signedAt` and a `Signature { type, data }`. Supported signature types are `SECP256K1`, `SECP256R1`, `ERC1271` (smart-contract signers, see [ERC-1271](/eip-1271/)) and `BLS` (encoding still TBD).

Findings and severities are deliberately not included; the summary only says "this instance was audited" and "it implements these ERCs".

## Sample code

Signing a summary with ethers v6 (types follow the spec's structs):

```ts
import { Wallet, keccak256, toUtf8Bytes, zeroPadValue, toBeHex } from "ethers";

const domain = { name: "ERC-7652: Onchain Audit Representation", version: "1.0" }; // as written in the spec
const types = {
  Auditor: [{ name: "name", type: "string" }, { name: "uri", type: "string" }, { name: "authors", type: "string[]" }],
  Contract: [{ name: "chainId", type: "bytes32" }, { name: "deployment", type: "address" }],
  AuditSummary: [
    { name: "auditor", type: "Auditor" },
    { name: "issuedAt", type: "uint256" },
    { name: "ercs", type: "uint256[]" },
    { name: "auditedContract", type: "Contract" },
    { name: "auditHash", type: "bytes32" },
    { name: "auditUri", type: "string" },
  ],
};

const summary = {
  auditor: { name: "Example Audits", uri: "https://example.com", authors: ["Alice"] },
  issuedAt: 1700000000,
  ercs: [20],
  auditedContract: { chainId: zeroPadValue(toBeHex(1), 32), deployment: tokenAddress },
  auditHash: keccak256(toUtf8Bytes(reportPdfContents)),
  auditUri: "https://example.com/reports/token.pdf",
};

const sig = await auditorWallet.signTypedData(domain, types, summary);
```

## Things to know

- Status is **Draft**, and the reference implementation is marked TBD.
- The domain name in the spec text reads "ERC-7652" although the proposal is ERC-7512; implementations should follow whatever the final spec settles on.
- A signed summary is **not** a guarantee of security. The spec says integrators must judge the auditor and the coverage themselves.
- Everything rests on auditor key management. There is no standard registry of auditor keys or revocation mechanism yet; auditors are expected to publish their keys themselves.
- Proxies and upgradeable contracts are not addressed: the summary binds to an address, not to the code behind it.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7512
