TokenManager
All public interfaces for the TokenManager contract
address _wethAddress
address of WETH tokenaddress _ethUsdCL
address of the Chainlink data feed for the ETH / USD exchangeuint8 _ethUsdCLDec
decimals for the given Chainlink data feedProvides list of all ERC20 tokens that can be swapped for sEURO, as symbols.
returns:
string[]
parameters:
string _symbol
_symbol
is the symbol of the token that you would like to retrieve data for.Gets token's decimals value for given symbol, if an accepted token.
parameters:
string _symbol
returns:
address
_symbol
is the symbol of the token that you would like to retrieve data for.Gets token's decimals value for given symbol, if an accepted token.
parameters:
string _symbol
returns:
uint8
_symbol
is the symbol of the token that you would like to retrieve data for.Gets the address for the Chainlink data feed of the token / USD exchange.
parameters:
string _symbol
returns:
address
_symbol
is the symbol of the token that you would like to retrieve data for.Gets the decimals value for the Chainlink data feed of the token / USD exchange.
parameters:
string _symbol
returns:
uint8
_symbol
is the symbol of the token that you would like to retrieve data for.Adds a new ERC20 token as an accepted token to swap for sEURO.
parameters:
address _addr, address _chainlinkAddr, uint8 _chainlinkDec
_addr
is the address of the token's contract._chainlinkAddr
is the address of the Chainlink data feed for the token / USD exchange._chainlinkDec
is the decimals value of the Chainlink data feed.User must be contract owner
Adds a new ERC20 token as an accepted token to swap for sEURO.
parameters:
string _symbol
_symbol
is the symbol of the token that you'd like to remove.User must be contract owner
string[] tokenSymbols
list of all of the ERC20 token symbols that are currently accepted in a swap for sEUROmapping(string =>
TokenData
) tokenMetaData
stores all the details for the ERC20 tokens, indexed by the token's symbol.TokenData
address addr
address of the token's contractuint8 dec
decimals used byaddress chainlinkAddr
address of the Chainlink data feed that provides token / USD rateaddress chainlinkDec
decimals used by the given Chainlink data feed
Last modified 1yr ago