ModuleKit
Building
Hooks
_preCheck

_preCheck

A virtual function called before executions occured on the account. Overwrites from ERC7579HookDestruct.

Usage

function _preCheck(
    address account,
    address msgSender,
    uint256 msgValue,
    bytes calldata msgData
)
    internal
    virtual
    override
    returns (bytes memory hookData)
{
    return abi.encode("success");
}

Parameters

account

  • Type: address

The address of the account that the execution is called on.

msgSender

  • Type: address

The address of the caller to the account.

msgValue

  • Type: uint256

The value sent to the account.

msgData

  • Type: bytes

The msgData sent to the account.

Returns

hookData

  • Type: bytes

The data sent to the postHook function.