FluidWithdrawLimitAuth ​
Inherits:Variables, Error, Events
Functions ​
validAddress ​
Validates that an address is not the zero address
solidity
modifier validAddress(address value_);
onlyRebalancer ​
Validates that an address is a rebalancer (taken from reserve contract)
solidity
modifier onlyRebalancer();
onlyMultisig ​
Validates that an address is a multisig (taken from reserve contract)
solidity
modifier onlyMultisig();
constructor ​
solidity
constructor(IFluidReserveContract reserveContract_, address liquidity_, address multisig_)
validAddress(address(reserveContract_))
validAddress(liquidity_)
validAddress(multisig_);
rebalanceWithdrawalLimit ​
updates the withdrawal limit for a specific token of a user in the liquidity
This function can only be called by the rebalancer
solidity
function rebalanceWithdrawalLimit(address user_, address token_, uint256 newLimit_) external onlyRebalancer;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | The address of the user for which to set the withdrawal limit |
token_ | address | The address of the token for which to set the withdrawal limit |
newLimit_ | uint256 | The new withdrawal limit to be set |
setWithdrawalLimit ​
Sets the withdrawal limit for a specific token of a user in the liquidity
This function can only be called by team multisig
solidity
function setWithdrawalLimit(address user_, address token_, uint256 newLimit_) external onlyMultisig;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | The address of the user for which to set the withdrawal limit |
token_ | address | The address of the token for which to set the withdrawal limit |
newLimit_ | uint256 | The new withdrawal limit to be set |
getUsersData ​
solidity
function getUsersData(address[] memory users_, address[] memory tokens_)
public
view
returns (uint256[] memory initialUsersSupply_, uint256[] memory initialWithdrawLimit_);
_percentDiffForValue ​
gets the percentage difference between oldValue_
and newValue_
in relation to oldValue_
solidity
function _percentDiffForValue(uint256 oldValue_, uint256 newValue_)
internal
pure
returns (uint256 configPercentDiff_);