Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Collectives Slash Handler to Use Limited Teleport Assets #46

Merged
merged 2 commits into from
Oct 18, 2023
Merged
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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ Changelog for the runtimes governed by the Polkadot Fellowship.
- XCM: Fix issue with RequestUnlock ([paritytech/polkadot#7278](https://github.com/paritytech/polkadot/pull/7278))
- Clear Existing HRMP Channel Request When Force Opening ([paritytech/polkadot#7389](https://github.com/paritytech/polkadot/pull/7389))
- Prune upgrade cooldowns ([paritytech/polkadot#7470](https://github.com/paritytech/polkadot/pull/7470))
- Assets `destroy_accounts` releases the deposit ([paritytech/substrate#14443](https://github.com/paritytech/substrate/pull/14443))
- Assets `destroy_accounts` releases the deposit
([paritytech/substrate#14443](https://github.com/paritytech/substrate/pull/14443))
- Update Polkadot Collectives to use `limited_teleport_assets` for automatic slash handling, as
`teleport_assets` is deprecated and caused a failing integration test. ([polkadot-fellows/runtimes#46](https://github.com/polkadot-fellows/runtimes/pull/46))
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use pallet_alliance::{ProposalIndex, ProposalProvider};
use parachains_common::impls::NegativeImbalance;
use sp_runtime::DispatchError;
use sp_std::{cmp::Ordering, marker::PhantomData, prelude::*};
use xcm::latest::{Fungibility, Junction, Parent};
use xcm::latest::{Fungibility, Junction, Parent, WeightLimit};

type AccountIdOf<T> = <T as frame_system::Config>::AccountId;

Expand Down Expand Up @@ -63,7 +63,7 @@ where

<pallet_balances::Pallet<T>>::resolve_creating(&pallet_acc, amount);

let result = <pallet_xcm::Pallet<T>>::teleport_assets(
let result = <pallet_xcm::Pallet<T>>::limited_teleport_assets(
<<T as frame_system::Config>::RuntimeOrigin>::signed(pallet_acc.into()),
Box::new(Parent.into()),
Box::new(
Expand All @@ -73,6 +73,7 @@ where
),
Box::new((Parent, imbalance).into()),
0,
WeightLimit::Unlimited,
);

if let Err(err) = result {
Expand Down
Loading