Enum Class FeeEstimateMode

java.lang.Object
java.lang.Enum<FeeEstimateMode>
com.hedera.hashgraph.sdk.FeeEstimateMode
All Implemented Interfaces:
Serializable, Comparable<FeeEstimateMode>, Constable

public enum FeeEstimateMode extends Enum<FeeEstimateMode>
Enum for the fee estimate mode.

Determines how the fee estimate is calculated for a transaction.

  • Enum Constant Details

    • STATE

      public static final FeeEstimateMode STATE
      Uses latest known state.

      This mode calculates fees based on the current state of the network, taking into account all state-dependent factors such as current exchange rates, gas prices, and network congestion.

    • INTRINSIC

      public static final FeeEstimateMode INTRINSIC
      Default mode: ignores state-dependent factors.

      This mode calculates fees based only on the intrinsic properties of the transaction itself, ignoring dynamic network conditions. This provides a baseline estimate that doesn't fluctuate with network state.

  • Field Details

    • code

      final int code
  • Method Details

    • values

      public static FeeEstimateMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FeeEstimateMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      static FeeEstimateMode fromString(String value)
      Convert a string value to the corresponding enum.
      Parameters:
      value - the string value of the mode
      Returns:
      the corresponding FeeEstimateMode
      Throws:
      IllegalArgumentException - if the value is not recognized
    • valueOf

      static FeeEstimateMode valueOf(int code)
      Convert a protobuf-encoded fee estimate mode value to the corresponding enum.
      Parameters:
      code - the protobuf-encoded value
      Returns:
      the corresponding FeeEstimateMode
      Throws:
      IllegalArgumentException - if the code is not recognized
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FeeEstimateMode>