Contract used for whitelisting tokens used in Elektro Markets Only user with "admin" role can add or remove tokens to whitelist If token is not valid, transaction is reverted Additionally contract is storing precision values for tokens. Precision is used in trade settlement calculations
Mapping holding datd for Elektro whitelisted token precisions.Maps token address to a {Precision} struct holding precision values. Notice that a zero precision can NOT be passed since it serves as a sign that a precision for a certain token has not been initialized. See {Precision}
mapping(address => struct TokenValidator.Precision) public whitelistedTokens;
TokenWhitelisted
Event fired upon whitelisting a token for Elektro usage.
Parameters
Name
Type
Description
whitelistedToken
address
- address of a whitelisted token
precision
uint256
- amount of decimals used/important for Elektro during rounding of values (always <= token decimals!)
toTokenPower
uint256
- difference between decimals and precision, this value is used for calculations to convert (normalize) precision based amount to actual token denomination 10^(decimals-precision)