-
Notifications
You must be signed in to change notification settings - Fork 2.7k
wip: multiasset treasury pallet #13571
wip: multiasset treasury pallet #13571
Conversation
frame/treasury/src/types.rs
Outdated
| PartialOrd, | ||
| RuntimeDebug, | ||
| )] | ||
| pub enum NativeOrAssetBalance<AssetId, NativeBalance, AssetBalance> { |
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.
can we stop doing this? it shouldn't be the treasury's job to handle the difference between native and other assets. just build another pallet/helper for it.
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.
I'm curious though. How would you approach it in a practical sense. Assuming it's a new pallet, how would it work?
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.
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.
Thanks! I've gone through it, and I'm exploring introducing a separate pallet for the multi asset functionality, which in turn actually makes things easier
* Runtime method to get user's assets balances * Fix test (typo) * Update frame/assets/src/functions.rs * Remove instance param * Update frame/assets/src/functions.rs Co-authored-by: Bastian Köcher <[email protected]> * Remove instance param * Refactor * Chore * Update doc --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: parity-processbot <>
| let beneficiary = T::Lookup::lookup(beneficiary)?; | ||
|
|
||
| ensure!(amount <= max_amount, Error::<T, I>::InsufficientPermission); | ||
|
|
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.
This change is carried over from a cherry picked commit and won't be in the final PR. Please ignore.
|
The CI pipeline was cancelled due to failure one of the required jobs. |
|
With some exploration, it seems a simpler solution is making the treasury more generic to the payment approach. So, I'm closing this in favour of a different PR: #13607 |
WIP: nothing to see yet