Skip to content

Commit

Permalink
Add xcm recorder to all runtimes (#576)
Browse files Browse the repository at this point in the history
The `XcmRecorder` config item is necessary for the `DryRunApi` to return
the `local_xcm`.
`pallet-xcm` can be used as the implementation.
Added it to all runtimes.

---------

Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
franciscoaguirre and bkchr authored Feb 7, 2025
1 parent 1a8ac56 commit 68babf4
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Coretime chain: allow cross-chain region transfers ([polkadot-fellows/runtimes/pull/483](https://github.com/polkadot-fellows/runtimes/pull/483))
- Unstake the last remaining corrupt ledger ([polkadot-fellows/runtimes/pull/538](https://github.com/polkadot-fellows/runtimes/pull/538))
- Disallow `add_sub` and `set_subs` from `NonTransfer` proxy type in people chain runtimes ([polkadot-fellows/runtimes#518](https://github.com/polkadot-fellows/runtimes/pull/518))
- Added the `XcmRecorder` config item to all runtimes so `local_xcm` can be returned from `DryRunApi` ([polkadot-fellows/runtimes#576](https://github.com/polkadot-fellows/runtimes/pull/576))

### Added

Expand Down
2 changes: 1 addition & 1 deletion relay/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = XcmPallet;
type AssetTransactor = LocalAssetTransactor;
type OriginConverter = LocalOriginConverter;
type IsReserve = ();
Expand Down
2 changes: 1 addition & 1 deletion relay/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = XcmPallet;
type AssetTransactor = LocalAssetTransactor;
type OriginConverter = LocalOriginConverter;
// Polkadot Relay recognises no chains which act as reserves.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
type AssetTransactor = AssetTransactors;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Asset Hub trusts only particular, pre-configured bridged locations from a different consensus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
type AssetTransactor = AssetTransactors;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Asset Hub trusts only particular, pre-configured bridged locations from a different consensus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
type AssetTransactor = FungibleTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Collectives does not recognize a reserve location for any asset. Users must teleport DOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
type AssetTransactor = AssetTransactors;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Coretime chain does not recognize a reserve location for any asset. Users must teleport KSM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
type AssetTransactor = AssetTransactors;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Coretime chain does not recognize a reserve location for any asset. Users must teleport DOT
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/encointer/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
type AssetTransactor = FungibleTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
type IsReserve = ();
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/people/people-kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
type AssetTransactor = FungibleTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// People chain does not recognize a reserve location for any asset. Users must teleport KSM
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/people/people-polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl xcm_executor::Config for XcmConfig {
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type XcmRecorder = ();
type XcmRecorder = PolkadotXcm;
}

/// Converts a local signed origin into an XCM `Location`. Forms the basis for local origins
Expand Down

0 comments on commit 68babf4

Please sign in to comment.