> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boost.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Claiming Incentives

<Warning>
  The One-Time Actions docs are under active development and will be subject to changes.
</Warning>

```mermaid theme={null}
    sequenceDiagram
        actor claimant as Boost Claimant 
        participant signer as Signer Service
        participant core as BoostCore.sol
        participant validator as SignerValidator.sol
        participant incentive as Incentive.sol
        claimant ->> signer: submits a claim for an eligible boost
        signer ->> claimant: validates claimant activity and returns a signature for the claim
        claimant ->> core: submits signed claim to Boost Core
        core ->> validator: validates the signature
        core ->> incentive: executes the claim
        incentive ->> claimant: transfers payout
```

## API

### `claimIncentive`

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

<Info>
  To learn how to encode the `claimDataPayload`, see the full [Claim Example](/v2/boost-sdk/examples/claim-example).
</Info>

```ts theme={null}
await core.claimIncentive(
  boost.id,
  0n, // the position of the incentive in the incentive array
  '0xCLAIMANT', // the claimant
  claimDataPayload,
);
```

#### Parameters

<ParamField path="boostId" type="bigint" required>
  A `bigint` representing the boost ID.
</ParamField>

<ParamField path="incentiveId" type="bigint" required>
  A `bigint` representing the incentive ID. The incentive ID is the index of the incentive in the `incentives` array.
</ParamField>

<ParamField path="address" type="string" required>
  An address representing the claimant of the incentive.
</ParamField>

<ParamField path="data" type="string" required>
  A hexadecimal string containing the encoded claim data payload.
</ParamField>

<ParamField path="parameters" type="Omit<wagmi.WriteContractParameters, 'address' | 'args' | 'functionName' | 'abi'>">
  Optional parameters to pass to the underlying `writeContract` method. Checkout [wagmi's documentation](https://wagmi.sh/core/api/actions/writeContract#parameters) for more information. `address`, `args`, `functionName`, `abi` are handled for you under the hood.
</ParamField>

#### Returns

<ResponseField name="void" type="Promise<void>" />

### `claimIncentiveFor`

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

<Info>
  To learn how to encode the `claimDataPayload`, see the full [Claim Example](/v2/boost-sdk/examples/claim-example).
</Info>

```ts theme={null}
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

<ParamField path="boostId" type="bigint" required>
  A `bigint` representing the boost ID.
</ParamField>

<ParamField path="incentiveId" type="bigint" required>
  A `bigint` representing the incentive ID. The incentive ID is the index of the incentive in the `incentives` array.
</ParamField>

<ParamField path="referrer" type="string" required>
  The address of the referrer (if any). Use zero address if no referrer.
</ParamField>

<ParamField path="data" type="string" required>
  A hexadecimal string containing the encoded claim data payload.
</ParamField>

<ParamField path="claimant" type="string" required>
  The address of the user eligible for the incentive payout
</ParamField>

<ParamField path="parameters" type="Omit<wagmi.WriteContractParameters, 'address' | 'args' | 'functionName' | 'abi'>">
  Optional parameters to pass to the underlying `writeContract` method. Checkout [wagmi's documentation](https://wagmi.sh/core/api/actions/writeContract#parameters) for more information. `address`, `args`, `functionName`, `abi` are handled for you under the hood.
</ParamField>

#### Returns

<ResponseField name="void" type="Promise<void>" />
