Skip to content

VoterWhitelister#

Manager of the FTSO whitelist.

Only addresses registered in this contract can submit data to the FTSO system.

Functions#

addFtso#

Defined in VoterWhitelister (Docs, Source).

function addFtso(
    uint256 _ftsoIndex
) external;

Create an empty whitelist with default size for a new FTSO.

Only ftsoManager can call this method.

Parameters Type Description
_ftsoIndex uint256 Index of the new FTSO.

cancelGovernanceCall#

Defined in GovernedBase (Docs, Source).

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.

chillVoter#

Defined in VoterWhitelister (Docs, Source).

function chillVoter(
    address _voter,
    uint256 _noOfRewardEpochs,
    uint256[] _ftsoIndices
) external returns (
    bool[] _removed,
    uint256 _untilRewardEpoch);

Used to chill a data provider, this is, remove it from the whitelist for a specified number of reward epochs.

Only governance can call this method.

Parameters Type Description
_voter address Data provider being chilled.
_noOfRewardEpochs uint256 Number of epochs to chill the provider for.
_ftsoIndices uint256[] Array of indices of the FTSOs that will not allow this provider to submit data.

chilledUntilRewardEpoch#

Defined in IVoterWhitelister (Docs, Source).

function chilledUntilRewardEpoch(
    address _voter
) external view returns (
    uint256);

In case of providing bad prices (e.g. collusion), the voter can be chilled for a few reward epochs. A voter can whitelist again from a returned reward epoch onwards.

Parameters Type Description
_voter address Address of the queried data provider.
Returns Type Description
[0] uint256 uint256 ID of the epoch where the data provider can start submitting prices again.

constructor#

Defined in VoterWhitelister (Docs, Source).

constructor(
    address _governance,
    address _addressUpdater,
    contract IIPriceSubmitter _priceSubmitter,
    uint256 _defaultMaxVotersForFtso,
    contract IVoterWhitelister _oldVoterWhitelister
) public;

constructor#

Defined in Governed (Docs, Source).

constructor(
    address _governance
) public;
Parameters Type Description
_governance address Governance contract. Must not be zero.

copyWhitelist#

Defined in VoterWhitelister (Docs, Source).

function copyWhitelist(
    uint256 _ftsoIndex
) external;

Copy whitelist data from oldVoterWhitelister for a specific FTSO. Can only be called by governance.

Parameters Type Description
_ftsoIndex uint256 Index of the FTSO whose whitelist is to be copied.

defaultMaxVotersForFtso#

Defined in IVoterWhitelister (Docs, Source).

function defaultMaxVotersForFtso(
) external view returns (
    uint256);

Maximum number of voters in the whitelist for a new FTSO.

Returns Type Description
[0] uint256 uint256 Default maximum allowed voters.

executeGovernanceCall#

Defined in GovernedBase (Docs, Source).

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

getAddressUpdater#

Defined in AddressUpdatable (Docs, Source).

function getAddressUpdater(
) public view returns (
    address _addressUpdater);

Returns the configured address updater.

Returns Type Description
_addressUpdater address The AddresUpdater contract that can update our contract address list, as a response to a governance call.

getFtsoWhitelistedPriceProviders#

Defined in VoterWhitelister (Docs, Source).

function getFtsoWhitelistedPriceProviders(
    uint256 _ftsoIndex
) public view returns (
    address[]);

Gets whitelisted price providers for the FTSO at a given index.

Parameters Type Description
_ftsoIndex uint256 Queried index.
Returns Type Description
[0] address[] Array of addresses of the whitelisted data providers.

getFtsoWhitelistedPriceProvidersBySymbol#

Defined in VoterWhitelister (Docs, Source).

function getFtsoWhitelistedPriceProvidersBySymbol(
    string _symbol
) external view returns (
    address[]);

Gets whitelisted price providers for the FTSO with a specified symbol.

Parameters Type Description
_symbol string Queried symbol.
Returns Type Description
[0] address[] Array of addresses of the whitelisted data providers.

governance#

Defined in GovernedBase (Docs, Source).

function governance(
) public view returns (
    address);

Returns the current effective governance address.

maxVotersForFtso#

Defined in IVoterWhitelister (Docs, Source).

function maxVotersForFtso(
    uint256 _ftsoIndex
) external view returns (
    uint256);

Maximum number of voters in the whitelist for a specific FTSO. Adjustable separately for each index.

Parameters Type Description
_ftsoIndex uint256 Index of the FTSO.
Returns Type Description
[0] uint256 uint256 Maximum allowed voters.

removeFtso#

Defined in VoterWhitelister (Docs, Source).

function removeFtso(
    uint256 _ftsoIndex
) external;

Clear whitelist for a removed FTSO.

Only ftsoManager can call this method.

Parameters Type Description
_ftsoIndex uint256 Index of the removed FTSO.

removeTrustedAddressFromWhitelist#

Defined in VoterWhitelister (Docs, Source).

function removeTrustedAddressFromWhitelist(
    address _trustedAddress,
    uint256 _ftsoIndex
) external;

Remove a trusted address from whitelist.

Parameters Type Description
_trustedAddress address Address to remove.
_ftsoIndex uint256 Index of the FTSO being modified.

requestFullVoterWhitelisting#

Defined in VoterWhitelister (Docs, Source).

