Smart Contract
Read the smart contracts
Typedoc
See technical documentation
SDK Implementation
See the source
Key Features
- Supports native assets as well as any ERC20
- Rewards dynamic at claim time, depending on the value of a field extracted from a transaction log or function argument.
Unlike budgets, allowlists, and validators, incentives cannot be re-used between multiple Boosts.
Create a new ERC20VariableCriteriaIncentive
Get an existing ERC20VariableCriteriaIncentive
Setting Up Incentive Criteria
The incentive criteria determines how the reward amount is extracted from transaction data. You can configure it to read values from either contract events or function calls.Criteria Configuration
The criteria object requires four fields:criteriaType: EitherSignatureType.EVENTfor event logs orSignatureType.FUNCfor function callssignature: The event or function signature to match againstfieldIndex: Which parameter in the event/function to extract the value from (0-based index)targetContract: The contract address to watch for the event/function
You can use the
@boostxyz/signatures package to get pre-defined event signatures instead of using raw hex values. For example: import { selectors } from '@boostxyz/signatures/events'Example: Event-based Criteria
Here’s an example setting up criteria to extract an amount from a Transfer event:Example: Function-based Criteria
Here’s an example setting up criteria to extract an amount from a mint function:maxReward parameter if necessary.