Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PriceTokenAmount

Contains token structure with price and amount.

Hierarchy

Index

Constructors

Properties

address: string
blockchain: BlockchainName
decimals: number
name: string
symbol: string

Accessors

  • get asStruct(): PriceTokenStruct
  • get asStructWithAmount(): PriceTokenAmountStruct
  • get isNative(): boolean
  • get price(): BigNumber
  • get stringWeiAmount(): string
  • get tokenAmount(): BigNumber
  • get weiAmount(): BigNumber

Methods

  • cloneAndCreate(tokenStruct?: Partial<PriceTokenAmountStruct>): Promise<PriceTokenAmount>
  • getAndUpdateTokenPrice(): Promise<BigNumber>
  • weiAmountMinusSlippage(slippage: number): BigNumber
  • weiAmountPlusSlippage(slippage: number): BigNumber
  • createFromToken(tokenAmount: TokenStruct & { weiAmount: BigNumber } & TokenStruct & { tokenAmount: BigNumber }): Promise<PriceTokenAmount>
  • createToken(tokenAmountBaseStruct: PriceTokenAmountBaseStruct): Promise<PriceTokenAmount>
  • createTokens(tokensAddresses: string[] | readonly string[], blockchain: BlockchainName): Promise<Token[]>
  • tokensToAddresses(tokens: Token[]): string[]

Generated using TypeDoc