Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

NameTypeDescription
msgSenderaddressthe address that called the smart account
valueuint256the value that was sent to the smart account
msgDatabytesthe 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

NameTypeDescription
hookDatabytesthe data that was returned by the preCheck function MAY validate the hookData to validate transaction context of the preCheck function