IRegistrar

Git Source

Inherits: IERC6372

Author: M^0 Labs

Functions

addToList

Adds account to list.

function addToList(bytes32 list, address account) external;

Parameters

NameTypeDescription

list

bytes32

The key for some list.

account

address

The address of some account to be added.

removeFromList

Removes account from list.

function removeFromList(bytes32 list, address account) external;

Parameters

NameTypeDescription

list

bytes32

The key for some list.

account

address

The address of some account to be removed.

setKey

Sets key to value.

function setKey(bytes32 key, bytes32 value) external;

Parameters

NameTypeDescription

key

bytes32

Some key.

value

bytes32

Some value.

clockStartingTimestamp

Returns the starting timestamp of Epoch 1.

function clockStartingTimestamp() external pure returns (uint256);

clockPeriod

Returns the period/duration, in seconds, of an epoch.

function clockPeriod() external pure returns (uint256);

get

Returns the value of key.

function get(bytes32 key) external view returns (bytes32);

Parameters

NameTypeDescription

key

bytes32

Some key.

Returns

NameTypeDescription

<none>

bytes32

Some value.

get

Returns the values of keys respectively.

function get(bytes32[] calldata keys) external view returns (bytes32[] memory);

Parameters

NameTypeDescription

keys

bytes32[]

Some keys.

Returns

NameTypeDescription

<none>

bytes32[]

Some values.

listContains

Returns whether list contains account.

function listContains(bytes32 list, address account) external view returns (bool);

Parameters

NameTypeDescription

list

bytes32

The key for some list.

account

address

The address of some account.

Returns

NameTypeDescription

<none>

bool

Whether list contains account.

listContains

Returns whether list contains all specified accounts.

function listContains(bytes32 list, address[] calldata accounts) external view returns (bool);

Parameters

NameTypeDescription

list

bytes32

The key for some list.

accounts

address[]

An array of addressed of some accounts.

Returns

NameTypeDescription

<none>

bool

Whether list contains all specified accounts.

emergencyGovernor

Returns the address of the Emergency Governor.

function emergencyGovernor() external view returns (address);

emergencyGovernorDeployer

Returns the address of the Emergency Governor Deployer.

function emergencyGovernorDeployer() external view returns (address);

powerToken

Returns the address of the Power Token.

function powerToken() external view returns (address);

powerTokenDeployer

Returns the address of the Power Token Deployer.

function powerTokenDeployer() external view returns (address);

standardGovernor

Returns the address of the Standard Governor.

function standardGovernor() external view returns (address);

standardGovernorDeployer

Returns the address of the Standard Governor Deployer.

function standardGovernorDeployer() external view returns (address);

vault

Returns the address of the Vault.

function vault() external view returns (address);

zeroGovernor

Returns the address of the Zero Governor.

function zeroGovernor() external view returns (address);

zeroToken

Returns the address of the Zero Token.

function zeroToken() external view returns (address);

Events

AddressAddedToList

Emitted when account is added to list.

event AddressAddedToList(bytes32 indexed list, address indexed account);

Parameters

NameTypeDescription

list

bytes32

The key for the list.

account

address

The address of the added account.

AddressRemovedFromList

Emitted when account is removed from list.

event AddressRemovedFromList(bytes32 indexed list, address indexed account);

Parameters

NameTypeDescription

list

bytes32

The key for the list.

account

address

The address of the removed account.

KeySet

Emitted when key is set to value.

event KeySet(bytes32 indexed key, bytes32 indexed value);

Parameters

NameTypeDescription

key

bytes32

The key.

value

bytes32

The value.

Errors

InvalidEmergencyGovernorDeployerAddress

Revert message when the Emergency Governor Deployer retrieved in the constructor is address(0).

error InvalidEmergencyGovernorDeployerAddress();

InvalidPowerTokenDeployerAddress

Revert message when the Power Token Deployer retrieved in the constructor is address(0).

error InvalidPowerTokenDeployerAddress();

InvalidStandardGovernorDeployerAddress

Revert message when the Standard Governor Deployer retrieved in the constructor is address(0).

error InvalidStandardGovernorDeployerAddress();

InvalidVaultAddress

Revert message when the Vault retrieved in the constructor is address(0).

error InvalidVaultAddress();

InvalidVoteTokenAddress

Revert message when the Vote Token retrieved in the constructor is address(0).

error InvalidVoteTokenAddress();

InvalidZeroGovernorAddress

Revert message when the Zero Governor specified in the constructor is address(0).

error InvalidZeroGovernorAddress();

NotStandardOrEmergencyGovernor

Revert message when the caller is not the Standard Governor nor the Emergency Governor.

error NotStandardOrEmergencyGovernor();

Copyright 2024 M^0 Foundation