Package org.web3j.tx
Class RawTransactionManager
java.lang.Object
org.web3j.tx.TransactionManager
org.web3j.tx.RawTransactionManager
- Direct Known Subclasses:
FastRawTransactionManager
TransactionManager implementation using Ethereum wallet file to create and sign transactions
locally.
This transaction manager provides support for specifying the chain id for transactions as per EIP155, as well as for locally signing RawTransaction instances without broadcasting them.
-
Field Summary
FieldsFields inherited from class org.web3j.tx.TransactionManager
DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH, DEFAULT_POLLING_FREQUENCY, REVERT_ERR_STR -
Constructor Summary
ConstructorsConstructorDescriptionRawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials) RawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials, int attempts, int sleepDuration) RawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials, long chainId) RawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials, long chainId, int attempts, long sleepDuration) RawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials, long chainId, TransactionReceiptProcessor transactionReceiptProcessor) RawTransactionManager(Web3j web3j, TxSignService txSignService, long chainId) -
Method Summary
Modifier and TypeMethodDescriptiongetCode(String contractAddress, DefaultBlockParameter defaultBlockParameter) protected BigIntegergetNonce()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) voidsetTxHashVerifier(TxHashVerifier txHashVerifier) sign(org.web3j.crypto.RawTransaction rawTransaction) signAndSend(org.web3j.crypto.RawTransaction rawTransaction) Methods inherited from class org.web3j.tx.TransactionManager
executeTransaction, executeTransaction, executeTransactionEIP1559, executeTransactionEIP1559, getFromAddress, processResponse, sendEIP1559Transaction, sendTransaction
-
Field Details
-
txHashVerifier
-
-
Constructor Details
-
RawTransactionManager
-
RawTransactionManager
-
RawTransactionManager
public RawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials, long chainId, TransactionReceiptProcessor transactionReceiptProcessor) -
RawTransactionManager
public RawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials, long chainId, int attempts, long sleepDuration) -
RawTransactionManager
-
RawTransactionManager
public RawTransactionManager(Web3j web3j, org.web3j.crypto.Credentials credentials, int attempts, int sleepDuration)
-
-
Method Details
-
getNonce
- Throws:
IOException
-
getTxHashVerifier
-
setTxHashVerifier
-
sendTransaction
public EthSendTransaction sendTransaction(BigInteger gasPrice, BigInteger gasLimit, String to, String data, BigInteger value, boolean constructor) throws IOException - Specified by:
sendTransactionin 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:
sendEIP1559Transactionin classTransactionManager- Throws:
IOException
-
sendCall
public String sendCall(String to, String data, DefaultBlockParameter defaultBlockParameter) throws IOException - Specified by:
sendCallin classTransactionManager- Throws:
IOException
-
getCode
public EthGetCode getCode(String contractAddress, DefaultBlockParameter defaultBlockParameter) throws IOException - Specified by:
getCodein classTransactionManager- Throws:
IOException
-
sign
-
signAndSend
public EthSendTransaction signAndSend(org.web3j.crypto.RawTransaction rawTransaction) throws IOException - Throws:
IOException
-