Skip to main content

claimQueue

Description:

Claim user unboost queue

Arguments:

NameTypeRequiredDescription
positionPositionYesposition field from boost.getQueuePosition
userAddressstringYesThe user address
vaultAddressstringYesThe address of the vault where the osTokens boosted
leverageStrategyVersion1 || 2NoLeverage strategy version. If not provided, it will be fetched automatically during the transaction

Example:

const queryParams = {
userAddress: '0x...',
vaultAddress: '0x...',
}

const { position, version: leverageStrategyVersion } = await sdk.boost.getQueuePosition(queryParams)

if (!isClaimable) {
return
}

const params = {
...queryParams,
position,
leverageStrategyVersion,
}

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