Tokens Module
Closed this issue · 2 comments
shaunxw commented
Goal
Create a orml-tokens
runtime module to support multiple types of token.
Plan
Version 1 - Basic tokens functionalities
- Minimal
trait
abstractionMultiCurrency
. transfer
mint
burn
slash
- Runtime module.
- Impl
MultiCurrency
. - Dispatchable
transfer
extrinsic
- Impl
- Unit test.
Version 2 - Compatibility with srml-balance
module
- Be compatible with
srml-balance
andCurrency
, which would be used for native token.
### Optional - Better issuance control via "imbalance"
- [ ] "imbalance" types represents balance
change of tokens.
- [ ] Add imbalance types and rebalance feature to MultiCurrency
and orml-tokens
.
xlc commented
More things to be considered later:
- events
- error type
- weight / transaction fee
- existential deposits
xlc commented
I am also thinking about adding a BasicCurrency
trait that is similar to MultiCurrency
except it is for single currency.
We don't need all the advanced features of Currency
most of the time. BasicCurrency
is usually enough. This allow new implementation of BasicCurrency
easy.