zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

Add `Balances` config variable to `prediction-markets` and use a variant of `orml_tokens::CurrencyAdapter` to abstract `Balances`

Open maltekliemann opened this issue 2 years ago • 1 comments

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.

maltekliemann avatar Oct 06 '22 11:10 maltekliemann

I'm not sure if this is worth the hassle.

maltekliemann avatar Oct 25 '23 00:10 maltekliemann

Probably outdated.

maltekliemann avatar May 03 '24 16:05 maltekliemann