initialize() :
This function is an external initializer for the NetworkSettings contract. It calls the __NetworkSettings_init() function, which is responsible for setting up the contract's initial state. This includes setting the contract's owner, setting the network settings, and setting the contract's status to active. (autogenerated documentation)
__NetworkSettings_init() :
This function is an internal function used to initialize the NetworkSettings contract. It calls the __Upgradeable_init() function to initialize the Upgradeable contract, and then calls the __NetworkSettings_init_unchained() function to initialize the NetworkSettings contract. (autogenerated documentation)
__NetworkSettings_init_unchained() :
This function is used to initialize the NetworkSettings contract. It sets the default flash loan fee to the default value of DEFAULT_FLASH_LOAN_FEE_PPM. This value is used to determine the fee that must be paid when taking out a flash loan. (autogenerated documentation)
version() :
This function is an override of the IVersioned and Upgradeable contracts. It returns a version number (in this case, 3) which is used to track the version of the contract. This allows for the contract to be upgraded and for users to know which version of the contract they are interacting with. (autogenerated documentation)
protectedTokenWhitelist() :
This function is used to retrieve a list of tokens that have been whitelisted for protection. It works by looping through the protectedTokenWhitelist array and creating a new Token array with the same length. It then iterates through the protectedTokenWhitelist array and adds each element to the new Token array. Finally, it returns the new Token array. (autogenerated documentation)
addTokenToWhitelist() :
This function adds a given token to the whitelist of a smart contract. It can only be called by an admin, and it works by calling the internal _addTokenToWhitelist() function, which adds the token to the whitelist. (autogenerated documentation)
addTokensToWhitelist() :
This function adds an array of tokens to the whitelist of a smart contract. It is only accessible to the admin of the contract and takes an array of tokens as an argument. The function iterates through the array and calls the _addTokenToWhitelist() function for each token in the array, adding them to the whitelist. (autogenerated documentation)
_addTokenToWhitelist() :
This function adds a given token to the whitelist of protected tokens. It first checks that the address of the token is a valid external address, and then adds the address of the token to the whitelist. If the address is already present in the whitelist, the function will revert. Finally, the function emits an event to signal that the token has been added to the whitelist. (autogenerated documentation)
removeTokenFromWhitelist() :
This function removes a given token from the whitelist of protected tokens. It can only be called by an admin and will revert if the token does not exist in the whitelist. It also emits an event to signal that the token has been removed from the whitelist. (autogenerated documentation)
isTokenWhitelisted() :
This function checks if a given token is whitelisted. It does this by accessing the _isTokenWhitelisted() function, which is a private function that checks the whitelist and returns a boolean value indicating whether the token is whitelisted or not. (autogenerated documentation)
poolFundingLimit() :
This function returns the funding limit for a given token pool. It works by accessing the _poolFundingLimits mapping, which stores the funding limit for each token pool. The function takes in a token pool as an argument and returns the corresponding funding limit stored in the mapping. (autogenerated documentation)
setFundingLimit(uint256) :
This function sets a funding limit for a given token pool. It takes two parameters, the token pool and the amount, and is only accessible to the admin. The function sets the funding limit for the token pool to the specified amount. (autogenerated documentation)
setFundingLimits(uint256[]) :
This function allows an admin to set the funding limit for multiple pools at once. It takes two parameters, an array of Token objects and an array of uint256 values. It then checks that the two arrays are the same length, and if so, it iterates through the arrays and calls the _setFundingLimit function for each pool, passing in the corresponding amount. (autogenerated documentation)
_setFundingLimit(uint256) :
This function sets the funding limit for a given token pool. It takes two parameters, the token pool address and the amount to set the limit to. It first checks if the token pool is whitelisted, and if it is, it sets the funding limit for the pool to the given amount. It then emits an event to notify that the funding limit has been updated. (autogenerated documentation)
addTokenToWhitelistWithLimit(uint256) :
This function adds a token to the whitelist and sets a funding limit for it. It is only accessible to the admin of the contract and works by first adding the token to the whitelist and then setting the funding limit for it. (autogenerated documentation)
minLiquidityForTrading() :
This function returns the minimum liquidity required for trading on the exchange. It works by retrieving the value stored in the _minLiquidityForTrading variable and returning it to the caller. (autogenerated documentation)
setMinLiquidityForTrading(uint256) :
This function allows an admin to update the minimum liquidity required for trading on the exchange. It takes an input of type uint256 (a 256-bit unsigned integer) and sets the _minLiquidityForTrading variable to this value. If the new value is the same as the previous value, the function will return without making any changes. Otherwise, it will emit an event to notify other contracts of the change. (autogenerated documentation)
withdrawalFeePPM() :
This function returns the withdrawal fee for the contract, expressed as parts-per-million (PPM). It works by simply returning the value stored in the _withdrawalFeePPM variable. (autogenerated documentation)
setWithdrawalFeePPM(uint32) :
This function allows an admin to update the withdrawal fee for the contract. The function takes in a new withdrawal fee as an argument and checks if it is valid. If the new fee is valid, the function sets the new fee and emits an event to notify the change. (autogenerated documentation)
defaultFlashLoanFeePPM() :
This function returns the default flash loan fee, expressed as parts-per-million (PPM). The default flash loan fee is a fee charged to users for taking out a flash loan. This fee is set by the contract owner and is used to incentivize users to pay back the loan in a timely manner. The fee is calculated as a percentage of the loan amount and is returned as a uint32 value. (autogenerated documentation)
setDefaultFlashLoanFeePPM(uint32) :
This function allows the admin to set the default flash loan fee in parts-per-million (PPM). The new fee must be a valid fee, which is checked by the validFee() function. If the fee is valid, the _setDefaultFlashLoanFeePPM() function is called to set the new fee. (autogenerated documentation)
flashLoanFeePPM() :
This function returns the flash loan fee for a given token pool. It works by first retrieving the flash loan fee associated with the given token pool from the _flashLoanFees mapping. If the fee has been initialized, the feePPM value is returned. Otherwise, the defaultFlashLoanFeePPM is returned. (autogenerated documentation)
setFlashLoanFeePPM(uint32) :
This function allows an admin to set the flash loan fee for a given token pool. It requires that the token pool is whitelisted and that the new fee is valid. If the new fee is different from the previous fee, the function will update the fee and emit an event to notify of the change. (autogenerated documentation)
vortexRewards() :
This function is a view function that returns the VortexRewards memory variable. This variable contains information about the rewards that are available to users of the Vortex platform. It is used to track the rewards that have been earned by users and to provide access to the rewards that are available. (autogenerated documentation)
setVortexRewards() :
This function allows an admin to set the rewards for burning Vortex tokens. It takes in a parameter called rewards which contains two values, burnRewardPPM and burnRewardMaxAmount. It checks that the fee is valid and that the max amount is greater than zero. If the new values are different from the previous values, it updates the _vortexRewards variable and emits an event to notify of the change. (autogenerated documentation)
_isTokenWhitelisted() :
This function checks if a given token is whitelisted. It does this by taking in a Token object and checking if its address is present in the _protectedTokenWhitelist mapping. If the address is present, the function returns true, otherwise it returns false. (autogenerated documentation)
_setDefaultFlashLoanFeePPM(uint32) :
This function sets the default flash loan fee per million (PPM) for the protocol. It takes in a new default flash loan fee PPM as an argument and checks if it is different from the current default flash loan fee PPM. If it is different, the new default flash loan fee PPM is set and an event is emitted to notify the users of the change. (autogenerated documentation)