Skip to main content
added 19 characters in body; edited title
Source Link
Guantong
  • 1.9k
  • 4
  • 13

What is the difference between `GlobalConsensus` (tuple struct with NetworkId) and `NetworkId` (be used via AccountId32) in XCM `MultiLocation`?

XCM version: 3

I'm learing XCM. I want to specify a Polkadot account by MultiLocation when within a parachain on Polkadot like Statemint, I know it can be specified with ParentThen(X1(AccountId32)).into.

But are the other two ways below correct? What is the difference between the three of them?

Option 1: Use NetworkId to sepcify Polkadot in GlobalConsensus.

MultiLocation { 
   parents: 0,
   interior: X2(GlobalConsensus(Polkadot), AccountId32 { network: None, id: [...] }) 
}

Option 2: Use NetworkId to specify Polkadot in AccountId32.

MultiLocation {
   parents: 0,
   interior: X1(AccountId32 { network: Some(Polkadot), id: [...] }) 
}

I know this question may be similar to another , but the focus of that question may be Ethereum, here I want to know what is the difference between these two ways of specifying NetworkId and when should I use which?

What is the difference between `GlobalConsensus` (tuple struct with NetworkId) and `NetworkId` (be used via AccountId32) in XCM?

XCM version: 3

I'm learing XCM. I want to specify a Polkadot account when within a parachain on Polkadot like Statemint, I know it can be specified with ParentThen(X1(AccountId32)).into.

But are the other two ways below correct? What is the difference between the three of them?

Option 1: Use NetworkId to sepcify Polkadot in GlobalConsensus.

MultiLocation { 
   parents: 0,
   interior: X2(GlobalConsensus(Polkadot), AccountId32 { network: None, id: [...] }) 
}

Option 2: Use NetworkId to specify Polkadot in AccountId32.

MultiLocation {
   parents: 0,
   interior: X1(AccountId32 { network: Some(Polkadot), id: [...] }) 
}

I know this question may be similar to another , but the focus of that question may be Ethereum, here I want to know what is the difference between these two ways of specifying NetworkId and when should I use which?

What is the difference between `GlobalConsensus` (tuple struct with NetworkId) and `NetworkId` (be used via AccountId32) in XCM `MultiLocation`?

XCM version: 3

I'm learing XCM. I want to specify a Polkadot account by MultiLocation when within a parachain on Polkadot like Statemint, I know it can be specified with ParentThen(X1(AccountId32)).into.

But are the other two ways below correct? What is the difference between the three of them?

Option 1: Use NetworkId to sepcify Polkadot in GlobalConsensus.

MultiLocation { 
   parents: 0,
   interior: X2(GlobalConsensus(Polkadot), AccountId32 { network: None, id: [...] }) 
}

Option 2: Use NetworkId to specify Polkadot in AccountId32.

MultiLocation {
   parents: 0,
   interior: X1(AccountId32 { network: Some(Polkadot), id: [...] }) 
}

I know this question may be similar to another , but the focus of that question may be Ethereum, here I want to know what is the difference between these two ways of specifying NetworkId and when should I use which?

Source Link
Guantong
  • 1.9k
  • 4
  • 13

What is the difference between `GlobalConsensus` (tuple struct with NetworkId) and `NetworkId` (be used via AccountId32) in XCM?

XCM version: 3

I'm learing XCM. I want to specify a Polkadot account when within a parachain on Polkadot like Statemint, I know it can be specified with ParentThen(X1(AccountId32)).into.

But are the other two ways below correct? What is the difference between the three of them?

Option 1: Use NetworkId to sepcify Polkadot in GlobalConsensus.

MultiLocation { 
   parents: 0,
   interior: X2(GlobalConsensus(Polkadot), AccountId32 { network: None, id: [...] }) 
}

Option 2: Use NetworkId to specify Polkadot in AccountId32.

MultiLocation {
   parents: 0,
   interior: X1(AccountId32 { network: Some(Polkadot), id: [...] }) 
}

I know this question may be similar to another , but the focus of that question may be Ethereum, here I want to know what is the difference between these two ways of specifying NetworkId and when should I use which?