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;
}
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§
sourcefn migrate_to_virtual_staker(who: &Self::AccountId)
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.
sourcefn virtual_bond(
keyless_who: &Self::AccountId,
value: Self::Balance,
payee: &Self::AccountId,
) -> DispatchResult
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.
Object Safety§
This trait is not object safe.