-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Time Release Pallet Documentation Improvement (#1978)
# Goal The goal of this PR is to improve the documentation of the Pallets and make that documentation be able to be used on docs.frequency.xyz. Part of frequency-chain/docs#59 # Discussion - Time Release Pallet (No RPCs for this pallet) - Small fixes in the template
- Loading branch information
Showing
3 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,42 @@ | ||
# Time-Release Module | ||
# Time-Release Pallet | ||
|
||
This pallet is a fork of the [ORML-vesting]( [vesting](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/vesting)). | ||
Provides a way to schedule a balance freeze on an account. | ||
|
||
## Overview | ||
## Summary | ||
|
||
The `time-release` module offers a method for scheduling a balance freeze on an account. It employs a *graded release* approach, which thaws a specific amount of balance every period of time, until all balance is thawed. | ||
The `time-release` pallet employs a _graded release_ approach, which thaws a specific amount of balance every period of time, until all balance is thawed. | ||
|
||
Note: This pallet is a fork and modification of the [ORML-vesting](<[vesting](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/vesting)>). | ||
|
||
### Release Schedule | ||
|
||
The schedule of a release on hold is described by the data structure `ReleaseSchedule`. Starting from the specified block number denoted as `start`, the schedule operates on a periodic basis. For each `period` amount of blocks, a designated `per_period` amount of balance is unfrozen. This process continues until the specified number of periods, denoted as `period_count`, is reached. It's important to highlight that in release schedules, the concept of time is measured in terms of block numbers. Accessing all `ReleaseSchedule` instances associated with an account is possible through querying the chain state. | ||
|
||
### Actions | ||
|
||
The Time-Release pallet provides for: | ||
|
||
- Creating a transfer with a schedule for release | ||
- Claiming balances that are released | ||
- Governance updates of schedules | ||
|
||
## Interactions | ||
|
||
### Extrinsics | ||
|
||
| Name/Description | Caller | Payment | Key Events | Runtime Added | | ||
| ------------------------------------------------------------------------------------------- | ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | | ||
| `transfer`<br />Transfer tokens to another account with an unlock schedule | Token Account | Tokens | [`ReleaseScheduleAdded`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.ReleaseScheduleAdded) | 24 | | ||
| `claim`<br />Remove the lock on tokens for the calling account when the schedule allows | Account with Lock | Tokens | [`Claimed`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.Claimed) | 24 | | ||
| `claim_for`<br />Remove the lock on tokens for a different account when the schedule allows | Any Token Account | Tokens | [`Claimed`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.Claimed) | 24 | | ||
| `update_release_schedules`<br />Governance action to update existing schedules | Governance | Tokens | [`ReleaseSchedulesUpdated`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.ReleaseSchedulesUpdated) | 24 | | ||
|
||
See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/struct.Pallet.html) for more details. | ||
|
||
### State Queries | ||
|
||
| Name | Description | Query | Runtime Added | | ||
| ---------------- | --------------------------------------------- | ------------------ | ------------- | | ||
| Release Schedule | Retrieves the release schedule for an account | `releaseSchedules` | 24 | | ||
|
||
See the [Rust Docs](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/storage_types/index.html) for additional state queries and details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters