Class EvmTransactionParams
Represents a transaction submitted to the hedera network through the native HAPI Ethereum gateway feature.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class EvmTransactionParams : TransactionParams<TransactionReceipt>
Examples
Submit a pre-signed RLP-encoded Ethereum transaction (type 0, 1, or 2).
AdditionalGasAllowance lets the HAPI payer cover fees if the
ethereum sender's authorized amount falls short:
// Submit a native EIP-1559 / EIP-2930 / legacy Ethereum transaction
// through the HAPI Ethereum gateway. `Transaction` is the full RLP
// blob (type 0, 1, or 2), already signed. AdditionalGasAllowance
// lets the HAPI payer cover fees if the eth sender runs short.
var receipt = await client.ExecuteEvmTransactionAsync(new EvmTransactionParams
{
Transaction = signedRlpTransaction,
AdditionalGasAllowance = 100_000_000 // 1 HBAR backstop
});
Console.WriteLine($"EVM tx status: {receipt.Status}");
Properties
| Edit this page View SourceAdditionalGasAllowance
The maximum amount, in tinybars, that the HAPI payer of the transaction is willing to pay to cover gas fees.
Declaration
public long AdditionalGasAllowance { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
Remarks
Ordinarily the account with the ECDSA alias corresponding to the public key that is extracted from the ethereum_data signature is responsible for fees that result from the execution of the transaction. If that amount of authorized fees is not sufficient then the (hapi) payer of the transaction can be charged, up to but not exceeding this amount. If the ethereum_data transaction authorized an amount that was insufficient then the (hapi) payer will only be charged the amount needed to make up the difference. If the gas price in the ethereum transaction was set to zero then the (hapi) payer will be assessed the entire gas & hedera fees.
CancellationToken
Optional Cancellation token that can interrupt the transaction.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
ExtraCallData
For large transactions where the call data cannot fit within the size of an hedera transaction, this address points to a file containing the callData of the ethereumData. The hedera node will re-write the ethereumData inserting the contents into the existing empty callData element with the contents in the referenced file at time of execution. The reconstructed ethereumData will then be checked against signatures for validation.
Declaration
public EntityId ExtraCallData { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Signatory
Additional private key, keys or signing callback method required to invoke this transaction. Typically not used, however there are some edge cases where it may send crypto to accounts that require a signature to receive funds.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |
Remarks
Keys/callbacks added here will be combined with those already identified in the client object's context when signing this transaction to change the state of this account.
Transaction
The complete raw Ethereum transaction (RLP encoded type 0, 1, and 2),
with the exception of the call data if
ExtraCallData
has been populated.
Declaration
public ReadOnlyMemory<byte> Transaction { get; set; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> |
Remarks
If it necessary to invoke the
ExtraCallData
feature, the callData for the ethereum transaction should be set to an empty string in this property. However Note: for validation of signatures, a node will reconstruct the proper ethereumData payload with the call data before attempting to validate signatures, so there may be extra work in generating the complete ethereum transaction to sign with private keys before breaking apart into components small enough to load onto a Hedera Gossip Node thru the HAPI.