Readonly
blocksReadonly
debugReadonly
forkReadonly
gasReadonly
logsBuilds a transaction body with the given clauses without having to specify the chainTag, expiration, gasPriceCoef, gas, dependsOn and reserved fields.
The clauses of the transaction.
The gas to be used to perform the transaction.
Optional
options: TransactionBodyOptionsOptional parameters for the request. Includes the expiration, gasPriceCoef, maxFeePErGas, maxPriorityFeePerGas, dependsOn and isDelegated fields.
If the expiration
is not specified, the transaction will expire after 32 blocks.
If the gasPriceCoef
is not specified & galactica fork didn't happen yet, the transaction will use the default gas price coef of 0.
If the gasPriceCoef
is not specified & galactica fork happened, the transaction will use the default maxFeePerGas and maxPriorityFeePerGas.
If the dependsOn is
not specified, the transaction will not depend on any other transaction.
If the isDelegated
is not specified, the transaction will not be delegated.
A promise that resolves to the transaction body.
Decode the revert reason from the encoded revert reason into a transaction.
The encoded revert reason to decode.
Optional
errorFragment: string(Optional) The error fragment to use to decode the revert reason (For Solidity custom errors).
A promise that resolves to the decoded revert reason. Revert reason can be a string error or Panic(error_code)
Estimates the amount of gas required to execute a set of transaction clauses.
An array of clauses to be simulated. Must contain at least one clause.
Optional
caller: stringThe address initiating the transaction. Optional.
Optional
options: EstimateGasOptionsAdditional options for the estimation, including gas padding.
Executes a read-only call to a smart contract function, simulating the transaction to obtain the result.
The method simulates a transaction using the provided parameters without submitting it to the blockchain, allowing read-only operations to be tested without incurring gas costs or modifying the blockchain state.
The address of the smart contract.
The ABI definition of the smart contract function to be called.
The arguments to be passed to the smart contract function.
Optional
contractCallOptions: ContractCallOptionsOptional parameters for the contract call execution.
The result of the contract call.
Executes and simulates multiple read-only smart-contract clause calls, simulating the transaction to obtain the results.
The array of contract clauses to be executed.
Optional
options: SimulateTransactionOptionsOptional simulation transaction settings.
Executes a transaction with multiple clauses on the VeChain blockchain.
Array of contract clauses to be included in the transaction.
A VeChain signer instance used to sign and send the transaction.
Optional
options: ContractTransactionOptionsOptional parameters to customize the transaction.
The result of the transaction, including transaction ID and a wait function.
Executes a transaction with a smart-contract on the VeChain blockchain.
The signer instance to sign the transaction.
The address of the smart contract.
The ABI of the contract function to be called.
The input parameters for the contract function.
Optional
options: ContractTransactionOptionsOptional transaction parameters.
Fills the default body options for a transaction.
Optional
options: TransactionBodyOptionsThe transaction body options to fill.
A promise that resolves to the filled transaction body options.
Retrieves the base gas price from the blockchain parameters.
This method sends a call to the blockchain parameters contract to fetch the current base gas price. The base gas price is the minimum gas price that can be used for a transaction. It is used to obtain the VTHO (energy) cost of a transaction.
A promise that resolves to the result of the contract call, containing the base gas price.
Get the revert reason of an existing transaction.
The hash of the transaction to get the revert reason for.
Optional
errorFragment: string(Optional) The error fragment to use to decode the revert reason (For Solidity custom errors).
A promise that resolves to the revert reason of the transaction.
Retrieves the details of a transaction.
Transaction ID of the transaction to retrieve.
Optional
options: GetTransactionInputOptions(Optional) Other optional parameters for the request.
A promise that resolves to the details of the transaction.
Retrieves the details of a transaction.
Transaction ID of the transaction to retrieve.
Optional
options: GetTransactionInputOptions(Optional) Other optional parameters for the request.
A promise that resolves to the details of the transaction.
Retrieves the receipt of a transaction.
Transaction ID of the transaction to retrieve.
Optional
options: GetTransactionReceiptInputOptions(Optional) Other optional parameters for the request.
If head
is not specified, the receipt of the transaction at the best block is returned.
A promise that resolves to the receipt of the transaction.
Retrieves the receipt of a transaction.
The raw transaction.
The transaction id of send transaction.
Sends a signed transaction to the network.
the transaction to send. It must be signed.
A promise that resolves to the transaction ID of the sent transaction.
Simulates the execution of a transaction. Allows to estimate the gas cost of a transaction without sending it, as well as to retrieve the return value(s) of the transaction.
The clauses of the transaction to simulate.
Optional
options: SimulateTransactionOptions(Optional) The options for simulating the transaction.
A promise that resolves to an array of simulation results. Each element of the array represents the result of simulating a clause.
Waits for a transaction to be included in a block.
The transaction ID of the transaction to wait for.
Optional
options: WaitForTransactionOptionsOptional parameters for the request. Includes the timeout and interval between requests. Both parameters are in milliseconds. If the timeout is not specified, the request will not time out!
A promise that resolves to the transaction receipt of the transaction. If the transaction is not included in a block before the timeout,
the promise will resolve to null
.
The
TransactionsModule
handles transaction related operations and provides convenient methods for sending transactions and waiting for transaction confirmation.