Function fromString

  • Converts a decimal value in Mas to the smallest unit of the Massa currency.

    Parameters

    • value: string

      The decimal value.

    Returns Mas

    The value in the smallest unit of the Massa currency.

    Throws

    An error if the format is not a decimal.

    Throws

    An error if the value is too large to be represented by an U256 or has too many decimals.