trait to get exposure from external pallets such as staking

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-11-27 17:08:16 +03:00
parent eebcc18018
commit a504d8eb87
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 8 additions and 0 deletions

View 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;
}

View File

@ -1,3 +1,4 @@
#![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), no_std)]
pub mod networks; pub mod networks;
pub mod exposure;