Registrar

Git Source

Inherits: IRegistrar

Author: M^0 Labs

State Variables

emergencyGovernorDeployer

Returns the address of the Emergency Governor Deployer.

address public immutable emergencyGovernorDeployer;

powerTokenDeployer

Returns the address of the Power Token Deployer.

address public immutable powerTokenDeployer;

standardGovernorDeployer

Returns the address of the Standard Governor Deployer.

address public immutable standardGovernorDeployer;

vault

Returns the address of the Vault.

address public immutable vault;

zeroGovernor

Returns the address of the Zero Governor.

address public immutable zeroGovernor;

zeroToken

Returns the address of the Zero Token.

address public immutable zeroToken;

_valueAt

A mapping of keys to values.

mapping(bytes32 key => bytes32 value) internal _valueAt;

Functions

onlyStandardOrEmergencyGovernor

Revert if the caller is not the Standard Governor nor the Emergency Governor.

modifier onlyStandardOrEmergencyGovernor();

constructor

Constructs a new Registrar contract.

constructor(address zeroGovernor_);

Parameters

addToList

Adds account to list.

function addToList(bytes32 list_, address account_) external onlyStandardOrEmergencyGovernor;

Parameters

removeFromList

Removes account from list.

function removeFromList(bytes32 list_, address account_) external onlyStandardOrEmergencyGovernor;

Parameters

setKey

Sets key to value.

function setKey(bytes32 key_, bytes32 value_) external onlyStandardOrEmergencyGovernor;

Parameters

clock

Returns the current timepoint according to the mode the contract is operating on.

function clock() external view returns (uint48);

get

Returns the value of key.

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

Parameters

Returns

get

Returns the value of key.

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

Parameters

Returns

listContains

Returns whether list contains account.

function listContains(bytes32 list_, address account_) external view returns (bool);

Parameters

Returns

listContains

Returns whether list contains account.

function listContains(bytes32 list_, address[] calldata accounts_) external view returns (bool);

Parameters

Returns

powerToken

Returns the address of the Power Token.

function powerToken() external view returns (address);

CLOCK_MODE

Returns a machine-readable string description of the clock the contract is operating on.

function CLOCK_MODE() external pure returns (string memory);

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);

emergencyGovernor

Returns the address of the Emergency Governor.

function emergencyGovernor() public view returns (address);

standardGovernor

Returns the address of the Standard Governor.

function standardGovernor() public view returns (address);

_revertIfNotStandardOrEmergencyGovernor

Reverts if the caller is not the Standard Governor nor the Emergency Governor.

function _revertIfNotStandardOrEmergencyGovernor() internal view;

_getValueKey

Returns the key used to store the value of key_.

function _getValueKey(bytes32 key_) internal pure returns (bytes32);

Parameters

Returns

_getIsInListKey

Returns the key used to store whether account_ is in list_.

function _getIsInListKey(bytes32 list_, address account_) internal pure returns (bytes32);

Parameters

Returns

Copyright 2024 M^0 Foundation