Show / Hide Table of Contents

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.

Inheritance
object
TokenRoyalty
Implements
IRoyalty
IEquatable<TokenRoyalty>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record TokenRoyalty : IRoyalty, IEquatable<TokenRoyalty>

Constructors

| Edit this page View Source

TokenRoyalty(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
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.

Properties

| Edit this page View Source

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 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
| Edit this page View Source

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.

| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

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.

| Edit this page View Source

Receiver

Address receiving the royalty assessment.

Declaration
public EntityId Receiver { get; }
Property Value
Type Description
EntityId
| Edit this page View Source

RoyaltyType

Identifies this royalty as a Token Royalty type.

Declaration
public RoyaltyType RoyaltyType { get; }
Property Value
Type Description
RoyaltyType

Implements

IRoyalty
IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph