IERC7579Hook
Inherits: IERC7579Module
Hook module (type 4): the single global hook that wraps the account's execution surface. preCheck
runs before the batch (returning opaque context), postCheck after — letting it enforce arbitrary
pre/post-execution policy (spend guards, allowlists, invariants) and revert to block the execution.
The wrap is ATOMIC (preCheck(); _execute(); postCheck();, per the ERC-7579 reference): a reverting
batch, preCheck, or postCheck reverts the WHOLE call — including any preCheck state effects — so
postCheck runs only on an otherwise-successful execution, never after a reverted one.
Functions
preCheck
function preCheck(address msgSender, uint256 msgValue, bytes calldata msgData)
external
returns (bytes memory hookData);Parameters
| Name | Type | Description |
|---|---|---|
| msgSender | address | |
| msgValue | uint256 | |
| msgData | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| hookData | bytes |
postCheck
function postCheck(bytes calldata hookData) external;Parameters
| Name | Type | Description |
|---|---|---|
| hookData | bytes |