VaultManagerLib
Functions
notPaused
Ensures that new vaults can only be registered while the register vaults are not paused
modifier notPaused(VaultStorage storage $);
registerVault
Registers a new vault for a specific asset.
function registerVault(VaultStorage storage $, address asset)
external
notPaused($)
returns (address);
setVaultRegistrationPauseStatus
Sets new vault registration paused or not
function setVaultRegistrationPauseStatus(VaultStorage storage $, bool pause)
external;
Parameters
Name | Type | Description |
---|---|---|
$ | VaultStorage | |
pause | bool | True to pause, False to un pause |
toggleVault
Toggles the pause status of a specific vault.
function toggleVault(VaultStorage storage $, address asset) external;
updateWhitelistedRewardTokens
Updates the whitelist status of a reward token.
function updateWhitelistedRewardTokens(
VaultStorage storage $,
address token,
bool whitelisted
) external;
addReward
function addReward(
VaultStorage storage $,
address _stakingToken,
address _rewardsToken,
uint256 _rewardsDuration
) external;
addIncentives
function addIncentives(
VaultStorage storage $,
address _stakingToken,
address _rewardsToken,
uint256 _amount
) external;
updateRewardsDuration
Updates the global rewards duration for new vaults.
function updateRewardsDuration(VaultStorage storage $, uint256 newDuration)
external;
isWhitelisted
Checks if a token is whitelisted as a reward token.
function isWhitelisted(VaultStorage storage $, address token)
public
view
returns (bool);
recoverERC20FromVault
function recoverERC20FromVault(
VaultStorage storage $,
address _asset,
address _to,
address _token,
uint256 _amount
) external;
updateRewardsDurationForVault
function updateRewardsDurationForVault(
VaultStorage storage $,
address _stakingToken,
address _rewardsToken,
uint256 _rewardsDuration
) external;
claimLostRewardsOnVault
function claimLostRewardsOnVault(VaultStorage storage $, address _asset)
external;
Structs
VaultStorage
struct VaultStorage {
bool pausedVaultRegistration;
mapping(address => IInfraredVault) vaultRegistry;
EnumerableSet.AddressSet whitelistedRewardTokens;
uint256 rewardsDuration;
}