Package foundation.icon.icx
Class TransactionBuilder.Builder
- java.lang.Object
-
- foundation.icon.icx.TransactionBuilder.Builder
-
- Enclosing class:
- TransactionBuilder
public static final class TransactionBuilder.Builder extends java.lang.Object
A Builder for the simple icx sending transaction.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transaction
build()
Make a new transaction using given propertiesTransactionBuilder.CallBuilder
call(java.lang.String method)
Converts the builder to CallBuilder with the calling method nameTransactionBuilder.DeployBuilder
deploy(java.lang.String contentType, byte[] content)
Converts the builder to DeployBuilder with the deploying contentTransactionBuilder.DepositBuilder
deposit()
Converts the builder to DepositBuilderTransactionBuilder.Builder
from(Address from)
Sets the sender addressTransactionBuilder.MessageBuilder
message(java.lang.String message)
Converts the builder to MessageBuilder with the messageTransactionBuilder.Builder
nid(NetworkId nid)
Sets the Network IDTransactionBuilder.Builder
nid(java.math.BigInteger nid)
Sets the Network IDTransactionBuilder.Builder
nonce(java.math.BigInteger nonce)
Sets the nonceTransactionBuilder.Builder
stepLimit(java.math.BigInteger stepLimit)
Sets the Maximum stepTransactionBuilder.Builder
timestamp(java.math.BigInteger timestamp)
Sets the timestampTransactionBuilder.Builder
to(Address to)
Sets the receiver addressTransactionBuilder.Builder
value(java.math.BigInteger value)
Sets the value to send ICXs
-
-
-
Method Detail
-
nid
public TransactionBuilder.Builder nid(java.math.BigInteger nid)
Sets the Network ID- Parameters:
nid
- Network ID ("0x1" for Mainnet, etc)- Returns:
- self
-
nid
public TransactionBuilder.Builder nid(NetworkId nid)
Sets the Network ID- Parameters:
nid
- Network ID ("0x1" for Mainnet, etc)- Returns:
- self
-
from
public TransactionBuilder.Builder from(Address from)
Sets the sender address- Parameters:
from
- EOA address that created the transaction- Returns:
- self
-
to
public TransactionBuilder.Builder to(Address to)
Sets the receiver address- Parameters:
to
- EOA address to receive coins, or SCORE address to execute the transaction.- Returns:
- self
-
value
public TransactionBuilder.Builder value(java.math.BigInteger value)
Sets the value to send ICXs- Parameters:
value
- Amount of ICX coins in loop to transfer. (1 icx = 1 ^ 18 loop)- Returns:
- self
-
stepLimit
public TransactionBuilder.Builder stepLimit(java.math.BigInteger stepLimit)
Sets the Maximum step- Parameters:
stepLimit
- Maximum step allowance that can be used by the transaction.- Returns:
- self
-
timestamp
public TransactionBuilder.Builder timestamp(java.math.BigInteger timestamp)
Sets the timestamp- Parameters:
timestamp
- Transaction creation time, in microsecond.- Returns:
- self
-
nonce
public TransactionBuilder.Builder nonce(java.math.BigInteger nonce)
Sets the nonce- Parameters:
nonce
- An arbitrary number used to prevent transaction hash collision.- Returns:
- self
-
call
public TransactionBuilder.CallBuilder call(java.lang.String method)
Converts the builder to CallBuilder with the calling method name- Parameters:
method
- calling method name- Returns:
TransactionBuilder.CallBuilder
-
deploy
public TransactionBuilder.DeployBuilder deploy(java.lang.String contentType, byte[] content)
Converts the builder to DeployBuilder with the deploying content- Parameters:
contentType
- content typecontent
- deploying content- Returns:
TransactionBuilder.DeployBuilder
-
message
public TransactionBuilder.MessageBuilder message(java.lang.String message)
Converts the builder to MessageBuilder with the message- Parameters:
message
- message- Returns:
TransactionBuilder.MessageBuilder
-
deposit
public TransactionBuilder.DepositBuilder deposit()
Converts the builder to DepositBuilder- Returns:
TransactionBuilder.DepositBuilder
- Since:
- 0.9.13
-
build
public Transaction build()
Make a new transaction using given properties- Returns:
- a transaction to send
-
-