Ethereum transaction

This feature is on previewnet only. API is subject to change.

The raw Ethereum transaction (RLP encoded type 0, 1, and 2) will hold signed Ethereum transactions and execute them as Hedera transactions in a prescribed manner.

Important Hedera interprets hbar decimals differently depending on the context. The lowest denomination of HBAR when used within a the value field in the EthereumTransaction is weibars meaning with 18 decimals The lowest denomination of hbar when used within data or the Hedera EVM is tinybars meaning with 8 decimals. Gas Price information is in weibars denomination. Reference: HIP-410

Transaction Signing Requirements

  • The key of the transaction fee-paying account

Transaction Fees

  • Please see the transaction and query fees table for the base transaction fee

//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

Last updated