additional function for exposure trait
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
cc300fefb0
commit
ba7d2a8222
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ghost-traits"
|
||||
version = "0.3.31"
|
||||
version = "0.3.32"
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
@ -10,10 +10,12 @@ repository.workspace = true
|
||||
[dependencies]
|
||||
frame-support = { workspace = true }
|
||||
sp-runtime = { workspace = true }
|
||||
sp-std = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"frame-support/std",
|
||||
"sp-runtime/std",
|
||||
"sp-std/std",
|
||||
]
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
use sp_runtime::traits::AtLeast32BitUnsigned;
|
||||
|
||||
pub trait ExposureListener<Balance: AtLeast32BitUnsigned, AccountId> {
|
||||
fn get_accounts_by_indexes(
|
||||
indexes: impl Iterator<Item = usize>,
|
||||
) -> sp_std::prelude::Vec<AccountId>;
|
||||
fn get_account_by_index(index: usize) -> Option<AccountId>;
|
||||
fn get_total_exposure() -> Balance;
|
||||
fn get_validator_exposure(index: &AccountId) -> Balance;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user