Skip to content

IIVoterWhitelister#

Source | Inherits from IVoterWhitelister

Internal interface for managers of the FTSO whitelist.

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

Functions#

addFtso#

Defined in IIVoterWhitelister (Docs, Source).

function addFtso(
    uint256 _ftsoIndex
) external;

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

Parameters Type Description
_ftsoIndex uint256 Index of the new FTSO.

chillVoter#

Defined in IIVoterWhitelister (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.

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.

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.

getFtsoWhitelistedPriceProviders#

Defined in IVoterWhitelister (Docs, Source).

function getFtsoWhitelistedPriceProviders(
    uint256 _ftsoIndex
) external 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 IVoterWhitelister (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.

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 IIVoterWhitelister (Docs, Source).

function removeFtso(
    uint256 _ftsoIndex
) external;

Clear whitelist for a removed FTSO.

Parameters Type Description
_ftsoIndex uint256 Index of the removed FTSO.

removeTrustedAddressFromWhitelist#

Defined in IIVoterWhitelister (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 IVoterWhitelister (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 IVoterWhitelister (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 IIVoterWhitelister (Docs, Source).

function setDefaultMaxVotersForFtso(
    uint256 _defaultMaxVotersForFtso
) external;

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

Parameters Type Description
_defaultMaxVotersForFtso uint256 New maximum default value.

setMaxVotersForFtso#

Defined in IIVoterWhitelister (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.

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