AmountFormat class

A utility class for formatting and converting token amounts.

Constructors

AmountFormat()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

formatValue(BigInt value, int decimals) String
Formats a token amount to a string representation.
fromWei(BigInt value, int decimals) → Decimal
Converts a token amount from its smallest unit (Wei) to its decimal representation.
toBigInt(dynamic value, [int decimals = 18]) BigInt
Converts a token amount to its smallest unit (BigInt) representation.