ModuleKit
Glossary
Types

Types in ModuleKit

Glossary of types in ModuleKit.

AccountInstance

The core instance of an account used for testing in ModuleKit.

Definition

struct AccountInstance {
    address account;
    AccountType accountType;
    address accountHelper;
    Auxiliary aux;
    IERC7579Validator defaultValidator;
    bytes32 salt;
    bytes initCode;
    address accountFactory;
}

Properties

account

  • Type: address

The address of the account.

accountType

The type of the account.

accountHelper

  • Type: address

The address of the account helper. This helper is used to format any calls for the right account type.

aux

Auxiliary data for the account.

defaultValidator

  • Type: IERC7579Validator

The default validator that is used when no validator is specified by the user.

salt

  • Type: bytes32

The salt used to create the account.

initCode

  • Type: bytes

The ERC-4337 initialization code for the account.

accountFactory

  • Type: address

The address of the account factory.

AccountType

The type of account used in ModuleKit.

Definition

enum AccountType {
    DEFAULT,
    SAFE,
    KERNEL,
    CUSTOM
}

Properties

DEFAULT

The ERC-7579 Reference Implementation.

SAFE

The Safe using the Safe7579 (opens in a new tab) adapter.

KERNEL

The Kernel account.

NEXUS

The Nexus account.

CUSTOM

A custom account type that a developer can define.

Auxiliary

Auxiliary data for an account.

Definition

struct Auxiliary {
    IEntryPoint entrypoint;
    UserOpGasLog gasSimulation;
    IERC7484 registry;
    MockFactory mockFactory;
}

Properties

entrypoint

  • Type: IEntryPoint

The ERC-4337 entryPoint used.

gasSimulation

  • Type: UserOpGasLog

A contract that is used to log the gas used in a UserOperation.

registry

  • Type: IERC7484

The registry used for the account.

mockFactory

  • Type: MockFactory

A factory used to deploy mock periphery contracts like a Mock Swap Router.

Execution

An execution of a UserOperation.

Definition

struct Execution {
    address target;
    uint256 value;
    bytes callData;
}

Properties

target

  • Type: address

The address of the target contract.

value

  • Type: uint256

The value to send with the call.

callData

  • Type: bytes

The data to send with the call.

InstalledModule

A module that is installed in an account.

Definition

struct InstalledModule {
    uint256 moduleType;
    address moduleAddress;
}

### Properties

moduleType

  • Type: uint256

The type of the module.

moduleAddress

  • Type: address

The address of the module.

UserOpData

The data of a UserOperation.

Definition

struct UserOpData {
    PackedUserOperation userOp;
    bytes32 userOpHash;
    IEntryPoint entrypoint;
}

Properties

userOp

  • Type: PackedUserOperation

The UserOperation.

userOpHash

  • Type: bytes32

The hash of the UserOperation.

entrypoint

  • Type: IEntryPoint

The entryPoint used for the UserOperation.