Crate pallet_time_release
source ·Expand description
Transfer Funds as Frozen with a Time Delayed Release
Quick Links
Time-Release Pallet
Provides a way to schedule a balance freeze on an account.
Summary
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.
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 Transfer tokens to another account with an unlock schedule | Token Account | Tokens | ReleaseScheduleAdded | 24 |
claim Remove the lock on tokens for the calling account when the schedule allows | Account with Lock | Tokens | Claimed | 24 |
claim_for Remove the lock on tokens for a different account when the schedule allows | Any Token Account | Tokens | Claimed | 24 |
update_release_schedules Governance action to update existing schedules | Governance | Tokens | ReleaseSchedulesUpdated | 24 |
See Rust Docs 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 for additional state queries and details.
Re-exports
Modules
- storage migrations
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet. - Autogenerated weights for
pallet_time_release
Structs
- The release schedule.