ConverterNetwork
ConverterNetwork
Keeps track of all the converters and is used to fetch valid converters which provide conversions according to token addresses provided
Solidity API
allConverters
Array holding all the converters
initialize
ConverterNetwork initializer
Parameters
📅 Events
ConverterAdded is emitted for each converter added on success
❌ Errors
InvalidMaxLoopsLimit is thrown when when loops limit is invalid
setMaxLoopsLimit
Set the limit for the loops can iterate to avoid the DOS
Parameters
⛔️ Access Requirements
Only owner
❌ Errors
InvalidMaxLoopsLimit is thrown when when loops limit is invalid
addTokenConverter
Adds new converter to the array
Parameters
📅 Events
ConverterAdded is emitted on success
⛔️ Access Requirements
Only Governance
removeTokenConverter
Removes converter from the array
Parameters
📅 Events
ConverterRemoved is emitted on success
⛔️ Access Requirements
Only Governance
❌ Errors
ConverterDoesNotExist is thrown when converter to remove does not exist
findTokenConverters
Used to get the array of converters supporting conversions, arranged in descending order based on token balances It will return the converters which are open to users for conversion
Parameters
Return Values
findTokenConvertersForConverters
Used to get the array of converters supporting conversions, arranged in descending order based on token balances It will return the converters which are open to converters for conversion.
Parameters
Return Values
getAllConverters
This function returns the array containing all the converters addresses
Return Values
isTokenConverter
This function checks if the given address is a converter or not
Parameters
Return Values
Last updated