::PalletInfo::name::(), Some(name));
diff --git a/evm-template/template-fuzzer/Cargo.toml b/evm-template/template-fuzzer/Cargo.toml
index 9216980..1afc4b8 100644
--- a/evm-template/template-fuzzer/Cargo.toml
+++ b/evm-template/template-fuzzer/Cargo.toml
@@ -18,7 +18,7 @@ workspace = true
substrate-runtime-fuzzer = { workspace = true }
ziggy = { workspace = true }
-parachain-template-runtime = { path = "../runtime" }
+evm-runtime-template = { path = "../runtime" }
parachains-common = { workspace = true }
parity-scale-codec = { workspace = true }
@@ -41,18 +41,18 @@ cumulus-test-relay-sproof-builder = { workspace = true }
[features]
default = [ "std", "try-runtime" ]
std = [
+ "evm-runtime-template/std",
"frame-support/std",
"pallet-timestamp/std",
- "parachain-template-runtime/std",
"parity-scale-codec/std",
"sp-consensus-aura/std",
"sp-runtime/std",
]
try-runtime = [
+ "evm-runtime-template/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-timestamp/try-runtime",
- "parachain-template-runtime/try-runtime",
"sp-runtime/try-runtime",
]
diff --git a/evm-template/template-fuzzer/src/main.rs b/evm-template/template-fuzzer/src/main.rs
index e48f716..1ec71d2 100644
--- a/evm-template/template-fuzzer/src/main.rs
+++ b/evm-template/template-fuzzer/src/main.rs
@@ -1,17 +1,17 @@
use std::time::{Duration, Instant};
use cumulus_primitives_core::relay_chain::Slot;
+use evm_runtime_template::{
+ constants::SLOT_DURATION, AccountId, AllPalletsWithSystem, Balance, Balances, BlockNumber,
+ EVMChainIdConfig, Executive, Runtime, RuntimeCall, RuntimeOrigin, SudoConfig,
+ UncheckedExtrinsic,
+};
use frame_support::{
dispatch::GetDispatchInfo,
pallet_prelude::Encode,
traits::{IntegrityTest, TryState, TryStateSelect},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
};
-use parachain_template_runtime::{
- constants::SLOT_DURATION, AccountId, AllPalletsWithSystem, Balance, Balances, BlockNumber,
- EVMChainIdConfig, Executive, Runtime, RuntimeCall, RuntimeOrigin, SudoConfig,
- UncheckedExtrinsic,
-};
use sp_consensus_aura::AURA_ENGINE_ID;
use sp_runtime::{
traits::{Dispatchable, Header},
@@ -25,7 +25,7 @@ fn main() {
let endowed_accounts: Vec = (0..5).map(|i| [i; 32].into()).collect();
let genesis_storage: Storage = {
- use parachain_template_runtime::{
+ use evm_runtime_template::{
BalancesConfig, CollatorSelectionConfig, RuntimeGenesisConfig, SessionConfig,
SessionKeys,
};
diff --git a/generic-template/Cargo.lock b/generic-template/Cargo.lock
index 4d530fa..6aa621b 100644
--- a/generic-template/Cargo.lock
+++ b/generic-template/Cargo.lock
@@ -3767,6 +3767,135 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "generic-runtime-template"
+version = "1.0.0"
+dependencies = [
+ "assets-common",
+ "cumulus-pallet-aura-ext",
+ "cumulus-pallet-parachain-system",
+ "cumulus-pallet-session-benchmarking",
+ "cumulus-pallet-xcm",
+ "cumulus-pallet-xcmp-queue",
+ "cumulus-primitives-aura",
+ "cumulus-primitives-core",
+ "cumulus-primitives-storage-weight-reclaim",
+ "cumulus-primitives-utility",
+ "frame-benchmarking",
+ "frame-executive",
+ "frame-support",
+ "frame-system",
+ "frame-system-benchmarking",
+ "frame-system-rpc-runtime-api",
+ "frame-try-runtime",
+ "hex-literal",
+ "log",
+ "pallet-assets",
+ "pallet-aura",
+ "pallet-authorship",
+ "pallet-balances",
+ "pallet-collator-selection",
+ "pallet-conviction-voting",
+ "pallet-message-queue",
+ "pallet-multisig",
+ "pallet-preimage",
+ "pallet-proxy",
+ "pallet-referenda",
+ "pallet-scheduler",
+ "pallet-session",
+ "pallet-sudo",
+ "pallet-timestamp",
+ "pallet-transaction-payment",
+ "pallet-transaction-payment-rpc-runtime-api",
+ "pallet-treasury",
+ "pallet-utility",
+ "pallet-whitelist",
+ "pallet-xcm",
+ "parachains-common",
+ "parity-scale-codec",
+ "polkadot-parachain-primitives",
+ "polkadot-runtime-common",
+ "scale-info",
+ "smallvec",
+ "sp-api",
+ "sp-arithmetic",
+ "sp-block-builder",
+ "sp-consensus-aura",
+ "sp-core",
+ "sp-genesis-builder",
+ "sp-inherents",
+ "sp-io",
+ "sp-offchain",
+ "sp-runtime",
+ "sp-session",
+ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.10.0)",
+ "sp-transaction-pool",
+ "sp-version",
+ "staging-parachain-info",
+ "staging-xcm",
+ "staging-xcm-builder",
+ "staging-xcm-executor",
+ "substrate-wasm-builder",
+]
+
+[[package]]
+name = "generic-template-node"
+version = "1.0.0"
+dependencies = [
+ "clap",
+ "color-print",
+ "cumulus-client-cli",
+ "cumulus-client-collator",
+ "cumulus-client-consensus-aura",
+ "cumulus-client-consensus-common",
+ "cumulus-client-consensus-proposer",
+ "cumulus-client-service",
+ "cumulus-primitives-core",
+ "cumulus-primitives-parachain-inherent",
+ "cumulus-relay-chain-interface",
+ "frame-benchmarking",
+ "frame-benchmarking-cli",
+ "futures",
+ "generic-runtime-template",
+ "jsonrpsee",
+ "log",
+ "pallet-transaction-payment-rpc",
+ "parity-scale-codec",
+ "polkadot-cli",
+ "polkadot-primitives",
+ "sc-basic-authorship",
+ "sc-chain-spec",
+ "sc-cli",
+ "sc-client-api",
+ "sc-consensus",
+ "sc-executor",
+ "sc-network",
+ "sc-network-sync",
+ "sc-offchain",
+ "sc-rpc",
+ "sc-service",
+ "sc-sysinfo",
+ "sc-telemetry",
+ "sc-tracing",
+ "sc-transaction-pool",
+ "sc-transaction-pool-api",
+ "serde",
+ "serde_json",
+ "sp-api",
+ "sp-block-builder",
+ "sp-blockchain",
+ "sp-consensus-aura",
+ "sp-core",
+ "sp-io",
+ "sp-keystore",
+ "sp-runtime",
+ "sp-timestamp",
+ "staging-xcm",
+ "substrate-build-script-utils",
+ "substrate-frame-rpc-system",
+ "substrate-prometheus-endpoint",
+]
+
[[package]]
name = "gethostname"
version = "0.2.3"
@@ -7231,135 +7360,6 @@ dependencies = [
"staging-xcm-executor",
]
-[[package]]
-name = "parachain-template-node"
-version = "1.0.0"
-dependencies = [
- "clap",
- "color-print",
- "cumulus-client-cli",
- "cumulus-client-collator",
- "cumulus-client-consensus-aura",
- "cumulus-client-consensus-common",
- "cumulus-client-consensus-proposer",
- "cumulus-client-service",
- "cumulus-primitives-core",
- "cumulus-primitives-parachain-inherent",
- "cumulus-relay-chain-interface",
- "frame-benchmarking",
- "frame-benchmarking-cli",
- "futures",
- "jsonrpsee",
- "log",
- "pallet-transaction-payment-rpc",
- "parachain-template-runtime",
- "parity-scale-codec",
- "polkadot-cli",
- "polkadot-primitives",
- "sc-basic-authorship",
- "sc-chain-spec",
- "sc-cli",
- "sc-client-api",
- "sc-consensus",
- "sc-executor",
- "sc-network",
- "sc-network-sync",
- "sc-offchain",
- "sc-rpc",
- "sc-service",
- "sc-sysinfo",
- "sc-telemetry",
- "sc-tracing",
- "sc-transaction-pool",
- "sc-transaction-pool-api",
- "serde",
- "serde_json",
- "sp-api",
- "sp-block-builder",
- "sp-blockchain",
- "sp-consensus-aura",
- "sp-core",
- "sp-io",
- "sp-keystore",
- "sp-runtime",
- "sp-timestamp",
- "staging-xcm",
- "substrate-build-script-utils",
- "substrate-frame-rpc-system",
- "substrate-prometheus-endpoint",
-]
-
-[[package]]
-name = "parachain-template-runtime"
-version = "1.0.0"
-dependencies = [
- "assets-common",
- "cumulus-pallet-aura-ext",
- "cumulus-pallet-parachain-system",
- "cumulus-pallet-session-benchmarking",
- "cumulus-pallet-xcm",
- "cumulus-pallet-xcmp-queue",
- "cumulus-primitives-aura",
- "cumulus-primitives-core",
- "cumulus-primitives-storage-weight-reclaim",
- "cumulus-primitives-utility",
- "frame-benchmarking",
- "frame-executive",
- "frame-support",
- "frame-system",
- "frame-system-benchmarking",
- "frame-system-rpc-runtime-api",
- "frame-try-runtime",
- "hex-literal",
- "log",
- "pallet-assets",
- "pallet-aura",
- "pallet-authorship",
- "pallet-balances",
- "pallet-collator-selection",
- "pallet-conviction-voting",
- "pallet-message-queue",
- "pallet-multisig",
- "pallet-preimage",
- "pallet-proxy",
- "pallet-referenda",
- "pallet-scheduler",
- "pallet-session",
- "pallet-sudo",
- "pallet-timestamp",
- "pallet-transaction-payment",
- "pallet-transaction-payment-rpc-runtime-api",
- "pallet-treasury",
- "pallet-utility",
- "pallet-whitelist",
- "pallet-xcm",
- "parachains-common",
- "parity-scale-codec",
- "polkadot-parachain-primitives",
- "polkadot-runtime-common",
- "scale-info",
- "smallvec",
- "sp-api",
- "sp-arithmetic",
- "sp-block-builder",
- "sp-consensus-aura",
- "sp-core",
- "sp-genesis-builder",
- "sp-inherents",
- "sp-io",
- "sp-offchain",
- "sp-runtime",
- "sp-session",
- "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?tag=polkadot-v1.10.0)",
- "sp-transaction-pool",
- "sp-version",
- "staging-parachain-info",
- "staging-xcm",
- "staging-xcm-builder",
- "staging-xcm-executor",
- "substrate-wasm-builder",
-]
-
[[package]]
name = "parachains-common"
version = "7.0.0"
@@ -13072,9 +13072,9 @@ dependencies = [
"cumulus-test-relay-sproof-builder",
"frame-support",
"frame-system",
+ "generic-runtime-template",
"pallet-balances",
"pallet-timestamp",
- "parachain-template-runtime",
"parachains-common",
"parity-scale-codec",
"sp-consensus-aura",
diff --git a/generic-template/Cargo.toml b/generic-template/Cargo.toml
index 8bd4be7..9d8346b 100644
--- a/generic-template/Cargo.toml
+++ b/generic-template/Cargo.toml
@@ -4,10 +4,10 @@ resolver = "2"
[workspace.package]
authors = [ "OpenZeppelin" ]
-description = "Runtime template(s) for Polkadot Para{chains, cores}"
+description = "Generic runtime template for Polkadot Para{chains, cores}"
edition = "2021"
license = "GPL-3.0-only"
-repository = "https://github.com/OpenZeppelin/polkadot-runtime-template"
+repository = "https://github.com/OpenZeppelin/polkadot-runtime-templates"
[workspace.dependencies]
clap = { version = "4.5.3", features = [ "derive" ] }
diff --git a/generic-template/node/Cargo.toml b/generic-template/node/Cargo.toml
index 19fe34f..a9ed444 100644
--- a/generic-template/node/Cargo.toml
+++ b/generic-template/node/Cargo.toml
@@ -1,8 +1,8 @@
[package]
-name = "parachain-template-node"
+name = "generic-template-node"
authors = { workspace = true }
build = "build.rs"
-description = "Node compatible with parachain runtime template."
+description = "Node compatible with generic runtime template."
edition = { workspace = true }
license = { workspace = true }
publish = false
@@ -19,7 +19,7 @@ serde = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true }
# Local
-parachain-template-runtime = { path = "../runtime" }
+generic-runtime-template = { path = "../runtime" }
# Substrate
frame-benchmarking = { workspace = true }
@@ -80,14 +80,14 @@ experimental = []
runtime-benchmarks = [
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
- "parachain-template-runtime/runtime-benchmarks",
+ "generic-runtime-template/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
- "parachain-template-runtime/try-runtime",
+ "generic-runtime-template/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
]
diff --git a/generic-template/node/src/chain_spec.rs b/generic-template/node/src/chain_spec.rs
index ab06f1b..3f4e714 100644
--- a/generic-template/node/src/chain_spec.rs
+++ b/generic-template/node/src/chain_spec.rs
@@ -1,5 +1,5 @@
use cumulus_primitives_core::ParaId;
-use parachain_template_runtime::{
+use generic_runtime_template::{
constants::currency::EXISTENTIAL_DEPOSIT, AccountId, AuraId, Signature,
};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
@@ -10,7 +10,7 @@ use sp_runtime::traits::{IdentifyAccount, Verify};
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec =
- sc_service::GenericChainSpec;
+ sc_service::GenericChainSpec;
/// The default XCM version to set in genesis config.
const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
@@ -61,8 +61,8 @@ where
///
/// The input must be a tuple of individual keys (a single arg for now since we
/// have just one key).
-pub fn template_session_keys(keys: AuraId) -> parachain_template_runtime::SessionKeys {
- parachain_template_runtime::SessionKeys { aura: keys }
+pub fn template_session_keys(keys: AuraId) -> generic_runtime_template::SessionKeys {
+ generic_runtime_template::SessionKeys { aura: keys }
}
pub fn development_config() -> ChainSpec {
@@ -75,8 +75,7 @@ pub fn development_config() -> ChainSpec {
properties.insert("basedOn".into(), "OpenZeppelin Generic Template".into());
ChainSpec::builder(
- parachain_template_runtime::WASM_BINARY
- .expect("WASM binary was not built, please build it!"),
+ generic_runtime_template::WASM_BINARY.expect("WASM binary was not built, please build it!"),
Extensions {
relay_chain: "rococo-local".into(),
// You MUST set this to the correct network!
@@ -127,8 +126,7 @@ pub fn local_testnet_config() -> ChainSpec {
#[allow(deprecated)]
ChainSpec::builder(
- parachain_template_runtime::WASM_BINARY
- .expect("WASM binary was not built, please build it!"),
+ generic_runtime_template::WASM_BINARY.expect("WASM binary was not built, please build it!"),
Extensions {
relay_chain: "rococo-local".into(),
// You MUST set this to the correct network!
diff --git a/generic-template/node/src/command.rs b/generic-template/node/src/command.rs
index aecdca8..6b129c9 100644
--- a/generic-template/node/src/command.rs
+++ b/generic-template/node/src/command.rs
@@ -3,8 +3,8 @@ use std::net::SocketAddr;
use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
use cumulus_primitives_core::ParaId;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
+use generic_runtime_template::Block;
use log::info;
-use parachain_template_runtime::Block;
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
NetworkParams, Result, SharedParams, SubstrateCli,
diff --git a/generic-template/node/src/rpc.rs b/generic-template/node/src/rpc.rs
index d5a4755..040fca4 100644
--- a/generic-template/node/src/rpc.rs
+++ b/generic-template/node/src/rpc.rs
@@ -7,7 +7,7 @@
use std::sync::Arc;
-use parachain_template_runtime::{opaque::Block, AccountId, Balance, Nonce};
+use generic_runtime_template::{opaque::Block, AccountId, Balance, Nonce};
use sc_client_api::AuxStore;
pub use sc_rpc::DenyUnsafe;
use sc_transaction_pool_api::TransactionPool;
diff --git a/generic-template/node/src/service.rs b/generic-template/node/src/service.rs
index 898b282..ab8e740 100644
--- a/generic-template/node/src/service.rs
+++ b/generic-template/node/src/service.rs
@@ -20,7 +20,7 @@ use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};
// Substrate Imports
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
// Local Runtime Types
-use parachain_template_runtime::{
+use generic_runtime_template::{
apis::RuntimeApi,
opaque::{Block, Hash},
};
diff --git a/generic-template/runtime/Cargo.toml b/generic-template/runtime/Cargo.toml
index 3b33a2a..1ccad84 100644
--- a/generic-template/runtime/Cargo.toml
+++ b/generic-template/runtime/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "parachain-template-runtime"
+name = "generic-runtime-template"
authors = { workspace = true }
description = "A generic parachain runtime template"
edition = { workspace = true }
diff --git a/generic-template/runtime/tests/common/mod.rs b/generic-template/runtime/tests/common/mod.rs
index a5f4fe8..2b9c1a0 100644
--- a/generic-template/runtime/tests/common/mod.rs
+++ b/generic-template/runtime/tests/common/mod.rs
@@ -1,6 +1,6 @@
// ExtBuilder impl for all runtime integration tests
use frame_support::weights::Weight;
-use parachain_template_runtime::{BuildStorage, Runtime, System};
+use generic_runtime_template::{BuildStorage, Runtime, System};
pub fn run_with_system_weight(w: Weight, mut assertions: F) {
let mut t: sp_io::TestExternalities =
diff --git a/generic-template/runtime/tests/constants_test.rs b/generic-template/runtime/tests/constants_test.rs
index 8691444..8792255 100644
--- a/generic-template/runtime/tests/constants_test.rs
+++ b/generic-template/runtime/tests/constants_test.rs
@@ -1,5 +1,5 @@
mod constant_tests {
- use parachain_template_runtime::constants::currency::*;
+ use generic_runtime_template::constants::currency::*;
#[test]
fn test_constants() {
@@ -20,7 +20,7 @@ mod constant_tests {
mod runtime_tests {
use frame_support::{pallet_prelude::Weight, traits::TypedGet, PalletId};
- use parachain_template_runtime::{
+ use generic_runtime_template::{
configs::*,
constants::{currency::*, *},
*,
@@ -39,7 +39,7 @@ mod runtime_tests {
authoring_version: 1,
spec_version: 1,
impl_version: 0,
- apis: parachain_template_runtime::apis::RUNTIME_API_VERSIONS,
+ apis: generic_runtime_template::apis::RUNTIME_API_VERSIONS,
transaction_version: 1,
state_version: 1,
}
@@ -222,7 +222,7 @@ mod runtime_tests {
mod xcm_tests {
use frame_support::weights::Weight;
- use parachain_template_runtime::configs::xcm_config::*;
+ use generic_runtime_template::configs::xcm_config::*;
#[test]
fn xcm_executor_constants() {
@@ -234,6 +234,9 @@ mod xcm_tests {
#[test]
fn pallet_xcm_constants() {
assert_eq!(MaxLockers::get(), 0);
- assert_eq!(::VERSION_DISCOVERY_QUEUE_SIZE, 100);
+ assert_eq!(
+ ::VERSION_DISCOVERY_QUEUE_SIZE,
+ 100
+ );
}
}
diff --git a/generic-template/runtime/tests/multiplier.rs b/generic-template/runtime/tests/multiplier.rs
index bd5e9a8..df56672 100644
--- a/generic-template/runtime/tests/multiplier.rs
+++ b/generic-template/runtime/tests/multiplier.rs
@@ -2,8 +2,8 @@
mod common;
use common::*;
use frame_support::pallet_prelude::*;
+use generic_runtime_template::{Runtime, RuntimeBlockWeights};
use pallet_transaction_payment::Multiplier;
-use parachain_template_runtime::{Runtime, RuntimeBlockWeights};
use polkadot_runtime_common::MinimumMultiplier;
use sp_runtime::{traits::Convert, Perquintill};
diff --git a/generic-template/runtime/tests/storage.rs b/generic-template/runtime/tests/storage.rs
index 5f1bf8b..d3a3aa3 100644
--- a/generic-template/runtime/tests/storage.rs
+++ b/generic-template/runtime/tests/storage.rs
@@ -1,6 +1,6 @@
// Storage indices integration checks
use frame_support::traits::PalletInfo;
-use parachain_template_runtime::{
+use generic_runtime_template::{
Aura, AuraExt, Authorship, Balances, CollatorSelection, CumulusXcm, MessageQueue, Multisig,
ParachainInfo, ParachainSystem, PolkadotXcm, Proxy, Runtime, Session, Sudo, System, Timestamp,
TransactionPayment, XcmpQueue,
diff --git a/generic-template/template-fuzzer/Cargo.toml b/generic-template/template-fuzzer/Cargo.toml
index 9216980..21301cf 100644
--- a/generic-template/template-fuzzer/Cargo.toml
+++ b/generic-template/template-fuzzer/Cargo.toml
@@ -18,7 +18,7 @@ workspace = true
substrate-runtime-fuzzer = { workspace = true }
ziggy = { workspace = true }
-parachain-template-runtime = { path = "../runtime" }
+generic-runtime-template = { path = "../runtime" }
parachains-common = { workspace = true }
parity-scale-codec = { workspace = true }
@@ -42,8 +42,8 @@ cumulus-test-relay-sproof-builder = { workspace = true }
default = [ "std", "try-runtime" ]
std = [
"frame-support/std",
+ "generic-runtime-template/std",
"pallet-timestamp/std",
- "parachain-template-runtime/std",
"parity-scale-codec/std",
"sp-consensus-aura/std",
"sp-runtime/std",
@@ -51,8 +51,8 @@ std = [
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
+ "generic-runtime-template/try-runtime",
"pallet-timestamp/try-runtime",
- "parachain-template-runtime/try-runtime",
"sp-runtime/try-runtime",
]
diff --git a/generic-template/template-fuzzer/src/main.rs b/generic-template/template-fuzzer/src/main.rs
index fed85d9..22f7500 100644
--- a/generic-template/template-fuzzer/src/main.rs
+++ b/generic-template/template-fuzzer/src/main.rs
@@ -7,7 +7,7 @@ use frame_support::{
traits::{IntegrityTest, TryState, TryStateSelect},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
};
-use parachain_template_runtime::{
+use generic_runtime_template::{
constants::SLOT_DURATION, AllPalletsWithSystem, Balance, Balances, BlockNumber, Executive,
Runtime, RuntimeCall, RuntimeOrigin, SudoConfig, UncheckedExtrinsic,
};
@@ -25,7 +25,7 @@ fn main() {
let endowed_accounts: Vec = (0..5).map(|i| [i; 32].into()).collect();
let genesis_storage: Storage = {
- use parachain_template_runtime::{
+ use generic_runtime_template::{
BalancesConfig, CollatorSelectionConfig, RuntimeGenesisConfig, SessionConfig,
SessionKeys,
};