Struct noble_vesting::Module [−][src]
Vesting module declaration.
Implementations
impl<T: Config + 'static> Module<T>
[src]
pub fn vesting<K: EncodeLike<T::AccountId>>(
key: K
) -> Option<VestingInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, T::BlockNumber>>
[src]
key: K
) -> Option<VestingInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, T::BlockNumber>>
Information regarding the vesting of a given account.
impl<T: Config> Module<T>
[src]
Can also be called using Call
.
pub fn vested_transfer(
origin: T::Origin,
target: <T::Lookup as StaticLookup>::Source,
schedule: VestingInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, T::BlockNumber>
) -> DispatchResult
[src]
origin: T::Origin,
target: <T::Lookup as StaticLookup>::Source,
schedule: VestingInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, T::BlockNumber>
) -> DispatchResult
Create a vested transfer.
The dispatch origin for this call must be Signed.
target
: The account that should be transferred the vested funds.amount
: The amount of funds to transfer and will be vested.schedule
: The vesting schedule attached to the transfer.
Emits VestingCreated
.
O(1)
.- DbWeight: 3 Reads, 3 Writes
- Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]
- Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]
NOTE: Calling this function will bypass origin filters.
pub fn force_vested_transfer(
origin: T::Origin,
source: <T::Lookup as StaticLookup>::Source,
target: <T::Lookup as StaticLookup>::Source,
schedule: VestingInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, T::BlockNumber>
) -> DispatchResult
[src]
origin: T::Origin,
source: <T::Lookup as StaticLookup>::Source,
target: <T::Lookup as StaticLookup>::Source,
schedule: VestingInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, T::BlockNumber>
) -> DispatchResult
Force a vested transfer.
The dispatch origin for this call must be Root.
source
: The account whose funds should be transferred.target
: The account that should be transferred the vested funds.amount
: The amount of funds to transfer and will be vested.schedule
: The vesting schedule attached to the transfer.
Emits VestingCreated
.
O(1)
.- DbWeight: 4 Reads, 4 Writes
- Reads: Vesting Storage, Balances Locks, Target Account, Source Account
- Writes: Vesting Storage, Balances Locks, Target Account, Source Account
NOTE: Calling this function will bypass origin filters.
Trait Implementations
impl<T: Config> Callable<T> for Module<T>
[src]
impl<T: Clone + Config> Clone for Module<T>
[src]
impl<T: Copy + Config> Copy for Module<T>
[src]
impl<T: Config> Debug for Module<T> where
T: Debug,
[src]
T: Debug,
impl<T: Eq + Config> Eq for Module<T>
[src]
impl<T: Config> GetNobleVersion for Module<T>
[src]
fn current_version() -> NobleVersion
[src]
fn storage_version() -> Option<NobleVersion>
[src]
impl<T: Config> IntegrityTest for Module<T>
[src]
pub fn integrity_test()
[src]
impl<T: Config> ModuleErrorMetadata for Module<T>
[src]
fn metadata() -> &'static [ErrorMetadata]
[src]
impl<T: Config + Config> OffchainWorker<<T as Config>::BlockNumber> for Module<T>
[src]
pub fn offchain_worker(_n: BlockNumber)
[src]
impl<T: Config + Config> OnFinalize<<T as Config>::BlockNumber> for Module<T>
[src]
pub fn on_finalize(_n: BlockNumber)
[src]
impl<T: Config> OnGenesis for Module<T>
[src]
fn on_genesis()
[src]
impl<T: Config + Config> OnInitialize<<T as Config>::BlockNumber> for Module<T>
[src]
pub fn on_initialize(_n: BlockNumber) -> u64
[src]
impl<T: Config> OnRuntimeUpgrade for Module<T>
[src]
fn on_runtime_upgrade() -> Weight
[src]
impl<T: PartialEq + Config> PartialEq<Module<T>> for Module<T>
[src]
impl<T: Config> StructuralEq for Module<T>
[src]
impl<T: Config> StructuralPartialEq for Module<T>
[src]
impl<T: Config> VestingSchedule<<T as Config>::AccountId> for Module<T> where
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: MaybeSerializeDeserialize + Debug,
[src]
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: MaybeSerializeDeserialize + Debug,
type Moment = T::BlockNumber
The quantity used to denote time; usually just a BlockNumber
.
type Currency = T::Currency
The currency that this schedule applies to.
fn vesting_balance(
who: &T::AccountId
) -> Option<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>
[src]
who: &T::AccountId
) -> Option<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>
Get the amount that is currently being vested and cannot be transferred out of this account.
fn add_vesting_schedule(
who: &T::AccountId,
locked: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
per_block: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
starting_block: T::BlockNumber
) -> DispatchResult
[src]
who: &T::AccountId,
locked: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
per_block: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
starting_block: T::BlockNumber
) -> DispatchResult
Adds a vesting schedule to a given account.
If there already exists a vesting schedule for the given account, an Err
is returned
and nothing is updated.
On success, a linearly reducing amount of funds will be locked. In order to realise any
reduction of the lock over time as it diminishes, the account owner must use vest
or
vest_other
.
Is a no-op if the amount to be vested is zero.
fn remove_vesting_schedule(who: &T::AccountId)
[src]
Remove a vesting schedule for a given account.
Auto Trait Implementations
impl<T> RefUnwindSafe for Module<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Module<T> where
T: Send,
T: Send,
impl<T> Sync for Module<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Module<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Module<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IsType<T> for T
[src]
pub fn from_ref(t: &T) -> &T
[src]
pub fn into_ref(&self) -> &T
[src]
pub fn from_mut(t: &mut T) -> &mut T
[src]
pub fn into_mut(&mut self) -> &mut T
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
Get a mutable reference to the inner from the outer.
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Member for T where
T: 'static + Send + Sync + Debug + Eq + PartialEq<T> + Clone,
[src]
T: 'static + Send + Sync + Debug + Eq + PartialEq<T> + Clone,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,