From 18ed309a37036db8429665f1e91fb24ab312e646 Mon Sep 17 00:00:00 2001 From: Kazunobu Ndong <33208377+ndkazu@users.noreply.github.com> Date: Tue, 2 Jul 2024 05:18:27 +0900 Subject: [PATCH] Pallet Name Customisation (#4806) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Instructions for pallet name customisation in the ReadMe --------- Signed-off-by: Oliver Tale-Yazdi Co-authored-by: Oliver Tale-Yazdi Co-authored-by: Bastian Köcher --- templates/minimal/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/templates/minimal/README.md b/templates/minimal/README.md index f00bfd4d4877..1909c777aede 100644 --- a/templates/minimal/README.md +++ b/templates/minimal/README.md @@ -37,6 +37,21 @@ A Polkadot SDK based project such as this one consists of: * 🛠️ Depending on your operating system and Rust version, there might be additional packages required to compile this template - please take note of the Rust compiler output. +## Customization + +In case you would like to change the pallet's name from `pallet-minimal-template` to `pallet-test`, +you would need to implement the following changes: +* Change the pallet folder name from `template` to `test` for consistency +* Also for consistency, in `/runtime/src/lib.rs`, change from `pub type Template` to `pub type Test`, +and don't forget to also customize the corresponding comments. +* Change `pallet-minimal-template` to `pallet-test` in the following files: + * `/runtime/Cargo.toml` + * `/runtime/src/lib.rs` + * `/pallets/test/Cargo.toml` + * `/src/lib.rs` +* Change `pallet_minimal_template` to `pallet_test` in the following files: + * `/runtime/src/lib.rs` + ### Build 🔨 Use the following command to build the node without launching it: