Skip to main content

Admin

Description

The admin governance plugin giving execution permission on the DAO to a single address.

Implementation

internal variable ADMIN_INTERFACE_ID

The ERC-165 interface ID of the contract.

bytes4 ADMIN_INTERFACE_ID

public variable EXECUTE_PROPOSAL_PERMISSION_ID

The ID of the permission required to call the executeProposal function.

bytes32 EXECUTE_PROPOSAL_PERMISSION_ID

external function initialize

Initializes the contract.

function initialize(contract IDAO _dao) external
InputTypeDescription
_daocontract IDAOThe associated DAO.

This method is required to support ERC-1167.

public function supportsInterface

Checks if this or the parent contract supports an interface by its ID.

function supportsInterface(bytes4 _interfaceId) public view returns (bool)
InputTypeDescription
_interfaceIdbytes4The ID of the interface.
Output
0boolReturns true if the interface is supported.

external function isMember

Checks if an account is a member of the DAO.

function isMember(address _account) external view returns (bool)
InputTypeDescription
_accountaddressThe address of the account to be checked.
Output
0boolWhether the account is a member or not.

This function must be implemented in the plugin contract that introduces the members to the DAO.

external function executeProposal

Creates and executes a new proposal.

function executeProposal(bytes _metadata, struct IDAO.Action[] _actions, uint256 _allowFailureMap) external
InputTypeDescription
_metadatabytesThe metadata of the proposal.
_actionsstruct IDAO.Action[]The actions to be executed.
_allowFailureMapuint256A bitmap allowing the proposal to succeed, even if individual actions might revert. If the bit at index i is 1, the proposal succeeds even if the ith action reverts. A failure map value of 0 requires every action to not revert.
© 2024