Package org.web3j.tx
Class ClientTransactionManager
java.lang.Object
org.web3j.tx.TransactionManager
org.web3j.tx.ClientTransactionManager
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
ConstructorsConstructorDescriptionClientTransactionManager
(Web3j web3j, String fromAddress) ClientTransactionManager
(Web3j web3j, String fromAddress, int attempts, int sleepDuration) ClientTransactionManager
(Web3j web3j, String fromAddress, TransactionReceiptProcessor transactionReceiptProcessor) -
Method Summary
Modifier and TypeMethodDescriptiongetCode
(String contractAddress, DefaultBlockParameter defaultBlockParameter) sendCall
(String to, String data, DefaultBlockParameter defaultBlockParameter) sendEIP1559Transaction
(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) sendTransaction
(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) Methods inherited from class org.web3j.tx.TransactionManager
executeTransaction, executeTransaction, executeTransactionEIP1559, executeTransactionEIP1559, getFromAddress, processResponse, sendEIP1559Transaction, sendTransaction
-
Constructor Details
-
ClientTransactionManager
-
ClientTransactionManager
-
ClientTransactionManager
public ClientTransactionManager(Web3j web3j, String fromAddress, TransactionReceiptProcessor transactionReceiptProcessor)
-
-
Method Details
-
sendTransaction
public EthSendTransaction sendTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) throws IOException - Specified by:
sendTransaction
in classTransactionManager
- Throws:
IOException
-
sendEIP1559Transaction
public EthSendTransaction sendEIP1559Transaction(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) throws IOException - Specified by:
sendEIP1559Transaction
in classTransactionManager
- Throws:
IOException
-
sendCall
public String sendCall(String to, String data, DefaultBlockParameter defaultBlockParameter) throws IOException - Specified by:
sendCall
in classTransactionManager
- Throws:
IOException
-
getCode
public EthGetCode getCode(String contractAddress, DefaultBlockParameter defaultBlockParameter) throws IOException - Specified by:
getCode
in classTransactionManager
- Throws:
IOException
-