Registrar
Inherits: IRegistrar
Author: M^0 Labs
State Variables
emergencyGovernorDeployer
Returns the address of the Emergency Governor Deployer.
powerTokenDeployer
Returns the address of the Power Token Deployer.
standardGovernorDeployer
Returns the address of the Standard Governor Deployer.
vault
Returns the address of the Vault.
zeroGovernor
Returns the address of the Zero Governor.
zeroToken
Returns the address of the Zero Token.
_valueAt
A mapping of keys to values.
Functions
onlyStandardOrEmergencyGovernor
Revert if the caller is not the Standard Governor nor the Emergency Governor.
constructor
Constructs a new Registrar contract.
Parameters
zeroGovernor_
address
The address of the ZeroGovernor contract.
addToList
Adds account
to list
.
Parameters
list_
bytes32
account_
address
removeFromList
Removes account
from list
.
Parameters
list_
bytes32
account_
address
setKey
Sets key
to value
.
Parameters
key_
bytes32
value_
bytes32
clock
Returns the current timepoint according to the mode the contract is operating on.
get
Returns the value of key
.
Parameters
key_
bytes32
Returns
<none>
bytes32
Some value.
get
Returns the value of key
.
Parameters
keys_
bytes32[]
Returns
values_
bytes32[]
Some value.
listContains
Returns whether list
contains account
.
Parameters
list_
bytes32
account_
address
Returns
<none>
bool
Whether list
contains account
.
listContains
Returns whether list
contains account
.
Parameters
list_
bytes32
accounts_
address[]
Returns
<none>
bool
Whether list
contains account
.
powerToken
Returns the address of the Power Token.
CLOCK_MODE
Returns a machine-readable string description of the clock the contract is operating on.
clockStartingTimestamp
Returns the starting timestamp of Epoch 1.
clockPeriod
Returns the period/duration, in seconds, of an epoch.
emergencyGovernor
Returns the address of the Emergency Governor.
standardGovernor
Returns the address of the Standard Governor.
_revertIfNotStandardOrEmergencyGovernor
Reverts if the caller is not the Standard Governor nor the Emergency Governor.
_getValueKey
Returns the key used to store the value of key_
.
Parameters
key_
bytes32
The key of the value.
Returns
<none>
bytes32
The key used to store the value of key_
.
_getIsInListKey
Returns the key used to store whether account_
is in list_
.
Parameters
list_
bytes32
The list of addresses.
account_
address
The address of the account.
Returns
<none>
bytes32
The key used to store whether account_
is in list_
.