diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c6d92304..77cf4b5ad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] + +### Added + +- Add pallet BlackHole to Kusama AssetHub following [WFC #539](https://kusama.subsquare.io/referenda/539) + ## [1.6.1] 24.06.2025 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 6a1f7dd535..2607f55a59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -870,6 +870,7 @@ dependencies = [ "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", + "fc-pallet-black-hole", "frame-benchmarking", "frame-executive", "frame-metadata-hash-extension", @@ -4417,7 +4418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4543,6 +4544,17 @@ dependencies = [ "bytes", ] +[[package]] +name = "fc-pallet-black-hole" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc8c64326a559c7bb1c4a0d13dadfb39def99c3085dfda5f676b3431ee7556a" +dependencies = [ + "parity-scale-codec", + "polkadot-sdk-frame", + "scale-info", +] + [[package]] name = "ff" version = "0.13.1" @@ -6216,7 +6228,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi 0.5.1", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11493,7 +11505,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -12043,7 +12055,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -12056,7 +12068,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -12156,7 +12168,7 @@ dependencies = [ "security-framework 3.2.0", "security-framework-sys", "webpki-root-certs 0.26.11", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -15501,7 +15513,7 @@ dependencies = [ "getrandom 0.3.3", "once_cell", "rustix 1.0.7", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -16835,7 +16847,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d18bca61da..e2f48cc500 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,6 +61,7 @@ encointer-balances-tx-payment-rpc-runtime-api = { version = "~16.1.0", default-f encointer-kusama-runtime = { path = "system-parachains/encointer" } encointer-primitives = { version = "~16.4.0", default-features = false } enumflags2 = { version = "0.7.7" } +fc-pallet-black-hole = { version = "1.0.0", default-features = false } frame-benchmarking = { version = "40.2.0", default-features = false } frame-election-provider-support = { version = "40.1.1", default-features = false } frame-executive = { version = "40.0.1", default-features = false } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index f9afce5ede..b7ce266bec 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -103,6 +103,9 @@ assets-common = { workspace = true } pallet-xcm-bridge-hub-router = { workspace = true } snowbridge-inbound-queue-primitives = { workspace = true } +# Frame contrib +fc-pallet-black-hole = { workspace = true } + [dev-dependencies] asset-test-utils = { workspace = true } parachains-runtimes-test-utils = { workspace = true } @@ -124,6 +127,7 @@ runtime-benchmarks = [ "cumulus-pallet-xcmp-queue/runtime-benchmarks", "cumulus-primitives-core/runtime-benchmarks", "cumulus-primitives-utility/runtime-benchmarks", + "fc-pallet-black-hole/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", @@ -166,6 +170,7 @@ try-runtime = [ "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", "cumulus-pallet-xcmp-queue/try-runtime", + "fc-pallet-black-hole/try-runtime", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", @@ -212,6 +217,7 @@ std = [ "cumulus-primitives-aura/std", "cumulus-primitives-core/std", "cumulus-primitives-utility/std", + "fc-pallet-black-hole/std", "frame-benchmarking?/std", "frame-executive/std", "frame-metadata-hash-extension/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index d3d56ab358..0b5efe2d39 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -1061,6 +1061,24 @@ impl pallet_revive::Config for Runtime { type FindAuthor = ::FindAuthor; } +parameter_types! { + pub const BlackHolePalletId: PalletId = PalletId(*b"py/bhole"); + pub const AdministrativeBodyId: BodyId = BodyId::Administration; +} + +impl fc_pallet_black_hole::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + type EventHorizonDispatchOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, + >; + type Balances = Balances; + type BlockNumberProvider = System; + type PalletId = BlackHolePalletId; + type BurnPeriod = ConstU32; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -1077,6 +1095,7 @@ construct_runtime!( TransactionPayment: pallet_transaction_payment = 11, AssetTxPayment: pallet_asset_conversion_tx_payment = 13, Vesting: pallet_vesting = 14, + BlackHole: fc_pallet_black_hole = 15, // Collator support. the order of these 5 are important and shall not change. Authorship: pallet_authorship = 20, @@ -1304,6 +1323,8 @@ mod benches { // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] + // Contrib + [fc_pallet_black_hole, BlackHole] ); use frame_benchmarking::BenchmarkError;