Claim UBI
Every verified person is eligible to claim daily free UBI in the form of G$ tokens.
First, create the SDK.
The first argument should be an ethers Web3Provider, since the user will need to sign transactions.
Second argument is which environment and chain contract set to use.
Every user can claim every day from every chain that has a UBI pool
import { ClaimSDK } from "@gooddollar/web3sdk-v2"
const sdk = new ClaimSDK(web3provider, "production" | "production-celo")
Check if the user is currently eligible to claim today:
const claimAmount = await sdk.checkEntitlement() // if claimAmount > 0 user can claim
Then, perform claim:
await sdk.claim()
You can also get the next
Date
when the user will be eligible to claim againconst nextClaimTime = await sdk.getNextClaimTime()
You can also use our react hooks to manage claim.
Fill out this form to request support:
Last modified 1mo ago