Skip to content

Conversation

@karolk91
Copy link
Collaborator

@karolk91 karolk91 commented Apr 7, 2025

  • Create utils to allow XCM location be converted to Root on destination chain via LocalOriginConverter
  • Change Polkadot XCM config to allow AssetHub as Root
  • Create tests for new utils

pub struct LocationAsSuperuser<SuperuserLocation, RuntimeOrigin>(
PhantomData<(SuperuserLocation, RuntimeOrigin)>,
);
impl<SuperuserLocation: Get<Location>, RuntimeOrigin: OriginTrait> ConvertOrigin<RuntimeOrigin>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for matching we use Contains

Suggested change
impl<SuperuserLocation: Get<Location>, RuntimeOrigin: OriginTrait> ConvertOrigin<RuntimeOrigin>
impl<SuperuserLocation: Contains<Location>, RuntimeOrigin: OriginTrait> ConvertOrigin<RuntimeOrigin>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 34963d7

use xcm::latest::{Location, OriginKind};
use xcm_executor::traits::ConvertOrigin;

pub struct LocationAsSuperuser<SuperuserLocation, RuntimeOrigin>(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add here some docs, because it is a pub struct and all pub stuff should have rustdocs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in bdbbd72

Copy link
Owner

@bkontur bkontur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good!

@karolk91 karolk91 marked this pull request as ready for review April 10, 2025 07:39
@bkontur bkontur merged commit 306c2ff into bkontur:bko-ahm-governance-root Apr 10, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants