public abstract class FunctionReturnDecoder
extends java.lang.Object
Delegates to DefaultFunctionReturnDecoder unless a FunctionReturnDecoderProvider SPI is found, in which case the first implementation found will be
used.
| Constructor and Description |
|---|
FunctionReturnDecoder() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<Type> |
decode(java.lang.String rawInput,
java.util.List<TypeReference<Type>> outputParameters)
Decode ABI encoded return values from smart contract function call.
|
protected abstract <T extends Type> |
decodeEventParameter(java.lang.String rawInput,
TypeReference<T> typeReference) |
protected abstract java.util.List<Type> |
decodeFunctionResult(java.lang.String rawInput,
java.util.List<TypeReference<Type>> outputParameters) |
static <T extends Type> |
decodeIndexedValue(java.lang.String rawInput,
TypeReference<T> typeReference)
Decodes an indexed parameter associated with an event.
|
public static java.util.List<Type> decode(java.lang.String rawInput, java.util.List<TypeReference<Type>> outputParameters)
rawInput - ABI encoded inputoutputParameters - list of return types as TypeReferenceList of values returned by function, Collections.emptyList() if
invalid responsepublic static <T extends Type> Type decodeIndexedValue(java.lang.String rawInput, TypeReference<T> typeReference)
If any of the following types are indexed, the Keccak-256 hashes of the values are returned instead. These are returned as a bytes32 value.
See the Solidity documentation for further information.
T - type of TypeReferencerawInput - ABI encoded inputtypeReference - of expected result typeprotected abstract java.util.List<Type> decodeFunctionResult(java.lang.String rawInput, java.util.List<TypeReference<Type>> outputParameters)
protected abstract <T extends Type> Type decodeEventParameter(java.lang.String rawInput, TypeReference<T> typeReference)