java.lang.Object
com.hedera.hashgraph.sdk.EvmHookSpec
com.hedera.hashgraph.sdk.EvmHook
Definition of an EVM hook.
This class represents a hook implementation that is programmed in EVM bytecode and can access state or interact with external contracts. It includes the hook specification and any initial storage updates.
-
Constructor Summary
ConstructorsConstructorDescriptionEvmHook(ContractId contractId) Create a new EvmHook with no initial storage updates.EvmHook(ContractId contractId, List<EvmHookStorageUpdate> storageUpdates) Create a new EvmHook with initial storage updates. -
Method Summary
Methods inherited from class com.hedera.hashgraph.sdk.EvmHookSpec
getContractId
-
Constructor Details
-
EvmHook
Create a new EvmHook with no initial storage updates.- Parameters:
contractId- underlying contract of the hook
-
EvmHook
Create a new EvmHook with initial storage updates.- Parameters:
contractId- underlying contract of the hookstorageUpdates- the initial storage updates for the EVM hook
-
-
Method Details
-
getStorageUpdates
Get the initial storage updates for this EVM hook.- Returns:
- an immutable list of storage updates
-
toProtobuf
EvmHook toProtobuf()Convert this EvmHook to a protobuf message.- Returns:
- the protobuf EvmHook
-
fromProtobuf
Create an EvmHook from a protobuf message.- Parameters:
proto- the protobuf EvmHook- Returns:
- a new EvmHook instance
-
equals
- Overrides:
equalsin classEvmHookSpec
-
hashCode
public int hashCode()- Overrides:
hashCodein classEvmHookSpec
-
toString
- Overrides:
toStringin classEvmHookSpec
-