mirror of
https://github.com/pezkuwichain/pez-minimal-template.git
synced 2026-06-13 04:51:05 +00:00
Update template triggered by workflow_dispatch
This commit is contained in:
+12
-10
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "minimal-template-runtime"
|
||||
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.9.0)"
|
||||
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.11.0)"
|
||||
version = "0.1.0"
|
||||
license = "MIT-0"
|
||||
authors.workspace = true
|
||||
@@ -17,23 +17,24 @@ parity-scale-codec = { version = "3.0.0", default-features = false }
|
||||
scale-info = { version = "2.6.0", default-features = false }
|
||||
|
||||
# this is a frame-based runtime, thus importing `frame` with runtime feature enabled.
|
||||
frame = { version = "0.1.1", package = "polkadot-sdk-frame", default-features = false, features = ["experimental", "runtime"] }
|
||||
frame = { version = "0.2.0", package = "polkadot-sdk-frame", default-features = false, features = ["experimental", "runtime"] }
|
||||
|
||||
# pallets that we want to use
|
||||
pallet-balances = { version = "31.0.0", default-features = false }
|
||||
pallet-sudo = { version = "31.0.0", default-features = false }
|
||||
pallet-timestamp = { version = "30.0.0", default-features = false }
|
||||
pallet-transaction-payment = { version = "31.0.0", default-features = false }
|
||||
pallet-transaction-payment-rpc-runtime-api = { version = "31.0.0", default-features = false }
|
||||
pallet-balances = { version = "34.0.0", default-features = false }
|
||||
pallet-sudo = { version = "33.0.0", default-features = false }
|
||||
pallet-timestamp = { version = "32.0.0", default-features = false }
|
||||
pallet-transaction-payment = { version = "33.0.0", default-features = false }
|
||||
pallet-transaction-payment-rpc-runtime-api = { version = "33.0.0", default-features = false }
|
||||
|
||||
# genesis builder that allows us to interacto with runtime genesis config
|
||||
sp-genesis-builder = { version = "0.10.0", default-features = false }
|
||||
# genesis builder that allows us to interact with runtime genesis config
|
||||
sp-genesis-builder = { version = "0.12.0", default-features = false }
|
||||
sp-runtime = { version = "36.0.0", default-features = false, features = ["serde"] }
|
||||
|
||||
# local pallet templates
|
||||
pallet-minimal-template = { path = "../pallets/template", default-features = false, version = "0.1.0" }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { version = "20.0.0", optional = true }
|
||||
substrate-wasm-builder = { version = "22.0.0", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@@ -52,5 +53,6 @@ std = [
|
||||
"pallet-minimal-template/std",
|
||||
|
||||
"sp-genesis-builder/std",
|
||||
"sp-runtime/std",
|
||||
"substrate-wasm-builder",
|
||||
]
|
||||
|
||||
+1
-5
@@ -18,10 +18,6 @@
|
||||
fn main() {
|
||||
#[cfg(feature = "std")]
|
||||
{
|
||||
substrate_wasm_builder::WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.export_heap_base()
|
||||
.import_memory()
|
||||
.build();
|
||||
substrate_wasm_builder::WasmBuilder::build_using_defaults();
|
||||
}
|
||||
}
|
||||
|
||||
+15
-11
@@ -23,7 +23,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
use frame::{
|
||||
deps::frame_support::{
|
||||
genesis_builder_helper::{build_config, create_default_config},
|
||||
genesis_builder_helper::{build_state, get_preset},
|
||||
weights::{FixedFee, NoFee},
|
||||
},
|
||||
prelude::*,
|
||||
@@ -83,7 +83,7 @@ parameter_types! {
|
||||
pub const Version: RuntimeVersion = VERSION;
|
||||
}
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig as frame_system::DefaultConfig)]
|
||||
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig)]
|
||||
impl frame_system::Config for Runtime {
|
||||
type Block = Block;
|
||||
type Version = Version;
|
||||
@@ -91,20 +91,20 @@ impl frame_system::Config for Runtime {
|
||||
type AccountData = pallet_balances::AccountData<<Runtime as pallet_balances::Config>::Balance>;
|
||||
}
|
||||
|
||||
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)]
|
||||
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
|
||||
impl pallet_balances::Config for Runtime {
|
||||
type AccountStore = System;
|
||||
}
|
||||
|
||||
#[derive_impl(pallet_sudo::config_preludes::TestDefaultConfig as pallet_sudo::DefaultConfig)]
|
||||
#[derive_impl(pallet_sudo::config_preludes::TestDefaultConfig)]
|
||||
impl pallet_sudo::Config for Runtime {}
|
||||
|
||||
#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig as pallet_timestamp::DefaultConfig)]
|
||||
#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig)]
|
||||
impl pallet_timestamp::Config for Runtime {}
|
||||
|
||||
#[derive_impl(pallet_transaction_payment::config_preludes::TestDefaultConfig as pallet_transaction_payment::DefaultConfig)]
|
||||
#[derive_impl(pallet_transaction_payment::config_preludes::TestDefaultConfig)]
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
|
||||
type WeightToFee = NoFee<<Self as pallet_balances::Config>::Balance>;
|
||||
type LengthToFee = FixedFee<1, <Self as pallet_balances::Config>::Balance>;
|
||||
}
|
||||
@@ -221,12 +221,16 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||
fn create_default_config() -> Vec<u8> {
|
||||
create_default_config::<RuntimeGenesisConfig>()
|
||||
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_state::<RuntimeGenesisConfig>(config)
|
||||
}
|
||||
|
||||
fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_config::<RuntimeGenesisConfig>(config)
|
||||
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
|
||||
get_preset::<RuntimeGenesisConfig>(id, |_| None)
|
||||
}
|
||||
|
||||
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
||||
vec![]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user