Unit parser

[blockchain/ethereum/Unit parser]


Creates BigNumber representation of number units useing the specified amount of decimals. See: https://docs.ethers.io/v5/api/utils/display-logic/#utils-parseUnits


Keywords: ethers, decimals, BigNumber

Input ports

  • units: number

    The number of units

  • decimals: number

    The number of decimals to represent the unit

Output ports

  • result: {string: any}

    The BigNumber representation of value, parsed with unit digits.

Last updated