Class HookMetadata
Represents the metadata required to create a new hook on an account or contract.
Implements
Inherited Members
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 SourceHookMetadata(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 SourceAdminKey
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 |
Contract
The contract that implements the hook's EVM bytecode.
Declaration
public EntityId Contract { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Id
An arbitrary numeric identifier for the hook, chosen by the creator.
Declaration
public long Id { get; }
Property Value
| Type | Description |
|---|---|
| long |
InitialStorage
Optional initial storage values for the hook.
Declaration
public IEnumerable<HookStorageEntry>? InitialStorage { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<HookStorageEntry> |