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

BatchClaimerV2_1

Git Source

Enables batch claiming of rewards for multiple staking assets for a given user.

This contract interacts with the InfraredV1_5 contract and InfraredVaults to claim rewards.

State Variables

infrared

Reference to the InfraredV1_5 contract used to fetch vaults and manage reward claims.

InfraredV1_5 internal constant infrared =
    InfraredV1_5(payable(0xb71b3DaEA39012Fb0f2B14D2a9C86da9292fC126));

wBYUSD

ERC4626 public constant wBYUSD =
    ERC4626(0x334404782aB67b4F6B2A619873E579E971f9AAB7);

rewardsFactory

IBerachainRewardsVaultFactory instance of the rewards factory contract address

IBerachainRewardsVaultFactory internal immutable rewardsFactory;

Functions

constructor

constructor();

batchClaim

Allows batch claiming of staking rewards from multiple vaults for a user.

*This function iterates over the stakingAssets array and attempts to:

  • Claim rewards from the InfraredVault if it exists.
  • Claim external vault rewards if available.*
function batchClaim(address user, address[] calldata stakingAssets) external;

Parameters

NameTypeDescription
useraddressThe address of the user for whom rewards are to be claimed.
stakingAssetsaddress[]An array of addresses representing staking asset vaults to process.

Errors

ZeroAddress

Error indicating the provided address was the zero address.

error ZeroAddress();

InvalidInputs

Error indicating that the provided inputs are invalid (e.g., empty array).

error InvalidInputs();