Class EvmHookCall

java.lang.Object
com.hedera.hashgraph.sdk.EvmHookCall

public class EvmHookCall extends Object
Specifies details of a call to an EVM hook.

This class represents the evm_hook_call field in the HookCall protobuf message. It contains the call data and gas limit for executing an EVM hook.

  • Constructor Details

    • EvmHookCall

      public EvmHookCall(byte[] data, long gasLimit)
      Create a new EvmHookCall.
      Parameters:
      data - the call data to pass to the hook via the IHieroHook.HookContext#data field
      gasLimit - the gas limit to use for the hook execution
  • Method Details

    • getData

      public byte[] getData()
      Get the call data for this hook call.
      Returns:
      the call data as a byte array
    • getGasLimit

      public long getGasLimit()
      Get the gas limit for this hook call.
      Returns:
      the gas limit
    • toProtobuf

      EvmHookCall toProtobuf()
      Convert this EvmHookCall to a protobuf message.
      Returns:
      the protobuf EvmHookCall
    • fromProtobuf

      static EvmHookCall fromProtobuf(EvmHookCall proto)
      Create an EvmHookCall from a protobuf message.
      Parameters:
      proto - the protobuf EvmHookCall
      Returns:
      a new EvmHookCall instance
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object