IERC7579Hook
Inherits: IERC7579Module
ERC-7579 Hooks module (type 4). A module that implements logic to execute before and after the account executes a user operation, either individually or batched.
Functions
preCheck
Called by the smart account before execution
function preCheck(address msgSender, uint256 value, bytes calldata msgData) external returns (bytes memory hookData);
Parameters
| Name | Type | Description |
|---|---|---|
msgSender | address | the address that called the smart account |
value | uint256 | the value that was sent to the smart account |
msgData | bytes | the data that was sent to the smart account MAY return arbitrary data in the hookData return value |
postCheck
Called by the smart account after execution
function postCheck(bytes calldata hookData) external;
Parameters
| Name | Type | Description |
|---|---|---|
hookData | bytes | the data that was returned by the preCheck function MAY validate the hookData to validate transaction context of the preCheck function |