Skip to content
Snippets Groups Projects
  • Shawn Tabrizi's avatar
    Introduce and Implement `VestedTransfer` Trait (#5630) · 38466913
    Shawn Tabrizi authored
    
    This PR introduces a `VestedTransfer` Trait, which handles making a
    transfer while also applying a vesting schedule to that balance.
    
    This can be used in pallets like the Treasury pallet, where now we can
    easily introduce a `vested_spend` extrinsic as an alternative to giving
    all funds up front.
    
    We implement `()` for the `VestedTransfer` trait, which just returns an
    error, and allows anyone to opt out from needing to use or implement
    this trait.
    
    This PR also updates the logic of `do_vested_transfer` to remove the
    "pre-check" which was needed before we had a default transactional layer
    in FRAME.
    
    Finally, I also fixed up some bad formatting in the test.rs file.
    
    ---------
    
    Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
    Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    Unverified
    38466913
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
pr_5630.prdoc 529 B