> ## Documentation Index
> Fetch the complete documentation index at: https://hedera-0c6e0218-docs-evm-account-model.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Modify transaction fields

> Customize Hedera transaction fields with the Hiero SDKs: transaction ID, valid duration, node account ID, memo, max fee, and the 6 KiB transaction size limit.

When submitting a transaction to the Hedera network, various fields can be modified, such as the transaction ID, consensus time, memo field, account ID of the node, and the maximum fee. These values can be set using methods provided by the SDKs. However, they are not required as the SDK can automatically create or use default values.

<Note>
  The total size for a given transaction is limited to 6KiB.
</Note>

| **Field**               | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Transaction ID**      | Set the ID for this transaction. The transaction ID includes the operator's account (the account paying the transaction fee). If two transactions have the same transaction ID, they won't both have an effect. One will complete normally and the other will fail with a duplicate transaction status. Normally, you should not use this method. Just before a transaction is executed, a transaction ID will be generated from the operator on the client. |
| **Valid Duration**      | Set the duration that this transaction is valid for. Max network valid duration is 180 seconds. SDK default value is 120 seconds. The minimum valid duration period is 15 seconds.                                                                                                                                                                                                                                                                           |
| **Memo**                | Set a note or description that should be recorded in the transaction record (maximum length of 100 characters). Anyone can view this memo on the network.                                                                                                                                                                                                                                                                                                    |
| **Node ID**             | Set the account ID of the node that this transaction will be submitted to.                                                                                                                                                                                                                                                                                                                                                                                   |
| **Max transaction fee** | Set the max transaction fee the operator (transaction fee payer account) is willing to pay. Default: 2 hbar.                                                                                                                                                                                                                                                                                                                                                 |
| **High Volume**         | If set to `true`, opts this transaction into the [high-volume throttle system](/learn/core-concepts/high-volume-entity-creation) with variable-rate pricing for entity creation. Only affects [supported transaction types](/learn/core-concepts/high-volume-entity-creation#supported-transaction-types); otherwise ignored. Default: `false`. See [HIP-1313](https://hips.hedera.com/hip/hip-1313).                                                        |

<Note>
  The SDKs do not require you to set these fields when submitting a transaction to a Hedera network. All methods below are optional and can be used to modify any fields.
</Note>

| **Method**                                              | **Type**         |
| ------------------------------------------------------- | ---------------- |
| `setTransactionID(<transactionId>)`                     | TransactionID    |
| `setTransactionValidDuration(<validDuration>)`          | Duration         |
| `setTransactionMemo(<memo>)`                            | String           |
| `setNodeAccountIds(<nodeAccountIds>)`                   | List\<AccountId> |
| `setMaxTransactionFee(<maxTransactionFee>)`             | Hbar             |
| `setGrpcDeadline(<grpcDeadline>)`                       | Duration         |
| `setRegenerateTransactionId(<regenerateTransactionId>)` | boolean          |
| `setHighVolume(<highVolume>)`                           | boolean          |

<Note>
  The example below uses `setKeyWithAlias()` to set the **EVM Address from Public Key** at account creation, the recommended pattern for EVM compatibility. See [Create an Account](/native/accounts/create#evm-address-from-public-key) for details, including the immutability behavior and when to use `setKeyWithoutAlias()` instead.
</Note>

<CodeGroup>
  ```java Java theme={null}
  //Create the transaction and set the transaction properties
  Transaction transaction = new AccountCreateTransaction() //Any transaction can be applied here
      // Sets the EVM Address from Public Key (recommended for EVM compatibility)
      .setKeyWithAlias(ecdsaPublicKey)
      // Use .setKeyWithoutAlias(ecdsaPublicKey) if you plan to rotate keys soon after creation
      .setInitialBalance(new Hbar(1))
      .setMaxTransactionFee(new Hbar(2)) //Set the max transaction fee to 2 hbar
      .setTransactionMemo("Transaction memo"); //Set the node ID to submit the transaction to
      
  //v2.0.0
  ```

  ```javascript JavaScript theme={null}
  //Create the transaction and set the transaction properties
  const transaction = await new AccountCreateTransaction() //Any transaction can be applied here
      // Sets the EVM Address from Public Key (recommended for EVM compatibility)
      .setKeyWithAlias(ecdsaPublicKey)
      // Use .setKeyWithoutAlias(ecdsaPublicKey) if you plan to rotate keys soon after creation
      .setInitialBalance(new Hbar(1))
      .setMaxTransactionFee(new Hbar(2)) //Set the max transaction fee to 2 hbar
      .setTransactionMemo("Transaction memo"); //Set the node ID to submit the transaction to
  ```

  ```go Go theme={null}
  //Create the transaction and set the transaction properties
  transaction := hedera.NewAccountCreateTransaction(). //Any transaction can be applied here
      // Sets the EVM Address from Public Key (recommended for EVM compatibility)
      SetECDSAKeyWithAlias(ecdsaPublicKey).
      // Use SetKeyWithoutAlias(ecdsaPublicKey). if you plan to rotate keys soon after creation
      SetInitialBalance(hedera.NewHbar(1)).
      SetMaxTransactionFee(hedera.NewHbar(2)). //Set the max transaction fee to 2 hbar
      SetTransactionMemo("Transaction memo") //Set the transaction memo

  //v2.0.0 
  ```

  ```rust Rust theme={null}
  // Create the transaction and set the transaction properties
  let transaction = AccountCreateTransaction::new() // Any transaction can be applied here
      // Sets the EVM Address from Public Key (recommended for EVM compatibility); takes the ECDSA PrivateKey
      .set_ecdsa_key_with_alias(ecdsa_private_key)
      // Use .set_key_without_alias(key) if you plan to rotate keys soon after creation
      .initial_balance(Hbar::new(1))
      .max_transaction_fee(Hbar::new(2)) // Set the max transaction fee to 2 hbar
      .transaction_memo("Transaction memo"); // Set the transaction memo

  // v0.34.0
  ```
</CodeGroup>

## Get transaction properties

| **Method**                      | **Type**                                    |
| ------------------------------- | ------------------------------------------- |
| `getTransactionID()`            | TransactionID                               |
| `getTransactionValidDuration()` | Duration                                    |
| `getTransactionMemo()`          | String                                      |
| `getNodeAccountId()`            | AccountID                                   |
| `getMaxTransactionFee()`        | Hbar                                        |
| `getTransactionHash()`          | byte\[ ]                                    |
| `getTransactionHashPerNode()`   | Map\<AccountId, byte \[ ]>                  |
| `getSignatures()`               | Map\<AccountId, Map\<PublicKey, byte \[ ]>> |

<CodeGroup>
  ```java Java theme={null}
  //Create the transaction and set the transaction properties
  Transaction transaction = new AccountCreateTransaction() //Any transaction can be applied here
      .setInitialBalance(Hbar.fromTinybars(1000))
      .setMaxTransactionFee(new Hbar(50)) //Set the max transaction fee to 50 hbar
      .setNodeAccountId(new AccountId(3)) //Set the node ID to submit the transaction to
      .setTransactionMemo("Transaction memo"); //Add a transaction memo
      
  Hbar maxTransactionFee = transaction.getMaxTransactionFee();
  //v2.0.0
  ```

  ```javascript JavaScript theme={null}
  //Create the transaction and set the transaction properties
  const transaction = await new AccountCreateTransaction() //Any transaction can be applied here
      .setInitialBalance(Hbar.fromTinybars(1000))
      .setMaxTransactionFee(new Hbar(50)) //Set the max transaction fee to 50 hbar
      .setNodeAccountId(new AccountId(3)) //Set the node ID to submit the transaction to
      .setTransactionMemo("Transaction memo"); //Add a transaction memo
      
  const maxTransactionFee = transaction.getMaxTransactionFee();
  ```

  ```go Go theme={null}
  //Create the transaction and set the transaction properties
  transaction := hedera.NewAccountCreateTransaction(). //Any transaction can be applied here
      SetECDSAKeyWithAlias(newKey).
      SetInitialBalance(hedera.NewHbar(100)).
      SetMaxTransactionFee(hedera.NewHbar(2)). //Set the max transaction fee to 2 hbar
      SetTransactionMemo("Transaction memo") //Add a transaction memo

  maxtransactionFee := transaction.GetMaxTransactionFee()
  //v2.0.0         
  ```

  ```rust Rust theme={null}
  // The node account ID to submit the transaction to. You can add more than 1 node account ID to the list
  let node_id = vec![AccountId::new(3)];

  // Create the transaction and set the transaction properties
  let transaction = AccountCreateTransaction::new() // Any transaction can be applied here
      .initial_balance(Hbar::from_tinybars(1000))
      .max_transaction_fee(Hbar::new(50)) // Set the max transaction fee to 50 hbar
      .node_account_ids([node_id]) // Set the node ID to submit the transaction to
      .transaction_memo("Transaction memo"); // Add a transaction memo

  let max_transaction_fee = transaction.max_transaction_fee();

  // v0.34.0
  ```
</CodeGroup>
