This repository was archived by the owner on Nov 15, 2023. It is now read-only.
MultiAsset Treasury Spend Over XCM. Companion PR for Substrate #13607#7058
Closed
tonyalaribe wants to merge 82 commits intomasterfrom
Closed
MultiAsset Treasury Spend Over XCM. Companion PR for Substrate #13607#7058tonyalaribe wants to merge 82 commits intomasterfrom
tonyalaribe wants to merge 82 commits intomasterfrom
Conversation
* descend origin to an asset sender * sender as tuple of dest and sender
muharem
reviewed
Apr 12, 2023
runtime/kusama/src/lib.rs
Outdated
|
|
||
| impl pallet_treasury::Config for Runtime { | ||
| type PalletId = TreasuryPalletId; | ||
| type AssetKind = xcm::latest::AssetId; |
Contributor
There was a problem hiding this comment.
with the setup there is no way to spend some DOTs on Statemint
Contributor
Author
There was a problem hiding this comment.
Since this is an xcm assetId, it can point to any asset at any xcm multilocation
018260d to
f4c5bd7
Compare
1 task
Contributor
Author
|
bot rebase |
…/multi-asset-treasury-over-xcm-2
|
Rebased |
Contributor
Author
|
bot rebase |
…/multi-asset-treasury-over-xcm-2
|
Rebased |
tonyalaribe
commented
May 5, 2023
| 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, |
Contributor
Author
There was a problem hiding this comment.
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 <gavin@parity.io>
|
The CI pipeline was cancelled due to failure one of the required jobs. |
Contributor
|
closing in favour of #7427 |
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PayOverXcmimplementation of thePaytrait. 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