Show / Hide Table of Contents

Class HookMetadata

Represents the metadata required to create a new hook on an account or contract.

Inheritance
object
HookMetadata
Implements
IEquatable<HookMetadata>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record HookMetadata : IEquatable<HookMetadata>
Remarks

This is a simplified representation that flattens the underlying protobuf structure. The hook extension point (currently only ACCOUNT_ALLOWANCE_HOOK) and the EVM-specific nesting are handled internally during proto projection.

Constructors

| Edit this page View Source

HookMetadata(long, EntityId, Endorsement?, IEnumerable<HookStorageEntry>?)

Public Constructor, a 
HookMetadata

is immutable after creation.

Declaration
public HookMetadata(long id, EntityId contract, Endorsement? adminKey = null, IEnumerable<HookStorageEntry>? initialStorage = null)
Parameters
Type Name Description
long id

An arbitrary numeric identifier for the hook.

EntityId contract

The contract that implements the hook's EVM bytecode.

Endorsement adminKey

Optional admin key for the hook.

IEnumerable<HookStorageEntry> initialStorage

Optional initial storage values for the hook.

Properties

| Edit this page View Source

AdminKey

Optional admin key that can be used to remove or replace the hook, or perform transactions that customize the hook.

Declaration
public Endorsement? AdminKey { get; }
Property Value
Type Description
Endorsement
| Edit this page View Source

Contract

The contract that implements the hook's EVM bytecode.

Declaration
public EntityId Contract { get; }
Property Value
Type Description
EntityId
| Edit this page View Source

Id

An arbitrary numeric identifier for the hook, chosen by the creator.

Declaration
public long Id { get; }
Property Value
Type Description
long
| Edit this page View Source

InitialStorage

Optional initial storage values for the hook.

Declaration
public IEnumerable<HookStorageEntry>? InitialStorage { get; }
Property Value
Type Description
IEnumerable<HookStorageEntry>

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph