Class TokenReceipt
A transaction receipt containing information regarding new token coin balance, typically returned from methods that can affect a change on the total circulation supply.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record TokenReceipt : TransactionReceipt, IEquatable<TransactionReceipt>, IEquatable<TokenReceipt>
Remarks
Best-effort when inferred. Methods that derive a receipt's type from
the network's response — GetReceiptAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?)
and GetAllReceiptsAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?) — cannot
recognise a supply of exactly zero as a token operation. The network reports
newTotalSupply as a presence-less uint64 and protobuf omits
zero from the wire, so burning or wiping an entire supply is
indistinguishable from a transaction that never touched a token. Such a
receipt arrives as a plain TransactionReceipt instead.
No value is lost to this. The substitution happens only when the supply is zero, so a receipt that is not this type implies a circulation of zero. Test rather than cast:
ulong circulation = receipt is TokenReceipt token ? token.Circulation : 0;
Receipts returned directly by the operation that produced them — such as
BurnTokenAsync — are typed explicitly and are always correct.
Properties
| Edit this page View SourceCirculation
The current (new) total supply of the token across all accounts, in its smallest unit: divide by 10^Decimals for whole tokens. For an NFT class, the number of NFTs.
Declaration
public ulong Circulation { get; }
Property Value
| Type | Description |
|---|---|
| ulong |