Crates.io | punk-pallet |
lib.rs | punk-pallet |
version | 2.0.0 |
source | src |
created_at | 2021-02-16 03:20:24.860252 |
updated_at | 2021-02-16 03:20:24.860252 |
description | Punk Pallet Bridge Kit |
homepage | https://hiraethcode.com |
repository | https://github.com/Sokos6/punkchain |
max_upload_size | |
id | 355847 |
size | 15,311 |
This is a template for a Substrate pallet which lives as its own crate so it can be imported into multiple runtimes. It is based on the "template" pallet that is included with the Substrate node template.
Check out the HOWTO to learn how to use this for your own runtime module.
This README should act as a general template for distributing your pallet to others.
This pallet acts as a template for building other pallets.
It currently allows a user to put a u32
value into storage, which triggers a runtime event.
This pallet does not depend on any externally defined traits.
This pallet does not depend on any other FRAME pallet or externally developed modules.
Cargo.toml
To add this pallet to your runtime, simply include the following to your runtime's Cargo.toml
file:
[dependencies.substrate-pallet-template]
default_features = false
git = 'https://github.com/substrate-developer-hub/substrate-pallet-template.git'
and update your runtime's std
feature to include this pallet:
std = [
# --snip--
'example_pallet/std',
]
lib.rs
You should implement it's trait like so:
/// Used for test_module
impl example_pallet::Trait for Runtime {
type Event = Event;
}
and include it in your construct_runtime!
macro:
ExamplePallet: substrate_pallet_template::{Module, Call, Storage, Event<T>},
This template pallet does not have any genesis configuration.
You can view the reference docs for this pallet by running:
cargo doc --open
or by visiting this site: