Companion for #11831 (#5784)

* Companion for #11831

* commti

* fix

* fix

* commit

* fix?

* added rpc extension

* fmt

* add dependency

* added NominationPools to runtimes

* implement np

* implement for kusama & westend

* remove np-rpc from rococco

* fmt

* add np-rpc to the client

* fix wrong dependency in client

* remove from client

* remove from rpc

* fix?

* switch back

* fix?

* .

* add rpc extension

* fmt

* fix dependency

* commit

* only implement the api in the runtimes

* update

* update runtimes

* update sp-io

* update

* Update Cargo.toml

* Update Cargo.toml

* Update Cargo.toml

* commit

* Revert "Merge branch 'rpc-pending-rewards' of github.com:Szegoo/polkadot into rpc-pending-rewards"

This reverts commit dd260820641060b6106b238081d674e902267f24, reversing
changes made to 8f3b58dbe28132a95c4d595700214f886da22e5e.

Co-authored-by: kianenigma <kian@parity.io>
This commit is contained in:
Sergej Sakac
2022-07-27 11:32:31 +02:00
committed by GitHub
parent a9e41ed5b5
commit c2df8308d7
5 changed files with 36 additions and 0 deletions
+12
View File
@@ -3198,6 +3198,7 @@ dependencies = [
"pallet-multisig",
"pallet-nomination-pools",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-runtime-api",
"pallet-offences",
"pallet-offences-benchmarking",
"pallet-preimage",
@@ -5263,6 +5264,16 @@ dependencies = [
"sp-std",
]
[[package]]
name = "pallet-nomination-pools-runtime-api"
version = "1.0.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=master#531d7c3a5b26f5849aa6e23518c45a56d67faccb"
dependencies = [
"parity-scale-codec",
"sp-api",
"sp-std",
]
[[package]]
name = "pallet-offences"
version = "4.0.0-dev"
@@ -12204,6 +12215,7 @@ dependencies = [
"pallet-multisig",
"pallet-nomination-pools",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-runtime-api",
"pallet-offences",
"pallet-offences-benchmarking",
"pallet-preimage",
+2
View File
@@ -45,6 +45,7 @@ pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "m
pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
@@ -148,6 +149,7 @@ std = [
"pallet-membership/std",
"pallet-multisig/std",
"pallet-nomination-pools/std",
"pallet-nomination-pools-runtime-api/std",
"pallet-offences/std",
"pallet-preimage/std",
"pallet-proxy/std",
+10
View File
@@ -2010,6 +2010,16 @@ sp_api::impl_runtime_apis! {
}
}
impl pallet_nomination_pools_runtime_api::NominationPoolsApi<
Block,
AccountId,
Balance,
> for Runtime {
fn pending_rewards(member: AccountId) -> Balance {
NominationPools::pending_rewards(member)
}
}
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade() -> (Weight, Weight) {
+2
View File
@@ -68,6 +68,7 @@ pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "maste
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
@@ -140,6 +141,7 @@ std = [
"beefy-primitives/std",
"pallet-multisig/std",
"pallet-nomination-pools/std",
"pallet-nomination-pools-runtime-api/std",
"pallet-offences/std",
"pallet-preimage/std",
"pallet-proxy/std",
+10
View File
@@ -1578,6 +1578,16 @@ sp_api::impl_runtime_apis! {
}
}
impl pallet_nomination_pools_runtime_api::NominationPoolsApi<
Block,
AccountId,
Balance,
> for Runtime {
fn pending_rewards(member: AccountId) -> Balance {
NominationPools::pending_rewards(member)
}
}
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade() -> (frame_support::weights::Weight, frame_support::weights::Weight) {