Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update XCM MultiLocation #3312

Closed
shawntabrizi opened this issue Jun 19, 2021 · 0 comments · Fixed by #3404
Closed

Update XCM MultiLocation #3312

shawntabrizi opened this issue Jun 19, 2021 · 0 comments · Fixed by #3404
Assignees

Comments

@shawntabrizi
Copy link
Member

@gavofyork suggested we update the MultiLocation syntax to:

#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)]
pub struct MultiLocation {
	parents: u8,
	junctions: Junctions,
}

#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)]
pub enum Junctions {
	/// The interpreting consensus system.
	Null,
	/// A relative path comprising 1 junction.
	X1(Junction),
	/// A relative path comprising 2 junctions.
	X2(Junction, Junction),
	/// A relative path comprising 3 junctions.
	X3(Junction, Junction, Junction),
	/// A relative path comprising 4 junctions.
	X4(Junction, Junction, Junction, Junction),
	/// A relative path comprising 5 junctions.
	X5(Junction, Junction, Junction, Junction, Junction),
	/// A relative path comprising 6 junctions.
	X6(Junction, Junction, Junction, Junction, Junction, Junction),
	/// A relative path comprising 7 junctions.
	X7(Junction, Junction, Junction, Junction, Junction, Junction, Junction),
	/// A relative path comprising 8 junctions.
	X8(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction),
}

And then we eliminate the Parent junction. This would force that all MultiLocations are always in their canonical/normalized form.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants