Package org.web3j.crypto
Class RawTransaction
java.lang.Object
org.web3j.crypto.RawTransaction
- Direct Known Subclasses:
SignedRawTransaction
Transaction class used for signing transactions locally.
For the specification, refer to p4 of the yellow paper.
For the specification, refer to p4 of the yellow paper.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRawTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value, String data) protectedRawTransaction(ITransaction transaction) -
Method Summary
Modifier and TypeMethodDescriptionstatic RawTransactioncreateContractTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, BigInteger value, String init) static RawTransactioncreateEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) Create an EIP-7594 (Osaka/Fusaka) blob transaction directly from raw blobs.static RawTransactioncreateEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<AccessListObject> accessList) Create an EIP-7594 (Osaka/Fusaka) blob transaction directly from raw blobs, with an access list.static RawTransactioncreateEtherTransaction(long chainId, BigInteger nonce, BigInteger gasLimit, String to, BigInteger value, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas) static RawTransactioncreateEtherTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value) static RawTransactioncreateTransaction(long chainId, BigInteger nonce, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas) static RawTransactioncreateTransaction(long chainId, BigInteger nonce, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, List<AccessListObject> accessList) static RawTransactioncreateTransaction(long chainId, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value, String data, List<AccessListObject> accessList) static RawTransactioncreateTransaction(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) static RawTransactioncreateTransaction(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, List<AccessListObject> accessList, List<AuthorizationTuple> authorizationList) static RawTransactioncreateTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, String data) static RawTransactioncreateTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value, String data) static RawTransactioncreateTransaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) static RawTransactioncreateTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) static RawTransactioncreateTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) static RawTransactioncreateTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create an EIP-7594 (Osaka/Fusaka) blob transaction.static RawTransactioncreateTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) Create an EIP-7594 (Osaka/Fusaka) blob transaction with access list.getData()getNonce()getTo()getType()getValue()
-
Constructor Details
-
RawTransaction
-
RawTransaction
protected RawTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value, String data)
-
-
Method Details
-
createContractTransaction
public static RawTransaction createContractTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, BigInteger value, String init) -
createEtherTransaction
public static RawTransaction createEtherTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value) -
createEtherTransaction
public static RawTransaction createEtherTransaction(long chainId, BigInteger nonce, BigInteger gasLimit, String to, BigInteger value, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas) -
createTransaction
public static RawTransaction createTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, String data) -
createTransaction
public static RawTransaction createTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value, String data) -
createTransaction
public static RawTransaction createTransaction(long chainId, BigInteger nonce, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas) -
createTransaction
public static RawTransaction createTransaction(long chainId, BigInteger nonce, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, List<AccessListObject> accessList) -
createTransaction
public static RawTransaction createTransaction(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) -
createTransaction
public static RawTransaction createTransaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) -
createEip7594Transaction
public static RawTransaction createEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) Create an EIP-7594 (Osaka/Fusaka) blob transaction directly from raw blobs. The KZG commitments, flat cell proofs, and blob versioned hashes are computed automatically.- Parameters:
blobs- the raw blobs
-
createEip7594Transaction
public static RawTransaction createEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<AccessListObject> accessList) Create an EIP-7594 (Osaka/Fusaka) blob transaction directly from raw blobs, with an access list. The KZG commitments, flat cell proofs, and versioned hashes are computed automatically.- Parameters:
blobs- the raw blobsaccessList- optional EIP-2930 access list
-
createTransaction
public static RawTransaction createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) -
createTransaction
public static RawTransaction createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) -
createTransaction
public static RawTransaction createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create an EIP-7594 (Osaka/Fusaka) blob transaction.- Parameters:
cellProofs- flat list ofCELLS_PER_EXT_BLOB * len(blobs)48-byte KZG proofswrapperVersion- must be BigInteger.ONE per EIP-7594
-
createTransaction
public static RawTransaction createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) Create an EIP-7594 (Osaka/Fusaka) blob transaction with access list.- Parameters:
cellProofs- flat list ofCELLS_PER_EXT_BLOB * len(blobs)48-byte KZG proofswrapperVersion- must be BigInteger.ONE per EIP-7594accessList- optional EIP-2930 access list
-
createTransaction
public static RawTransaction createTransaction(long chainId, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to, BigInteger value, String data, List<AccessListObject> accessList) -
createTransaction
public static RawTransaction createTransaction(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, List<AccessListObject> accessList, List<AuthorizationTuple> authorizationList) -
getNonce
-
getGasPrice
-
getGasLimit
-
getTo
-
getValue
-
getData
-
getType
-
getTransaction
-