-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Repot frame_support::traits; introduce some new currency stuff #8435
Conversation
…e into gav-fungibles-traits
Why do we need to deprecate Balances pallet? |
We don't really. It's a possibility since Assets should be a functionally complete replacement, however I removed the action item since I think Balances will always be a bit faster owing to being able to amalgamate the storage accesses of the system nonce with the balance. |
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.
Note the issues above, but all in all, very good.
Asset::<T>::get(asset).map(|x| x.supply).unwrap_or_else(Zero::zero) | ||
} | ||
|
||
fn minimum_balance(asset: Self::AssetId) -> Self::Balance { |
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.
Returning None
here makes sense... It is possible that the fungibles trait should use options?
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.
what will be the difference between no minimum balance vs zero minimum balance?
🚀 |
* master: (84 commits) Duplicate logging to stdout (#8495) Fix sync restart (#8497) client: fix justifications migration (#8489) helper macro to create storage types on the fly (#8456) Make `BlockImport` and `Verifier` async (#8472) Get rid of `test-helpers` feature in sc-consensus-babe (#8486) Enhancement on Substrate Node Template (#8473) Add Social Network (#8065) Prepare UI tests for Rust 1.51 & new CI image (#8474) Benchmarking pallet-example (#8301) Use pathbuf for remote externalities (#8480) Bring back the on_finalize weight of staking. (#8463) Implement `fungible::*` for Balances (#8454) make types within `generate_solution_type` macro explicit (#8447) [pallet-staking] Refund unused weight for `payout_stakers` (#8458) Use `async_trait` in sc-consensus-slots (#8461) Repot frame_support::traits; introduce some new currency stuff (#8435) Fix &mut self -> &self in add_known_address (#8468) Add NetworkService::add_known_address (#8467) Fix companion check (#8464) ...
…ytech#8435) * Reservable, Transferrable Fungible(s), plus adapters. * Repot into new dir * Imbalances for Fungibles * Repot and balanced fungible. * Clean up names and bridge-over Imbalanced. * Repot frame_support::trait. Finally. * Make build. * Docs * Good errors * Fix tests. Implement fungible::Inspect for Balances. * Implement additional traits for Balances. * Revert UI test "fixes" * Fix UI error * Fix UI test * Fixes * Update lock * Grumbles * Grumbles * Fixes Co-authored-by: Bastian Köcher <info@kchr.de>
Repots everything from
frame_support::traits
. Remains backwards compatible though.Introduces some new traits which should close the gap between the Assets pallet style
Fungibles
and the Balances pallet styleCurrency
.TODO:
Tracking issue: paritytech/polkadot-sdk#327