Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IInfrared

Git Source

Functions

addIncentives

Adds reward incentives to a specific staking vault

Transfers reward tokens from caller to this contract, then notifies vault of new rewards

Notes:

  • error: ZeroAmount if _amount is 0

  • error: NoRewardsVault if vault doesn't exist for _stakingToken

  • error: RewardTokenNotWhitelisted if reward token hasn't been configured for the vault

  • access: Callable when contract is initialized

  • security: Requires caller to have approved this contract to spend _rewardsToken

function addIncentives(
    address _stakingToken,
    address _rewardsToken,
    uint256 _amount
) external;

Parameters

NameTypeDescription
_stakingTokenaddressThe address of the staking token associated with the vault
_rewardsTokenaddressThe address of the token being added as incentives
_amountuint256The amount of reward tokens to add as incentives

vaultRegistry

Mapping of staking token addresses to their corresponding InfraredVault

Each staking token can only have one vault

function vaultRegistry(address _stakingToken)
    external
    view
    returns (IInfraredVault vault);