Skip to content

Token registry design #1

Open
Open
@shaunxw

Description

@shaunxw

Types

  • struct TokenInfo
    • id: MultiLocation
    • decimals: u8
    • #cfg(feature = full) extra: ExtraTokenInfo
  • struct ExtraTokenInfo
    • name: &'static str
    • symbol: &'static str
    • description: &' static str
    • icon: Option<&'static str>

Traits

  • ReserveChainLocation: should be implemented by each TokenInfo.
    • fn location() -> MultiLocation: returns the reserve chain location of a token.

Registry

  • mod polkadot
    • mod acala
      • const ACA: TokenInfo
      • const aUSD: TokenInfo
      • const all: [TokenInfo] = [ACA, aUSD]
    • mod plasm
      • use plasm_token_info::*
      • assuming Plasm have published their token info in crate plasm_token_info
  • mod kusama
    • mod karura
      • const KAR: TokenInfo
      • const kUSD: TokenInfo
      • const all: [TokenInfo] = [KAR, kUSD]

Dump

  • Add a bin crate and script to dump JSON file.
    • dump_token_info
      • generate a JSON file with all the token info

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions