diff --git a/Cargo.lock b/Cargo.lock index 1babc9b..3336ed6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3893,7 +3893,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minimal-template-node" -version = "0.0.0" +version = "0.1.0" dependencies = [ "clap", "futures", @@ -3928,7 +3928,7 @@ dependencies = [ [[package]] name = "minimal-template-runtime" -version = "0.0.0" +version = "0.1.0" dependencies = [ "pallet-balances", "pallet-minimal-template", @@ -4399,7 +4399,7 @@ dependencies = [ [[package]] name = "pallet-minimal-template" -version = "0.0.0" +version = "0.1.0" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", diff --git a/node/Cargo.toml b/node/Cargo.toml index 428f198..37db97d 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "minimal-template-node" -description = "A minimal Substrate-based Substrate node, ready for hacking." -version = "0.0.0" +description = "A miniaml Substrate-based Substrate node, ready for hacking. (polkadot v1.9.0)" +version = "0.1.0" license = "MIT-0" edition = "2021" publish = false @@ -13,12 +13,11 @@ build = "build.rs" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -clap = { version = "4.5.3", features = ["derive"] } -futures = { version = "0.3.30", features = ["thread-pool"] } +clap = { version = "4.5.1", features = ["derive"] } +futures = { version = "0.3.21", features = ["thread-pool"] } futures-timer = "3.0.1" jsonrpsee = { version = "0.22", features = ["server"] } serde_json = { version = "1.0.114", default-features = true } - sc-cli = { version = "0.39.0" } sc-executor = { version = "0.35.0" } sc-network = { version = "0.37.0" } @@ -32,7 +31,6 @@ sc-rpc-api = { version = "0.36.0" } sc-basic-authorship = { version = "0.37.0" } sc-offchain = { version = "32.0.0" } sc-client-api = { version = "31.0.0" } - sp-timestamp = { version = "29.0.0" } sp-keyring = { version = "34.0.0" } sp-api = { version = "29.0.0" } @@ -40,16 +38,12 @@ sp-blockchain = { version = "31.0.0" } sp-block-builder = { version = "29.0.0" } sp-io = { version = "33.0.0" } sp-runtime = { version = "34.0.0" } - substrate-frame-rpc-system = { version = "31.0.0" } # Once the native runtime is gone, there should be little to no dependency on FRAME here, and # certainly no dependency on the runtime. -polkadot-sdk-frame = { version = "0.1.1", features = [ - "experimental", - "runtime", -] } -runtime = { package = "minimal-template-runtime", path = "../runtime" } +frame = { version = "0.1.1", package = "polkadot-sdk-frame", features = ["experimental", "runtime"] } +runtime = { package = "minimal-template-runtime", path = "../runtime", version = "0.1.0" } [build-dependencies] substrate-build-script-utils = { version = "11.0.0" } diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 7818bb4..5aa3f51 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -45,7 +45,7 @@ pub fn development_config() -> Result { /// Configure initial storage state for FRAME pallets. fn testnet_genesis() -> Value { - use polkadot_sdk_frame::traits::Get; + use frame::traits::Get; use runtime::interface::{Balance, MinimumBalance}; let endowment = >::get().max(1) * 1000; let balances = AccountKeyring::iter() diff --git a/pallets/template/Cargo.toml b/pallets/template/Cargo.toml index eb870fd..0e9a082 100644 --- a/pallets/template/Cargo.toml +++ b/pallets/template/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-minimal-template" -description = "A minimal pallet built with FRAME, part of Polkadot Sdk." -version = "0.0.0" +description = "A minimal pallet built with FRAME, part of Polkadot Sdk. (polkadot v1.9.0)" +version = "0.1.0" license = "MIT-0" edition = "2021" publish = false @@ -15,15 +15,12 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive", ], default-features = false } -scale-info = { version = "2.11.1", default-features = false, features = [ +scale-info = { version = "2.10.0", default-features = false, features = [ "derive", ] } -polkadot-sdk-frame = { version = "0.1.1", default-features = false, features = [ - "experimental", - "runtime", -] } +frame = { version = "0.1.1", package = "polkadot-sdk-frame", default-features = false, features = ["experimental", "runtime"] } [features] default = ["std"] -std = ["codec/std", "polkadot-sdk-frame/std", "scale-info/std"] +std = ["codec/std", "frame/std", "scale-info/std"] diff --git a/pallets/template/src/lib.rs b/pallets/template/src/lib.rs index d407d64..6e9917c 100644 --- a/pallets/template/src/lib.rs +++ b/pallets/template/src/lib.rs @@ -1,13 +1,13 @@ -//! A shell pallet built with [`polkadot_sdk_frame`]. +//! A shell pallet built with [`frame`]. #![cfg_attr(not(feature = "std"), no_std)] -use polkadot_sdk_frame::prelude::*; +use frame::prelude::*; // Re-export all pallet parts, this is needed to properly import the pallet into the runtime. pub use pallet::*; -#[polkadot_sdk_frame::pallet] +#[frame::pallet] pub mod pallet { use super::*; diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 17bcb17..d93d07a 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "minimal-template-runtime" -description = "A solochain runtime template built with Substrate, part of Polkadot Sdk." -version = "0.0.0" +description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.9.0)" +version = "0.1.0" license = "MIT-0" edition = "2021" publish = false @@ -13,10 +13,7 @@ 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. -polkadot-sdk-frame = { version = "0.1.1", default-features = false, features = [ - "experimental", - "runtime", -] } +frame = { version = "0.1.1", 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 } @@ -25,11 +22,11 @@ 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 } -# genesis builder that allows us to interact with runtime genesis config +# genesis builder that allows us to interacto with runtime genesis config sp-genesis-builder = { version = "0.10.0", default-features = false } # local pallet templates -pallet-minimal-template = { path = "../pallets/template", default-features = false } +pallet-minimal-template = { path = "../pallets/template", default-features = false, version = "0.1.0" } [build-dependencies] substrate-wasm-builder = { version = "20.0.0", optional = true } @@ -40,7 +37,7 @@ std = [ "parity-scale-codec/std", "scale-info/std", - "polkadot-sdk-frame/std", + "frame/std", "pallet-balances/std", "pallet-sudo/std", diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 09dfe16..da22c8f 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -21,7 +21,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -use polkadot_sdk_frame::{ +use frame::{ deps::frame_support::{ genesis_builder_helper::{build_config, create_default_config}, weights::{FixedFee, NoFee}, @@ -86,7 +86,7 @@ parameter_types! { pub const Version: RuntimeVersion = VERSION; } -#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig)] +#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { type Block = Block; type Version = Version; @@ -94,18 +94,18 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData<::Balance>; } -#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)] +#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig as pallet_balances::DefaultConfig)] impl pallet_balances::Config for Runtime { type AccountStore = System; } -#[derive_impl(pallet_sudo::config_preludes::TestDefaultConfig)] +#[derive_impl(pallet_sudo::config_preludes::TestDefaultConfig as pallet_sudo::DefaultConfig)] impl pallet_sudo::Config for Runtime {} -#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig)] +#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig as pallet_timestamp::DefaultConfig)] impl pallet_timestamp::Config for Runtime {} -#[derive_impl(pallet_transaction_payment::config_preludes::TestDefaultConfig)] +#[derive_impl(pallet_transaction_payment::config_preludes::TestDefaultConfig as pallet_transaction_payment::DefaultConfig)] impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; type WeightToFee = NoFee<::Balance>; @@ -114,7 +114,7 @@ impl pallet_transaction_payment::Config for Runtime { impl pallet_minimal_template::Config for Runtime {} -type Block = polkadot_sdk_frame::runtime::types_common::BlockOf; +type Block = frame::runtime::types_common::BlockOf; type Header = HeaderFor; type RuntimeExecutive = @@ -241,10 +241,10 @@ impl_runtime_apis! { // https://github.com/paritytech/substrate/issues/10579#issuecomment-1600537558 pub mod interface { use super::Runtime; - use polkadot_sdk_frame::deps::frame_system; + use frame::deps::frame_system; pub type Block = super::Block; - pub use polkadot_sdk_frame::runtime::types_common::OpaqueBlock; + pub use frame::runtime::types_common::OpaqueBlock; pub type AccountId = ::AccountId; pub type Nonce = ::Nonce; pub type Hash = ::Hash;