This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Adds vested_transfer
to Vesting pallet
#5029
Merged
Merged
Conversation
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
It looks like @lsaether signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
shawntabrizi
approved these changes
Feb 24, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me. Should check with Gav that he likes the feature :)
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
bkchr
approved these changes
Feb 25, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay for me as well.
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
@gnunicorn this be gucci |
gavofyork
approved these changes
Mar 5, 2020
General-Beck
pushed a commit
to General-Beck/substrate
that referenced
this pull request
Mar 6, 2020
* Add the vested_transfer function with tests * Add VestingDeposit for minimum amount to create a new schedule * Remove irrelevant file commit * Bump spec * Add weight comment * Fix CI build * Make the check before the transfer * Update frame/vesting/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Add tab to line 249 * Rename to `MinVestedTransfer` for clarity Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
General-Beck
pushed a commit
to General-Beck/substrate
that referenced
this pull request
Mar 17, 2020
* Add the vested_transfer function with tests * Add VestingDeposit for minimum amount to create a new schedule * Remove irrelevant file commit * Bump spec * Add weight comment * Fix CI build * Make the check before the transfer * Update frame/vesting/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Add tab to line 249 * Rename to `MinVestedTransfer` for clarity Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #4780
This PR implements a way to make a
vested_transfer
that will transfer currency and create a new vesting schedule for the target account. This means that the the target account must not already have aVestingSchedule
attached to it. Thevested_transfer
function is permissionless, allowing for anyone in the system to create a newVestingSchedule
for a target account but requires a minimum transfer amount (VestingDeposit
) to do so.A further enhancement may be to add a maximum
MaxVestingLength
to prevent users from accidentally locking tokens indefinitely, however it's not critical to the logic in this PR.I opened this PR to get initial review and can follow up with the necessary changes to the Polkadot codebases if approved.