CustomUnitToken class

Read-only interface for Core tokens implementing calculated custom units.

Constructors

CustomUnitToken(Web3Client client, XCBAddress contractAddress)
Creates a custom-unit reader for contractAddress.

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

balance(XCBAddress account, {String? unit, BlockNum? atBlock}) Future<CustomUnitBalance>
Reads canonical and calculated balances at the same block reference.
balanceOfUnit(XCBAddress account, String unit, {BlockNum? atBlock}) Future<BigInt>
Reads a calculated balance in unit.
canonicalBalance(XCBAddress account, {BlockNum? atBlock}) Future<BigInt>
Reads the canonical token balance.
discover({BlockNum? atBlock}) Future<CustomUnitDiscovery?>
Detects and validates the custom-unit capability used by Tone/Core API.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preferredUnit({BlockNum? atBlock}) Future<String>
Calls preferredUnit() without applying discovery validation.
supportedUnits({BlockNum? atBlock}) Future<List<String>>
Calls supportedUnits() without applying discovery validation.
supportsUnit(String unit, {BlockNum? atBlock}) Future<bool>
Calls supportsUnit(unit).
toString() String
A string representation of this object.
inherited

Operators

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