Class HookCall
Represents a hook call specification, including the hook's numeric identifier, call data, gas limit, and invocation mode.
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record HookCall : IEquatable<HookCall>
Constructors
| Edit this page View SourceHookCall(long, ReadOnlyMemory<byte>, ulong, HookCallMode)
Public Constructor, a
HookCall
is immutable after creation.
Declaration
public HookCall(long hookId, ReadOnlyMemory<byte> data, ulong gasLimit, HookCallMode callMode = HookCallMode.PreOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| long | hookId | The numeric id of the hook to call. |
| ReadOnlyMemory<byte> | data | Call data to pass to the hook. |
| ulong | gasLimit | The gas limit to use for the hook execution. |
| HookCallMode | callMode | Specifies when the hook is invoked relative to the transaction. Defaults to PreOnly. |
Properties
| Edit this page View SourceCallMode
Specifies when the hook is invoked relative to the transaction.
Declaration
public HookCallMode CallMode { get; }
Property Value
| Type | Description |
|---|---|
| HookCallMode |
Data
Call data to pass to the hook via the HookContext data field.
Declaration
public ReadOnlyMemory<byte> Data { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> |
GasLimit
The gas limit to use for the hook execution.
Declaration
public ulong GasLimit { get; }
Property Value
| Type | Description |
|---|---|
| ulong |
HookId
The numeric id of the hook to call.
Declaration
public long HookId { get; }
Property Value
| Type | Description |
|---|---|
| long |