Skip to main content

claimRewards

Description:

Claims rewards from the reward splitter contract

Arguments:

NameTypeRequiredDescription
userAddressstringYesThe address of the user initiating the action. This address will become the owner of the reward splitter and must be the vault admin
vaultAddressstringYesThe address of the vault
rewardSplitterAddressstringYesThe address of the reward splitter
assetsbigintYesThe amount of assets to claim

Example:

const params = {
vaultAddress: '0x...',
userAddress: '0x...',
rewardSplitterAddress: '0x...',
assets: parseEther('100'),
}

// Send transaction
const hash = await sdk.rewardSplitter.claimRewards(params)
// When you sign transactions on the backend (for custodians)
const { data, to } = await sdk.rewardSplitter.claimRewards.encode(params)
// Get an approximate gas per transaction
const gas = await sdk.rewardSplitter.claimRewards.estimateGas(params)