trait to get exposure from external pallets such as staking
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
eebcc18018
commit
a504d8eb87
7
pallets/traits/src/exposure.rs
Normal file
7
pallets/traits/src/exposure.rs
Normal file
@ -0,0 +1,7 @@
|
||||
use sp_runtime::traits::AtLeast32BitUnsigned;
|
||||
|
||||
pub trait ExposureListener<Balance: AtLeast32BitUnsigned, EraIndex, AuthIndex> {
|
||||
fn get_current_era() -> EraIndex;
|
||||
fn get_total_exposure(era: EraIndex) -> Balance;
|
||||
fn get_validator_exposure(index: AuthIndex) -> Balance;
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub mod networks;
|
||||
pub mod exposure;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user