EthUtils class

These utilities are used extensively within the library, but are also quite useful for application developers.

Annotations
  • @JS("utils")

Constructors

EthUtils()

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 Properties

defaultAbiCoder AbiCoder
An AbiCoder created when the library is imported which is used by the Interface.
no setter

Static Methods

arrayify(String hash) String
commify(String value) String
Returns a string with value grouped by 3 digits, separated by ,.
formatEther(String value) String
The equivalent to calling formatUnits(value, "ether").
formatUnits(String value, [dynamic unit = 'ether']) String
Returns a String representation of value formatted with unit digits (if it is a number) or to the unit specified (if a string).
getAddress(String address) String
Returns address as a Checksum Address.
hashMessage(dynamic message) String
Computes the EIP-191 personal message digest of message.
id(String text) String
The Ethereum Identity function computes the KECCAK256 hash of the text bytes.
isAddress(String address) bool
Returns true if address is valid (in any supported format).
parseEther(String value) BigNumber
The equivalent to calling parseUnits(value, "ether").
parseUnit(String value, [dynamic unit = 'ether']) BigNumber
Returns a BigNumber representation of value, parsed with unit digits (if it is a number) or from the unit specified (if a string).
solidityKeccak256(List<String> types, List values) String
Returns the KECCAK256 of the non-standard encoded values packed according to their respective type in types.
solidityPack(List<String> types, List values) String
Returns the non-standard encoded values packed according to their respective type in types.
soliditySha256(List<String> types, List values) String
Returns the SHA2-256 of the non-standard encoded values packed according to their respective type in types.
verifyMessage(String hash, String sig) String