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]
|
[package]
|
||||||
name = "ghost-traits"
|
name = "ghost-traits"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
@ -10,10 +10,12 @@ repository.workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
frame-support = { workspace = true }
|
frame-support = { workspace = true }
|
||||||
sp-runtime = { workspace = true }
|
sp-runtime = { workspace = true }
|
||||||
|
sp-std = { workspace = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"frame-support/std",
|
"frame-support/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
|
"sp-std/std",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
use sp_runtime::traits::AtLeast32BitUnsigned;
|
use sp_runtime::traits::AtLeast32BitUnsigned;
|
||||||
|
|
||||||
pub trait ExposureListener<Balance: AtLeast32BitUnsigned, AccountId> {
|
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_account_by_index(index: usize) -> Option<AccountId>;
|
||||||
fn get_total_exposure() -> Balance;
|
fn get_total_exposure() -> Balance;
|
||||||
fn get_validator_exposure(index: &AccountId) -> Balance;
|
fn get_validator_exposure(index: &AccountId) -> Balance;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user