mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-24 19:27:57 +00:00
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "test-node-runtime"
|
||||
version = "2.0.0-rc5"
|
||||
version = "2.0.0"
|
||||
authors = ["Anonymous"]
|
||||
edition = "2018"
|
||||
license = "Unlicense"
|
||||
@@ -13,43 +13,47 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
|
||||
|
||||
aura = { version = "2.0.0-rc5", default-features = false, package = "pallet-aura" }
|
||||
balances = { version = "2.0.0-rc5", default-features = false, package = "pallet-balances" }
|
||||
frame-support = { version = "2.0.0-rc5", default-features = false }
|
||||
grandpa = { version = "2.0.0-rc5", default-features = false, package = "pallet-grandpa" }
|
||||
randomness-collective-flip = { version = "2.0.0-rc5", default-features = false, package = "pallet-randomness-collective-flip" }
|
||||
sudo = { version = "2.0.0-rc5", default-features = false, package = "pallet-sudo" }
|
||||
system = { version = "2.0.0-rc5", default-features = false, package = "frame-system" }
|
||||
timestamp = { version = "2.0.0-rc5", default-features = false, package = "pallet-timestamp" }
|
||||
transaction-payment = { version = "2.0.0-rc5", default-features = false, package = "pallet-transaction-payment" }
|
||||
frame-executive = { version = "2.0.0-rc5", default-features = false }
|
||||
serde = { version = "1.0.114", optional = true, features = ["derive"] }
|
||||
sp-api = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-block-builder = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-consensus-aura = { version = "0.8.0-rc5", default-features = false }
|
||||
sp-core = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-inherents = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-io = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-offchain = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-runtime = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-session = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-std = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-transaction-pool = { version = "2.0.0-rc5", default-features = false }
|
||||
sp-version = { version = "2.0.0-rc5", default-features = false }
|
||||
frame-executive = { version = "2.0.0-rc6", default-features = false }
|
||||
frame-support = { version = "2.0.0-rc6", default-features = false }
|
||||
frame-system = { version = "2.0.0-rc6", default-features = false }
|
||||
pallet-aura = { version = "2.0.0-rc6", default-features = false }
|
||||
pallet-balances = { version = "2.0.0-rc6", default-features = false }
|
||||
pallet-grandpa = { version = "2.0.0-rc6", default-features = false }
|
||||
pallet-randomness-collective-flip = { version = "2.0.0-rc6", default-features = false }
|
||||
pallet-sudo = { version = "2.0.0-rc6", default-features = false }
|
||||
pallet-timestamp = { version = "2.0.0-rc6", default-features = false }
|
||||
pallet-transaction-payment = { version = "2.0.0-rc6", default-features = false }
|
||||
serde = { version = "1.0.115", optional = true, features = ["derive"] }
|
||||
sp-api = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-block-builder = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-consensus-aura = { version = "0.8.0-rc6", default-features = false }
|
||||
sp-core = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-inherents = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-io = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-offchain = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-runtime = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-session = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-std = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-transaction-pool = { version = "2.0.0-rc6", default-features = false }
|
||||
sp-version = { version = "2.0.0-rc6", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner" }
|
||||
substrate-wasm-builder-runner = "1.0.6"
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"aura/std",
|
||||
"balances/std",
|
||||
"codec/std",
|
||||
"frame-executive/std",
|
||||
"frame-support/std",
|
||||
"grandpa/std",
|
||||
"randomness-collective-flip/std",
|
||||
"frame-system/std",
|
||||
"pallet-aura/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-grandpa/std",
|
||||
"pallet-randomness-collective-flip/std",
|
||||
"pallet-sudo/std",
|
||||
"pallet-timestamp/std",
|
||||
"pallet-transaction-payment/std",
|
||||
"serde",
|
||||
"sp-api/std",
|
||||
"sp-block-builder/std",
|
||||
@@ -63,8 +67,4 @@ std = [
|
||||
"sp-std/std",
|
||||
"sp-transaction-pool/std",
|
||||
"sp-version/std",
|
||||
"sudo/std",
|
||||
"system/std",
|
||||
"timestamp/std",
|
||||
"transaction-payment/std",
|
||||
]
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use wasm_builder_runner::WasmBuilder;
|
||||
use substrate_wasm_builder_runner::WasmBuilder;
|
||||
|
||||
fn main() {
|
||||
WasmBuilder::new()
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||
#![recursion_limit = "256"]
|
||||
#![allow(clippy::large_enum_variant)]
|
||||
|
||||
// Make the WASM binary available.
|
||||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
use grandpa::{
|
||||
use pallet_grandpa::{
|
||||
fg_primitives,
|
||||
AuthorityId as GrandpaId,
|
||||
AuthorityList as GrandpaAuthorityList,
|
||||
@@ -61,7 +62,6 @@ use sp_version::NativeVersion;
|
||||
use sp_version::RuntimeVersion;
|
||||
|
||||
// A few exports that help ease life for downstream crates.
|
||||
pub use balances::Call as BalancesCall;
|
||||
pub use frame_support::{
|
||||
construct_runtime,
|
||||
parameter_types,
|
||||
@@ -81,13 +81,14 @@ pub use frame_support::{
|
||||
},
|
||||
StorageValue,
|
||||
};
|
||||
pub use pallet_balances::Call as BalancesCall;
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
pub use sp_runtime::{
|
||||
Perbill,
|
||||
Permill,
|
||||
};
|
||||
pub use timestamp::Call as TimestampCall;
|
||||
|
||||
/// An index to a block.
|
||||
pub type BlockNumber = u32;
|
||||
@@ -180,7 +181,7 @@ parameter_types! {
|
||||
pub const Version: RuntimeVersion = VERSION;
|
||||
}
|
||||
|
||||
impl system::Trait for Runtime {
|
||||
impl frame_system::Trait for Runtime {
|
||||
/// The basic call filter to use in dispatchable.
|
||||
type BaseCallFilter = ();
|
||||
/// The identifier used to distinguish between accounts.
|
||||
@@ -234,16 +235,16 @@ impl system::Trait for Runtime {
|
||||
/// What to do if an account is fully reaped from the system.
|
||||
type OnKilledAccount = ();
|
||||
/// The data to be stored in an account.
|
||||
type AccountData = balances::AccountData<Balance>;
|
||||
type AccountData = pallet_balances::AccountData<Balance>;
|
||||
/// Weight information for the extrinsics of this pallet.
|
||||
type SystemWeightInfo = ();
|
||||
}
|
||||
|
||||
impl aura::Trait for Runtime {
|
||||
impl pallet_aura::Trait for Runtime {
|
||||
type AuthorityId = AuraId;
|
||||
}
|
||||
|
||||
impl grandpa::Trait for Runtime {
|
||||
impl pallet_grandpa::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
|
||||
@@ -264,7 +265,7 @@ parameter_types! {
|
||||
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
|
||||
}
|
||||
|
||||
impl timestamp::Trait for Runtime {
|
||||
impl pallet_timestamp::Trait for Runtime {
|
||||
/// A timestamp: milliseconds since the unix epoch.
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = Aura;
|
||||
@@ -276,7 +277,7 @@ parameter_types! {
|
||||
pub const ExistentialDeposit: u128 = 500;
|
||||
}
|
||||
|
||||
impl balances::Trait for Runtime {
|
||||
impl pallet_balances::Trait for Runtime {
|
||||
/// The type for recording an account's balance.
|
||||
type Balance = Balance;
|
||||
/// The ubiquitous event type.
|
||||
@@ -291,15 +292,15 @@ parameter_types! {
|
||||
pub const TransactionByteFee: Balance = 1;
|
||||
}
|
||||
|
||||
impl transaction_payment::Trait for Runtime {
|
||||
type Currency = balances::Module<Runtime>;
|
||||
impl pallet_transaction_payment::Trait for Runtime {
|
||||
type Currency = pallet_balances::Module<Runtime>;
|
||||
type OnTransactionPayment = ();
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = IdentityFee<Balance>;
|
||||
type FeeMultiplierUpdate = ();
|
||||
}
|
||||
|
||||
impl sudo::Trait for Runtime {
|
||||
impl pallet_sudo::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
}
|
||||
@@ -310,14 +311,14 @@ construct_runtime!(
|
||||
NodeBlock = opaque::Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system::{Module, Call, Config, Storage, Event<T>},
|
||||
RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
|
||||
Timestamp: timestamp::{Module, Call, Storage, Inherent},
|
||||
Aura: aura::{Module, Config<T>, Inherent},
|
||||
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
|
||||
Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},
|
||||
TransactionPayment: transaction_payment::{Module, Storage},
|
||||
Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},
|
||||
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
||||
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
||||
Aura: pallet_aura::{Module, Config<T>, Inherent},
|
||||
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
|
||||
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
||||
Sudo: pallet_sudo::{Module, Call, Config<T>, Storage, Event<T>},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -333,13 +334,13 @@ pub type SignedBlock = generic::SignedBlock<Block>;
|
||||
pub type BlockId = generic::BlockId<Block>;
|
||||
/// The SignedExtension to the basic transaction logic.
|
||||
pub type SignedExtra = (
|
||||
system::CheckSpecVersion<Runtime>,
|
||||
system::CheckTxVersion<Runtime>,
|
||||
system::CheckGenesis<Runtime>,
|
||||
system::CheckEra<Runtime>,
|
||||
system::CheckNonce<Runtime>,
|
||||
system::CheckWeight<Runtime>,
|
||||
transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
frame_system::CheckGenesis<Runtime>,
|
||||
frame_system::CheckEra<Runtime>,
|
||||
frame_system::CheckNonce<Runtime>,
|
||||
frame_system::CheckWeight<Runtime>,
|
||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||
);
|
||||
/// Unchecked extrinsic type as expected by this runtime.
|
||||
pub type UncheckedExtrinsic =
|
||||
@@ -350,7 +351,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExt
|
||||
pub type Executive = frame_executive::Executive<
|
||||
Runtime,
|
||||
Block,
|
||||
system::ChainContext<Runtime>,
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllModules,
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user