Claimable
Claimable is a smart contract that allows you to schedule your token release or transfer. It works similar to a stock option grant, where you specify a cliff and a vesting period. This could be used for common use cases such as investor token release and incentive token grants.
Problem Statement
Claimable is a smart contract that allows you to schedule your token release or transfer. It works similar to a stock option grant, where you specify a cliff and a vesting period. This could be used for common use cases such as investor token release and incentive token grants.HOW CAN I TRY IT? It is available on Rinkey testnet: 0xB84cda1Bf76328EfEEB0FE40139177790866F210 You will need first to approve the smart contract with your token Use the Write Contract tab to create, claim or revoke You can use the Read Contract tab for queriesWHAT ASSETS CAN I STREAM WITH CLAIMABLE? Claimable supports any ERC20 tokens. Native currency Ether is not supported yet.
Solution
The smart contract is written in Solidity.SUPPORTED METHODSCreate (transaction)As a grantor, you can create a grant ticket where you specify the followingtoken: the address of the ERC20 token you are grantingbeneficiary: the recipient of this token grantcliff: you can specify a cliff (in number of days) or set it to 0 to make it immediately availablevesting: the number of days for the entire amount to be vestedamount: the number of tokens you are grantingirrevocable: if set to true, you will not be able to revokebatchCreateSameAmount (transaction)As a grantor, you can create a batch of tickets where you specify the followingtoken: the address of the ERC20 token you are grantingbeneficiaries: array of recipientscliff: you can specify a cliff (in number of days) or set it to 0 to make it immediately availablevesting: the number of days for the entire amount to be vestedamount: the number of tokens you are grantingirrevocable: if set to true, you will not be able to revokebatchCreate (transaction)As a grantor, you can create a batch of tickets where you specify the followingtoken: the address of the ERC20 token you are grantingbeneficiaries: array of recipientscliff: you can specify a cliff (in number of days) or set it to 0 to make it immediately availablevesting: the number of days for the entire amount to be vestedamounts: the number array of tokens you are granting for each beneficiaryirrevocable: if set to true, you will not be able to revokeRevoke (transaction)You may revoke a grant by calling it with a ticket number. The method will transfer the remaining balance of the tokens back to the grantor wallet address, and the beneficiary will no longer be able to make a claimClaim (transaction)You can claim your ticket for all the available tokens. You will be responsible for paying for the gas feeAvailable (query)Display the number of tokens that are available to the beneficiary for the ticket. Only grantor and beneficiary can queryhasCliffed (query)Check if the ticket has cliffed or not. Only grantor and beneficiary can querymyBeneficiaryTickets (query)List all ticket numbers that you are the beneficiarymyGrantorTickets (query)List all ticket numbers that you are the grantorviewTickets (query)enter ticket number to view Ticket struct
Hackathon
HackMoney 2021
2021
Contributors
- calvinmd
30 contributions