Skip to content

Commit 368ca2f

Browse files
committed
Add pallet BlackHole to Kusama AssetHub following WFC #539
1 parent d41d01f commit 368ca2f

File tree

5 files changed

+52
-8
lines changed

5 files changed

+52
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Changelog for the runtimes governed by the Polkadot Fellowship.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [Unreleased]
8+
9+
### Added
10+
11+
- Add pallet BlackHole to Kusama AssetHub following [WFC #539](https://kusama.subsquare.io/referenda/539)
12+
713
## [1.6.1] 24.06.2025
814

915
### Changed

Cargo.lock

Lines changed: 20 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ encointer-balances-tx-payment-rpc-runtime-api = { version = "~16.1.0", default-f
6161
encointer-kusama-runtime = { path = "system-parachains/encointer" }
6262
encointer-primitives = { version = "~16.4.0", default-features = false }
6363
enumflags2 = { version = "0.7.7" }
64+
fc-pallet-black-hole = { version = "1.0.0", default-features = false }
6465
frame-benchmarking = { version = "40.2.0", default-features = false }
6566
frame-election-provider-support = { version = "40.1.1", default-features = false }
6667
frame-executive = { version = "40.0.1", default-features = false }

system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ assets-common = { workspace = true }
103103
pallet-xcm-bridge-hub-router = { workspace = true }
104104
snowbridge-inbound-queue-primitives = { workspace = true }
105105

106+
# Frame contrib
107+
fc-pallet-black-hole = { workspace = true }
108+
106109
[dev-dependencies]
107110
asset-test-utils = { workspace = true }
108111
parachains-runtimes-test-utils = { workspace = true }
@@ -124,6 +127,7 @@ runtime-benchmarks = [
124127
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
125128
"cumulus-primitives-core/runtime-benchmarks",
126129
"cumulus-primitives-utility/runtime-benchmarks",
130+
"fc-pallet-black-hole/runtime-benchmarks",
127131
"frame-benchmarking/runtime-benchmarks",
128132
"frame-support/runtime-benchmarks",
129133
"frame-system-benchmarking/runtime-benchmarks",
@@ -166,6 +170,7 @@ try-runtime = [
166170
"cumulus-pallet-parachain-system/try-runtime",
167171
"cumulus-pallet-xcm/try-runtime",
168172
"cumulus-pallet-xcmp-queue/try-runtime",
173+
"fc-pallet-black-hole/try-runtime",
169174
"frame-executive/try-runtime",
170175
"frame-support/try-runtime",
171176
"frame-system/try-runtime",
@@ -212,6 +217,7 @@ std = [
212217
"cumulus-primitives-aura/std",
213218
"cumulus-primitives-core/std",
214219
"cumulus-primitives-utility/std",
220+
"fc-pallet-black-hole/std",
215221
"frame-benchmarking?/std",
216222
"frame-executive/std",
217223
"frame-metadata-hash-extension/std",

system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,24 @@ impl pallet_revive::Config for Runtime {
10611061
type FindAuthor = <Runtime as pallet_authorship::Config>::FindAuthor;
10621062
}
10631063

1064+
parameter_types! {
1065+
pub const BlackHolePalletId: PalletId = PalletId(*b"py/bhole");
1066+
pub const AdministrativeBodyId: BodyId = BodyId::Administration;
1067+
}
1068+
1069+
impl fc_pallet_black_hole::Config for Runtime {
1070+
type RuntimeEvent = RuntimeEvent;
1071+
type WeightInfo = ();
1072+
type EventHorizonDispatchOrigin = EitherOfDiverse<
1073+
EnsureRoot<AccountId>,
1074+
EnsureXcm<IsVoiceOfBody<GovernanceLocation, AdministrativeBodyId>>,
1075+
>;
1076+
type Balances = Balances;
1077+
type BlockNumberProvider = System;
1078+
type PalletId = BlackHolePalletId;
1079+
type BurnPeriod = ConstU32<HOURS>;
1080+
}
1081+
10641082
// Create the runtime by composing the FRAME pallets that were previously configured.
10651083
construct_runtime!(
10661084
pub enum Runtime
@@ -1077,6 +1095,7 @@ construct_runtime!(
10771095
TransactionPayment: pallet_transaction_payment = 11,
10781096
AssetTxPayment: pallet_asset_conversion_tx_payment = 13,
10791097
Vesting: pallet_vesting = 14,
1098+
BlackHole: fc_pallet_black_hole = 15,
10801099

10811100
// Collator support. the order of these 5 are important and shall not change.
10821101
Authorship: pallet_authorship = 20,

0 commit comments

Comments
 (0)