The Boost V2 Docs are under active development and will be subject to changes.

API

claimIncentive

Claims one incentive from a boost. Must be called by claimant.

To learn how to encode the claimDataPayload, see the full Claim Example.

await core.claimIncentive(
  boost.id,
  0n, // the position of the incentive in the incentive array
  '0xCLAIMANT', // the claimant
  claimDataPayload,
);

Parameters

boostId
bigint
required

A bigint representing the boost ID.

incentiveId
bigint
required

A bigint representing the incentive ID. The incentive ID is the index of the incentive in the incentives array.

address
string
required

An address representing the claimant of the incentive.

data
string
required

A hexadecimal string containing the encoded claim data payload.

parameters
Omit<wagmi.WriteContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying writeContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

void
Promise<void>

claimIncentiveFor

Claim an incentive for a Boost on behalf of another user.

To learn how to encode the claimDataPayload, see the full Claim Example.

await core.claimIncentiveFor(
 boost.id,
 0n, // the position of the incentive in the incentive array
 "0xREFERER", // referrer (if any). use zero address if no referrer
 claimDataPayload,
 "0xCLAIMANT", // the address of the account the claim is being made for
);

Parameters

boostId
bigint
required

A bigint representing the boost ID.

incentiveId
bigint
required

A bigint representing the incentive ID. The incentive ID is the index of the incentive in the incentives array.

referrer
string
required

The address of the referrer (if any). Use zero address if no referrer.

data
string
required

A hexadecimal string containing the encoded claim data payload.

claimant
string
required

The address of the user eligible for the incentive payout

parameters
Omit<wagmi.WriteContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying writeContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

void
Promise<void>