Prevent name clash with Substrate Pallet Template (#2536)

* Remove cumulus template pallet

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use substrate template pallet

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update Cargo.lock

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert back to master

Revert "Remove cumulus template pallet"

This reverts commit a6d3566e52e9124c0e9823c12cacea557187c6b4.

Revert "Use substrate template pallet"

This reverts commit fbb8eea28dec5b75e13823762572d24bd9a4b88f.

Revert "Update Cargo.lock"

This reverts commit ee24cb81e5d91d6b8f7ef0c97d0f0fdbfe857c53.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* pallet-template -> pallet-parachain-template

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update Cargo.lock

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-05-08 17:20:20 +02:00
committed by GitHub
parent 6cba4b41a9
commit 97984e44bb
6 changed files with 27 additions and 28 deletions
Generated
+16 -16
View File
@@ -7339,6 +7339,21 @@ dependencies = [
"sp-std",
]
[[package]]
name = "pallet-parachain-template"
version = "0.1.0"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"parity-scale-codec",
"scale-info",
"serde",
"sp-core",
"sp-io",
"sp-runtime",
]
[[package]]
name = "pallet-preimage"
version = "4.0.0-dev"
@@ -7574,21 +7589,6 @@ dependencies = [
"sp-std",
]
[[package]]
name = "pallet-template"
version = "0.1.0"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"parity-scale-codec",
"scale-info",
"serde",
"sp-core",
"sp-io",
"sp-runtime",
]
[[package]]
name = "pallet-timestamp"
version = "4.0.0-dev"
@@ -7879,9 +7879,9 @@ dependencies = [
"pallet-authorship",
"pallet-balances",
"pallet-collator-selection",
"pallet-parachain-template",
"pallet-session",
"pallet-sudo",
"pallet-template",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
@@ -1,5 +1,5 @@
[package]
name = "pallet-template"
name = "pallet-parachain-template"
authors = ["Anonymous"]
description = "FRAME pallet template for defining custom runtime logic."
version = "0.1.0"
@@ -1,4 +1,4 @@
//! Benchmarking setup for pallet-template
//! Benchmarking setup for pallet-parachain-template
use super::*;
@@ -1,4 +1,3 @@
use crate as pallet_template;
use frame_support::{parameter_types, traits::Everything};
use frame_system as system;
use sp_core::H256;
@@ -18,7 +17,7 @@ frame_support::construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
TemplateModule: pallet_template::{Pallet, Call, Storage, Event<T>},
TemplateModule: crate::{Pallet, Call, Storage, Event<T>},
}
);
@@ -54,7 +53,7 @@ impl system::Config for Test {
type MaxConsumers = frame_support::traits::ConstU32<16>;
}
impl pallet_template::Config for Test {
impl crate::Config for Test {
type RuntimeEvent = RuntimeEvent;
}
+4 -4
View File
@@ -22,7 +22,7 @@ scale-info = { version = "2.6.0", default-features = false, features = ["derive"
smallvec = "1.10.0"
# Local
pallet-template = { path = "../pallets/template", default-features = false }
pallet-parachain-template = { path = "../pallets/template", default-features = false }
# Substrate
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "master" }
@@ -99,7 +99,7 @@ std = [
"pallet-collator-selection/std",
"pallet-session/std",
"pallet-sudo/std",
"pallet-template/std",
"pallet-parachain-template/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
@@ -132,7 +132,7 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-collator-selection/runtime-benchmarks",
"pallet-template/runtime-benchmarks",
"pallet-parachain-template/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
@@ -156,7 +156,7 @@ try-runtime = [
"pallet-collator-selection/try-runtime",
"pallet-session/try-runtime",
"pallet-sudo/try-runtime",
"pallet-template/try-runtime",
"pallet-parachain-template/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-xcm/try-runtime",
+3 -3
View File
@@ -58,7 +58,7 @@ use xcm::latest::prelude::BodyId;
use xcm_executor::XcmExecutor;
/// Import the template pallet.
pub use pallet_template;
pub use pallet_parachain_template;
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = MultiSignature;
@@ -457,7 +457,7 @@ impl pallet_collator_selection::Config for Runtime {
}
/// Configure the pallet template in pallets/template.
impl pallet_template::Config for Runtime {
impl pallet_parachain_template::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
}
@@ -492,7 +492,7 @@ construct_runtime!(
DmpQueue: cumulus_pallet_dmp_queue = 33,
// Template
TemplatePallet: pallet_template = 40,
TemplatePallet: pallet_parachain_template = 40,
}
);