mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-04-21 23:47:56 +00:00
Implement CheckedMetadataHashExtension (#211)
This commit is contained in:
@@ -31,6 +31,7 @@ smallvec = "1.11.0"
|
||||
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
|
||||
@@ -20,6 +20,7 @@ smallvec = { workspace = true }
|
||||
# Substrate
|
||||
frame-benchmarking = { workspace = true, optional = true }
|
||||
frame-executive = { workspace = true }
|
||||
frame-metadata-hash-extension = { workspace = true }
|
||||
frame-support = { workspace = true }
|
||||
frame-system = { workspace = true }
|
||||
frame-system-benchmarking = { workspace = true, optional = true }
|
||||
@@ -128,6 +129,7 @@ std = [
|
||||
"fp-self-contained/std",
|
||||
"frame-benchmarking?/std",
|
||||
"frame-executive/std",
|
||||
"frame-metadata-hash-extension/std",
|
||||
"frame-support/std",
|
||||
"frame-system-benchmarking?/std",
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
@@ -185,7 +187,7 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
async-backing = []
|
||||
|
||||
metadata-hash = [ "substrate-wasm-builder/metadata-hash" ]
|
||||
runtime-benchmarks = [
|
||||
"assets-common/runtime-benchmarks",
|
||||
"cumulus-pallet-parachain-system/runtime-benchmarks",
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#[cfg(feature = "std")]
|
||||
#[cfg(all(not(feature = "metadata-hash"), feature = "std"))]
|
||||
fn main() {
|
||||
substrate_wasm_builder::WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.export_heap_base()
|
||||
.import_memory()
|
||||
.build()
|
||||
substrate_wasm_builder::WasmBuilder::build_using_defaults();
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "metadata-hash", feature = "std"))]
|
||||
fn main() {
|
||||
substrate_wasm_builder::WasmBuilder::init_with_defaults()
|
||||
.enable_metadata_hash("UNIT", 12)
|
||||
.build();
|
||||
}
|
||||
|
||||
/// The wasm builder is deactivated when compiling
|
||||
|
||||
@@ -75,6 +75,7 @@ pub type SignedExtra = (
|
||||
frame_system::CheckNonce<Runtime>,
|
||||
frame_system::CheckWeight<Runtime>,
|
||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
|
||||
cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim<Runtime>,
|
||||
);
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ smallvec = "1.11.0"
|
||||
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" }
|
||||
|
||||
@@ -20,6 +20,7 @@ smallvec = { workspace = true }
|
||||
# Substrate
|
||||
frame-benchmarking = { workspace = true, optional = true }
|
||||
frame-executive = { workspace = true }
|
||||
frame-metadata-hash-extension = { workspace = true }
|
||||
frame-support = { workspace = true }
|
||||
frame-system = { workspace = true }
|
||||
frame-system-benchmarking = { workspace = true, optional = true }
|
||||
@@ -105,6 +106,7 @@ std = [
|
||||
"cumulus-primitives-utility/std",
|
||||
"frame-benchmarking?/std",
|
||||
"frame-executive/std",
|
||||
"frame-metadata-hash-extension/std",
|
||||
"frame-support/std",
|
||||
"frame-system-benchmarking?/std",
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
@@ -157,7 +159,7 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
async-backing = []
|
||||
|
||||
metadata-hash = [ "substrate-wasm-builder/metadata-hash" ]
|
||||
runtime-benchmarks = [
|
||||
"assets-common/runtime-benchmarks",
|
||||
"cumulus-pallet-parachain-system/runtime-benchmarks",
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#[cfg(feature = "std")]
|
||||
#[cfg(all(not(feature = "metadata-hash"), feature = "std"))]
|
||||
fn main() {
|
||||
substrate_wasm_builder::WasmBuilder::new()
|
||||
.with_current_project()
|
||||
.export_heap_base()
|
||||
.import_memory()
|
||||
.build()
|
||||
substrate_wasm_builder::WasmBuilder::build_using_defaults();
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "metadata-hash", feature = "std"))]
|
||||
fn main() {
|
||||
substrate_wasm_builder::WasmBuilder::init_with_defaults()
|
||||
.enable_metadata_hash("UNIT", 12)
|
||||
.build();
|
||||
}
|
||||
|
||||
/// The wasm builder is deactivated when compiling
|
||||
|
||||
@@ -70,6 +70,7 @@ pub type SignedExtra = (
|
||||
frame_system::CheckNonce<Runtime>,
|
||||
frame_system::CheckWeight<Runtime>,
|
||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
|
||||
cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim<Runtime>,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user