Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
super nominator trait
Browse files Browse the repository at this point in the history
  • Loading branch information
Ank4n committed May 22, 2023
1 parent e7229f1 commit 7b47b24
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions primitives/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,15 @@ pub trait StakingInterface {
fn set_current_era(era: EraIndex);
}

pub trait SuperNominator: StakingInterface {
/// Bond `value` of `who`'s balance to a super nominator.
fn super_bond(sub_nominator: &Self::AccountId, super_nominator: &Self::AccountId, value: Self::Balance) -> DispatchResult;

/// Unbond `value` of a `sub nominator`'s balance from a super nominator.
fn super_unbond(super_nominator: &Self::AccountId, sub_nominator: &Self::AccountId, value: Self::Balance) -> DispatchResult;

/// Withdraw `value` from super nominator's unlocking balance to sub.
fn super_withdraw(super_nominator: &Self::AccountId, sub_nominator: &Self::AccountId, value: Self::Balance) -> DispatchResult;
}

sp_core::generate_feature_enabled_macro!(runtime_benchmarks_enabled, feature = "runtime-benchmarks", $);

0 comments on commit 7b47b24

Please sign in to comment.