GovernedAtGenesis
#
Source | Inherits from GovernedBase
Defines behaviors for governed contracts that have their governor set at genesis.
This contract enforces a fixed governance
address when the constructor
is not executed on a contract (for instance when directly loaded to the genesis block).
This is required to fix governance
on a contract when the network starts, at such point
where theoretically no accounts yet exist, and leaving it ungoverned could result in a race
to claim governance
by an unauthorized address.
Functions#
cancelGovernanceCall
#
function cancelGovernanceCall(
bytes4 _selector
) external;
Cancel a timelocked governance
call before it has been executed.
Only governance
can call this method.
Parameters | Type | Description |
---|---|---|
_selector |
bytes4 |
The method selector. |
constructor
#
constructor(
address _governance
) public;
executeGovernanceCall
#
function executeGovernanceCall(
bytes4 _selector
) external;
Execute the timelocked governance
calls once the timelock period expires.
Only executor can call this method.
Parameters | Type | Description |
---|---|---|
_selector |
bytes4 |
The method selector (only one timelocked call per method is stored). |
governance
#
function governance(
) public view returns (
address);
Returns the current effective governance
address.
initialise
#
function initialise(
address _governance
) public pure;
Disallow initialise
to be called.
Parameters | Type | Description |
---|---|---|
_governance |
address |
The governance address for initial claiming. |
switchToProductionMode
#
function switchToProductionMode(
) external;
Enter the production mode after all the initial governance
settings have been set.
This enables timelocks and the governance
can be obtained afterward by calling
governanceSettings
.getGovernanceAddress().
Emits GovernedProductionModeEntered
.