Class TokenTransfer
Represents a token transfer (Token, Address, Amount)
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record TokenTransfer : IEquatable<TokenTransfer>
Constructors
| Edit this page View SourceTokenTransfer(EntityId, EntityId, long, bool, HookCall?)
Public Constructor, an
TokenTransfer
is immutable after creation.
Declaration
public TokenTransfer(EntityId token, EntityId address, long amount, bool delegated = false, HookCall? allowanceHook = null)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityId | token | The identifier of the Token whose coins were transferred. |
| EntityId | address | The account receiving or sending the token's coins. |
| long | amount | The (divisible) amount of coins transferred. Negative values indicate an outflow of coins from the account. Positive values indicate an inflow of coins to the account. |
| bool | delegated | Indicates the parties involved in the transaction are acting as delegates through a granted allowance. |
| HookCall | allowanceHook | Optional allowance hook call for this token transfer. |
Properties
| Edit this page View SourceAccount
The account receiving or sending the token's coins.
Declaration
public EntityId Account { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
AllowanceHook
Optional allowance hook call for this token transfer. The hook's CallMode determines whether it is invoked before the transfer only, or both before and after.
Declaration
public HookCall? AllowanceHook { get; }
Property Value
| Type | Description |
|---|---|
| HookCall |
Amount
The (divisible) amount of coins transferred. Negative values indicate an outflow of coins from the account. Positive values indicate an inflow of coins to the account.
Declaration
public long Amount { get; init; }
Property Value
| Type | Description |
|---|---|
| long |
Delegated
Indicates the parties involved in the transaction are acting as delegates through a granted allowance.
Declaration
public bool Delegated { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Token
The identifier of the Token type that was transferred.
Declaration
public EntityId Token { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |