Class UpdateRoyaltiesParams
Transaction Parameters for updating the royalties (custom fees) associated with a token.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class UpdateRoyaltiesParams : TransactionParams<TransactionReceipt>
Examples
Replace the royalty schedule on a token — a 2.5% fungible-transfer fee:
// Replace the royalty (custom transfer fee) schedule on a token.
// Pass null to clear all royalties. Requires the RoyaltiesEndorsement.
// Each IRoyalty implementation represents a different fee model —
// FixedRoyalty (flat fee in a given token), TokenRoyalty (percentage
// of fungible transfer), or NftRoyalty (royalty on NFT sales).
var royalties = new IRoyalty[]
{
// 2.5% of every fungible transfer goes to royaltyReceiver
new TokenRoyalty(royaltyReceiver, numerator: 25, denominator: 1000,
minimum: 0, maximum: 0)
};
var receipt = await client.UpdateRoyaltiesAsync(token, royalties);
Console.WriteLine($"UpdateRoyalties status: {receipt.Status}");
Properties
| Edit this page View SourceCancellationToken
Optional cancellation token to interrupt the token royalties update submission process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
Royalties
The list of royalties to apply to token transactions, may be a blank list or null, this list replaces the previous list of royalties in full.
Declaration
public IReadOnlyList<IRoyalty>? Royalties { get; set; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<IRoyalty> |
Signatory
Additional private key, keys or signing callback method required to authorize the transfers. Typically matches the Endorsement assigned to the royalty key for the token if it is not already set as the payer for the transaction.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |
Remarks
Keys/callbacks added here will be combined with those already identified in the client object's context when signing this transaction to change the state of this account.
Token
The ID of the token definition to update.
Declaration
public EntityId Token { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |