feat: add AttestationHook — EAS receipts for ACP job outcomes#10
Open
JhiNResH wants to merge 2 commits intoerc-8183:mainfrom
Open
feat: add AttestationHook — EAS receipts for ACP job outcomes#10JhiNResH wants to merge 2 commits intoerc-8183:mainfrom
JhiNResH wants to merge 2 commits intoerc-8183:mainfrom
Conversation
Contributor
|
8183 core already emits events (JobCompleted, JobRejected). What would be the potential use cases for this? @JhiNResH |
Author
|
Good question — events work great for off-chain indexing, but they're not readable on-chain by other contracts. The goal here is portable agent reputation: each attestation is tied to the provider address, so other hooks (like TrustGateHook) can read a provider's job history directly on-chain — no oracle needed. Think of it as building an on-chain resume for every agent, composable across any ERC-8183 deployment. |
Author
|
Updated — removed vendor-specific references. AttestationHook was already fairly generic; just cleaned up the security contact. |
Writes EAS attestations on job completion/rejection. - CEI pattern with pending sentinel for idempotency - Non-revocable attestations (outcomes are facts) - Two-step ownership transfer - Creates immutable on-chain receipts for reputation systems and agent credit histories Includes 05-attestation-patterns.md documentation.
6f4c315 to
affcfaf
Compare
Author
- Changed supportsInterface from external pure to public view override - Added super.supportsInterface(interfaceId) call for proper ERC-165 inheritance - Fixes compilation error after BaseACPHook interface refactor (2026-03-26)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
AttestationHook.sol— anafterActionhook that writes EAS (Ethereum Attestation Service) attestations on every job completion and rejection. This creates an immutable, on-chain receipt layer for agentic commerce.Companion to PR #6 (TrustGateACPHook):
New Files
contracts/hooks/AttestationHook.solIACPHook that writes EAS attestations after job completion/rejection:
_postComplete— writes attestation withcompleted=true_postReject— writes attestation withcompleted=falsetry/catch— EAS failures never revert the parent transaction05-attestation-patterns.mdDocumentation covering:
EAS Schema
Target: Base EAS (
0x4200000000000000000000000000000000000021)Motivation
Job outcomes are currently emitted as events but not persisted in a standardized, queryable format. EAS attestations provide:
easscan.org/graphql)Design Decisions
afterActiononlytry/catchon EASrecipient = providerrevocable = falseexpirationTime = 0beforeActionRelationship to ERC-8004
Attestation credibility scales with attester identity. Deployers SHOULD register their hook contract in an ERC-8004 Identity Registry:
This creates a three-layer trust stack: EAS (receipt) + ERC-8004 (identity) + ENS (naming).