public class TriggerContractDataBuilder extends Object
Constructor and Description |
---|
TriggerContractDataBuilder()
Creates a new instance of TriggerContractDataBuilder
|
TriggerContractDataBuilder(String methodSignature)
Creates a new instance of TriggerContractDataBuilder
|
Modifier and Type | Method and Description |
---|---|
byte[] |
build()
Builds the trigger call.
|
byte[] |
buildConstructorParams()
Builds as constructor paramsList.
|
static String |
getMethodFromCall(String call)
Gets the method name from a call.
|
static List<String> |
getparamsFromCall(String call)
Gets the parameters form a call.
|
TriggerContractDataBuilder |
paramAddress(TronAddress value)
Adds new address parameter.
|
TriggerContractDataBuilder |
paramArrayBool(boolean[] array,
boolean dynamic)
Adds new boolean array parameter.
|
TriggerContractDataBuilder |
paramArrayInt(BigInteger[] array,
boolean dynamic)
Adds new integer array parameter.
|
TriggerContractDataBuilder |
paramArrayString(String[] array,
boolean dynamic)
Adds new string array parameter.
|
TriggerContractDataBuilder |
paramArrayUInt(BigInteger[] array,
boolean dynamic)
Adds new unsigned integer array parameter.
|
TriggerContractDataBuilder |
paramBool(boolean value)
Adds new boolean parameter.
|
TriggerContractDataBuilder |
paramBytes(byte[] value)
Adds new dynamic bytes array parameter.
|
TriggerContractDataBuilder |
paramFixedBytes(byte[] value)
Adds new fixed bytes parameter (1 to 32 bytes).
|
TriggerContractDataBuilder |
paramInt(BigInteger value)
Adds new integer parameter.
|
TriggerContractDataBuilder |
params(Object... arguments)
Sets all parameters to the trigger contract call
|
TriggerContractDataBuilder |
paramsList(List<String> arguments)
Sets all parameters to the trigger contract call
|
TriggerContractDataBuilder |
paramString(String value)
Adds new string parameter.
|
TriggerContractDataBuilder |
paramUInt(BigInteger value)
Adds new unsigned integer parameter.
|
public TriggerContractDataBuilder()
public TriggerContractDataBuilder(String methodSignature)
methodSignature
- The method signaturepublic TriggerContractDataBuilder paramAddress(TronAddress value)
value
- The value of the parameter.public TriggerContractDataBuilder paramBool(boolean value)
value
- The value of the parameter.public TriggerContractDataBuilder paramUInt(BigInteger value)
value
- The value of the parameter.public TriggerContractDataBuilder paramInt(BigInteger value)
value
- The value of the parameter.public TriggerContractDataBuilder paramString(String value)
value
- The value of the parameter.public TriggerContractDataBuilder paramFixedBytes(byte[] value)
value
- The value of the parameter.public TriggerContractDataBuilder paramBytes(byte[] value)
value
- The value of the parameter.public TriggerContractDataBuilder paramArrayBool(boolean[] array, boolean dynamic)
array
- The value of the parameter.dynamic
- true if the array is dynamic sizedpublic TriggerContractDataBuilder paramArrayString(String[] array, boolean dynamic)
array
- The value of the parameter.dynamic
- true if the array is dynamic sizedpublic TriggerContractDataBuilder paramArrayInt(BigInteger[] array, boolean dynamic)
array
- The value of the parameter.dynamic
- true if the array is dynamic sizedpublic TriggerContractDataBuilder paramArrayUInt(BigInteger[] array, boolean dynamic)
array
- The value of the parameter.dynamic
- true if the array is dynamic sizedpublic TriggerContractDataBuilder params(Object... arguments)
arguments
- the argumentspublic TriggerContractDataBuilder paramsList(List<String> arguments)
arguments
- the argumentspublic byte[] build() throws EncodingException
EncodingException
- If the parameters are wrong specified.public byte[] buildConstructorParams() throws EncodingException
EncodingException
- If the parameters are wrong specified.public static String getMethodFromCall(String call)
call
- The call.Copyright © 2020. All rights reserved.