Class TokenRoyalty
The definition of a Royalty computed from the amount of Fungible token exchanged, can be in the form as a deduction of the token exchanged, or an excise amount taken from the sender of the fungible token.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record TokenRoyalty : IRoyalty, IEquatable<TokenRoyalty>
Constructors
| Edit this page View SourceTokenRoyalty(EntityId, long, long, long, long, bool)
Public Constructor, an
TokenRoyalty
is immutable after creation.
Declaration
public TokenRoyalty(EntityId account, long numerator, long denominator, long minimum, long maximum, bool assessAsSurcharge = false)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityId | account | Address receiving the royalty assessment. |
| long | numerator | The numerator portion of the fraction of the transferred units to assess. |
| long | denominator | The denominator portion of the fraction of the transferred units to assess. |
| long | minimum | The minimum assessed value, in terms of the smallest denomination of the associated token. |
| long | maximum | The maximum allowed fee value, in terms of the smallest denomination of the associated token. |
| bool | assessAsSurcharge |
the amount is added as an extra surcharge paid by the sender of the associated token. If
(the default) the amount of token received by the receiving account is reduced by the assessment computed from the total amount of the associated fungible token sent by the sender. |
Properties
| Edit this page View SourceAssessAsSurcharge
Determines how the royalty assessment is applied,
if
true
the amount is added as an extra surcharge paid by the sender of the associated token. If
false
(the default) the amount of token received by the receiving account is reduced by the assessment computed from the total amount of the associated fungible token sent by the sender.
Declaration
public bool AssessAsSurcharge { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Denominator
The denominator portion of the fraction of the transferred units to assess.
Declaration
public long Denominator { get; }
Property Value
| Type | Description |
|---|---|
| long |
Remarks
This is not expressed as a floating point number in order to avoid rounding fees inherent in computing platforms.
Maximum
The maximum allowed fee value, in terms of the smallest denomination of the associated token.
Declaration
public long Maximum { get; }
Property Value
| Type | Description |
|---|---|
| long |
Minimum
The minimum assessed value, in terms of the smallest denomination of the associated token.
Declaration
public long Minimum { get; }
Property Value
| Type | Description |
|---|---|
| long |
Numerator
The numerator portion of the fraction of the transferred units to assess.
Declaration
public long Numerator { get; }
Property Value
| Type | Description |
|---|---|
| long |
Remarks
This is not expressed as a floating point number in order to avoid rounding fees inherent in computing platforms.
Receiver
Address receiving the royalty assessment.
Declaration
public EntityId Receiver { get; }
Property Value
| Type | Description |
|---|---|
| EntityId |
RoyaltyType
Identifies this royalty as a Token Royalty type.
Declaration
public RoyaltyType RoyaltyType { get; }
Property Value
| Type | Description |
|---|---|
| RoyaltyType |