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

# Rewards

> Retrieve information about ERC20 Incentive rewards

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

The ERC20 Variable Incentive is designed to store and distribute dynamic amounts of assets that can be claimed by users. The Boost SDK provides several methods to retrieve information about the current state of its rewards.

## API

### `asset`

Retrieves the address of the ERC20-like asset to be rewarded on claim.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20VariableCriteriaIncentive.asset();
  ```
</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="ERC20-like address" type="Address">
  The address of the asset transferred on claim
</ResponseField>

### `getIncentiveCriteria`

Fetches the [IncentiveCriteria](https://sdk.boost.xyz/interfaces/IncentiveCriteria.html) struct from the contract. The criteria determines how a claim value will be extracted from a transaction.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20VariableCriteriaIncentive.getIncentiveCriteria()
  ```
</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="Promise<IncentiveCriteria>" type={<a href="https://sdk.boost.xyz/interfaces/IncentiveCriteria.html">IncentiveCriteria</a>} required>
  <Expandable title="properties">
    <ParamField path="criteriaType" type={<a href="https://sdk.boost.xyz/enums/SignatureType.html">SignatureType</a>} required>
      Either `SignatureType.EVENT` or `SignatureType.FUNC`, determines how the validator decodes transaction data.
    </ParamField>

    <ParamField path="signature" type="Hex" required>
      The padded 4byte signature of the contract's event or function that will be examined when extracting the claim amount.
    </ParamField>

    <ParamField path="fieldIndex" type="number" required>
      The index of the function argument or log parameter where the numerical amount will be extracted.
    </ParamField>

    <ParamField path="targetContract" type="Address" required>
      The address of the underlying asset that called the function or emitted the event matching the signature, must have occured within the same transaction submitted for validation.
    </ParamField>
  </Expandable>
</ResponseField>

### `maxReward`

Retrieves the maximum amount that can be claimed at a time, if the amount extracted from the claim transaction given the criteria is more than this value, then the claim value will be this max reward value.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20VariableCriteriaIncentive.maxReward()
  ```
</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="Promise<bigint>" type="bigint">
  Returns the maximum reward per claim
</ResponseField>

### `reward`

Retrieves the ETH decimal format reward multiplier. If set to `0n` or `1 ether`, user will be transferred the whole amount asserted at claim time.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20VariableIncentive.reward()
  ```
</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="Promise<bigint>" type="bigint">
  Returns the reward multiplier.
</ResponseField>

### `limit`

Retrieves the spending limit for this incentive. The sum of all claims cannot exceed this amount.

<CodeGroup>
  ```ts index.ts theme={null}
  await erc20VariableCriteriaIncentive.limit()
  ```
</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="Promise<bigint>" type="bigint">
  Returns the total budget for this incentive
</ResponseField>
