Expand description
Hook development helpers for the ERC-8183 Agentic Commerce Protocol.
Provides hook action selector constants matching the BaseACPHook routing
logic. These selectors are the msg.sig values passed by the core contract
to IACPHook.beforeAction / IACPHook.afterAction callbacks.
§Hook data encoding (per selector)
| Action | data encoding |
|---|---|
setProvider | abi.encode(address provider, bytes optParams) |
setBudget | abi.encode(uint256 amount, bytes optParams) |
fund | optParams (raw bytes) |
submit | abi.encode(bytes32 deliverable, bytes optParams) |
complete | abi.encode(bytes32 reason, bytes optParams) |
reject | abi.encode(bytes32 reason, bytes optParams) |
Constants§
- COMPLETE
complete(uint256,bytes32,bytes)selector.- FUND
fund(uint256,uint256,bytes)selector.- REJECT
reject(uint256,bytes32,bytes)selector.- SET_
BUDGET setBudget(uint256,uint256,bytes)selector.- SET_
PROVIDER setProvider(uint256,address,bytes)selector.- SUBMIT
submit(uint256,bytes32,bytes)selector.