Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TRONDecimals = 6 ISWAPDecimals = 8 BTTDecimals = 18 BNBDecimals = 18 TRON = *newCurrency(TRONDecimals, "TRX", "Tron") BNB = *newCurrency(BNBDecimals, "BNB", "Tron") BTT = *newCurrency(BTTDecimals, "BTT", "Tron") )
View Source
var WETH = map[constants.ChainID]Token{ constants.MAINNET: NewToken(constants.MAINNET, "0x891CDB91D149F23B1A45D9C5CA78A88D0CB44C18", TRONDecimals, "WTRX", "Wrapped TRX"), constants.SHASTA: NewToken(constants.SHASTA, "0xB970B980C520EC3F49921C2727BFA6DE79E7226A", TRONDecimals, "WTRX", "Wrapped TRX"), constants.NILE: NewToken(constants.NILE, "0x8f44113A985076431b77f6078f0929f949cB8836", TRONDecimals, "WTRX", "Wrapped TRX"), constants.BTTMainnet: NewToken(constants.BTTMainnet, "0x23181F21DEa5936e24163FFABa4Ea3B316B57f3C", BTTDecimals, "WBTT", "Wrapped Bittorrent"), constants.BSCMainnet: NewToken(constants.BSCMainnet, "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", BNBDecimals, "WBNB", "Wrapped BNB"), }
Functions ¶
func CurrencyEquals ¶
CurrencyEquals checks the currency equality
Types ¶
type Currency ¶
type Token ¶
type Token struct { Currency `bson:"inline"` ChainID constants.ChainID `json:"chain_id,omitempty" bson:"chainId"` Address string `json:"address,omitempty" bson:"address"` }
Token the ERC20 based crypto token
func (*Token) SortsBefore ¶
SortsBefore sorts the tokens based on addresses
Click to show internal directories.
Click to hide internal directories.