public class ContractParameter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ContractParameter.ContractParameterDeserializer |
protected static class |
ContractParameter.ContractParameterSerializer |
protected static class |
ContractParameter.ParameterDeserializer<T extends ContractParameter> |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
value |
| Modifier | Constructor and Description |
|---|---|
protected |
ContractParameter() |
protected |
ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType) |
protected |
ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType,
java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
static ContractParameter |
array(ContractParameter... params) |
static ContractParameter |
array(java.util.List<ContractParameter> params) |
static ContractParameter |
bool(boolean bool)
Creates a boolean parameter from the given boolean.
|
static ContractParameter |
byteArray(byte[] byteArray)
Creates a byte array parameter from the given value.
|
static ContractParameter |
byteArray(java.lang.String value)
Creates a byte array parameter from the given hex string.
|
static ContractParameter |
byteArrayFromAddress(java.lang.String address)
Creates a byte array parameter from the given address.
|
boolean |
equals(java.lang.Object o) |
static ContractParameter |
fixed8ByteArray(java.math.BigDecimal number)
Creates a byte array parameter from the given number, transforming it to the Fixed8 number
format in little-endian order.
|
java.lang.String |
getParamName() |
io.neow3j.model.types.ContractParameterType |
getParamType() |
java.lang.Object |
getValue() |
static ContractParameter |
hash160(byte[] hash)
Deprecated.
|
static ContractParameter |
hash160(ScriptHash hash)
Creates a hash160 parameter from the given script hash.
|
static ContractParameter |
hash160(java.lang.String hashHexString)
Deprecated.
|
static ContractParameter |
hash256(byte[] hash)
Deprecated.
|
static ContractParameter |
hash256(ScriptHash hash)
Creates a hash256 parameter from the given script hash.
|
static ContractParameter |
hash256(java.lang.String hashHexString)
Deprecated.
|
int |
hashCode() |
static ContractParameter |
integer(java.math.BigInteger integer)
Creates an integer parameter from the given integer.
|
static ContractParameter |
integer(int integer)
Creates an integer parameter from the given integer.
|
static ContractParameter |
publicKey(byte[] publicKey) |
static ContractParameter |
publicKey(java.lang.String publicKey) |
static ContractParameter |
signature(byte[] signature)
Creates a signature parameter from the given signature.
|
static ContractParameter |
signature(java.lang.String signatureHexString)
Creates a signature parameter from the given signature hexadecimal string.
|
static ContractParameter |
string(java.lang.String value) |
java.lang.String |
toString() |
protected ContractParameter()
protected ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType,
java.lang.Object value)
protected ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType)
public static ContractParameter string(java.lang.String value)
public static ContractParameter array(java.util.List<ContractParameter> params)
public static ContractParameter array(ContractParameter... params)
public static ContractParameter byteArray(byte[] byteArray)
Creates a byte array parameter from the given value.
Make sure that the array is already in the right order. E.g. Fixed8 numbers need to be in little-endian order. It will be sent in the order provided.
byteArray - The parameter value.public static ContractParameter byteArray(java.lang.String value)
Creates a byte array parameter from the given hex string.
Make sure that the value is already in the right order. E.g. Fixed8 numbers need to be in little-endian order. It will be sent in the order provided.
value - The value as a string.public static ContractParameter byteArrayFromAddress(java.lang.String address)
address - An address.public static ContractParameter fixed8ByteArray(java.math.BigDecimal number)
number - A decimal numberpublic static ContractParameter signature(java.lang.String signatureHexString)
signatureHexString - A signature as hexadecimal string.public static ContractParameter signature(byte[] signature)
signature - A signature.public static ContractParameter bool(boolean bool)
bool - a boolean value.public static ContractParameter integer(int integer)
integer - an integer value.public static ContractParameter integer(java.math.BigInteger integer)
integer - an integer value.@Deprecated public static ContractParameter hash160(java.lang.String hashHexString)
hashHexString - a hash160 value as hexadecimal string in big-endian order.@Deprecated public static ContractParameter hash160(byte[] hash)
hash - a hash160 value in little-endian order.public static ContractParameter hash160(ScriptHash hash)
hash - a script hash@Deprecated public static ContractParameter hash256(java.lang.String hashHexString)
hashHexString - a hash256 value as hexadecimal string in big-endian order.@Deprecated public static ContractParameter hash256(byte[] hash)
hash - a hash256 value in little-endian order.public static ContractParameter hash256(ScriptHash hash)
hash - a script hashpublic static ContractParameter publicKey(java.lang.String publicKey)
public static ContractParameter publicKey(byte[] publicKey)
public java.lang.String getParamName()
public io.neow3j.model.types.ContractParameterType getParamType()
public java.lang.Object getValue()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object