-
Notifications
You must be signed in to change notification settings - Fork 372
Align BridgeHub runtimes with other SP runtimes + reused test for teleport native tokens + some nits #2449
Align BridgeHub runtimes with other SP runtimes + reused test for teleport native tokens + some nits #2449
Changes from all commits
97ae18a
b807bc6
85e6c72
ccf7da4
b24f9bc
044c3c0
0fc0136
5c125db
b01d022
78ab2cd
e5692b3
0829744
27d3951
cb2d352
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,11 +24,11 @@ use frame_support::{ | |
| }; | ||
| use frame_system::EnsureRoot; | ||
| use pallet_xcm::XcmPassthrough; | ||
| use parachains_common::xcm_config::{ | ||
| ConcreteNativeAssetFrom, DenyReserveTransferToRelayChain, DenyThenTry, | ||
| use parachains_common::{ | ||
| impls::ToStakingPot, | ||
| xcm_config::{ConcreteNativeAssetFrom, DenyReserveTransferToRelayChain, DenyThenTry}, | ||
| }; | ||
| use polkadot_parachain::primitives::Sibling; | ||
| use polkadot_runtime_common::impls::ToAuthor; | ||
| use xcm::latest::prelude::*; | ||
| use xcm_builder::{ | ||
| AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, | ||
|
|
@@ -96,17 +96,16 @@ pub type XcmOriginToTransactDispatchOrigin = ( | |
| // transaction from the Root origin. | ||
| ParentAsSuperuser<RuntimeOrigin>, | ||
| // Native signed account converter; this just converts an `AccountId32` origin into a normal | ||
| // `Origin::Signed` origin of the same 32-byte value. | ||
| // `RuntimeOrigin::Signed` origin of the same 32-byte value. | ||
| SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>, | ||
| // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. | ||
| XcmPassthrough<RuntimeOrigin>, | ||
| ); | ||
|
|
||
| match_types! { | ||
| // TODO: map gov2 origins here - after merge https://github.com/paritytech/cumulus/pull/1895 | ||
| pub type ParentOrParentsExecutivePlurality: impl Contains<MultiLocation> = { | ||
| pub type ParentOrParentsPlurality: impl Contains<MultiLocation> = { | ||
| MultiLocation { parents: 1, interior: Here } | | ||
| MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } | ||
| MultiLocation { parents: 1, interior: X1(Plurality { .. }) } | ||
| }; | ||
| pub type ParentOrSiblings: impl Contains<MultiLocation> = { | ||
| MultiLocation { parents: 1, interior: Here } | | ||
|
|
@@ -165,10 +164,10 @@ pub type Barrier = DenyThenTry< | |
| AllowKnownQueryResponses<PolkadotXcm>, | ||
| WithComputedOrigin< | ||
| ( | ||
| // Allow anything to pay for execution. | ||
| // If the message is one that immediately attemps to pay for execution, then allow it. | ||
| AllowTopLevelPaidExecutionFrom<Everything>, | ||
| // Parent and its exec plurality get free execution. | ||
| AllowExplicitUnpaidExecutionFrom<ParentOrParentsExecutivePlurality>, | ||
| // Parent and its pluralities (i.e. governance bodies) get free execution. | ||
| AllowExplicitUnpaidExecutionFrom<ParentOrParentsPlurality>, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't we have
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did it according to statemine, but I think it is related to the fact that Kusama does not have Collectives parachain, polkadot's
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and iiuc this is one of future plans to bring |
||
| // Subscriptions for version tracking are OK. | ||
| AllowSubscriptionsFrom<ParentOrSiblings>, | ||
| ), | ||
|
|
@@ -197,7 +196,7 @@ impl xcm_executor::Config for XcmConfig { | |
| MaxInstructions, | ||
| >; | ||
| type Trader = | ||
| UsingComponents<WeightToFee, KsmRelayLocation, AccountId, Balances, ToAuthor<Runtime>>; | ||
| UsingComponents<WeightToFee, KsmRelayLocation, AccountId, Balances, ToStakingPot<Runtime>>; | ||
| type ResponseHandler = PolkadotXcm; | ||
| type AssetTrap = PolkadotXcm; | ||
| type AssetClaims = PolkadotXcm; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.