Skip to content

GovernanceSettings#

Source | Inherits from IGovernanceSettings

A special contract that holds the Flare governance address and its timelock.

All governance calls are delayed by the timelock specified in this contract.

This contract enables updating governance address and timelock only by hard-forking the network, this is, only by updating validator code.

Events#

GovernanceAddressUpdated#

Defined in GovernanceSettings (Docs, Source).

event GovernanceAddressUpdated(
    uint256 timestamp,
    address oldGovernanceAddress,
    address newGovernanceAddress
)

Emitted when the governance address has been changed.

Parameters Type Description
timestamp uint256 Timestamp of the block where the change happened, in seconds from UNIX epoch.
oldGovernanceAddress address Governance address before the change.
newGovernanceAddress address Governance address after the change.

GovernanceExecutorsUpdated#

Defined in GovernanceSettings (Docs, Source).

event GovernanceExecutorsUpdated(
    uint256 timestamp,
    address[] oldExecutors,
    address[] newExecutors
)

The list of addresses that are allowed to perform governance calls has been changed.

Parameters Type Description
timestamp uint256 Timestamp of the block where the change happened, in seconds from UNIX epoch.
oldExecutors address[] Array of executor addresses before the change.
newExecutors address[] Array of executor addresses after the change.

GovernanceTimelockUpdated#

Defined in GovernanceSettings (Docs, Source).

event GovernanceTimelockUpdated(
    uint256 timestamp,
    uint256 oldTimelock,
    uint256 newTimelock
)

Emitted when the timelock has been changed.

Parameters Type Description
timestamp uint256 Timestamp of the block where the change happened, in seconds from UNIX epoch.
oldTimelock uint256 Timelock before the change (in seconds).
newTimelock uint256 Timelock after the change (in seconds).

Functions#

getExecutors#

Defined in GovernanceSettings (Docs, Source).

function getExecutors(
) external view returns (
    address[]);

Gets the addresses of the accounts that are allowed to execute the timelocked governance calls, once the timelock period expires. Executors can be changed without a hard fork, via a normal governance call.

Returns Type Description
[0] address[]

getGovernanceAddress#

Defined in GovernanceSettings (Docs, Source).

function getGovernanceAddress(
) external view returns (
    address);

Gets the governance account address. The governance address can only be changed by a hard fork.

Returns Type Description
[0] address

getTimelock#

Defined in GovernanceSettings (Docs, Source).

function getTimelock(
) external view returns (
    uint256);

Gets the time in seconds that must pass between a governance call and its execution. The timelock value can only be changed by a hard fork.

Returns Type Description
[0] uint256

initialise#

Defined in GovernanceSettings (Docs, Source).

function initialise(
    address _governanceAddress,
    uint256 _timelock,
    address[] _executors
) external;

Perform initialization, which cannot be done in constructor, since this is a genesis contract. Can only be called once.

Parameters Type Description
_governanceAddress address Initial governance address.
_timelock uint256 Initial timelock value, in seconds.
_executors address[] Initial list of addresses allowed to perform governance calls.

isExecutor#

Defined in GovernanceSettings (Docs, Source).

function isExecutor(
    address _address
) external view returns (
    bool);

Checks whether an address is one of the allowed executors. See getExecutors.

Parameters Type Description
_address address The address to check.
Returns Type Description
[0] bool True if _address is in the executors list.

setExecutors#

Defined in GovernanceSettings (Docs, Source).

function setExecutors(
    address[] _newExecutors
) external;

Set the addresses of the accounts that are allowed to execute the timelocked governance calls once the timelock period expires. It isn't very dangerous to allow for anyone to execute timelocked calls, but we reserve the right to make sure the timing of the execution is under control. Can only be called by the governance.

Parameters Type Description
_newExecutors address[] New list of allowed executors. The previous list is replaced.

setGovernanceAddress#

Defined in GovernanceSettings (Docs, Source).

function setGovernanceAddress(
    address _newGovernance
) external;

Change the governance address. Can only be called by validators via fork.

Parameters Type Description
_newGovernance address New governance address.

setTimelock#

Defined in GovernanceSettings (Docs, Source).

function setTimelock(
    uint256 _newTimelock
) external;

Change the timelock, this is, the amount of time between a governance call and its execution. Can only be called by validators via fork.

Parameters Type Description
_newTimelock uint256 New timelock value, in seconds.

Variables#

SIGNAL_COINBASE#

Defined in GovernanceSettings (Docs, Source).

    address SIGNAL_COINBASE

Last update: 2024-03-01