-
Notifications
You must be signed in to change notification settings - Fork 1.6k
MultiAsset Treasury Spend Over XCM. Companion PR for Substrate #13607 #7058
Conversation
* descend origin to an asset sender * sender as tuple of dest and sender
runtime/kusama/src/lib.rs
Outdated
} | ||
|
||
impl pallet_treasury::Config for Runtime { | ||
type PalletId = TreasuryPalletId; | ||
type AssetKind = xcm::latest::AssetId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the setup there is no way to spend some DOTs on Statemint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is an xcm assetId, it can point to any asset at any xcm multilocation
018260d
to
f4c5bd7
Compare
bot rebase |
…/multi-asset-treasury-over-xcm-2
Rebased |
bot rebase |
…/multi-asset-treasury-over-xcm-2
Rebased |
@@ -217,6 +217,8 @@ impl<Network: Get<Option<NetworkId>>, AccountId: From<[u8; 32]> + Into<[u8; 32]> | |||
{ | |||
fn convert(location: MultiLocation) -> Result<AccountId, MultiLocation> { | |||
let id = match location { | |||
// support account IDs from the relay chain | |||
MultiLocation { parents: 1, interior: X1(AccountId32 { id, network: None }) } => id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noteworthy change, since this allows interpreting an account on the parent chain into an accountId
* drop redundant query status * rename ReportQueryStatus to OuterQueryStatus * revert rename of QueryResponseStatus * update mapping
Co-authored-by: Gavin Wood <[email protected]>
The CI pipeline was cancelled due to failure one of the required jobs. |
closing in favour of #7427 |
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
Companion PR for paritytech/substrate#13607
Background
This PR is a step towards multi-asset treasury spends. Instead of the treasury spends operating only on local assets on the relay chain, we rename the old spend extrinsic to
spend_local()
and introduce a newspend()
extrinsic which is configured to spend over XCM.Implemnetation
This is implementend based on the
PayOverXcm
implementation of thePay
trait. This PayOverXcm instance is in turn configured and pointed towards statemine/t respectively.In practice, the treasury would have an account on statemin/t which would hold assets of different asset classes. These assets would be sourced by any means including teleports from the relay chain and via asset conversions by governance. (The means of conversions is outside the scope of this PR)
This PR allows the treasury spend to control the assets stored on statemine/t. So you can specify an asset class when performing a treasury spend, and that asset class and amount would be transfered to the beneficiary of the spend call.
Depends strongly on: #6900