IModuleManagerBase_v1.sol

Git Source

Inherits: IERC2771Context

Functions

isModule

Returns whether the address module is added as module.

function isModule(address module) external view returns (bool);

Parameters

NameTypeDescription

module

address

The module to check.

Returns

NameTypeDescription

<none>

bool

True if module added, false otherwise.

listModules

Returns the list of all modules.

function listModules() external view returns (address[] memory);

Returns

NameTypeDescription

<none>

address[]

List of all modules.

modulesSize

Returns the number of modules.

function modulesSize() external view returns (uint8);

Returns

NameTypeDescription

<none>

uint8

The number of modules.

isTrustedForwarder

Returns wether the given address is the trusted forwarder or not.

Exposes the ERC2771 isTrusted Forwarder.

function isTrustedForwarder(address forwarder) external view returns (bool);

Parameters

NameTypeDescription

forwarder

address

The address to check.

Returns

NameTypeDescription

<none>

bool

True if the address is the trusted forwarder, false otherwise.

trustedForwarder

Returns the trusted forwarder for metatransactions.

Exposes the ERC2771 isTrusted Forwarder.

function trustedForwarder() external view returns (address);

Returns

NameTypeDescription

<none>

address

The trusted forwarder address.

Events

ModuleAdded

Event emitted when module added.

event ModuleAdded(address indexed module);

Parameters

NameTypeDescription

module

address

The module's address.

ModuleRemoved

Event emitted when module removed.

event ModuleRemoved(address indexed module);

Parameters

NameTypeDescription

module

address

The module's address.

ModuleTimelockStarted

Event emitted when updating a module is initiated, and the timelock starts;.

event ModuleTimelockStarted(address module, uint timelockUntil);

Parameters

NameTypeDescription

module

address

The module's address.

timelockUntil

uint256

The unix timestamp until the timelock is active.

ModuleUpdateCanceled

Event emitted when a module update is canceled.

event ModuleUpdateCanceled(address module);

Parameters

NameTypeDescription

module

address

The module's address.

Errors

ModuleManagerBase__CallerNotAuthorized

Function is only callable by authorized address.

error ModuleManagerBase__CallerNotAuthorized();

ModuleManagerBase__OnlyCallableByModule

Function is only callable by modules.

error ModuleManagerBase__OnlyCallableByModule();

ModuleManagerBase__InvalidModuleAddress

Given module address invalid.

error ModuleManagerBase__InvalidModuleAddress();

ModuleManagerBase__IsModule

Given address is a module.

error ModuleManagerBase__IsModule();

ModuleManagerBase__IsNotModule

Given address is not a module.

error ModuleManagerBase__IsNotModule();

ModuleManagerBase__ModuleAmountOverLimits

The {ModuleManagerBase_v1} has reached the maximum amount of modules.

error ModuleManagerBase__ModuleAmountOverLimits();

ModuleManagerBase__ModuleUpdateTimelockStillActive

Timelock still active for the given module address.

error ModuleManagerBase__ModuleUpdateTimelockStillActive(
    address _module, uint _timelockUntil
);

Parameters

NameTypeDescription

_module

address

The module address.

_timelockUntil

uint256

The unix timestamp until the timelock is active.

ModuleManagerBase__ModuleUpdateAlreadyStarted

Module update is already in progress.

error ModuleManagerBase__ModuleUpdateAlreadyStarted();

ModuleManagerBase__ModuleNotRegistered

Module has not been registered in our factory.

error ModuleManagerBase__ModuleNotRegistered();

ModuleManagerBase__ModuleFactoryInvalid

Referenced {ModuleFactory_v1} is invalid.

error ModuleManagerBase__ModuleFactoryInvalid();

Structs

ModuleUpdateTimelock

The timelock struct to keep track of updating the registered modules.

struct ModuleUpdateTimelock {
    bool timelockActive;
    uint timelockUntil;
}

Properties

NameTypeDescription

timelockActive

bool

Is the timelock currently active.

timelockUntil

uint256

Timestamp that represents from when the update can be carried out.

Last updated