Extract Runtime Constants into Separate Crates (#4456)

* kusama-runtime-constants created

* polkadot_runtime_constants added

* runtime constants extracted

* update node

* cargo +nightly fmt

* Delete constants.rs

* update Cargo.toml

* 2021

* runtime constants update

* utils

* utils

* node test service

* Update runtime/rococo/constants/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* runtime-native

* bridge messages

* re-export DOLLARS

* Update runtime/westend/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update runtime/test-runtime/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* std feature

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Doordashcon
2021-12-11 08:10:32 +01:00
committed by GitHub
parent 7c5249c951
commit 11d343e258
28 changed files with 238 additions and 36 deletions
+2
View File
@@ -50,6 +50,7 @@ pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "ma
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
test-runtime-constants = { package = "test-runtime-constants", path = "./constants", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
@@ -114,6 +115,7 @@ std = [
"pallet-staking/std",
"frame-system/std",
"frame-system-rpc-runtime-api/std",
"test-runtime-constants/std",
"pallet-timestamp/std",
"sp-version/std",
"pallet-vesting/std",
@@ -0,0 +1,19 @@
[package]
name = "test-runtime-constants"
version = "0.9.13"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
[dependencies]
smallvec = "1.6.1"
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false }
runtime-common = { package = "polkadot-runtime-common", path = "../../common", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[features]
default = ["std"]
std = [
"sp-runtime/std"
]
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
#![cfg_attr(not(feature = "std"), no_std)]
/// Money matters.
pub mod currency {
use primitives::v0::Balance;
+1 -2
View File
@@ -81,9 +81,8 @@ pub use paras_sudo_wrapper::Call as ParasSudoWrapperCall;
pub use sp_runtime::BuildStorage;
/// Constant values used within the runtime.
pub mod constants;
use test_runtime_constants::{currency::*, fee::*, time::*};
pub mod xcm_config;
use constants::{currency::*, fee::*, time::*};
// Make the WASM binary available.
#[cfg(feature = "std")]