Skip to content

PRXVT/hook-contracts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC-8183

ERC-8183 — job escrow with evaluator attestation for trustless agent-to-agent commerce.

Specification

  • hook-profiles.md — Recommended hook profiles: A (Simple Policy), B (Advanced Escrow), C (Experimental).

Hook Extension Contracts

Contract Description
AgenticCommerceHooked.sol Hookable variant of the core protocol. Same lifecycle with an optional hook address per job and optParams on all hookable functions. claimRefund is deliberately not hookable.
IACPHook.sol Interface all hooks must implement: beforeAction and afterAction.
BaseACPHook.sol Abstract base that routes beforeAction/afterAction to named virtual functions (_preFund, _postComplete, etc.). Inherit this and override only what you need.

Hook Examples

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.

Building a Hook

  1. Inherit BaseACPHook and override only the callbacks you need.
  2. See CONTRIBUTING.md for full guidelines.

Contributing

Contributions, feedback, and discussion are welcome - please see CONTRIBUTING.md for guidelines on how to get started.

License

MIT

About

Hook extension layer for ERC-8183 — extend job escrow with custom logic via beforeAction/afterAction callbacks.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Solidity 100.0%