This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Staking and nomination pools runtime API improvements #13119
Merged
paritytech-processbot
merged 32 commits into
master
from
gpestana/13069-nomination-staking-rpc-methods
Feb 21, 2023
Merged
Changes from 27 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
710bab9
Adds StakingAPI_nominations_quota and NominationPoolsApi_balanceToPoi…
gpestana 11c4f61
Adds balance param to api_nominations_quota
gpestana 3268088
Update frame/nomination-pools/src/lib.rs
gpestana ca2ed2f
Update frame/nomination-pools/src/lib.rs
gpestana a31efce
Addresses comments - returns zero instead of error in runtime api
gpestana 5dfae89
Update frame/staking/runtime-api/src/lib.rs
gpestana 9e9e793
Update frame/staking/runtime-api/src/lib.rs
gpestana 0a8059a
Addresses PR comments
gpestana 8b848fd
Update frame/nomination-pools/runtime-api/Cargo.toml
gpestana 825f312
Fixes points_to_balance logic; adds tests
gpestana 62aa1a2
test comment fix
gpestana 05b238e
Merge remote-tracking branch 'origin/master' into gpestana/13069-nomi…
137a355
Update frame/nomination-pools/runtime-api/src/lib.rs
gpestana cfea646
Update frame/nomination-pools/runtime-api/src/lib.rs
gpestana bf944a4
Fix block pruning (#13323)
arkpar e8d7590
Referendum proposal's metadata (#12568)
muharem 5164848
Improve test coverage of the `Notifications` protocol (#13033)
altonen b7d764c
refactors runtime API logic to own pallet impl block
gpestana cc3ad3a
Merge remote-tracking branch 'origin/master' into gpestana/13069-nomi…
6a54821
removes unrelated changes
gpestana d6ec3a9
Merge branch 'master' into gpestana/13069-nomination-staking-rpc-methods
gpestana 3f16777
Fixes cargo doc comments lint
gpestana 8422864
fixes node cargo
gpestana 9c1b1fc
Merge branch 'master' into gpestana/13069-nomination-staking-rpc-methods
gpestana 98176d0
Merge remote-tracking branch 'origin/master' into gpestana/13069-nomi…
b801518
Merge remote-tracking branch 'origin/master' into gpestana/13069-nomi…
eb28218
fixes comment
gpestana 28b1434
Merge remote-tracking branch 'origin/master' into gpestana/13069-nomi…
3afd3f7
Merge remote-tracking branch 'origin/master' into gpestana/13069-nomi…
a1a5c3c
restart ci
gpestana 7c23d17
restart ci
gpestana 4492a2d
restart ci
gpestana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [package] | ||
| name = "pallet-staking-runtime-api" | ||
| version = "4.0.0-dev" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2021" | ||
| license = "Apache-2.0" | ||
| homepage = "https://substrate.io" | ||
| repository = "https://github.com/paritytech/substrate/" | ||
| description = "RPC runtime API for transaction payment FRAME pallet" | ||
| readme = "README.md" | ||
|
|
||
| [package.metadata.docs.rs] | ||
| targets = ["x86_64-unknown-linux-gnu"] | ||
|
|
||
| [dependencies] | ||
| codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } | ||
| sp-api = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/api" } | ||
|
|
||
| [features] | ||
| default = ["std"] | ||
| std = [ | ||
| "codec/std", | ||
| "sp-api/std", | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Runtime API definition for the staking pallet. | ||
|
|
||
| License: Apache-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // This file is part of Substrate. | ||
|
|
||
| // Copyright (C) 2023 Parity Technologies (UK) Ltd. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| //! Runtime API definition for the staking pallet. | ||
|
|
||
| #![cfg_attr(not(feature = "std"), no_std)] | ||
|
|
||
| use codec::Codec; | ||
|
|
||
| sp_api::decl_runtime_apis! { | ||
| pub trait StakingApi<Balance> | ||
| where | ||
| Balance: Codec, | ||
| { | ||
| /// Returns the nominations quota for a nominator with a given balance. | ||
| fn nominations_quota(balance: Balance) -> u32; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.