IIVoterWhitelister
Internal interface for managers of the FTSO whitelist .
Only addresses registered in this contract can submit data to the FTSO system.
Functions
addFtso
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
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
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
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
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
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
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
function removeFtso (
uint256 _ftsoIndex
) external ;
Clear whitelist for a removed FTSO.
Parameters
Type
Description
_ftsoIndex
uint256
Index of the removed FTSO.
removeTrustedAddressFromWhitelist
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
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
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
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
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.