Ethereum transaction
Field
Description
Method
Type
//Create the transaction
EthereumTransaction transaction = new EthereumTransaction()
.setEthereumData(ethereumData)
.setMaxGasAllowanceHbar(allowance);
//Sign with the client operator private key to pay for the transaction and submit the query to a Hedera network
TransactionResponse txResponse = transaction.execute(client);
//Request the receipt of the transaction
TransactionReceipt receipt = txResponse.getReceipt(client);
//Get the transaction consensus status
Status transactionStatus = receipt.status;
System.out.println("The transaction consensus status is " +transactionStatus);
//v2.14//Create the transaction
const transaction = new EthereumTransaction()
.setEthereumData(ethereumData)
.setMaxGasAllowance(allowance);
//Sign with the client operator private key to pay for the transaction and submit the query to a Hedera network
const txResponse = await transaction.execute(client);
//Request the receipt of the transaction
const receipt = await txResponse.getReceipt(client);
//Get the transaction consensus status
const transactionStatus = receipt.status;
console.log("The transaction consensus status is " +transactionStatus);
//v2.14Last updated