ThirdwebTransaction Instance Methods
The ThirdwebTransaction class provides a set of instance methods to set various properties of your transaction's input data and gas settings.
Do note that in most cases those are autopolulated by the SDK and you don't need to set them manually.
Set the target address or contract of the transaction.
The target address or contract of the transaction. Must be a hexadecimal string.
Returns the instance of ThirdwebTransaction with the to property set.
Set the raw encoded data payload (potentially overriding previous data if the transaction was created using ThirdwebContract.Prepare).
The raw data payload of the transaction. Must be a hexadecimal string.
Returns the instance of ThirdwebTransaction with the data property set.
Set the value of the payable transaction in Wei.
The value of the transaction in Wei. Must be a BigInteger.
Returns the instance of ThirdwebTransaction with the value property set.
Set the gas limit of the transaction.
The gas limit of the transaction. Must be an BigInteger.
Returns the instance of ThirdwebTransaction with the gasLimit property set.
Set the gas price of a legacy transaction.
The gas price of the transaction. Must be an BigInteger.
Returns the instance of ThirdwebTransaction with the gasPrice property set.
Set the nonce of the transaction.
The nonce of the transaction. Must be an BigInteger.
Returns the instance of ThirdwebTransaction with the nonce property set.
Set the maximum fee per gas of an EIP-1559 transaction.
The maximum fee per gas of the transaction. Must be an BigInteger.
Returns the instance of ThirdwebTransaction with the maxFeePerGas property set.
Set the maximum priority fee per gas of an EIP-1559 transaction.
The maximum priority fee per gas of the transaction. Must be an BigInteger.
Returns the instance of ThirdwebTransaction with the maxPriorityFeePerGas property set.
Set the chain ID of the transaction.
The chain ID of the transaction. Must be an BigInteger.
Returns the instance of ThirdwebTransaction with the chainId property set.
Set the ZkSync options of the transaction.
This allows you to use native ZkSync Account Abstraction with any paymaster.
The ZkSync options of the transaction. Must be an instance of ZkSyncOptions.
ZkSyncOptions includes the following properties:
Paymaster - The paymaster address. Must be a hexadecimal string.
PaymasterInput - The paymaster input data. Must be a hexadecimal string.
GasPerPubdataByteLimit - The gas limit per pubdata byte. Must be a BigInteger.
FactoryDeps - A list of factory dependencies. Must be a list of byte[].
Returns the instance of ThirdwebTransaction with the zkSyncOptions property set.