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 echanged, or an exise amount taken from the sender of the fungible token.
Inherited Members
Namespace: Hashgraph
Assembly: Hashgraph.dll
Syntax
public sealed class TokenRoyalty : IRoyalty, IEquatable<TokenRoyalty>
Constructors
| Improve this Doc View SourceTokenRoyalty(Address, Int64, Int64, Int64, Int64, Boolean)
Public Constructor, an
TokenRoyalty
is immutable after creation.
Declaration
public TokenRoyalty(Address account, long numerator, long denominator, long minimum, long maximum, bool assesAsSurcharge = false)
Parameters
Type | Name | Description |
---|---|---|
Address | account | Account receiving the royalty assessment. |
Int64 | numerator | The numerator portion of the fraction of the transferred units to assess. |
Int64 | denominator | The denominator portion of the fraction of the transferred units to assess. |
Int64 | minimum | The minimum assessed value, in terms of the smallest denomination of the associated token. |
Int64 | maximum | The maximum allowed fee value, in terms of the smallest denomination of the associated token. |
Boolean | assesAsSurcharge | Determines how the royalty assessment is applied, if 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
assement computed from the total amount of the associated
fungible token sent by the sender.
|
Properties
| Improve this Doc View SourceAccount
Account receiving the royalty assessment.
Declaration
public Address Account { get; }
Property Value
Type | Description |
---|---|
Address |
AssessAsSurcharge
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
assement computed from the total amount of the associated
fungible token sent by the sender.
Declaration
public bool AssessAsSurcharge { get; }
Property Value
Type | Description |
---|---|
Boolean |
Denominator
The denominator portion of the fraction of the transferred units to assess.
Declaration
public long Denominator { get; }
Property Value
Type | Description |
---|---|
Int64 |
Remarks
This is not expressed as a floating point number in order to avoid rounding fees inheret 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 |
---|---|
Int64 |
Minimum
The minimum assessed value, in terms of the smallest denomination of the associated token.
Declaration
public long Minimum { get; }
Property Value
Type | Description |
---|---|
Int64 |
Numerator
The numerator portion of the fraction of the transferred units to assess.
Declaration
public long Numerator { get; }
Property Value
Type | Description |
---|---|
Int64 |
Remarks
This is not expressed as a floating point number in order to avoid rounding fees inheret in computing platforms.
RoyaltyType
Identifies this royalty as a Token Royalty type.
Declaration
public RoyaltyType RoyaltyType { get; }
Property Value
Type | Description |
---|---|
RoyaltyType |