See the code
See the full example code
Set up a Managed Budget
First you’ll need to either initialize a new budget, or use an existing one, and allow the budget to spend a certain amount of your selected ERC20.Define The Action
Next you’ll need to define the action that qualifies a user to claim the reward. For Agora, we want to reward users that vote for a specific proposal on Agora. To do this, we’ll key off of theVoteCast event,
which has the event signature VoteCast(address indexed,uint256,uint8,uint256,string).

'VoteCast' Event Structure. Take note of the proposalId and support fields which are at index 1 and 2.
VoteCast event.
eventAction payload consists of the actionClaimant and the actionSteps we defined previously.
The purpose of the eventAction is to track and reward users based on their interactions with the specified event.
-
actionClaimant: This object defines the conditions under which a user is eligible to claim rewards. It includes:
signatureType: Specifies that the signature type is an event.signature: The event signature we are targeting, in this case, theVoteCastevent.fieldIndex: Indicates which field in the event data we are interested in; here, it targets the ‘voter’ address (the address that initiated the vote).targetContract: The address of the contract we are monitoring for the event.
-
actionSteps: This array can contain up to four action steps that outline the specific actions or conditions that must be met for the event action to be valid. In this example, we include the previously defined
eventActionStepOneandeventActionStepTwo.
core.EventAction to set up the event action with our constructed eventActionPayload.
Deploy the Boost
Once the event action is created, we can set up the incentives and deploy our boost.Claiming Incentives
Once a claimant has successfully voted, you can claim the incentive for that claimant. You will need the address of the user that cast the vote, the hash of the vote cast transaction, and the boost id. But first, you’ll need to implement some logic to determine the variable reward amount./signatures api endpoint with the following params:
boostId: The id of the boost where the action was completed. The format ischainId:boostId(e.g.8453:0x378632819f39c74c4f56b1429e760739c5fb51b7:12)txHash: The hash of the transaction that completed the action.claimData: This is only nessecary for variableIncentives. For this parameter you would pass in therewardAmountwhich is used to determine the amount of the incentive to claim. If you have more than one variable incentive you can pass in a comma-separated list of claimData values.
Claim Signature API
See additional documentation on how to build a claim signature
maxParticipants set for the boost is reached, or the incentive budget is fully spent.