Package org.web3j.tx
Class TransactionManager
- java.lang.Object
-
- org.web3j.tx.TransactionManager
-
- Direct Known Subclasses:
ClientTransactionManager,RawTransactionManager,ReadonlyTransactionManager
public abstract class TransactionManager extends java.lang.ObjectTransaction manager abstraction for executing transactions with Ethereum client via various mechanisms.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_POLLING_ATTEMPTS_PER_TX_HASHstatic longDEFAULT_POLLING_FREQUENCYstatic java.lang.StringREVERT_ERR_STR
-
Constructor Summary
Constructors Modifier Constructor Description protectedTransactionManager(Web3j web3j, int attempts, long sleepDuration, java.lang.String fromAddress)protectedTransactionManager(Web3j web3j, java.lang.String fromAddress)protectedTransactionManager(TransactionReceiptProcessor transactionReceiptProcessor, java.lang.String fromAddress)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected TransactionReceiptexecuteTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value)protected TransactionReceiptexecuteTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value, boolean constructor)protected TransactionReceiptexecuteTransactionEIP1559(java.math.BigInteger gasPremium, java.math.BigInteger feeCap, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value)protected TransactionReceiptexecuteTransactionEIP1559(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)abstract EthGetCodegetCode(java.lang.String contractAddress, DefaultBlockParameter defaultBlockParameter)java.lang.StringgetFromAddress()abstract java.lang.StringsendCall(java.lang.String to, java.lang.String data, DefaultBlockParameter defaultBlockParameter)EthSendTransactionsendTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value)abstract EthSendTransactionsendTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value, boolean constructor)EthSendTransactionsendTransactionEIP1559(java.math.BigInteger gasPremium, java.math.BigInteger feeCap, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value)abstract EthSendTransactionsendTransactionEIP1559(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)
-
-
-
Field Detail
-
DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH
public static final int DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH
- See Also:
- Constant Field Values
-
DEFAULT_POLLING_FREQUENCY
public static final long DEFAULT_POLLING_FREQUENCY
- See Also:
- Constant Field Values
-
REVERT_ERR_STR
public static final java.lang.String REVERT_ERR_STR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TransactionManager
protected TransactionManager(TransactionReceiptProcessor transactionReceiptProcessor, java.lang.String fromAddress)
-
TransactionManager
protected TransactionManager(Web3j web3j, java.lang.String fromAddress)
-
TransactionManager
protected TransactionManager(Web3j web3j, int attempts, long sleepDuration, java.lang.String fromAddress)
-
-
Method Detail
-
executeTransaction
protected TransactionReceipt executeTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value) throws java.io.IOException, TransactionException
- Throws:
java.io.IOExceptionTransactionException
-
executeTransaction
protected TransactionReceipt executeTransaction(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, TransactionException
- Throws:
java.io.IOExceptionTransactionException
-
executeTransactionEIP1559
protected TransactionReceipt executeTransactionEIP1559(java.math.BigInteger gasPremium, java.math.BigInteger feeCap, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value) throws java.io.IOException, TransactionException
- Throws:
java.io.IOExceptionTransactionException
-
executeTransactionEIP1559
protected TransactionReceipt executeTransactionEIP1559(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, TransactionException
- Throws:
java.io.IOExceptionTransactionException
-
sendTransaction
public EthSendTransaction sendTransaction(java.math.BigInteger gasPrice, java.math.BigInteger gasLimit, java.lang.String to, java.lang.String data, java.math.BigInteger value) throws java.io.IOException
- 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) throws java.io.IOException
- Throws:
java.io.IOException
-
sendTransaction
public abstract 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
- Throws:
java.io.IOException
-
sendTransactionEIP1559
public abstract 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
- Throws:
java.io.IOException
-
sendCall
public abstract java.lang.String sendCall(java.lang.String to, java.lang.String data, DefaultBlockParameter defaultBlockParameter) throws java.io.IOException- Throws:
java.io.IOException
-
getCode
public abstract EthGetCode getCode(java.lang.String contractAddress, DefaultBlockParameter defaultBlockParameter) throws java.io.IOException
- Throws:
java.io.IOException
-
getFromAddress
public java.lang.String getFromAddress()
-
-