git.delta.rocks / unique-network / refs/commits / f5faed258f1b

difftreelog

source

doc/vesting.md1.9 KiBsourcehistory
1# Vesting23The goal of vesting feature is to provide the capability to freeze tokens until certain time.45In order to optimize storage used for chain state, as well as keep the rest of functionality simple and intact, vesting is provided via a separate dictionary and set of methods:67## VestedTransfer89### Description10This method transfers tokens to a vesting account with pre-defined vesting period. The token will not show up as owned by the recipient address, but will not be shown as owned by the previous owner (sender) either. Instead, it will be shown as owned by a special value address - Vesting address (with unknown private key). After the vesting timestamp, token can be claimed using VestingClaim method, which will transfer the token to the recipient address.1112### Permissions13* Collection Owner14* Collection Admin15* Current NFT Owner1617### Parameters18* Recipient: Address of token recipient19* CollectionId: ID of the collection20* ItemId (Optional): ID of the item21    * Non-Fungible Mode: Required22    * Fungible Mode: Ignored23    * Re-Fungible Mode: Required24* Value (Optional): Amount to transfer25    * Non-Fungible Mode: Ignored26    * Fungible Mode: Must specify transferred amount27    * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)28* VestingTime: The timestamp after which transfers will become available and token can be claimed2930### Events31* VestedTransfer32    * CollectionID33    * ItemId: Identifier of NFT34    * Recipient35    * Value36    * VestingTimestamp3738## VestedClaim3940### Description41This method transfers tokens from the vesting account to the recipient, which was defined in VestingTransfer transaction. This method may be called by anyone, and it will only work after the vesting timestamp.4243### Permissions44* Anyone4546### Parameters47* Recipient: Address of token recipient48* CollectionId: ID of the collection4950### Events51* VestedClaim52    * CollectionID53    * ItemId: Identifier of NFT54    * Recipient55    * Value56