public class TriggerContractResult extends Object
Constructor and Description |
---|
TriggerContractResult(byte[] returnedData) |
TriggerContractResult(TronTransaction transaction) |
Modifier and Type | Method and Description |
---|---|
TronAddress |
getResultAsAddress()
Interprets the result as an address.
|
Object[] |
getResultAsArray(String type)
Interprets the result as an array.
|
Object[] |
getResultAsArray(String type,
int length)
Interprets the result as an array.
|
TronAddress[] |
getResultAsArrayAddress()
Interprets the result as an array of address.
|
boolean[] |
getResultAsArrayBool()
Interprets the result as an array of bool.
|
BigInteger[] |
getResultAsArrayInt()
Interprets the result as an array of int.
|
String[] |
getResultAsArrayString()
Interprets the result as an array of string.
|
BigInteger[] |
getResultAsArrayUInt()
Interprets the result as an array of uint.
|
boolean |
getResultAsBool()
Interprets the result as boolean.
|
byte[] |
getResultAsBytes()
Interprets the result as a dynamic array of bytes
|
byte[] |
getResultAsFixedBytes(int length)
Interprets the result as a fixed array of bytes.
|
BigInteger |
getResultAsInt()
Interprets the result as an integer.
|
String |
getResultAsString()
Interprets the result as an string.
|
BigInteger |
getResultAsUInt()
Interprets the result as an unsigned integer.
|
byte[] |
getReturnedData() |
TronTransaction |
getTransaction() |
List<Object> |
interpretReturnedData(List<String> types)
Interprets the returned data.
|
List<Object> |
interpretReturnedData(String type)
Interprets the returned data.
|
boolean |
isTransaction() |
public TriggerContractResult(TronTransaction transaction)
public TriggerContractResult(byte[] returnedData)
public boolean isTransaction()
public TronTransaction getTransaction()
public byte[] getReturnedData()
public List<Object> interpretReturnedData(String type) throws InvalidCallDataException
type
- the TVM type.InvalidCallDataException
- If the data or the type are invalid.public List<Object> interpretReturnedData(List<String> types) throws InvalidCallDataException
types
- the TVM types.InvalidCallDataException
- If the data or the type are invalid.public boolean getResultAsBool() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public TronAddress getResultAsAddress() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public BigInteger getResultAsInt() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public BigInteger getResultAsUInt() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public String getResultAsString() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public byte[] getResultAsFixedBytes(int length) throws InvalidCallDataException
length
- The length of the array.InvalidCallDataException
- If the data or the type are invalid.public byte[] getResultAsBytes() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public Object[] getResultAsArray(String type) throws InvalidCallDataException
type
- the type of the elements of the array.InvalidCallDataException
- If the data or the type are invalid.public Object[] getResultAsArray(String type, int length) throws InvalidCallDataException
type
- the type of the elements of the array.length
- the length of the arrayInvalidCallDataException
- If the data or the type are invalid.public BigInteger[] getResultAsArrayInt() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public BigInteger[] getResultAsArrayUInt() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public String[] getResultAsArrayString() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public boolean[] getResultAsArrayBool() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.public TronAddress[] getResultAsArrayAddress() throws InvalidCallDataException
InvalidCallDataException
- If the data or the type are invalid.Copyright © 2020. All rights reserved.