BatchClaimer
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));
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
Name | Type | Description |
---|---|---|
user | address | The address of the user for whom rewards are to be claimed. |
stakingAssets | address[] | 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();