> ## 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.

# Claims

> Retrieve ERC20 Incentive claim information and draw raffle

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

The ERC20 Incentive is designed to store and distribute assets that can be claimed by users. The Boost SDK provides several methods to retrieve information about claim state, as well as drawing raffles.

## API

### `claims`

Retrieves the total number of completed claims.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20Incentive.claims();
  ```
</CodeGroup>

#### Parameters

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

#### Returns

<ResponseField name="Total claims" type="Promise<bigint>">
  Returns the total number of claims.
</ResponseField>

### `claimed`

Checks if an address has previously claimed this incentive.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20Incentive.claimed(address);
  ```
</CodeGroup>

#### Parameters

<ParamField path="address" type="Address">
  The address to check claimed status.
</ParamField>

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

#### Returns

<ResponseField name="Has claimed" type="Promise<boolean>">
  Returns true if address has claimed the incentive.
</ResponseField>

### `drawRaffle`

When using an ERC20 Incentive initialized with a `RAFFLE` strategy. Pick a random entry from a list of all claims and transfer the reward to them. Only callable by incentive. managers.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20Incentive.drawRaffle();
  ```
</CodeGroup>

#### Parameters

<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="Success" type="Promise<void>">
  Promise that successfully resolves if a winner has been paid out
</ResponseField>

### `entries`

By index, retrieve the address in the list of all raffle entries.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20Incentive.entries(0n);
  ```
</CodeGroup>

#### Parameters

<ParamField path="index" type="bigint">
  The raffle entry address to retrieve by index
</ParamField>

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

#### Returns

<ResponseField name="Raffle entry" type="Promise<Address>">
  Returns the entry's address
</ResponseField>

### `isClaimable`

Check if an incentive is claimable by an address. Will return false if the recipient has already claimed, or total incentive claims has met the configured limit.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20Incentive.isClaimable(address);
  ```
</CodeGroup>

#### Parameters

<ParamField path="address" type="Address">
  The address to check eligibility for.
</ParamField>

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

#### Returns

<ResponseField name="Eligibility" type="Promise<boolean>">
  Returns true if address can claim incentive.
</ResponseField>

### `getRemainingClaimPotential`

Retrieves the number of remaining possible claims for an incentive by comparing total claims against the limit.
Note that this does not check if a specific user is eligible to claim.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20Incentive.getRemainingClaimPotential();
  ```
</CodeGroup>

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

#### Returns

<ResponseField name="Remaining claims" type="Promise<bigint>">
  Returns the number of remaining possible claims (limit minus current claims)
</ResponseField>

### `canBeClaimed`

Checks if any claims remain for an incentive by comparing total claims against the limit.
Returns a boolean indicating if claims are still possible.
Note that this does not check if a specific user is eligible to claim.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20Incentive.canBeClaimed();
  ```
</CodeGroup>

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

#### Returns

<ResponseField type="Promise<boolean>">
  Returns `true` if there are remaining claims available, `false` otherwise
</ResponseField>
