Skip to main content

Vesting

The vesting pallet provides functionality for the vesting schedule on an account's locked balance. This pallet ensures that there is a lock in place preventing the balance from dropping below the unvested amount for any reason other than transaction fee payment. As the amount vested increases over time, the amount unvested reduces. However, locks remain in place and explicit action is needed on behalf of the user to ensure that the amount locked is equivalent to the amount remaining to be vested. This is done through a dispatchable function, either vest (in a typical case where the sender is calling on their own behalf) or vest_other in case the sender is calling on another account's behalf.

Functions

  • forceVestedTransfer(source, target, schedule) - Force a vested transfer.
  • mergeSchedules(schedule1Index, schedule2Index) - Merge two vesting schedules together, creating a new vesting schedule that unlocks over the highest possible start and end blocks. If both schedules have already started the current block will be used as the schedule start; with the caveat that if one schedule is finished by the current block, the other will be treated as the new merged schedule, unmodified.
  • vest() - Unlock any vested funds of the sender account.
  • vestOther(target) - Unlock any vested funds of a target account.
  • vestedTransfer(target, schedule) - Create a vested transfer.