From fbc58e350bb0101f0119762dd27916d6c4879a8f Mon Sep 17 00:00:00 2001 From: Uncle Stinky Date: Thu, 27 Nov 2025 19:03:13 +0300 Subject: [PATCH] conversion function to AccountId added Signed-off-by: Uncle Stinky --- pallets/traits/Cargo.toml | 2 +- pallets/traits/src/exposure.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallets/traits/Cargo.toml b/pallets/traits/Cargo.toml index c163cac..c31da82 100644 --- a/pallets/traits/Cargo.toml +++ b/pallets/traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ghost-traits" -version = "0.3.25" +version = "0.3.26" license.workspace = true authors.workspace = true edition.workspace = true diff --git a/pallets/traits/src/exposure.rs b/pallets/traits/src/exposure.rs index df8fe78..a6a282e 100644 --- a/pallets/traits/src/exposure.rs +++ b/pallets/traits/src/exposure.rs @@ -1,7 +1,7 @@ use sp_runtime::traits::AtLeast32BitUnsigned; -pub trait ExposureListener { - fn get_current_era() -> EraIndex; - fn get_total_exposure(era: EraIndex) -> Balance; - fn get_validator_exposure(index: AuthIndex) -> Balance; +pub trait ExposureListener { + fn get_account_by_index(index: usize) -> Option; + fn get_total_exposure() -> Balance; + fn get_validator_exposure(index: &AccountId) -> Balance; }