Package org.web3j.tx
Class TransactionManager
java.lang.Object
org.web3j.tx.TransactionManager
- Direct Known Subclasses:
ClientTransactionManager,RawTransactionManager,ReadonlyTransactionManager
Transaction manager abstraction for executing transactions with Ethereum client via various
mechanisms.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransactionManager(Web3j web3j, int attempts, long sleepDuration, String fromAddress) protectedTransactionManager(Web3j web3j, String fromAddress) protectedTransactionManager(TransactionReceiptProcessor transactionReceiptProcessor, String fromAddress) -
Method Summary
Modifier and TypeMethodDescriptionprotected TransactionReceiptexecuteTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value) protected TransactionReceiptexecuteTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) protected TransactionReceiptexecuteTransactionEIP1559(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value) protected TransactionReceiptexecuteTransactionEIP1559(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) abstract EthGetCodegetCode(String contractAddress, DefaultBlockParameter defaultBlockParameter) protected TransactionReceiptprocessResponse(EthSendTransaction transactionResponse) abstract StringsendCall(String to, String data, DefaultBlockParameter defaultBlockParameter) sendEIP1559Transaction(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value) abstract EthSendTransactionsendEIP1559Transaction(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) abstract EthSendTransactionsendTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor)
-
Field Details
-
DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH
public static final int DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH- See Also:
-
DEFAULT_POLLING_FREQUENCY
public static final long DEFAULT_POLLING_FREQUENCY- See Also:
-
REVERT_ERR_STR
- See Also:
-
-
Constructor Details
-
TransactionManager
protected TransactionManager(TransactionReceiptProcessor transactionReceiptProcessor, String fromAddress) -
TransactionManager
-
TransactionManager
-
-
Method Details
-
executeTransaction
protected TransactionReceipt executeTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value) throws IOException, TransactionException - Throws:
IOExceptionTransactionException
-
executeTransaction
protected TransactionReceipt executeTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) throws IOException, TransactionException - Throws:
IOExceptionTransactionException
-
executeTransactionEIP1559
protected TransactionReceipt executeTransactionEIP1559(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value) throws IOException, TransactionException - Throws:
IOExceptionTransactionException
-
executeTransactionEIP1559
protected TransactionReceipt executeTransactionEIP1559(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) throws IOException, TransactionException - Throws:
IOExceptionTransactionException
-
sendTransaction
public EthSendTransaction sendTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value) throws IOException - Throws:
IOException
-
sendEIP1559Transaction
public EthSendTransaction sendEIP1559Transaction(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value) throws IOException - Throws:
IOException
-
sendTransaction
public abstract EthSendTransaction sendTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) throws IOException - Throws:
IOException
-
sendEIP1559Transaction
public abstract EthSendTransaction sendEIP1559Transaction(long chainId, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) throws IOException - Throws:
IOException
-
sendCall
public abstract String sendCall(String to, String data, DefaultBlockParameter defaultBlockParameter) throws IOException - Throws:
IOException
-
getCode
public abstract EthGetCode getCode(String contractAddress, DefaultBlockParameter defaultBlockParameter) throws IOException - Throws:
IOException
-
getFromAddress
-
processResponse
protected TransactionReceipt processResponse(EthSendTransaction transactionResponse) throws IOException, TransactionException - Throws:
IOExceptionTransactionException
-