function requestFullVoterWhitelisting(
    address _voter
) external returns (
    uint256[] _supportedIndices,
    bool[] _success);

Requests whitelisting an account to act as a data provider for all active FTSOs. May be called by any address, including the voter itself.

Parameters Type Description
_voter address Address of the voter to be whitelisted.
Returns Type Description
_supportedIndices uint256[] Array of currently supported FTSO indices.
_success bool[] Array of success flags by FTSO index.

requestWhitelistingVoter#

Defined in VoterWhitelister (Docs, Source).

function requestWhitelistingVoter(
    address _voter,
    uint256 _ftsoIndex
) external;

Requests whitelisting an account to act as a data provider for a specific FTSO. Reverts if the vote power of the account is too low. May be called by any address, including the voter itself.

Parameters Type Description
_voter address Address of the voter to be whitelisted.
_ftsoIndex uint256 Index of the FTSO.

setDefaultMaxVotersForFtso#

Defined in VoterWhitelister (Docs, Source).

function setDefaultMaxVotersForFtso(
    uint256 _defaultMaxVotersForFtso
) external;

Set the maximum number of voters in the whitelist for a new FTSOs.

Only governance can call this method.

Parameters Type Description
_defaultMaxVotersForFtso uint256 New maximum default value.

setMaxVotersForFtso#

Defined in VoterWhitelister (Docs, Source).

function setMaxVotersForFtso(
    uint256 _ftsoIndex,
    uint256 _newMaxVoters
) external;

Set the maximum number of voters in the whitelist for a specific FTSO. Can remove voters with the least votepower from the whitelist.

Only governance can call this method.

Parameters Type Description
_ftsoIndex uint256 Index of the FTSO to modify.
_newMaxVoters uint256 New size of the whitelist.

switchToProductionMode#

Defined in GovernedBase (Docs, Source).

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.

turnOffCopyMode#

Defined in VoterWhitelister (Docs, Source).

function turnOffCopyMode(
) external;

Turn off copy mode. Can only be called by governance.

updateContractAddresses#

Defined in AddressUpdatable (Docs, Source).

function updateContractAddresses(
    bytes32[] _contractNameHashes,
    address[] _contractAddresses
) external;

External method called from AddressUpdater only.

Modifiers#

notInCopyMode#

Defined in VoterWhitelister (Docs, Source).

modifier notInCopyMode()

Only callable when not in copy mode.

onlyAddressUpdater#

Defined in AddressUpdatable (Docs, Source).

modifier onlyAddressUpdater()

Only the AdressUpdater contract can call this method. Its address is set at construction time but it can also update itself.

onlyFtsoManager#

Defined in VoterWhitelister (Docs, Source).

modifier onlyFtsoManager()

Only the ftsoManager can call this method.

onlyGovernance#

Defined in GovernedBase (Docs, Source).

modifier onlyGovernance()

onlyImmediateGovernance#

Defined in GovernedBase (Docs, Source).

modifier onlyImmediateGovernance()

voterNotChilled#

Defined in VoterWhitelister (Docs, Source).

modifier voterNotChilled(    address _voter)

Only data providers that have not been chilled can perform this action.

Parameters Type Description
_voter address Address of the data provider performing the action.

Variables#

chilledUntilRewardEpoch#

Defined in VoterWhitelister (Docs, Source).

    mapping(address => uint256) chilledUntilRewardEpoch

In case of providing bad prices (e.g. collusion), the voter can be chilled for a few reward epochs. A voter can whitelist again from a returned reward epoch onwards.

copyMode#

Defined in VoterWhitelister (Docs, Source).

    bool copyMode

defaultMaxVotersForFtso#

Defined in VoterWhitelister (Docs, Source).

    uint256 defaultMaxVotersForFtso

Maximum number of voters in the whitelist for a new FTSO.

ftsoManager#

Defined in VoterWhitelister (Docs, Source).

    contract IFtsoManager ftsoManager

Address of the FtsoManager contract.

ftsoRegistry#

Defined in VoterWhitelister (Docs, Source).

    contract IFtsoRegistry ftsoRegistry

Address of the FtsoRegistry contract.

governanceSettings#

Defined in GovernedBase (Docs, Source).

    contract IGovernanceSettings governanceSettings

Governance Settings.

maxVotersForFtso#

Defined in VoterWhitelister (Docs, Source).

    mapping(uint256 => uint256) maxVotersForFtso

Maximum number of voters in the whitelist for a specific FTSO. Adjustable separately for each index.

oldVoterWhitelister#

Defined in VoterWhitelister (Docs, Source).

    contract IVoterWhitelister oldVoterWhitelister

Previous VoterWhitelister contract, set at construction time. Necessary to allow copying the previous whitelist onto a new contract.

priceSubmitter#

Defined in VoterWhitelister (Docs, Source).

    contract IIPriceSubmitter priceSubmitter

Address of the PriceSubmitter contract set at construction time.

productionMode#

Defined in GovernedBase (Docs, Source).

    bool productionMode

When true, governance is enabled and cannot be disabled. See switchToProductionMode.

timelockedCalls#

Defined in GovernedBase (Docs, Source).

    mapping(bytes4 => struct GovernedBase.TimelockedCall) timelockedCalls

List of pending timelocked governance calls.