ModuleKit
Testing
Core
getExecOps

getExecOps

Get the UserOperationData for a given operation.

Usage

UserOpData memory userOpData = instance.getExecOps({
    target: target,
    value: value,
    callData: callData,
    txValidator: address(instance.defaultValidator)
});

Parameters

instance

The instance of the account used for testing.

txValidator

  • Type: address

The address of the transaction validator to use for the call.

target

  • Type: address

The address of the target contract.

callData

  • Type: bytes

The data to send with the call.

value

  • Type: uint256

The value to send with the call.

executions (optional)

The executions to use for the call instead of using a single target, value and callData.

Returns

The data of the UserOperation.