{"eip":7512,"title":"Onchain Representation for Audits","description":"Proposal to define a contract parseable representation of Audit reports.","authors":["Richard Meissner - Safe (@rmeissner)","Robert Chen - OtterSec (@chen-robert)","Matthias Egli - ChainSecurity (@MatthiasEgli)","Jan Kalivoda - Ackee Blockchain (@jaczkal)","Michael Lewellen - OpenZeppelin (@cylon56)","Shay Zluf - Hats Finance (@shayzluf)","Alex Papageorgiou - Omniscia (@alex-ppg)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2023-09-05","requires":[712],"discussionsTo":"https://ethereum-magicians.org/t/erc-7512-onchain-audit-representation/15683","repo":"ERCs","label":"ERC-7512","officialUrl":"https://eips.ethereum.org/EIPS/eip-7512","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7512.md","url":"https://eips.huatuo.xyz/eip-7512/","tldr":{"en":"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.","ja":"監査人が監査の EIP-712 サマリーに署名するドラフトの形式。コントラクトが、特定のデプロイが信頼できる者によって監査されたこと、およびどの ERC を実装しているかをオンチェーンで確認できるようにする。","ko":"감사자가 감사의 EIP-712 요약에 서명하는 초안 형식. 컨트랙트가 특정 배포가 신뢰할 만한 주체에게 감사받았는지, 그리고 어떤 ERC를 구현하는지 온체인에서 확인할 수 있게 한다.","zh":"一种草案格式，让审计方对审计的 EIP-712 摘要签名，使合约可以在链上检查某个特定部署是否经过可信方审计，以及它实现了哪些 ERC。"},"tags":["audit","security","eip-712","signatures"],"explainers":{"en":{"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"],"related":[712,155,1271,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7512/","markdown":"## What problem does it solve?\n\nAudit 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.\n\nERC-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.\n\n## How it works\n\nThe summary is a typed structure:\n\n- **Auditor**: `name`, `uri`, and a list of `authors`.\n- **Contract**: `chainId` (the [EIP-155](/eip-155/) chain ID as `bytes32`) and `deployment` address. One summary covers one contract instance.\n- **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`.\n\nThe 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).\n\nFindings and severities are deliberately not included; the summary only says \"this instance was audited\" and \"it implements these ERCs\".\n\n## Sample code\n\nSigning a summary with ethers v6 (types follow the spec's structs):\n\n```ts\nimport { Wallet, keccak256, toUtf8Bytes, zeroPadValue, toBeHex } from \"ethers\";\n\nconst domain = { name: \"ERC-7652: Onchain Audit Representation\", version: \"1.0\" }; // as written in the spec\nconst types = {\n  Auditor: [{ name: \"name\", type: \"string\" }, { name: \"uri\", type: \"string\" }, { name: \"authors\", type: \"string[]\" }],\n  Contract: [{ name: \"chainId\", type: \"bytes32\" }, { name: \"deployment\", type: \"address\" }],\n  AuditSummary: [\n    { name: \"auditor\", type: \"Auditor\" },\n    { name: \"issuedAt\", type: \"uint256\" },\n    { name: \"ercs\", type: \"uint256[]\" },\n    { name: \"auditedContract\", type: \"Contract\" },\n    { name: \"auditHash\", type: \"bytes32\" },\n    { name: \"auditUri\", type: \"string\" },\n  ],\n};\n\nconst summary = {\n  auditor: { name: \"Example Audits\", uri: \"https://example.com\", authors: [\"Alice\"] },\n  issuedAt: 1700000000,\n  ercs: [20],\n  auditedContract: { chainId: zeroPadValue(toBeHex(1), 32), deployment: tokenAddress },\n  auditHash: keccak256(toUtf8Bytes(reportPdfContents)),\n  auditUri: \"https://example.com/reports/token.pdf\",\n};\n\nconst sig = await auditorWallet.signTypedData(domain, types, summary);\n```\n\n## Things to know\n\n- Status is **Draft**, and the reference implementation is marked TBD.\n- 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.\n- A signed summary is **not** a guarantee of security. The spec says integrators must judge the auditor and the coverage themselves.\n- 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.\n- Proxies and upgradeable contracts are not addressed: the summary binds to an address, not to the code behind it.\n"},"ja":{"lang":"ja","tldr":"監査人が監査の EIP-712 サマリーに署名するドラフトの形式。コントラクトが、特定のデプロイが信頼できる者によって監査されたこと、およびどの ERC を実装しているかをオンチェーンで確認できるようにする。","tags":["audit","security","eip-712","signatures"],"related":[712,155,1271,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7512/","markdown":"## 何を解決するのか\n\n現在の監査レポートは、ウェブサイト上の PDF です。監査済みのコードだけを受け入れたいコントラクト、たとえば新しいトークンを登録するブリッジや、モジュールをインストールするスマートアカウントには、あるデプロイが、誰によって、どの標準に照らしてレビューされたかを確認する機械可読な方法がありません。\n\nERC-7512 は、コントラクトが検証できるコンパクトな署名付き**監査サマリー**を定義します。たとえばブリッジの運営者は、信頼する監査人の鍵を一覧にしておき、それらの鍵のいずれかが、まさにそのコントラクトのアドレスとチェーンに対して署名したサマリーを提示した人なら誰でもトークンを登録できるようにできます。\n\n## 仕組み\n\nサマリーは型付き構造体です。\n\n- **Auditor**: `name`、`uri`、`authors` のリスト。\n- **Contract**: `chainId`（[EIP-155](/eip-155/) のチェーン ID を `bytes32` で表したもの）と `deployment` アドレス。1 つのサマリーは 1 つのコントラクトインスタンスを対象とします。\n- **AuditSummary**: 監査人、`issuedAt`、`ercs`（コントラクトが完全に実装している ERC 番号のリスト。空でもよい）、監査対象のコントラクト、`auditHash`（元のレポートのハッシュ）、`auditUri`。\n\n監査人は [EIP-712](/eip-712/) の型付きデータで `AuditSummary` に署名し、その結果を `signedAt` と `Signature { type, data }` を持つ `SignedAuditSummary` として添付します。サポートされる署名タイプは `SECP256K1`、`SECP256R1`、`ERC1271`（スマートコントラクトの署名者。[ERC-1271](/eip-1271/) を参照）、`BLS`（エンコーディングは未定）です。\n\n発見事項や重大度は意図的に含まれていません。サマリーが述べるのは「このインスタンスは監査された」と「これらの ERC を実装している」ということだけです。\n\n## サンプルコード\n\nethers v6 でサマリーに署名する（型は仕様の構造体に従う）:\n\n```ts\nimport { Wallet, keccak256, toUtf8Bytes, zeroPadValue, toBeHex } from \"ethers\";\n\nconst domain = { name: \"ERC-7652: Onchain Audit Representation\", version: \"1.0\" }; // as written in the spec\nconst types = {\n  Auditor: [{ name: \"name\", type: \"string\" }, { name: \"uri\", type: \"string\" }, { name: \"authors\", type: \"string[]\" }],\n  Contract: [{ name: \"chainId\", type: \"bytes32\" }, { name: \"deployment\", type: \"address\" }],\n  AuditSummary: [\n    { name: \"auditor\", type: \"Auditor\" },\n    { name: \"issuedAt\", type: \"uint256\" },\n    { name: \"ercs\", type: \"uint256[]\" },\n    { name: \"auditedContract\", type: \"Contract\" },\n    { name: \"auditHash\", type: \"bytes32\" },\n    { name: \"auditUri\", type: \"string\" },\n  ],\n};\n\nconst summary = {\n  auditor: { name: \"Example Audits\", uri: \"https://example.com\", authors: [\"Alice\"] },\n  issuedAt: 1700000000,\n  ercs: [20],\n  auditedContract: { chainId: zeroPadValue(toBeHex(1), 32), deployment: tokenAddress },\n  auditHash: keccak256(toUtf8Bytes(reportPdfContents)),\n  auditUri: \"https://example.com/reports/token.pdf\",\n};\n\nconst sig = await auditorWallet.signTypedData(domain, types, summary);\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** で、リファレンス実装は TBD となっています。\n- 仕様本文のドメイン名は、提案が ERC-7512 であるにもかかわらず「ERC-7652」となっています。実装は、最終的に仕様が確定した内容に従うべきです。\n- 署名付きサマリーはセキュリティの保証では**ありません**。仕様は、連携する側が監査人とカバレッジを自ら判断しなければならないとしています。\n- すべては監査人の鍵管理にかかっています。監査人の鍵の標準的なレジストリや失効の仕組みはまだなく、監査人が自分で鍵を公開することが期待されています。\n- プロキシやアップグレード可能なコントラクトは扱われていません。サマリーは、アドレスに結び付くのであり、その背後のコードには結び付きません。\n"},"ko":{"lang":"ko","tldr":"감사자가 감사의 EIP-712 요약에 서명하는 초안 형식. 컨트랙트가 특정 배포가 신뢰할 만한 주체에게 감사받았는지, 그리고 어떤 ERC를 구현하는지 온체인에서 확인할 수 있게 한다.","tags":["audit","security","eip-712","signatures"],"related":[712,155,1271,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7512/","markdown":"## 어떤 문제를 해결하나요?\n\n오늘날 감사 보고서는 웹사이트에 올라온 PDF입니다. 새 토큰을 등록하는 브리지나 모듈을 설치하는 스마트 계정처럼 감사받은 코드만 받아들이고 싶은 컨트랙트는, 특정 배포가 검토되었는지, 누가 했는지, 어떤 표준을 기준으로 했는지 기계가 읽을 수 있는 방식으로 확인할 방법이 없습니다.\n\nERC-7512는 컨트랙트가 검증할 수 있는 간결하고 서명된 **감사 요약(audit summary)**을 정의합니다. 예를 들어 브리지 운영자는 신뢰하는 감사자 키 목록을 두고, 그 키 중 하나가 정확히 그 컨트랙트 주소와 체인에 대해 서명한 요약을 제출하는 누구에게든 토큰을 등록하게 할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n요약은 타입이 지정된 구조체입니다.\n\n- **Auditor**: `name`, `uri`, `authors` 목록.\n- **Contract**: `chainId`([EIP-155](/eip-155/) 체인 ID를 `bytes32`로 표현)와 `deployment` 주소. 요약 하나는 컨트랙트 인스턴스 하나를 다룹니다.\n- **AuditSummary**: 감사자, `issuedAt`, `ercs`(컨트랙트가 완전히 구현한 ERC 번호 목록이며 비어 있을 수 있음), 감사 대상 컨트랙트, `auditHash`(원본 보고서의 해시), `auditUri`.\n\n감사자는 [EIP-712](/eip-712/) 타입 데이터로 `AuditSummary`에 서명하고, 그 결과를 `signedAt`과 `Signature { type, data }`를 가진 `SignedAuditSummary`로 첨부합니다. 지원되는 서명 타입은 `SECP256K1`, `SECP256R1`, `ERC1271`(스마트 컨트랙트 서명자, [ERC-1271](/eip-1271/) 참고), `BLS`(인코딩은 아직 미정)입니다.\n\n발견 사항과 심각도는 의도적으로 포함하지 않습니다. 요약은 \"이 인스턴스는 감사받았다\"와 \"이 ERC들을 구현한다\"만 말합니다.\n\n## 샘플 코드\n\nethers v6로 요약에 서명하기(타입은 명세의 구조체를 따름):\n\n```ts\nimport { Wallet, keccak256, toUtf8Bytes, zeroPadValue, toBeHex } from \"ethers\";\n\nconst domain = { name: \"ERC-7652: Onchain Audit Representation\", version: \"1.0\" }; // as written in the spec\nconst types = {\n  Auditor: [{ name: \"name\", type: \"string\" }, { name: \"uri\", type: \"string\" }, { name: \"authors\", type: \"string[]\" }],\n  Contract: [{ name: \"chainId\", type: \"bytes32\" }, { name: \"deployment\", type: \"address\" }],\n  AuditSummary: [\n    { name: \"auditor\", type: \"Auditor\" },\n    { name: \"issuedAt\", type: \"uint256\" },\n    { name: \"ercs\", type: \"uint256[]\" },\n    { name: \"auditedContract\", type: \"Contract\" },\n    { name: \"auditHash\", type: \"bytes32\" },\n    { name: \"auditUri\", type: \"string\" },\n  ],\n};\n\nconst summary = {\n  auditor: { name: \"Example Audits\", uri: \"https://example.com\", authors: [\"Alice\"] },\n  issuedAt: 1700000000,\n  ercs: [20],\n  auditedContract: { chainId: zeroPadValue(toBeHex(1), 32), deployment: tokenAddress },\n  auditHash: keccak256(toUtf8Bytes(reportPdfContents)),\n  auditUri: \"https://example.com/reports/token.pdf\",\n};\n\nconst sig = await auditorWallet.signTypedData(domain, types, summary);\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**이며 레퍼런스 구현은 TBD로 표시되어 있습니다.\n- 제안은 ERC-7512인데도 명세 본문의 도메인 이름은 \"ERC-7652\"로 되어 있습니다. 구현은 최종 명세가 확정하는 내용을 따라야 합니다.\n- 서명된 요약은 보안에 대한 보증이 **아닙니다**. 명세는 연동하는 쪽이 감사자와 감사 범위를 직접 판단해야 한다고 말합니다.\n- 모든 것은 감사자의 키 관리에 달려 있습니다. 감사자 키의 표준 레지스트리나 폐기 메커니즘은 아직 없으며, 감사자가 직접 키를 공개하리라 기대됩니다.\n- 프록시와 업그레이드 가능한 컨트랙트는 다루지 않습니다. 요약은 주소에 묶이며, 그 뒤의 코드에 묶이지 않습니다.\n"},"zh":{"lang":"zh","tldr":"一种草案格式，让审计方对审计的 EIP-712 摘要签名，使合约可以在链上检查某个特定部署是否经过可信方审计，以及它实现了哪些 ERC。","tags":["audit","security","eip-712","signatures"],"related":[712,155,1271,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7512/","markdown":"## 它解决什么问题？\n\n如今的审计报告是网站上的 PDF。想要只接受经过审计的代码的合约，例如注册新代币的跨链桥或安装模块的智能账户，没有任何机器可读的方式来检查某个部署是否经过审查、由谁审查，以及针对哪些标准。\n\nERC-7512 定义了一种紧凑的、已签名的**审计摘要**，合约可以验证它。例如，跨链桥运营方可以列出它信任的审计方密钥，并允许任何人提交由其中某个密钥为该确切合约地址和链签名的摘要来注册代币。\n\n## 它如何运作\n\n摘要是一个类型化结构：\n\n- **Auditor**：`name`、`uri`，以及 `authors` 列表。\n- **Contract**：`chainId`（[EIP-155](/eip-155/) 链 ID，以 `bytes32` 表示）和 `deployment` 地址。一份摘要只覆盖一个合约实例。\n- **AuditSummary**：审计方、`issuedAt`、`ercs`（合约完整实现的 ERC 编号列表，可以为空）、被审计的合约、`auditHash`（原始报告的哈希）和 `auditUri`。\n\n审计方用 [EIP-712](/eip-712/) 类型化数据对 `AuditSummary` 签名，并把结果附加为带有 `signedAt` 和 `Signature { type, data }` 的 `SignedAuditSummary`。支持的签名类型有 `SECP256K1`、`SECP256R1`、`ERC1271`（智能合约签名者，参见 [ERC-1271](/eip-1271/)）和 `BLS`（编码方式仍待确定）。\n\n审计发现和严重程度被有意排除在外；摘要只表明\"此实例已被审计\"以及\"它实现了这些 ERC\"。\n\n## 示例代码\n\n用 ethers v6 对摘要签名（类型遵循规范中的结构）：\n\n```ts\nimport { Wallet, keccak256, toUtf8Bytes, zeroPadValue, toBeHex } from \"ethers\";\n\nconst domain = { name: \"ERC-7652: Onchain Audit Representation\", version: \"1.0\" }; // as written in the spec\nconst types = {\n  Auditor: [{ name: \"name\", type: \"string\" }, { name: \"uri\", type: \"string\" }, { name: \"authors\", type: \"string[]\" }],\n  Contract: [{ name: \"chainId\", type: \"bytes32\" }, { name: \"deployment\", type: \"address\" }],\n  AuditSummary: [\n    { name: \"auditor\", type: \"Auditor\" },\n    { name: \"issuedAt\", type: \"uint256\" },\n    { name: \"ercs\", type: \"uint256[]\" },\n    { name: \"auditedContract\", type: \"Contract\" },\n    { name: \"auditHash\", type: \"bytes32\" },\n    { name: \"auditUri\", type: \"string\" },\n  ],\n};\n\nconst summary = {\n  auditor: { name: \"Example Audits\", uri: \"https://example.com\", authors: [\"Alice\"] },\n  issuedAt: 1700000000,\n  ercs: [20],\n  auditedContract: { chainId: zeroPadValue(toBeHex(1), 32), deployment: tokenAddress },\n  auditHash: keccak256(toUtf8Bytes(reportPdfContents)),\n  auditUri: \"https://example.com/reports/token.pdf\",\n};\n\nconst sig = await auditorWallet.signTypedData(domain, types, summary);\n```\n\n## 需要注意\n\n- 状态为 **Draft**，参考实现标记为 TBD。\n- 规范文本中的域名写作 \"ERC-7652\"，尽管该提案是 ERC-7512；实现应遵循最终规范确定的内容。\n- 已签名的摘要**不是**安全保证。规范指出，集成方必须自行判断审计方和覆盖范围。\n- 一切都取决于审计方的密钥管理。目前还没有标准的审计方密钥注册表或撤销机制；预期由审计方自行公布其密钥。\n- 代理和可升级合约没有被涉及：摘要绑定的是地址，而不是其背后的代码。\n"}}}
