zeitgeist
zeitgeist copied to clipboard
Add `Balances` config variable to `prediction-markets` and use a variant of `orml_tokens::CurrencyAdapter` to abstract `Balances`
In some situations, we require direct access to the Balances
pallet instead of going through MultiCurrency
. Using imbalances would be one example.
We're currently using CurrencyOf<T>
, which "imports" the Balances
pallet from MarketCommons
. That's one way to abstract the Balances
pallet.
Th state-of-the-art solution appears to be to just add a config variable to every pallet that requires direct access. This can be "prettified" by implementing something similar to orml_tokens::CurrencyAdapter
for orml_currencies
and the using CurrencyAdapter<Currencies, GetNativeToken>
instead of Balances
.
After this is done, we should also be able to eliminate the Currency
config variable from MarketCommons
.
I'm not sure if this is worth the hassle.
Probably outdated.