{"eip":8329,"title":"Subject-Linked Impact Snapshot Log","description":"Defines append-only subject-linked impact snapshots with correction provenance, methodology versioning, and attestations","authors":["Chris Turner \u003cc.turner@kula.com\u003e","David Hay (@david-hay)","Reagan Simpson (@krumg111)","Collins Musyimi (@Musyimi97)"],"status":"Last Call","type":"Standards Track","category":"ERC","created":"2026-07-05","requires":[165],"discussionsTo":"https://ethereum-magicians.org/t/erc-8329-subject-linked-impact-snapshot-log/28938","repo":"ERCs","label":"ERC-8329","officialUrl":"https://eips.ethereum.org/EIPS/eip-8329","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8329.md","url":"https://eips.huatuo.xyz/eip-8329/","tldr":{"en":"A standard append-only log for reporting impact figures such as emissions, energy or jobs per subject and period, with a committed methodology, linear correction chains and optional endorsements or disputes.","ja":"排出量、エネルギー、雇用などのインパクト数値を、対象と期間ごとに報告するための標準的な追記専用ログ。方法論のコミットメント、直線的な訂正チェーン、任意の承認や異議申し立てを備える。","ko":"배출량, 에너지, 일자리 같은 임팩트 수치를 대상과 기간별로 보고하기 위한 표준 추가 전용 로그. 커밋된 방법론, 선형 정정 체인, 선택적 보증 또는 이의 제기를 갖춘다.","zh":"一个标准的仅追加日志，用于按对象和时段报告排放、能源或就业等影响数据，带有已承诺的方法论、线性的更正链，以及可选的背书或争议。"},"tags":["impact","reporting","attestations","sustainability","data"],"explainers":{"en":{"lang":"en","tldr":"A standard append-only log for reporting impact figures such as emissions, energy or jobs per subject and period, with a committed methodology, linear correction chains and optional endorsements or disputes.","tags":["impact","reporting","attestations","sustainability","data"],"related":[165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8329/","markdown":"## What problem does it solve?\n\nImpact numbers (carbon emitted or offset, energy generated, water treated, jobs created, hectares protected…) are usually published in PDFs or one-off data formats. On-chain, there was no common interface tying such a value to *who or what* it is about, *which period* it covers, *what unit* it is in, and *how* it was calculated.\n\nA single mutable value is not enough either: overwriting it erases what was claimed before and cannot tell a new reporting period apart from a restatement of an old one. ERC-8329 defines an append-only snapshot log that keeps the full history, including corrections.\n\n## How it works\n\n**Snapshots.** `recordSnapshot` stores one value for `(subjectId, indicatorId, [periodStart, periodEnd))`:\n\n- `value` is an `int256` with explicit `decimals` (impact can be negative), so the quantity is `value × 10^-decimals`;\n- `unit` is usually `keccak256` of a unit string (`\"tCO2e\"`, `\"kWh\"`, `\"m3\"`, …);\n- `methodologyHash` (keccak of the exact methodology document) and a non-empty `methodologyURI` are mandatory;\n- only completed periods are accepted (`periodEnd \u003c= block.timestamp`), and only authorised reporters may write.\n\n**One original per exact period.** A second report for the same subject, indicator and period must be a **correction**: it points `correctsIndex` at the snapshot it replaces, which gets `correctedByIndex` set. Each snapshot can be corrected once, so chains are linear, never forked. `currentSnapshotForPeriod` returns the end of the chain; `latestIndicatorSnapshot` only reflects recording order.\n\n**Standard identifiers.** The spec defines indicators such as `keccak256(\"ERC-8329:INDICATOR:CARBON_EMITTED\")` and a pattern for custom ones.\n\n**Optional extensions** (detected via [ERC-165](/eip-165/)):\n\n- `IImpactAttestation`: anyone authorised other than the reporter address can append an endorsement or dispute with an evidence hash. Attestations are never edited or deleted.\n- `IMethodologyVersioning`: a governed switch to a new methodology, effective immediately or from a future indicator ordinal, discoverable via `activeMethodology` / `pendingMethodology`. Recalculated history must be submitted as corrections.\n\n## Sample code\n\nRecording an annual emissions figure, then reading the current value for that year (ethers v6):\n\n```ts\nimport { Contract, id, formatUnits } from \"ethers\";\n\nconst abi = [\n  \"function recordSnapshot(bytes32,bytes32,int256,uint8,bytes32,uint64,uint64,bytes32,string,uint256) returns (uint256)\",\n  \"function currentSnapshotForPeriod(bytes32,bytes32,uint64,uint64) view returns (uint256)\",\n  \"function getSnapshot(bytes32,uint256) view returns (tuple(bytes32 subjectId,bytes32 indicatorId,int256 value,uint8 decimals,bytes32 unit,uint64 periodStart,uint64 periodEnd,bytes32 methodologyHash,string methodologyURI,address reportedBy,uint64 reportedAt,uint256 correctsIndex,uint256 correctedByIndex))\",\n];\nconst log = new Contract(LOG_ADDRESS, abi, reporter);\n\nconst NO_CORRECTION = 2n ** 256n - 1n;\nconst CARBON_EMITTED = id(\"ERC-8329:INDICATOR:CARBON_EMITTED\");\nconst UNIT_TCO2E = id(\"tCO2e\");\nconst [start, end] = [1735689600n, 1767225600n]; // [2025-01-01, 2026-01-01) UTC\n\nawait log.recordSnapshot(\n  subjectId, CARBON_EMITTED, 12345n, 1, UNIT_TCO2E, // 1234.5 tCO2e\n  start, end, methodologyHash, \"ipfs://\u003ccid\u003e\", NO_CORRECTION,\n);\n\nconst idx = await log.currentSnapshotForPeriod(subjectId, CARBON_EMITTED, start, end);\nconst s = await log.getSnapshot(subjectId, idx);\nconsole.log(formatUnits(s.value, s.decimals), \"tCO2e\");\n```\n\n## Things to know\n\n- Status is **Last Call** (the spec's deadline is 2026-10-19), so the interface may still receive final changes.\n- The log proves *who* reported a value, not that it is true. It does not validate measurements, credential reporters or attestors, or compute any score.\n- Overlapping periods, related indicators and separate registries can describe the same real-world impact; aggregate with care to avoid double counting.\n- Always check `unit`, `decimals` and sign, and verify the methodology document against its hash.\n- Data on a public chain is public: use opaque subject IDs and keep sensitive evidence off-chain.\n"},"ja":{"lang":"ja","tldr":"排出量、エネルギー、雇用などのインパクト数値を、対象と期間ごとに報告するための標準的な追記専用ログ。方法論のコミットメント、直線的な訂正チェーン、任意の承認や異議申し立てを備える。","tags":["impact","reporting","attestations","sustainability","data"],"related":[165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8329/","markdown":"## 何を解決するのか\n\nインパクトの数値（排出または相殺された炭素、発電されたエネルギー、処理された水、創出された雇用、保護された面積など）は、通常 PDF や単発のデータ形式で公開されます。オンチェーンでは、そうした値を、それが*誰または何*についてのものか、*どの期間*をカバーするか、*どの単位*か、*どのように*計算されたか、と結び付ける共通のインターフェースがありませんでした。\n\n単一の変更可能な値でも不十分です。上書きすると以前に主張された内容が消えてしまい、新しい報告期間と、過去の期間の訂正再報告を区別できません。ERC-8329 は、訂正を含む完全な履歴を保持する、追記専用のスナップショットログを定義します。\n\n## 仕組み\n\n**スナップショット。** `recordSnapshot` は、`(subjectId, indicatorId, [periodStart, periodEnd))` に対して 1 つの値を保存します。\n\n- `value` は、明示的な `decimals` を持つ `int256` です（インパクトは負になりえます）。したがって量は `value × 10^-decimals` です。\n- `unit` は通常、単位文字列（`\"tCO2e\"`、`\"kWh\"`、`\"m3\"` など）の `keccak256` です。\n- `methodologyHash`（方法論文書そのものの keccak）と、空でない `methodologyURI` は必須です。\n- 完了した期間（`periodEnd \u003c= block.timestamp`）のみが受け付けられ、書き込めるのは権限を持つ報告者だけです。\n\n**正確な期間ごとにオリジナルは 1 つ。** 同じ対象、指標、期間に対する 2 回目の報告は**訂正**でなければなりません。それは `correctsIndex` で置き換え対象のスナップショットを指し、そのスナップショットには `correctedByIndex` が設定されます。各スナップショットは 1 回しか訂正できないため、チェーンは直線的で、分岐することはありません。`currentSnapshotForPeriod` はチェーンの末尾を返し、`latestIndicatorSnapshot` は記録順だけを反映します。\n\n**標準の識別子。** 仕様は、`keccak256(\"ERC-8329:INDICATOR:CARBON_EMITTED\")` のような指標と、独自の指標のためのパターンを定義しています。\n\n**任意の拡張**（[ERC-165](/eip-165/) で検出）:\n\n- `IImpactAttestation`: 報告者アドレス以外の権限を持つ誰でも、証拠ハッシュ付きで、承認や異議申し立てを追加できます。アテステーションは編集も削除もされません。\n- `IMethodologyVersioning`: 新しい方法論へのガバナンスされた切り替えで、即時、または将来の指標の序数から有効になり、`activeMethodology` / `pendingMethodology` で確認できます。再計算された履歴は、訂正として提出しなければなりません。\n\n## サンプルコード\n\n年間の排出量を記録し、その年の現在の値を読み取る（ethers v6）:\n\n```ts\nimport { Contract, id, formatUnits } from \"ethers\";\n\nconst abi = [\n  \"function recordSnapshot(bytes32,bytes32,int256,uint8,bytes32,uint64,uint64,bytes32,string,uint256) returns (uint256)\",\n  \"function currentSnapshotForPeriod(bytes32,bytes32,uint64,uint64) view returns (uint256)\",\n  \"function getSnapshot(bytes32,uint256) view returns (tuple(bytes32 subjectId,bytes32 indicatorId,int256 value,uint8 decimals,bytes32 unit,uint64 periodStart,uint64 periodEnd,bytes32 methodologyHash,string methodologyURI,address reportedBy,uint64 reportedAt,uint256 correctsIndex,uint256 correctedByIndex))\",\n];\nconst log = new Contract(LOG_ADDRESS, abi, reporter);\n\nconst NO_CORRECTION = 2n ** 256n - 1n;\nconst CARBON_EMITTED = id(\"ERC-8329:INDICATOR:CARBON_EMITTED\");\nconst UNIT_TCO2E = id(\"tCO2e\");\nconst [start, end] = [1735689600n, 1767225600n]; // [2025-01-01, 2026-01-01) UTC\n\nawait log.recordSnapshot(\n  subjectId, CARBON_EMITTED, 12345n, 1, UNIT_TCO2E, // 1234.5 tCO2e\n  start, end, methodologyHash, \"ipfs://\u003ccid\u003e\", NO_CORRECTION,\n);\n\nconst idx = await log.currentSnapshotForPeriod(subjectId, CARBON_EMITTED, start, end);\nconst s = await log.getSnapshot(subjectId, idx);\nconsole.log(formatUnits(s.value, s.decimals), \"tCO2e\");\n```\n\n## 知っておくべきこと\n\n- ステータスは **Last Call** です（仕様上の期限は 2026-10-19）。そのため、インターフェースには最終的な変更が入る可能性があります。\n- ログが証明するのは、値を*誰が*報告したかであり、それが真実であることではありません。測定値の検証、報告者やアテスターの資格確認、スコアの計算は行いません。\n- 重複する期間、関連する指標、別々のレジストリが、現実世界の同じインパクトを記述することがあります。二重計上を避けるため、集計には注意してください。\n- `unit`、`decimals`、符号を必ず確認し、方法論文書をそのハッシュと照合してください。\n- 公開チェーン上のデータは公開されます。不透明な対象 ID を使い、機微な証拠はオフチェーンに置いてください。\n"},"ko":{"lang":"ko","tldr":"배출량, 에너지, 일자리 같은 임팩트 수치를 대상과 기간별로 보고하기 위한 표준 추가 전용 로그. 커밋된 방법론, 선형 정정 체인, 선택적 보증 또는 이의 제기를 갖춘다.","tags":["impact","reporting","attestations","sustainability","data"],"related":[165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8329/","markdown":"## 어떤 문제를 해결하나요?\n\n임팩트 수치(배출 또는 상쇄된 탄소, 생산된 에너지, 처리된 물, 창출된 일자리, 보호된 헥타르 등)는 보통 PDF나 일회성 데이터 형식으로 공개됩니다. 온체인에는 이런 값을 *누구 또는 무엇*에 관한 것인지, *어느 기간*을 다루는지, *어떤 단위*인지, *어떻게* 계산했는지와 묶어 주는 공통 인터페이스가 없었습니다.\n\n변경 가능한 단일 값만으로도 충분하지 않습니다. 덮어쓰면 이전에 주장한 내용이 지워지고, 새 보고 기간과 지난 기간의 수정 보고를 구분할 수 없습니다. ERC-8329는 정정을 포함한 전체 이력을 보존하는 추가 전용 스냅샷 로그를 정의합니다.\n\n## 어떻게 동작하나요?\n\n**스냅샷.** `recordSnapshot`은 `(subjectId, indicatorId, [periodStart, periodEnd))`에 대해 하나의 값을 저장합니다.\n\n- `value`는 명시적인 `decimals`를 가진 `int256`입니다(임팩트는 음수일 수 있음). 따라서 수량은 `value × 10^-decimals`입니다.\n- `unit`은 보통 단위 문자열(`\"tCO2e\"`, `\"kWh\"`, `\"m3\"` 등)의 `keccak256`입니다.\n- `methodologyHash`(방법론 문서 원본의 keccak)와 비어 있지 않은 `methodologyURI`는 필수입니다.\n- 완료된 기간(`periodEnd \u003c= block.timestamp`)만 허용되며, 권한을 가진 보고자만 쓸 수 있습니다.\n\n**정확한 기간마다 원본은 하나.** 같은 대상, 지표, 기간에 대한 두 번째 보고는 **정정**이어야 합니다. `correctsIndex`가 대체하려는 스냅샷을 가리키고, 그 스냅샷에는 `correctedByIndex`가 설정됩니다. 각 스냅샷은 한 번만 정정할 수 있으므로 체인은 선형이며 갈라지지 않습니다. `currentSnapshotForPeriod`는 체인의 끝을 반환하고, `latestIndicatorSnapshot`은 기록 순서만 반영합니다.\n\n**표준 식별자.** 명세는 `keccak256(\"ERC-8329:INDICATOR:CARBON_EMITTED\")` 같은 지표와 사용자 정의 지표를 위한 패턴을 정의합니다.\n\n**선택적 확장**([ERC-165](/eip-165/)로 감지):\n\n- `IImpactAttestation`: 보고자 주소가 아닌 권한 있는 누구나 증거 해시와 함께 보증이나 이의 제기를 덧붙일 수 있습니다. 증명(attestation)은 수정되거나 삭제되지 않습니다.\n- `IMethodologyVersioning`: 새 방법론으로의 거버넌스 전환으로, 즉시 또는 미래의 지표 서수부터 적용되며 `activeMethodology` / `pendingMethodology`로 확인할 수 있습니다. 재계산된 이력은 정정으로 제출해야 합니다.\n\n## 샘플 코드\n\n연간 배출량을 기록한 다음 해당 연도의 현재 값 읽기(ethers v6):\n\n```ts\nimport { Contract, id, formatUnits } from \"ethers\";\n\nconst abi = [\n  \"function recordSnapshot(bytes32,bytes32,int256,uint8,bytes32,uint64,uint64,bytes32,string,uint256) returns (uint256)\",\n  \"function currentSnapshotForPeriod(bytes32,bytes32,uint64,uint64) view returns (uint256)\",\n  \"function getSnapshot(bytes32,uint256) view returns (tuple(bytes32 subjectId,bytes32 indicatorId,int256 value,uint8 decimals,bytes32 unit,uint64 periodStart,uint64 periodEnd,bytes32 methodologyHash,string methodologyURI,address reportedBy,uint64 reportedAt,uint256 correctsIndex,uint256 correctedByIndex))\",\n];\nconst log = new Contract(LOG_ADDRESS, abi, reporter);\n\nconst NO_CORRECTION = 2n ** 256n - 1n;\nconst CARBON_EMITTED = id(\"ERC-8329:INDICATOR:CARBON_EMITTED\");\nconst UNIT_TCO2E = id(\"tCO2e\");\nconst [start, end] = [1735689600n, 1767225600n]; // [2025-01-01, 2026-01-01) UTC\n\nawait log.recordSnapshot(\n  subjectId, CARBON_EMITTED, 12345n, 1, UNIT_TCO2E, // 1234.5 tCO2e\n  start, end, methodologyHash, \"ipfs://\u003ccid\u003e\", NO_CORRECTION,\n);\n\nconst idx = await log.currentSnapshotForPeriod(subjectId, CARBON_EMITTED, start, end);\nconst s = await log.getSnapshot(subjectId, idx);\nconsole.log(formatUnits(s.value, s.decimals), \"tCO2e\");\n```\n\n## 알아둘 점\n\n- 상태는 **Last Call**입니다(명세상 기한은 2026-10-19). 따라서 인터페이스에 마지막 변경이 있을 수 있습니다.\n- 로그가 증명하는 것은 값을 *누가* 보고했는지이지 그것이 사실이라는 것이 아닙니다. 측정값을 검증하거나, 보고자나 증명자의 자격을 확인하거나, 점수를 계산하지 않습니다.\n- 겹치는 기간, 관련된 지표, 별도의 레지스트리가 같은 현실 세계의 임팩트를 기술할 수 있습니다. 이중 계산을 피하도록 집계에 주의하세요.\n- 항상 `unit`, `decimals`, 부호를 확인하고 방법론 문서를 해시와 대조하세요.\n- 공개 체인의 데이터는 공개입니다. 불투명한 대상 ID를 쓰고 민감한 증거는 오프체인에 두세요.\n"},"zh":{"lang":"zh","tldr":"一个标准的仅追加日志，用于按对象和时段报告排放、能源或就业等影响数据，带有已承诺的方法论、线性的更正链，以及可选的背书或争议。","tags":["impact","reporting","attestations","sustainability","data"],"related":[165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8329/","markdown":"## 它解决什么问题？\n\n影响数据（排放或抵消的碳、产生的能源、处理的水、创造的就业、保护的公顷数……）通常以 PDF 或一次性的数据格式发布。在链上，没有一个通用接口，把这样的数值与它所涉及的*人或事物*、所覆盖的*时段*、所用的*单位*，以及*如何*计算联系起来。\n\n单个可变的值同样不够：覆盖它会抹去先前声称的内容，也无法区分新的报告时段与对旧时段的重述。ERC-8329 定义了一个仅追加的快照日志，保留包括更正在内的完整历史。\n\n## 它如何运作\n\n**快照。** `recordSnapshot` 为 `(subjectId, indicatorId, [periodStart, periodEnd))` 存储一个值：\n\n- `value` 是带有显式 `decimals` 的 `int256`（影响可以为负），因此数量为 `value × 10^-decimals`；\n- `unit` 通常是单位字符串（`\"tCO2e\"`、`\"kWh\"`、`\"m3\"`……）的 `keccak256`；\n- `methodologyHash`（方法论文档原文的 keccak）和非空的 `methodologyURI` 是必需的；\n- 只接受已结束的时段（`periodEnd \u003c= block.timestamp`），并且只有获授权的报告者才能写入。\n\n**每个精确时段只有一份原始记录。** 对同一对象、指标和时段的第二次报告必须是**更正**：它用 `correctsIndex` 指向被它取代的快照，而该快照会被设置 `correctedByIndex`。每个快照只能被更正一次，因此链是线性的，绝不分叉。`currentSnapshotForPeriod` 返回链的末端；`latestIndicatorSnapshot` 只反映记录顺序。\n\n**标准标识符。** 规范定义了诸如 `keccak256(\"ERC-8329:INDICATOR:CARBON_EMITTED\")` 的指标，以及自定义指标的命名模式。\n\n**可选扩展**（通过 [ERC-165](/eip-165/) 检测）：\n\n- `IImpactAttestation`：除报告者地址之外的任何获授权者，都可以追加带有证据哈希的背书或争议。证明（attestation）永远不会被编辑或删除。\n- `IMethodologyVersioning`：经治理流程切换到新的方法论，立即生效或从未来某个指标序号起生效，可通过 `activeMethodology` / `pendingMethodology` 发现。重新计算的历史必须作为更正提交。\n\n## 示例代码\n\n记录一份年度排放数据，然后读取该年度的当前值（ethers v6）：\n\n```ts\nimport { Contract, id, formatUnits } from \"ethers\";\n\nconst abi = [\n  \"function recordSnapshot(bytes32,bytes32,int256,uint8,bytes32,uint64,uint64,bytes32,string,uint256) returns (uint256)\",\n  \"function currentSnapshotForPeriod(bytes32,bytes32,uint64,uint64) view returns (uint256)\",\n  \"function getSnapshot(bytes32,uint256) view returns (tuple(bytes32 subjectId,bytes32 indicatorId,int256 value,uint8 decimals,bytes32 unit,uint64 periodStart,uint64 periodEnd,bytes32 methodologyHash,string methodologyURI,address reportedBy,uint64 reportedAt,uint256 correctsIndex,uint256 correctedByIndex))\",\n];\nconst log = new Contract(LOG_ADDRESS, abi, reporter);\n\nconst NO_CORRECTION = 2n ** 256n - 1n;\nconst CARBON_EMITTED = id(\"ERC-8329:INDICATOR:CARBON_EMITTED\");\nconst UNIT_TCO2E = id(\"tCO2e\");\nconst [start, end] = [1735689600n, 1767225600n]; // [2025-01-01, 2026-01-01) UTC\n\nawait log.recordSnapshot(\n  subjectId, CARBON_EMITTED, 12345n, 1, UNIT_TCO2E, // 1234.5 tCO2e\n  start, end, methodologyHash, \"ipfs://\u003ccid\u003e\", NO_CORRECTION,\n);\n\nconst idx = await log.currentSnapshotForPeriod(subjectId, CARBON_EMITTED, start, end);\nconst s = await log.getSnapshot(subjectId, idx);\nconsole.log(formatUnits(s.value, s.decimals), \"tCO2e\");\n```\n\n## 需要注意\n\n- 状态为 **Last Call**（规范中的截止日期为 2026-10-19），因此接口仍可能有最后的改动。\n- 日志证明的是*谁*报告了某个值，而不是它是否属实。它不验证测量结果，不为报告者或证明者做资质认证，也不计算任何评分。\n- 重叠的时段、相关的指标和各自独立的注册表可能描述同一个现实世界的影响；汇总时请小心，避免重复计算。\n- 务必检查 `unit`、`decimals` 和符号，并用哈希核对方法论文档。\n- 公链上的数据是公开的：请使用不透明的对象 ID，并把敏感证据保存在链下。\n"}}}
