githubEdit

Injective List

We have moved the on-chain denoms token metadata to the injective-listarrow-up-right repository. This repository will aggregate data from several sources and produce a comprehensive token metadata master list.

Here is an example of how to integrate injective-list with the TokenFactoryStatic class:

  1. Use the TokenStaticFactory class from the sdk-ts package

import { TokenType, TokenStatic, TokenStaticFactory } from '@injectivelabs/sdk-ts'
import { tokens } from '../data/tokens.json' // json file downloaded from step 1

export const tokenStaticFactory = new TokenStaticFactory(tokens as TokenStatic[])

// After instantiating, we can start using it in our dApp
const denom = 'peggy0x...'
const token = tokenStaticFactory.toToken(denom)

console.log(token)

There are few edge cases that we have to consider while using the TokenFactory:

Last updated