ghost-node/pallets/traits/src/exposure.rs
Uncle Stretch a504d8eb87
trait to get exposure from external pallets such as staking
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2025-11-27 17:08:16 +03:00

8 lines
281 B
Rust

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