AbiType class abstract

Implementers

Constructors

AbiType()

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

byteLength() int
Precompute the byte size of the static ABI typed value @return the byte size of the ABI value @throws IllegalArgumentException if the ABI type is dynamic typed
decode(Uint8List encoded) Object
Decode ABI encoded byte array to dart values from ABI type schemes @param encoded byte array of ABI encoding @throws IllegalArgumentException if encoded byte array cannot match with ABI encoding rules
encode(dynamic obj) Uint8List
Encode values with ABI rules based on the ABI type schemes @return byte[] of ABI encoding @throws IllegalArgumentException if encoder cannot infer the type from obj
isDynamic() bool
Check if this ABI type is a dynamic type. Returns decision if the ABI type is dynamic.
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

castToTupleType(int size, AbiType type) TypeTuple
Cast a dynamic/static array to ABI tuple type @param size length of the ABI array @param t ABI type of the element of the ABI array @return a type-cast from ABI array to an ABI tuple type
findBoolLR(List<AbiType> typeArray, int index, int delta) int
getContentEncoded(Uint8List encoded) Uint8List
Take the bytes after the first 2 bytes in the byte array (consider the byte array to be an encoding for ABI dynamic typed value) @param encoded an ABI encoding byte array @return the tailing bytes after the first 2 bytes of the ABI encoding byte array @throws IllegalArgumentException if the encoded byte array has length < 2
getLengthEncoded(Uint8List encoded) Uint8List
Take the first 2 bytes in the byte array (consider the byte array to be an encoding for ABI dynamic typed value) @param encoded an ABI encoding byte array @return the first 2 bytes of the ABI encoding byte array @throws IllegalArgumentException if the encoded byte array has length < 2
parseTupleContent(String input) List<String>
valueOf(String scheme) AbiType
Deserialize ABI type scheme from string @param str string representation of ABI type schemes @return ABI type scheme object @throws ArgumentError if ABI type serialization strings are corrupted

Constants

ABI_DYNAMIC_HEAD_BYTE_LEN → const int