Use fungible traits for treasury pallet#13476
Conversation
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com>
ddb3ff8 to
42789a2
Compare
|
The CI pipeline was cancelled due to failure one of the required jobs. |
|
Thanks! @tonyalaribe this is very helpful PR to understand the whole change going on with #12951 |
I believe so. But the need for migrations will be from the work on the balance pallet in #12951. So the migrations are more for the balance pallet than the treasury pallet. |
Background
The current currency traits are deprecated and there's currently a move to modify the existing pallets to support the fungible traits. paritytech/polkadot-sdk#226
This is an important step towards some more topics which are coming up, such as the Multi-Asset Treasury topic which will build on these fungible traits.
Review notes:
Since some of the fungible traits are fairly new and some methods appear to have similar uses, it's not always clear if i'm using the right traits and methods. For eg it's not always clear whether to use
mint_intoorset_balancein tests, as a replacement forBalances::make_free_balance_be()It's also not always clear what the direct fungible equivalents of some Currency methods are. Eg Currency has
deposit_into_existinganddeposit_creatingand onlydepositexists underfungiblewith thePrecision::ExactandPrecision::BestEffortflags. Please keep this in mind while reviewing, to spot scenarios where this PR might be using the wrong fungible method equivalents.The PR depends on the changes to the fungible traits in the
gav-hold-freezebranch (#12951), and would have to be reanchored on master when that branch has been merged