Skip to main content

Module hooks

Module hooks 

Source
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)

Actiondata encoding
setProviderabi.encode(address provider, bytes optParams)
setBudgetabi.encode(uint256 amount, bytes optParams)
fundoptParams (raw bytes)
submitabi.encode(bytes32 deliverable, bytes optParams)
completeabi.encode(bytes32 reason, bytes optParams)
rejectabi.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.