EthereumAbi

Wrapper class for Ethereum ABI encoding &decoding.

Functions

Link copied to clipboard
open fun decodeCall(data: Array<Byte>, abi: String): String
Decode function call data to human readable json format, according to input abi json
Link copied to clipboard
open fun decodeContractCall(coin: CoinType, input: Array<Byte>): Array<Byte>
Decode a contract call (function input) according to an ABI json.
Link copied to clipboard
open fun decodeOutput(fn: EthereumAbiFunction, encoded: Array<Byte>): Boolean
Decode function output from Eth ABI binary, fill output parameters
Link copied to clipboard
open fun decodeParams(coin: CoinType, input: Array<Byte>): Array<Byte>
Decode a function input or output data according to a given ABI.
Link copied to clipboard
open fun decodeValue(coin: CoinType, input: Array<Byte>): Array<Byte>
* Decodes an Eth ABI value according to a given type.
Link copied to clipboard
open fun encode(fn: EthereumAbiFunction): Array<Byte>
Encode function to Eth ABI binary
Link copied to clipboard
open fun encodeFunction(coin: CoinType, input: Array<Byte>): Array<Byte>
Encode function to Eth ABI binary.
Link copied to clipboard
open fun encodeTyped(messageJson: String): Array<Byte>
Compute the hash of a struct, used for signing, according to EIP712 ("v4").