Options
All
  • Public
  • Public/Protected
  • All
Menu

Token info is a helper class which abstracts away handling different versions of a Token represented on Injective.

Ex: USDC token

  • For a peggy denom -> decimals 6, address: ERC20 contract address, symbol: USDC
  • For a factory/cw20Denom: (both 6 decimals) -> if coming from Ethereum through Wormhole take USDCet as the cw20 addresses will match, -> if coming from Solana through Wormhole take USDCso as the cw20 addresses will match,

Ex: SOL token

  • For the native token on Solana -> decimals 9
  • For the cw20 version of the native SOL token on Injective through wormhole -> decimals 8

Ex: CHZ token

  • For the peggy denom -> decimals 18
  • For a factory/cw20Denom: -> For CHZ coming through Wormhole from Ethereum -> decimals 8

Hierarchy

  • TokenInfo

Index

Constructors

  • Returns TokenInfo

Properties

denom: string
meta: TokenMeta

Accessors

  • get address(): string
  • Returns string

  • get coinGeckoId(): string
  • Returns string

  • get cw20Decimals(): any
  • When we have multiple cw20 entries (versions) of a token on Injective we need to match the denom's address with a cw20 entry and get the decimals for that version

    Returns any

  • get decimals(): any
  • Decimals can vary between different versions of a token so we need to get the decimal places of the token based on the denom (from which we can derive the source of the token)

    Returns any

  • get erc20Decimals(): number
  • Returns number

  • get isCanonical(): boolean
  • Returns boolean

  • get logo(): string
  • Returns string

  • get name(): string
  • Returns string

  • get splDecimals(): number
  • Returns number

  • get symbol(): any
  • When we have multiple cw20 entries (versions) of a token on Injective we need to match the denom's address with a cw20 entry and get the symbol for that version

    ex: (Main) USDC, USDCet, USDCso

    Returns any

  • Returns TokenType

Methods

  • Returns Token

  • fromMeta(meta: TokenMeta & { denom?: string }, denom?: string): TokenInfo
  • Parameters

    • meta: TokenMeta & { denom?: string }
    • Optional denom: string

    Returns TokenInfo

  • Parameters

    Returns TokenInfo

Generated using TypeDoc