Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension to Treasury Pallet for Assets #92

Closed
joepetrowski opened this issue Sep 16, 2022 · 2 comments · May be fixed by paritytech/substrate#14434
Closed

Extension to Treasury Pallet for Assets #92

joepetrowski opened this issue Sep 16, 2022 · 2 comments · May be fixed by paritytech/substrate#14434
Assignees
Labels
I5-enhancement An additional feature request.

Comments

@joepetrowski
Copy link
Contributor

joepetrowski commented Sep 16, 2022

This would be one step toward #98 and also related to https://forum.polkadot.network/t/a-better-treasury-system/291.

We should have an extension to the Treasury pallet, similar to how pallet-asset-tx-payment extends pallet-transaction-payment. It should:

  • Allow spend proposals with AssetId.
  • Use the same AccountId as the Treasury's Pot.
  • Provide a Trait to convert from BalanceOf to AssetId and back. The default implementation can use the ratio of minimum balances.
  • Take deposits based on the conversion.
  • Interpret the SpendOrigin based on the conversion.

Payout should assume that the pallet's AccountId already has enough of the asset, and would fail if it does not. That is, this extension should not worry about acquiring AssetId.

@jsidorenko
Copy link
Contributor

What if we create a separate struct like AssetOrNative that will keep inside the information about the assetId or currency and the amount? I would be glad to use it inside the uniques-pallet so that users could set the price for their NFT in a different token. But in my case, there won't be a conversion needed, which means if the price is set in USDC, then it will be the only token to pay for the NFT.

@joepetrowski
Copy link
Contributor Author

Closed by #1333

lexnv added a commit that referenced this issue Apr 3, 2024
archive: Use integer for describing block height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants