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§
sourcefn slash_stake(pool_id: &PoolId, amount: Balance) -> Result<(), DispatchError>
fn slash_stake(pool_id: &PoolId, amount: Balance) -> Result<(), DispatchError>
Slash an amount
of stake from the pool_id
.
sourcefn force_refund(pool_id: &PoolId) -> Result<Balance, DispatchError>
fn force_refund(pool_id: &PoolId) -> Result<Balance, DispatchError>
Force refund the entire nomination to pool_id
.