Or the Hedgey API can be used, if the API is used a CSV file is uploaded and Hedgey will manage the process of creating the merkle tree and storing the proofs (which are needed for claiming).
Generate a UUID
Each claim is identified by a UUID. You can generate a UUID by calling the following endpoint:
For larger claims (500,000 addresses or more) the generating proofs step may take some time, the progress can be checked by calling the endpoint above.
The root and uuid are needed to create a token claim on the hedgey contract.
const campaign = {
id: '0x025f649ea6b44845875be9971b133e1e', // generated uuid as hex generated from the API
contractAddress: '0x923b523B8cA37c5ea7BD990D1A98293495812Be6', // the token claim campaign address (Sepolia)
manager: '0x0C4FAb8d9DBE774708EeC313bf0295278E307bcD', // the wallet address for the token claim manager (can cancel)
token: '0xE13FB676E9bdd7AFda91495eC4e027FC63212FC3', // the token address
amount: '8700000000', // amount of tokens
start: '1719138856', // start date of the campaign in unix time
end: '1712139217', // end date of the campaign in unix time
tokenLockup: 0, // 0 unlocked, 1 locked, 2 vesting
root: tree.root, // the root of the merkle tree generated from the API
delegating: true, // if delegation is possible
}
When users claim the tokens will be locked for a period of time, they will be receiving an NFT that gives the ability to unlock the tokens according to the vesting schedule.