Trait staking::StakingApi

source ·
pub trait StakingApi<PoolId, Index, Balance> {
    // Required methods
    fn nonce(pool_id: &PoolId) -> Index;
    fn slash_stake(
        pool_id: &PoolId,
        amount: Balance
    ) -> Result<(), DispatchError>;
    fn force_refund(pool_id: &PoolId) -> Result<Balance, DispatchError>;
}

Required Methods§

source

fn nonce(pool_id: &PoolId) -> Index

Get the newest nonce for the staking pool.

source

fn slash_stake(pool_id: &PoolId, amount: Balance) -> Result<(), DispatchError>

Slash an amount of stake from the pool_id.

source

fn force_refund(pool_id: &PoolId) -> Result<Balance, DispatchError>

Force refund the entire nomination to pool_id.

Implementors§

source§

impl<T, Balance> StakingApi<VaultId<<T as Config>::AccountId, <T as Config>::CurrencyId>, <T as Config>::Nonce, Balance> for Pallet<T>where T: Config, Balance: BalanceToFixedPoint<<T as Config>::SignedFixedPoint>, <T::SignedFixedPoint as FixedPointNumber>::Inner: TryInto<Balance>,