subdarkdex / subdex-parachain

Apache License 2.0
0 stars 1 forks source link

Rework main network asset representation #27

Closed iorveth closed 3 years ago

iorveth commented 3 years ago

Issue

Currently we have main network asset id (ksm, etc) hardcoded as specific AssetIdOf<T> at chain_spec. It`s not as type safe and clear, as it supposed to be.

Proposal

Replace AssetIdOf<T> value with enum, representing either main network asset id, which is handled by Currency trait or specific internal currency asset id to represent assets from other parachains. Adjust related logic.

enum Asset {
   MainNetworkCurrency
   Asset(asset_id)
}