java.lang.Object
com.hedera.hashgraph.sdk.EvmHookCall
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) static EvmHookCallfromProtobuf(EvmHookCall proto) Create an EvmHookCall from a protobuf message.byte[]getData()Get the call data for this hook call.longGet the gas limit for this hook call.inthashCode()(package private) EvmHookCallConvert this EvmHookCall to a protobuf message.toString()
-
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 fieldgasLimit- 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
Create an EvmHookCall from a protobuf message.- Parameters:
proto- the protobuf EvmHookCall- Returns:
- a new EvmHookCall instance
-
equals
-
hashCode
public int hashCode() -
toString
-