mirror of
https://github.com/pezkuwichain/pez-solochain-template.git
synced 2026-04-22 02:08:04 +00:00
Update template triggered by workflow_dispatch
This commit is contained in:
Generated
+1124
-867
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -46,12 +46,13 @@ default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic
|
|||||||
polkavm = "0.9.3"
|
polkavm = "0.9.3"
|
||||||
polkavm-linker = "0.9.2"
|
polkavm-linker = "0.9.2"
|
||||||
polkavm-derive = "0.9.1"
|
polkavm-derive = "0.9.1"
|
||||||
log = { version = "0.4.20", default-features = false }
|
log = { version = "0.4.21", default-features = false }
|
||||||
quote = { version = "1.0.33" }
|
quote = { version = "1.0.33" }
|
||||||
serde = { version = "1.0.197", default-features = false }
|
serde = { version = "1.0.197", default-features = false }
|
||||||
serde-big-array = { version = "0.3.2" }
|
serde-big-array = { version = "0.3.2" }
|
||||||
serde_derive = { version = "1.0.117" }
|
serde_derive = { version = "1.0.117" }
|
||||||
serde_json = { version = "1.0.114", default-features = false }
|
serde_json = { version = "1.0.114", default-features = false }
|
||||||
serde_yaml = { version = "0.9" }
|
serde_yaml = { version = "0.9" }
|
||||||
syn = { version = "2.0.50" }
|
syn = { version = "2.0.53" }
|
||||||
thiserror = { version = "1.0.48" }
|
thiserror = { version = "1.0.48" }
|
||||||
|
tracing-subscriber = { version = "0.3.18" }
|
||||||
|
|||||||
+33
-37
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solochain-template-node"
|
name = "solochain-template-node"
|
||||||
description = "A solochain node template built with Substrate, part of Polkadot Sdk. (polkadot v1.9.0)"
|
description = "A solochain node template built with Substrate, part of Polkadot Sdk. (polkadot v1.11.0)"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
license = "MIT-0"
|
license = "MIT-0"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
@@ -18,45 +18,42 @@ workspace = true
|
|||||||
targets = ["x86_64-unknown-linux-gnu"]
|
targets = ["x86_64-unknown-linux-gnu"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5.1", features = ["derive"] }
|
clap = { version = "4.5.3", features = ["derive"] }
|
||||||
futures = { version = "0.3.21", features = ["thread-pool"] }
|
futures = { version = "0.3.30", features = ["thread-pool"] }
|
||||||
serde_json = { workspace = true, default-features = true }
|
serde_json = { workspace = true, default-features = true }
|
||||||
jsonrpsee = { version = "0.22", features = ["server"] }
|
jsonrpsee = { version = "0.22", features = ["server"] }
|
||||||
sc-cli = { version = "0.39.0" }
|
sc-cli = { version = "0.41.0" }
|
||||||
sp-core = { version = "31.0.0" }
|
sp-core = { version = "32.0.0" }
|
||||||
sc-executor = { version = "0.35.0" }
|
sc-executor = { version = "0.37.0" }
|
||||||
sc-network = { version = "0.37.0" }
|
sc-network = { version = "0.39.0" }
|
||||||
sc-service = { version = "0.38.0" }
|
sc-service = { version = "0.40.0" }
|
||||||
sc-telemetry = { version = "17.0.0" }
|
sc-telemetry = { version = "19.0.0" }
|
||||||
sc-transaction-pool = { version = "31.0.0" }
|
sc-transaction-pool = { version = "33.0.0" }
|
||||||
sc-transaction-pool-api = { version = "31.0.0" }
|
sc-transaction-pool-api = { version = "33.0.0" }
|
||||||
sc-offchain = { version = "32.0.0" }
|
sc-offchain = { version = "34.0.0" }
|
||||||
sc-consensus-aura = { version = "0.37.0" }
|
sc-consensus-aura = { version = "0.39.0" }
|
||||||
sp-consensus-aura = { version = "0.35.0" }
|
sp-consensus-aura = { version = "0.37.0" }
|
||||||
sc-consensus = { version = "0.36.0" }
|
sc-consensus = { version = "0.38.0" }
|
||||||
sc-consensus-grandpa = { version = "0.22.0" }
|
sc-consensus-grandpa = { version = "0.24.0" }
|
||||||
sp-consensus-grandpa = { version = "16.0.0" }
|
sp-consensus-grandpa = { version = "18.0.0" }
|
||||||
sc-client-api = { version = "31.0.0" }
|
sc-client-api = { version = "33.0.0" }
|
||||||
sc-rpc-api = { version = "0.36.0" }
|
sc-rpc-api = { version = "0.38.0" }
|
||||||
sc-basic-authorship = { version = "0.37.0" }
|
sc-basic-authorship = { version = "0.39.0" }
|
||||||
sp-runtime = { version = "34.0.0" }
|
sp-runtime = { version = "36.0.0" }
|
||||||
sp-io = { version = "33.0.0" }
|
sp-io = { version = "35.0.0" }
|
||||||
sp-timestamp = { version = "29.0.0" }
|
sp-timestamp = { version = "31.0.0" }
|
||||||
sp-inherents = { version = "29.0.0" }
|
sp-inherents = { version = "31.0.0" }
|
||||||
sp-keyring = { version = "34.0.0" }
|
sp-keyring = { version = "36.0.0" }
|
||||||
sp-api = { version = "29.0.0" }
|
sp-api = { version = "31.0.0" }
|
||||||
sp-blockchain = { version = "31.0.0" }
|
sp-blockchain = { version = "33.0.0" }
|
||||||
sp-block-builder = { version = "29.0.0" }
|
sp-block-builder = { version = "31.0.0" }
|
||||||
frame-system = { version = "31.0.0" }
|
frame-system = { version = "33.0.0" }
|
||||||
pallet-transaction-payment = { version = "31.0.0", default-features = false }
|
pallet-transaction-payment = { version = "33.0.0", default-features = false }
|
||||||
pallet-transaction-payment-rpc = { version = "33.0.0" }
|
pallet-transaction-payment-rpc = { version = "35.0.0" }
|
||||||
substrate-frame-rpc-system = { version = "31.0.0" }
|
substrate-frame-rpc-system = { version = "33.0.0" }
|
||||||
frame-benchmarking-cli = { version = "35.0.1" }
|
frame-benchmarking-cli = { version = "37.0.0" }
|
||||||
solochain-template-runtime = { version = "0.1.0", path = "../runtime" }
|
solochain-template-runtime = { version = "0.1.0", path = "../runtime" }
|
||||||
|
|
||||||
# CLI-specific dependencies
|
|
||||||
try-runtime-cli = { version = "0.41.0", optional = true }
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
substrate-build-script-utils = { version = "11.0.0" }
|
substrate-build-script-utils = { version = "11.0.0" }
|
||||||
|
|
||||||
@@ -77,5 +74,4 @@ try-runtime = [
|
|||||||
"pallet-transaction-payment/try-runtime",
|
"pallet-transaction-payment/try-runtime",
|
||||||
"solochain-template-runtime/try-runtime",
|
"solochain-template-runtime/try-runtime",
|
||||||
"sp-runtime/try-runtime",
|
"sp-runtime/try-runtime",
|
||||||
"try-runtime-cli/try-runtime",
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -41,11 +41,6 @@ pub enum Subcommand {
|
|||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||||
|
|
||||||
/// Try-runtime has migrated to a standalone CLI
|
|
||||||
/// (<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
|
||||||
/// deprecation notice. It will be removed entirely some time after January 2024.
|
|
||||||
TryRuntime,
|
|
||||||
|
|
||||||
/// Db meta columns information.
|
/// Db meta columns information.
|
||||||
ChainInfo(sc_cli::ChainInfoCmd),
|
ChainInfo(sc_cli::ChainInfoCmd),
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-8
@@ -117,7 +117,9 @@ pub fn run() -> sc_cli::Result<()> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.run::<sp_runtime::traits::HashingFor<Block>, ()>(config)
|
cmd.run_with_spec::<sp_runtime::traits::HashingFor<Block>, ()>(Some(
|
||||||
|
config.chain_spec,
|
||||||
|
))
|
||||||
},
|
},
|
||||||
BenchmarkCmd::Block(cmd) => {
|
BenchmarkCmd::Block(cmd) => {
|
||||||
let PartialComponents { client, .. } = service::new_partial(&config)?;
|
let PartialComponents { client, .. } = service::new_partial(&config)?;
|
||||||
@@ -168,12 +170,6 @@ pub fn run() -> sc_cli::Result<()> {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
#[cfg(feature = "try-runtime")]
|
|
||||||
Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.into()),
|
|
||||||
#[cfg(not(feature = "try-runtime"))]
|
|
||||||
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \
|
|
||||||
You can enable it with `--features try-runtime`."
|
|
||||||
.into()),
|
|
||||||
Some(Subcommand::ChainInfo(cmd)) => {
|
Some(Subcommand::ChainInfo(cmd)) => {
|
||||||
let runner = cli.create_runner(cmd)?;
|
let runner = cli.create_runner(cmd)?;
|
||||||
runner.sync_run(|config| cmd.run::<Block>(&config))
|
runner.sync_run(|config| cmd.run::<Block>(&config))
|
||||||
@@ -181,7 +177,18 @@ pub fn run() -> sc_cli::Result<()> {
|
|||||||
None => {
|
None => {
|
||||||
let runner = cli.create_runner(&cli.run)?;
|
let runner = cli.create_runner(&cli.run)?;
|
||||||
runner.run_node_until_exit(|config| async move {
|
runner.run_node_until_exit(|config| async move {
|
||||||
service::new_full(config).map_err(sc_cli::Error::Service)
|
match config.network.network_backend {
|
||||||
|
sc_network::config::NetworkBackendType::Libp2p => service::new_full::<
|
||||||
|
sc_network::NetworkWorker<
|
||||||
|
solochain_template_runtime::opaque::Block,
|
||||||
|
<solochain_template_runtime::opaque::Block as sp_runtime::traits::Block>::Hash,
|
||||||
|
>,
|
||||||
|
>(config)
|
||||||
|
.map_err(sc_cli::Error::Service),
|
||||||
|
sc_network::config::NetworkBackendType::Litep2p =>
|
||||||
|
service::new_full::<sc_network::Litep2pNetworkBackend>(config)
|
||||||
|
.map_err(sc_cli::Error::Service),
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-5
@@ -124,7 +124,11 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Builds a new service for a full client.
|
/// Builds a new service for a full client.
|
||||||
pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
pub fn new_full<
|
||||||
|
N: sc_network::NetworkBackend<Block, <Block as sp_runtime::traits::Block>::Hash>,
|
||||||
|
>(
|
||||||
|
config: Configuration,
|
||||||
|
) -> Result<TaskManager, ServiceError> {
|
||||||
let sc_service::PartialComponents {
|
let sc_service::PartialComponents {
|
||||||
client,
|
client,
|
||||||
backend,
|
backend,
|
||||||
@@ -136,14 +140,24 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
|||||||
other: (block_import, grandpa_link, mut telemetry),
|
other: (block_import, grandpa_link, mut telemetry),
|
||||||
} = new_partial(&config)?;
|
} = new_partial(&config)?;
|
||||||
|
|
||||||
let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network);
|
let mut net_config = sc_network::config::FullNetworkConfiguration::<
|
||||||
|
Block,
|
||||||
|
<Block as sp_runtime::traits::Block>::Hash,
|
||||||
|
N,
|
||||||
|
>::new(&config.network);
|
||||||
|
let metrics = N::register_notification_metrics(config.prometheus_registry());
|
||||||
|
|
||||||
|
let peer_store_handle = net_config.peer_store_handle();
|
||||||
let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name(
|
let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name(
|
||||||
&client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"),
|
&client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"),
|
||||||
&config.chain_spec,
|
&config.chain_spec,
|
||||||
);
|
);
|
||||||
let (grandpa_protocol_config, grandpa_notification_service) =
|
let (grandpa_protocol_config, grandpa_notification_service) =
|
||||||
sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone());
|
sc_consensus_grandpa::grandpa_peers_set_config::<_, N>(
|
||||||
|
grandpa_protocol_name.clone(),
|
||||||
|
metrics.clone(),
|
||||||
|
peer_store_handle,
|
||||||
|
);
|
||||||
net_config.add_notification_protocol(grandpa_protocol_config);
|
net_config.add_notification_protocol(grandpa_protocol_config);
|
||||||
|
|
||||||
let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new(
|
let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new(
|
||||||
@@ -163,6 +177,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
|||||||
block_announce_validator_builder: None,
|
block_announce_validator_builder: None,
|
||||||
warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)),
|
warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)),
|
||||||
block_relay: None,
|
block_relay: None,
|
||||||
|
metrics,
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
if config.offchain_worker.enabled {
|
if config.offchain_worker.enabled {
|
||||||
@@ -177,7 +192,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
|||||||
transaction_pool: Some(OffchainTransactionPoolFactory::new(
|
transaction_pool: Some(OffchainTransactionPoolFactory::new(
|
||||||
transaction_pool.clone(),
|
transaction_pool.clone(),
|
||||||
)),
|
)),
|
||||||
network_provider: network.clone(),
|
network_provider: Arc::new(network.clone()),
|
||||||
enable_http_requests: true,
|
enable_http_requests: true,
|
||||||
custom_extensions: |_| vec![],
|
custom_extensions: |_| vec![],
|
||||||
})
|
})
|
||||||
@@ -205,7 +220,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
|
let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
|
||||||
network: network.clone(),
|
network: Arc::new(network.clone()),
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
keystore: keystore_container.keystore(),
|
keystore: keystore_container.keystore(),
|
||||||
task_manager: &mut task_manager,
|
task_manager: &mut task_manager,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pallet-template"
|
name = "pallet-template"
|
||||||
description = "FRAME pallet template for defining custom runtime logic. (polkadot v1.9.0)"
|
description = "FRAME pallet template for defining custom runtime logic. (polkadot v1.11.0)"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
license = "MIT-0"
|
license = "MIT-0"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
@@ -19,19 +19,19 @@ targets = ["x86_64-unknown-linux-gnu"]
|
|||||||
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
|
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
|
||||||
"derive",
|
"derive",
|
||||||
] }
|
] }
|
||||||
scale-info = { version = "2.10.0", default-features = false, features = [
|
scale-info = { version = "2.11.1", default-features = false, features = [
|
||||||
"derive",
|
"derive",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
# frame deps
|
# frame deps
|
||||||
frame-benchmarking = { version = "31.0.0", default-features = false, optional = true }
|
frame-benchmarking = { version = "33.0.0", default-features = false, optional = true }
|
||||||
frame-support = { version = "31.0.0", default-features = false }
|
frame-support = { version = "33.0.0", default-features = false }
|
||||||
frame-system = { version = "31.0.0", default-features = false }
|
frame-system = { version = "33.0.0", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
sp-core = { version = "31.0.0" }
|
sp-core = { version = "32.0.0" }
|
||||||
sp-io = { version = "33.0.0" }
|
sp-io = { version = "35.0.0" }
|
||||||
sp-runtime = { version = "34.0.0" }
|
sp-runtime = { version = "36.0.0" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ frame_support::construct_runtime!(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
|
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
|
||||||
impl frame_system::Config for Test {
|
impl frame_system::Config for Test {
|
||||||
type BaseCallFilter = frame_support::traits::Everything;
|
type BaseCallFilter = frame_support::traits::Everything;
|
||||||
type BlockWeights = ();
|
type BlockWeights = ();
|
||||||
|
|||||||
+30
-32
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solochain-template-runtime"
|
name = "solochain-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"
|
version = "0.1.0"
|
||||||
license = "MIT-0"
|
license = "MIT-0"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
@@ -19,54 +19,54 @@ targets = ["x86_64-unknown-linux-gnu"]
|
|||||||
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
|
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
|
||||||
"derive",
|
"derive",
|
||||||
] }
|
] }
|
||||||
scale-info = { version = "2.10.0", default-features = false, features = [
|
scale-info = { version = "2.11.1", default-features = false, features = [
|
||||||
"derive",
|
"derive",
|
||||||
"serde",
|
"serde",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
# frame
|
# frame
|
||||||
frame-support = { version = "31.0.0", default-features = false, features = ["experimental"] }
|
frame-support = { version = "33.0.0", default-features = false, features = ["experimental"] }
|
||||||
frame-system = { version = "31.0.0", default-features = false }
|
frame-system = { version = "33.0.0", default-features = false }
|
||||||
frame-try-runtime = { version = "0.37.0", default-features = false, optional = true }
|
frame-try-runtime = { version = "0.39.0", default-features = false, optional = true }
|
||||||
frame-executive = { version = "31.0.0", default-features = false }
|
frame-executive = { version = "33.0.0", default-features = false }
|
||||||
|
|
||||||
# frame pallets
|
# frame pallets
|
||||||
pallet-aura = { version = "30.0.0", default-features = false }
|
pallet-aura = { version = "32.0.0", default-features = false }
|
||||||
pallet-balances = { version = "31.0.0", default-features = false }
|
pallet-balances = { version = "34.0.0", default-features = false }
|
||||||
pallet-grandpa = { version = "31.0.0", default-features = false }
|
pallet-grandpa = { version = "33.0.0", default-features = false }
|
||||||
pallet-sudo = { version = "31.0.0", default-features = false }
|
pallet-sudo = { version = "33.0.0", default-features = false }
|
||||||
pallet-timestamp = { version = "30.0.0", default-features = false }
|
pallet-timestamp = { version = "32.0.0", default-features = false }
|
||||||
pallet-transaction-payment = { version = "31.0.0", default-features = false }
|
pallet-transaction-payment = { version = "33.0.0", default-features = false }
|
||||||
|
|
||||||
# primitives
|
# primitives
|
||||||
sp-api = { version = "29.0.0", default-features = false }
|
sp-api = { version = "31.0.0", default-features = false }
|
||||||
sp-block-builder = { version = "29.0.0", default-features = false }
|
sp-block-builder = { version = "31.0.0", default-features = false }
|
||||||
sp-consensus-aura = { version = "0.35.0", default-features = false, features = ["serde"] }
|
sp-consensus-aura = { version = "0.37.0", default-features = false, features = ["serde"] }
|
||||||
sp-consensus-grandpa = { version = "16.0.0", default-features = false, features = ["serde"] }
|
sp-consensus-grandpa = { version = "18.0.0", default-features = false, features = ["serde"] }
|
||||||
sp-core = { version = "31.0.0", default-features = false, features = ["serde"] }
|
sp-core = { version = "32.0.0", default-features = false, features = ["serde"] }
|
||||||
sp-inherents = { version = "29.0.0", default-features = false }
|
sp-inherents = { version = "31.0.0", default-features = false }
|
||||||
sp-offchain = { version = "29.0.0", default-features = false }
|
sp-offchain = { version = "31.0.0", default-features = false }
|
||||||
sp-runtime = { version = "34.0.0", default-features = false, features = ["serde"] }
|
sp-runtime = { version = "36.0.0", default-features = false, features = ["serde"] }
|
||||||
sp-session = { version = "30.0.0", default-features = false }
|
sp-session = { version = "32.0.0", default-features = false }
|
||||||
sp-std = { version = "14.0.0", default-features = false }
|
sp-std = { version = "14.0.0", default-features = false }
|
||||||
sp-storage = { version = "20.0.0", default-features = false }
|
sp-storage = { version = "21.0.0", default-features = false }
|
||||||
sp-transaction-pool = { version = "29.0.0", default-features = false }
|
sp-transaction-pool = { version = "31.0.0", default-features = false }
|
||||||
sp-version = { version = "32.0.0", default-features = false, features = ["serde"] }
|
sp-version = { version = "34.0.0", default-features = false, features = ["serde"] }
|
||||||
sp-genesis-builder = { version = "0.10.0", default-features = false }
|
sp-genesis-builder = { version = "0.12.0", default-features = false }
|
||||||
|
|
||||||
# RPC related
|
# RPC related
|
||||||
frame-system-rpc-runtime-api = { version = "29.0.0", default-features = false }
|
frame-system-rpc-runtime-api = { version = "31.0.0", default-features = false }
|
||||||
pallet-transaction-payment-rpc-runtime-api = { version = "31.0.0", default-features = false }
|
pallet-transaction-payment-rpc-runtime-api = { version = "33.0.0", default-features = false }
|
||||||
|
|
||||||
# Used for runtime benchmarking
|
# Used for runtime benchmarking
|
||||||
frame-benchmarking = { version = "31.0.0", default-features = false, optional = true }
|
frame-benchmarking = { version = "33.0.0", default-features = false, optional = true }
|
||||||
frame-system-benchmarking = { version = "31.0.0", default-features = false, optional = true }
|
frame-system-benchmarking = { version = "33.0.0", default-features = false, optional = true }
|
||||||
|
|
||||||
# The pallet in this template.
|
# The pallet in this template.
|
||||||
pallet-template = { path = "../pallets/template", default-features = false, version = "0.1.0" }
|
pallet-template = { path = "../pallets/template", default-features = false, version = "0.1.0" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
substrate-wasm-builder = { version = "20.0.0", optional = true }
|
substrate-wasm-builder = { version = "22.0.0", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
@@ -137,5 +137,3 @@ try-runtime = [
|
|||||||
"pallet-transaction-payment/try-runtime",
|
"pallet-transaction-payment/try-runtime",
|
||||||
"sp-runtime/try-runtime",
|
"sp-runtime/try-runtime",
|
||||||
]
|
]
|
||||||
|
|
||||||
experimental = ["pallet-aura/experimental"]
|
|
||||||
|
|||||||
+1
-5
@@ -1,10 +1,6 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
{
|
{
|
||||||
substrate_wasm_builder::WasmBuilder::new()
|
substrate_wasm_builder::WasmBuilder::build_using_defaults();
|
||||||
.with_current_project()
|
|
||||||
.export_heap_base()
|
|
||||||
.import_memory()
|
|
||||||
.build();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-11
@@ -18,7 +18,7 @@ use sp_std::prelude::*;
|
|||||||
use sp_version::NativeVersion;
|
use sp_version::NativeVersion;
|
||||||
use sp_version::RuntimeVersion;
|
use sp_version::RuntimeVersion;
|
||||||
|
|
||||||
use frame_support::genesis_builder_helper::{build_config, create_default_config};
|
use frame_support::genesis_builder_helper::{build_state, get_preset};
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
construct_runtime, derive_impl, parameter_types,
|
construct_runtime, derive_impl, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
@@ -36,7 +36,7 @@ pub use frame_support::{
|
|||||||
pub use frame_system::Call as SystemCall;
|
pub use frame_system::Call as SystemCall;
|
||||||
pub use pallet_balances::Call as BalancesCall;
|
pub use pallet_balances::Call as BalancesCall;
|
||||||
pub use pallet_timestamp::Call as TimestampCall;
|
pub use pallet_timestamp::Call as TimestampCall;
|
||||||
use pallet_transaction_payment::{ConstFeeMultiplier, CurrencyAdapter, Multiplier};
|
use pallet_transaction_payment::{ConstFeeMultiplier, FungibleAdapter, Multiplier};
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
pub use sp_runtime::BuildStorage;
|
pub use sp_runtime::BuildStorage;
|
||||||
pub use sp_runtime::{Perbill, Permill};
|
pub use sp_runtime::{Perbill, Permill};
|
||||||
@@ -148,7 +148,7 @@ parameter_types! {
|
|||||||
/// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from
|
/// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from
|
||||||
/// [`SoloChainDefaultConfig`](`struct@frame_system::config_preludes::SolochainDefaultConfig`),
|
/// [`SoloChainDefaultConfig`](`struct@frame_system::config_preludes::SolochainDefaultConfig`),
|
||||||
/// but overridden as needed.
|
/// but overridden as needed.
|
||||||
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig as frame_system::DefaultConfig)]
|
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig)]
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
/// The block type for the runtime.
|
/// The block type for the runtime.
|
||||||
type Block = Block;
|
type Block = Block;
|
||||||
@@ -180,8 +180,6 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<32>;
|
type MaxAuthorities = ConstU32<32>;
|
||||||
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
|
|
||||||
#[cfg(feature = "experimental")]
|
|
||||||
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Runtime>;
|
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +230,7 @@ parameter_types! {
|
|||||||
|
|
||||||
impl pallet_transaction_payment::Config for Runtime {
|
impl pallet_transaction_payment::Config for Runtime {
|
||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;
|
type OnChargeTransaction = FungibleAdapter<Balances, ()>;
|
||||||
type OperationalFeeMultiplier = ConstU8<5>;
|
type OperationalFeeMultiplier = ConstU8<5>;
|
||||||
type WeightToFee = IdentityFee<Balance>;
|
type WeightToFee = IdentityFee<Balance>;
|
||||||
type LengthToFee = IdentityFee<Balance>;
|
type LengthToFee = IdentityFee<Balance>;
|
||||||
@@ -417,7 +415,7 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn authorities() -> Vec<AuraId> {
|
fn authorities() -> Vec<AuraId> {
|
||||||
Aura::authorities().into_inner()
|
pallet_aura::Authorities::<Runtime>::get().into_inner()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,12 +575,16 @@ impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||||
fn create_default_config() -> Vec<u8> {
|
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||||
create_default_config::<RuntimeGenesisConfig>()
|
build_state::<RuntimeGenesisConfig>(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
|
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
|
||||||
build_config::<RuntimeGenesisConfig>(config)
|
get_preset::<RuntimeGenesisConfig>(id, |_| None)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
||||||
|
vec![]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user