Class EvmTransactionInput
Helper class used to orchestrate the creation of an RLP encoded Ethereum transaction to be submitted to the network using the Hedera Ethereum Transaction HAPI endpoint.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class EvmTransactionInput
Properties
| Edit this page View SourceChainId
The corresponding Chain identifier for the network that this transaction is being submitted to.
Declaration
public BigInteger ChainId { get; set; }
Property Value
| Type | Description |
|---|---|
| BigInteger |
EvmNonce
The current EVM Nonce associated with the account that will sign this transaction.
Declaration
public long EvmNonce { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
GasLimit
The maximum amount of gas, in gas units, that the paying account is willing to pay to execute the transaction.
Declaration
public long GasLimit { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
GasPrice
The gas price the signing account is willing to pay for computational resources to execute the transaction.
Declaration
public long GasPrice { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
MethodName
Optional method name to call on the contract, if this is a contract call. This value must be specified if the transaction is a contract call having any values in the MethodParameters array.
Declaration
public string? MethodName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MethodParameters
Optional method parameters to pass to the contract, if this is a contract call.
Declaration
public object[]? MethodParameters { get; set; }
Property Value
| Type | Description |
|---|---|
| object[] |
ToEvmAddress
The recipient of the transaction, which may be a contract or another Hedera account.
Declaration
public EvmAddress ToEvmAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| EvmAddress |
Remarks
Going forward, this should be the EVM address of the account as identified by the mirror node. It may be a long zero EVM address or an ECDSA alias address. To avoid potential compatibility issues, it is recommended to use the EVM address for the target account or contract as identified by the mirror node, not just assume the long zero address is the correct address.
ValueInTinybars
The amount of HBAR to transfer to the recipient of the transaction.
Declaration
public long ValueInTinybars { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
Methods
| Edit this page View SourceRlpEncode(Signatory)
Generates an RLP encoded byte array representing the transaction input values, including the signature if the Signatory is provided.
Declaration
public ReadOnlyMemory<byte> RlpEncode(Signatory signatory)
Parameters
| Type | Name | Description |
|---|---|---|
| Signatory | signatory | Signatory (Private Key) that will sign the transaction, it must be a single ECDSA key that corresponds to the EVM address of the account paying for the transaction. |
Returns
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> | An array of bytes representing the transaction in EVM RLP encoding. |