Package org.web3j.tx
Class ClientTransactionManager
- java.lang.Object
-
- org.web3j.tx.TransactionManager
-
- org.web3j.tx.ClientTransactionManager
-
public class ClientTransactionManager extends TransactionManager
TransactionManager implementation for using an Ethereum node to transact.Note: accounts must be unlocked on the node for transactions to be successful.
-
-
Field Summary
-
Fields inherited from class org.web3j.tx.TransactionManager
DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH, DEFAULT_POLLING_FREQUENCY, REVERT_ERR_STR
-
-
Constructor Summary
Constructors Constructor Description ClientTransactionManager(Web3j web3j, java.lang.String fromAddress)
ClientTransactionManager(Web3j web3j, java.lang.String fromAddress, int attempts, int sleepDuration)
ClientTransactionManager(Web3j web3j, java.lang.String fromAddress, TransactionReceiptProcessor transactionReceiptProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EthGetCode
getCode(java.lang.String contractAddress, DefaultBlockParameter defaultBlockParameter)
java.lang.String
sendCall(java.lang.String to, java.lang.String data, DefaultBlockParameter defaultBlockParameter)
EthSendTransaction
sendTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value, boolean constructor)
EthSendTransaction
sendTransactionEIP1559(java.math.BigInteger gasPremium, java.math.BigInteger feeCap, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value, boolean constructor)
-
Methods inherited from class org.web3j.tx.TransactionManager
executeTransaction, executeTransaction, executeTransactionEIP1559, executeTransactionEIP1559, getFromAddress, sendTransaction, sendTransactionEIP1559
-
-
-
-
Constructor Detail
-
ClientTransactionManager
public ClientTransactionManager(Web3j web3j, java.lang.String fromAddress)
-
ClientTransactionManager
public ClientTransactionManager(Web3j web3j, java.lang.String fromAddress, int attempts, int sleepDuration)
-
ClientTransactionManager
public ClientTransactionManager(Web3j web3j, java.lang.String fromAddress, TransactionReceiptProcessor transactionReceiptProcessor)
-
-
Method Detail
-
sendTransaction
public EthSendTransaction sendTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value, boolean constructor) throws java.io.IOException
- Specified by:
sendTransaction
in classTransactionManager
- Throws:
java.io.IOException
-
sendTransactionEIP1559
public EthSendTransaction sendTransactionEIP1559(java.math.BigInteger gasPremium, java.math.BigInteger feeCap, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value, boolean constructor) throws java.io.IOException
- Specified by:
sendTransactionEIP1559
in classTransactionManager
- Throws:
java.io.IOException
-
sendCall
public java.lang.String sendCall(java.lang.String to, java.lang.String data, DefaultBlockParameter defaultBlockParameter) throws java.io.IOException
- Specified by:
sendCall
in classTransactionManager
- Throws:
java.io.IOException
-
getCode
public EthGetCode getCode(java.lang.String contractAddress, DefaultBlockParameter defaultBlockParameter) throws java.io.IOException
- Specified by:
getCode
in classTransactionManager
- Throws:
java.io.IOException
-
-