referrerpolicy=no-referrer-when-downgrade

Trait sp_staking::StakingUnchecked

source ·
pub trait StakingUnchecked: StakingInterface {
    // Required methods
    fn migrate_to_virtual_staker(who: &Self::AccountId);
    fn virtual_bond(
        keyless_who: &Self::AccountId,
        value: Self::Balance,
        payee: &Self::AccountId,
    ) -> DispatchResult;
    fn migrate_to_direct_staker(who: &Self::AccountId);
}
Expand description

Set of low level apis to manipulate staking ledger.

These apis bypass some or all safety checks and should only be used if you know what you are doing.

Required Methods§

source

fn migrate_to_virtual_staker(who: &Self::AccountId)

Migrate an existing staker to a virtual staker.

It would release all funds held by the implementation pallet.

source

fn virtual_bond( keyless_who: &Self::AccountId, value: Self::Balance, payee: &Self::AccountId, ) -> DispatchResult

Book-keep a new bond for keyless_who without applying any locks (hence virtual).

It is important that keyless_who is a keyless account and therefore cannot interact with staking pallet directly. Caller is responsible for ensuring the passed amount is locked and valid.

source

fn migrate_to_direct_staker(who: &Self::AccountId)

Migrate a virtual staker to a direct staker.

Only used for testing.

Object Safety§

This trait is not object safe.

Implementors§