Contract is responsible for managing interactions with tokens. It provides helper functions that allows to get decimals, balances and allowances of tokens. {collectFunds} function is used to safely transfer tokens to msg.sender by using {TokenWrapper} contract which implements {safeTransferFrom} function to transfer non compatible {ERC20} tokens
Function that allows to safely transfer tokens to {FundLock} from an external source. This function is always called by {FundLock}, so msg.sender is address of {FundLock} contract Can be used only by verified Elektro contracts.
Arguments
Name
Type
Description
from
address
address of account to transfer tokens from
tokenAddress
address
address of the token to transfer
amount
uint256
of tokens to be transferred
getEthereumAddress
Getting address of Ether set in {TokenManager}
Arguments
getWETH9Address
Getting address of WETH9 set in {TokenManager}
Arguments
getTokenWrapper
Getting address of {TokenWrapper} contract set in {TokenManager}
Arguments
getTokenDecimals
Helper functions that gets decimals property for specified token
Arguments
Name
Type
Description
token
address
address of asset to get decimals
getTokenSymbol
Helper functions that gets symbol property for specified token
Arguments
Name
Type
Description
token
address
address of asset to get symbol for
getTokenProperties
Helper functions that gets multiple balances and allowances for specified tokens