Represents a generic Token A token has base units (e.g. wei) and display units For example 1 VTHO (1 in display units) = 10^18 base units (wei)

Constructors

Properties

Accessors

Methods

Constructors

Properties

_valueWei: bigint
name: string

Token name

tokenAddress: Address

Token contract address

units: Units

Base units to represent the token

Accessors

Methods

  • Converts the base unit value to a human-readable string. If displayDecimals is provided the value is rounded to that number of decimals Otherwise, it falls back to the token's inherent units.

    Parameters

    • OptionaldisplayDecimals: number

      Number of decimal places to round to

    Returns string