Skip to content
Snippets Groups Projects
Unverified Commit 5f50b704 authored by Xiliang Chen's avatar Xiliang Chen Committed by GitHub
Browse files

Vesting module documentation (#109)

* Add vesting documentations.

* Add vesting module README.

* Fix type.
parent e1196d21
No related branches found
No related tags found
No related merge requests found
# Vesting Module
## Overview
Vesting module provides a means of scheduled balance lock on an account. It uses the *graded vesting* way, which unlocks a specific amount of balance every period of time, until all balance unlocked.
### Vesting Schedule
The schedule of a vesting is described by data structure `VestingSchedule`: from the block number of `start`, for every `period` amount of blocks, `per_period` amount of balance would unlocked, until number of periods `period_count` reached. Note in vesting schedules, *time* is measured by block number. All `VestingSchedule`s under an account could be queried in chain state.
//! # Vesting Module
//!
//! ## Overview
//!
//! Vesting module provides a means of scheduled balance lock on an account. It uses the *graded vesting* way, which
//! unlocks a specific amount of balance every period of time, until all balance unlocked.
//!
//! ### Vesting Schedule
//!
//! The schedule of a vesting is described by data structure `VestingSchedule`: from the block number of `start`, for
//! every `period` amount of blocks, `per_period` amount of balance would unlocked, until number of periods
//! `period_count` reached. Note in vesting schedules, *time* is measured by block number. All `VestingSchedule`s under
//! an account could be queried in chain state.
//!
//! ## Interface
//!
//! ### Dispatchable Functions
//!
//! - `add_vesting_schedule` - Add a new vesting schedule for an account.
//! - `claim` - Claim unlocked balances.
//! - `update_vesting_schedules` - Update all vesting schedules under an account, `root` origin required.
#![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode, HasCompact}; use codec::{Decode, Encode, HasCompact};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment