Skip to content

Commit ad7309c

Browse files
Added pending_rewards API call to Testnet 8.X branch (#782)
1 parent 285c13d commit ad7309c

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

Cargo.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/runtime/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aleph-runtime"
3-
version = "0.8.1"
3+
version = "0.8.2"
44
authors = ["Cardinal Cryptography"]
55
edition = "2021"
66
homepage = "https://alephzero.org"
@@ -41,6 +41,7 @@ pallet-vesting = { default-features = false, git = "https://github.com/Cardinal-
4141
pallet-multisig = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
4242
pallet-utility = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
4343
pallet-nomination-pools = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
44+
pallet-nomination-pools-runtime-api = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
4445

4546
sp-api = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
4647
sp-block-builder = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
@@ -109,6 +110,7 @@ std = [
109110
"pallet-contracts-rpc-runtime-api/std",
110111
"pallet-contracts/std",
111112
"pallet-nomination-pools/std",
113+
"pallet-nomination-pools-runtime-api/std",
112114
]
113115
short_session = ["primitives/short_session"]
114116
try-runtime = [

bin/runtime/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
108108
spec_name: create_runtime_str!("aleph-node"),
109109
impl_name: create_runtime_str!("aleph-node"),
110110
authoring_version: 1,
111-
spec_version: 38,
111+
spec_version: 44,
112112
impl_version: 1,
113113
apis: RUNTIME_API_VERSIONS,
114114
transaction_version: 13,
@@ -956,6 +956,12 @@ impl_runtime_apis! {
956956

957957
}
958958

959+
impl pallet_nomination_pools_runtime_api::NominationPoolsApi<Block, AccountId, Balance> for Runtime {
960+
fn pending_rewards(member_account: AccountId) -> Balance {
961+
NominationPools::pending_rewards(member_account)
962+
}
963+
}
964+
959965
#[cfg(feature = "try-runtime")]
960966
impl frame_try_runtime::TryRuntime<Block> for Runtime {
961967
fn on_runtime_upgrade() -> (frame_support::weights::Weight, frame_support::weights::Weight) {

0 commit comments

Comments
 (0)