Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions cumulus/parachains/runtimes/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,33 +463,6 @@ impl<
AllPalletsWithoutSystem,
> RuntimeHelper<Runtime, AllPalletsWithoutSystem>
{
#[deprecated(
note = "Will be removed after Aug 2025; It uses hard-coded `Location::parent()`, \
use `execute_as_governance_call` instead."
)]
pub fn execute_as_governance(call: Vec<u8>) -> Outcome {
// prepare xcm as governance will do
let xcm = Xcm(vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact {
origin_kind: OriginKind::Superuser,
call: call.into(),
fallback_max_weight: None,
},
ExpectTransactStatus(MaybeErrorCode::Success),
]);

// execute xcm as parent origin
let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256);
<<Runtime as pallet_xcm::Config>::XcmExecutor>::prepare_and_execute(
Location::parent(),
xcm,
&mut hash,
Self::xcm_max_weight(XcmReceivedFrom::Parent),
Weight::zero(),
)
}

pub fn execute_as_governance_call<Call: Dispatchable + Encode>(
call: Call,
governance_origin: GovernanceOrigin<Call::RuntimeOrigin>,
Expand Down
11 changes: 11 additions & 0 deletions prdoc/pr_12682.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: Remove deprecated RuntimeHelper::execute_as_governance
doc:
- audience: Runtime Dev
description: |-
## Summary

- Removes `RuntimeHelper::execute_as_governance` (deprecated after August 2025).
- Callers should use `execute_as_governance_call` instead; no remaining in-repo usages.
crates:
- name: parachains-runtimes-test-utils
bump: major
Loading