Skip to main content
The One-Time Actions docs are under active development and will be subject to changes.
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.

Parameters

Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>
Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<bigint>
Returns the total number of claims.

totalClaimed

Returns the total amount distributed by this incentive.

Parameters

Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>
Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<bigint>
Returns the total amount claimed

claimed

Checks if an address has previously claimed this incentive.

Parameters

Address
The address to check claimed status.
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>
Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<boolean>
Returns true if address has claimed the incentive.

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.

Parameters

Address
The address to check eligibility for.
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>
Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<boolean>
Returns true if address can claim incentive.

getRemainingClaimPotential

Retrieves the remaining amount of tokens (in wei) remaining in the incentive by comparing total claims against the limit.
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>
Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<bigint>
Returns the remaining amount of tokens (in wei) remaining in the incentive

canBeClaimed

Checks if the balance of the incentive is greater than 0. Note that this does not check if a specific user is eligible to claim.
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>
Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Returns true if the incentive has a remaining balance, false otherwise