ERC-8183 — job escrow with evaluator attestation for trustless agent-to-agent commerce.
- hook-profiles.md — Recommended hook profiles: A (Simple Policy), B (Advanced Escrow), C (Experimental).
| Contract | Description |
|---|---|
| BaseERC8183Hook.sol | Abstract base that routes beforeAction/afterAction to named virtual functions (_preFund, _postComplete, etc.). Inherit this and override only what you need. |
| IERC8183HookMetadata.sol | Required metadata interface for MultiHookRouter compatibility. Declares which selectors a hook depends on. |
| MultiHookRouter.sol | Composability layer. Fans beforeAction/afterAction out to an ordered list of sub-hooks per job, per selector. |
The hookable core protocol (ERC8183) and the base hook interface (IERC8183Hook) live in the base-contracts submodule.
| Contract | Profile | Description |
|---|---|---|
| BiddingHook.sol | A — Simple Policy | Off-chain signed bidding for provider selection. Providers sign bid commitments; the hook verifies the winning signature on-chain via setProvider. Zero direct external calls — everything flows through core → hook callbacks. |
| FundTransferHook.sol | B — Advanced Escrow | Two-phase fund transfer for token conversion/bridging jobs. Client capital flows to provider at fund; provider deposits output tokens at submit; buyer receives them at complete. |
| PrivacyHook.sol | C — Experimental | Encrypted-envelope submissions. Providers encrypt deliverables off-chain with AES-256-GCM and submit an IPFS CID with ECDH-wrapped AES keys per recipient; the hook validates envelope structure on-chain and optionally verifies a ZK proof over the encrypted data. |
- Inherit
BaseERC8183Hookand override only the callbacks you need. - Implement
IERC8183HookMetadataso the hook is MultiHookRouter-compatible. - Keep the hook in a single
.solfile with any custom interfaces inlined. - Stay vendor-neutral — no specific token, exchange, or vendor names.
- See CONTRIBUTING.md for full PR guidelines.
Contributions, feedback, and discussion are welcome — please see CONTRIBUTING.md for guidelines on how to get started.
MIT