EthereumAbiValue

Represents Ethereum ABI value

Functions

Link copied to clipboard
open fun decodeArray(input: Array<Byte>, type: String): String
Decode an array of given simple types.
Link copied to clipboard
open fun decodeUInt256(input: Array<Byte>): String
Decodes input data (bytes longer than 32 will be truncated) as uint256
Link copied to clipboard
open fun decodeValue(input: Array<Byte>, type: String): String
Decode an arbitrary type, return value as string
Link copied to clipboard
open fun encodeAddress(value: Array<Byte>): Array<Byte>
Encode an address according to Ethereum ABI, 20 bytes of the address.
Link copied to clipboard
open fun encodeBool(value: Boolean): Array<Byte>
Encode a bool according to Ethereum ABI, into 32 bytes.
Link copied to clipboard
open fun encodeBytes(value: Array<Byte>): Array<Byte>
Encode a number of bytes, up to 32 bytes, padded on the right.
Link copied to clipboard
open fun encodeBytesDyn(value: Array<Byte>): Array<Byte>
Encode a dynamic number of bytes by encoding its hash
Link copied to clipboard
open fun encodeInt256(value: Array<Byte>): Array<Byte>
Encode a int256 according to Ethereum ABI, into 32 bytes.
Link copied to clipboard
open fun encodeInt32(value: Int): Array<Byte>
Encode a int32 according to Ethereum ABI, into 32 bytes.
Link copied to clipboard
open fun encodeString(value: String): Array<Byte>
Encode a string according to Ethereum ABI by encoding its hash.
Link copied to clipboard
open fun encodeUInt256(value: Array<Byte>): Array<Byte>
Encode an int256 according to Ethereum ABI, into 32 bytes.
Link copied to clipboard
open fun encodeUInt32(value: Int): Array<Byte>
Encode a uint32 according to Ethereum ABI, into 32 bytes.