JavaScript
Last updated
Was this helpful?
Last updated
Was this helpful?
Setup a lambda function or an endpoint that will send the B3TR tokens to the user, providing also a proof and impacts of the rewarding action.
We will use and to interact with VeBetterDAO's X2EarnRewardsPool
contract to distribute the rewards.
Run the following command to install the packages:
To distribute the rewards you will need 2 information:
Node URL
Your APP_ID
on VeBetterDAO: create app to obtain the APP_ID.
Now you can distribute the reward like this:
To be able to distribute the rewards you will need to add the PUBLIC ADDRESS of the wallet calling the distributeRewards
function as a Reward Distributor of your app.
To do so, you need to:
1) Connect with your app's admin wallet to the governance dapp
2) Go to your app's page
3) Click the cogs button to enter the settings page
4) Scroll down to the "Reward Distributors" section, and add the public address as a reward distributor
5) Save changes
Read more about the proof standard and how we expect you to provide it in the section.