Module

Git Source

Inherits: Initializable, ERC165Upgradeable, TeamControlled, IModule

Author: Daniel Yamagata & Naveen Ailawadi

A base contract for modules, which are 'children' of departments and treasuries with bespoke logic and spending capabilities

*Modules should be deployed as proxies. If ERC1967 proxies, their storage layout should use EIP7201 storage slots Reference:

Functions

constructor

constructor();

init

Initializes the state of the module. This initialization is bespoke to each module

function init(address initTeam, bytes memory params) external virtual;

Parameters

Name
Type
Description

initTeam

address

The team that controls the module

params

bytes

The abi-encoded params to be decoded and passed to the module's initializer

__Module_init

function __Module_init(address initTeam) internal virtual onlyInitializing;

supportsInterface

ERC165 support

function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(ERC165Upgradeable, IERC165)
    returns (bool);

getParent

Returns the parent of 'this'. If 'this' is a department or module, returns the team that directly controls 'this'. If 'this' is the Treasury, returns the sentinel parent, which is address(0x1)

function getParent() public view virtual returns (address);

Returns

Name
Type
Description

<none>

address

The parent, which is either the treasury, a department, a module, or the sentinel parent

Last updated