GuardianModule ​
Inherits:AuthModule
Fluid Liquidity Guardians only related methods
Functions ​
onlyGuardians ​
only guardians guard
modifier onlyGuardians() ;_getUserPauseMode ​
function _getUserPauseMode(uint256 userData_, uint256 pauseModeBits_)
internal
pure
returns (bool pauseSupplyOrBorrow_, bool pauseWithdrawOrPayback_);_storeUserPauseMode ​
function _storeUserPauseMode(
uint256 userData_,
bool pauseSupplyOrBorrow_,
bool pauseWithdrawOrPayback_,
uint256 pauseModeBits_
) internal pure returns (uint256);_revertIfUserClassAbove ​
function _revertIfUserClassAbove(address user_, uint256 maxUserClass_) internal view;_updateUserSupplyPause ​
function _updateUserSupplyPause(
address user_,
address[] calldata tokens_,
bool pauseSupply_,
bool pauseWithdraw_,
bool isUnpause_
) internal returns (bool[] memory actedSupply_, bool[] memory actedWithdraw_);_updateUserBorrowPause ​
function _updateUserBorrowPause(
address user_,
address[] calldata tokens_,
bool pauseBorrow_,
bool pausePayback_,
bool isUnpause_
) internal returns (bool[] memory actedBorrow_, bool[] memory actedPayback_);pauseUserSupply ​
pause selected supply-side operations for a user per _userClass: class 2 reverts on any pause flag; class 1 forbids pausing withdraw; class 0 allows all. Only callable by Guardians.
function pauseUserSupply(address user_, address[] calldata tokens_, bool pauseSupply_, bool pauseWithdraw_)
public
onlyGuardians
returns (bool[] memory actedSupply_, bool[] memory actedWithdraw_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | address of user to pause operations for |
tokens_ | address[] | token addresses to apply supply/withdraw pause flags for |
pauseSupply_ | bool | if true, deposits/supply are paused for tokens_ |
pauseWithdraw_ | bool | if true, withdrawals are paused for tokens_ |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | per-token flags; true when that token's supply pause state changed |
actedWithdraw_ | bool[] | per-token flags; true when that token's withdraw pause state changed |
pauseUserBorrow ​
pause selected borrow-side operations for a user per _userClass: class 2 reverts on any pause flag; class 1 forbids pausing payback; class 0 allows all. Only callable by Guardians.
function pauseUserBorrow(address user_, address[] calldata tokens_, bool pauseBorrow_, bool pausePayback_)
public
onlyGuardians
returns (bool[] memory actedBorrow_, bool[] memory actedPayback_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | address of user to pause operations for |
tokens_ | address[] | token addresses to apply borrow/payback pause flags for |
pauseBorrow_ | bool | if true, borrows are paused for tokens_ |
pausePayback_ | bool | if true, paybacks are paused for tokens_ |
Returns
| Name | Type | Description |
|---|---|---|
actedBorrow_ | bool[] | per-token flags; true when that token's borrow pause state changed |
actedPayback_ | bool[] | per-token flags; true when that token's payback pause state changed |
unpauseUserSupply ​
unpause selected supply-side operations for a particular user. Only callable by Guardians.
function unpauseUserSupply(address user_, address[] calldata tokens_, bool unpauseSupply_, bool unpauseWithdraw_)
public
onlyGuardians
returns (bool[] memory actedSupply_, bool[] memory actedWithdraw_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | address of user to unpause operations for |
tokens_ | address[] | token addresses to apply supply/withdraw unpause flags for |
unpauseSupply_ | bool | if true, deposits/supply are unpaused for tokens_ |
unpauseWithdraw_ | bool | if true, withdrawals are unpaused for tokens_ |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | per-token flags; true when that token's supply pause state changed |
actedWithdraw_ | bool[] | per-token flags; true when that token's withdraw pause state changed |
unpauseUserBorrow ​
unpause selected borrow-side operations for a particular user. Only callable by Guardians.
function unpauseUserBorrow(address user_, address[] calldata tokens_, bool unpauseBorrow_, bool unpausePayback_)
public
onlyGuardians
returns (bool[] memory actedBorrow_, bool[] memory actedPayback_);Parameters
| Name | Type | Description |
|---|---|---|
user_ | address | address of user to unpause operations for |
tokens_ | address[] | token addresses to apply borrow/payback unpause flags for |
unpauseBorrow_ | bool | if true, borrows are unpaused for tokens_ |
unpausePayback_ | bool | if true, paybacks are unpaused for tokens_ |
Returns
| Name | Type | Description |
|---|---|---|
actedBorrow_ | bool[] | per-token flags; true when that token's borrow pause state changed |
actedPayback_ | bool[] | per-token flags; true when that token's payback pause state changed |
_updateTokenPause ​
function _updateTokenPause(
address[] calldata tokens_,
bool pauseSupply_,
bool pauseWithdraw_,
bool pauseBorrow_,
bool pausePayback_,
bool isUnpause_
)
internal
returns (
bool[] memory actedSupply_,
bool[] memory actedWithdraw_,
bool[] memory actedBorrow_,
bool[] memory actedPayback_
);pauseTokens ​
pause selected operations for the given tokens. Only callable by Guardians.
function pauseTokens(
address[] calldata tokens_,
bool pauseSupply_,
bool pauseWithdraw_,
bool pauseBorrow_,
bool pausePayback_
)
public
onlyGuardians
returns (
bool[] memory actedSupply_,
bool[] memory actedWithdraw_,
bool[] memory actedBorrow_,
bool[] memory actedPayback_
);Parameters
| Name | Type | Description |
|---|---|---|
tokens_ | address[] | token addresses to pause |
pauseSupply_ | bool | if true, deposits/supply are paused |
pauseWithdraw_ | bool | if true, withdrawals are paused |
pauseBorrow_ | bool | if true, borrows are paused |
pausePayback_ | bool | if true, paybacks are paused |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | per-token flags; true when that token's supply pause state changed |
actedWithdraw_ | bool[] | per-token flags; true when that token's withdraw pause state changed |
actedBorrow_ | bool[] | per-token flags; true when that token's borrow pause state changed |
actedPayback_ | bool[] | per-token flags; true when that token's payback pause state changed |
unpauseTokens ​
unpause selected operations for the given tokens. Only callable by Guardians.
function unpauseTokens(
address[] calldata tokens_,
bool unpauseSupply_,
bool unpauseWithdraw_,
bool unpauseBorrow_,
bool unpausePayback_
)
public
onlyGuardians
returns (
bool[] memory actedSupply_,
bool[] memory actedWithdraw_,
bool[] memory actedBorrow_,
bool[] memory actedPayback_
);Parameters
| Name | Type | Description |
|---|---|---|
tokens_ | address[] | token addresses to unpause |
unpauseSupply_ | bool | if true, deposits/supply are unpaused |
unpauseWithdraw_ | bool | if true, withdrawals are unpaused |
unpauseBorrow_ | bool | if true, borrows are unpaused |
unpausePayback_ | bool | if true, paybacks are unpaused |
Returns
| Name | Type | Description |
|---|---|---|
actedSupply_ | bool[] | per-token flags; true when that token's supply pause state changed |
actedWithdraw_ | bool[] | per-token flags; true when that token's withdraw pause state changed |
actedBorrow_ | bool[] | per-token flags; true when that token's borrow pause state changed |
actedPayback_ | bool[] | per-token flags; true when that token's payback pause state changed |