Class CreateTokenParams
Token Creation Parameters.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class CreateTokenParams : TransactionParams<CreateTokenReceipt>
Remarks
The specified Treasury Address is receiving the initial supply of tokens as-well
as the tokens from Token Mint operations when executed. The balance of the treasury
account is decreased when the Token Burn operation is executed.
The supply that is going to be put in circulation is going to be
S*(10^D)
, where
S
is initial supply and
D
is Decimals. The maximum supply a token can have is
S* (10^D) < 2^63
.
The token can be created as immutable if the
Administrator
endorsement is omitted or set to
None
. In this case, the name, symbol, treasury, management keys, Expiration and renew properties cannot be updated. If a token is created as immutable, any account is able to extend the expiration time by paying the fee.
Examples
Create a fungible token with a capped supply, naming the payer as treasury and reusing the payer's key as both administrator and supply endorsement:
var createReceipt = await client.CreateTokenAsync(new CreateTokenParams
{
Name = "Sample Token",
Symbol = "SMPL",
Circulation = 1_000_000,
Decimals = 2,
Ceiling = 10_000_000,
Treasury = treasury,
Administrator = adminEndorsement,
SupplyEndorsement = adminEndorsement,
Memo = "Hiero SDK sample token"
});
Console.WriteLine($"Token created: {createReceipt.Token}");
Properties
| Edit this page View SourceAdministrator
Administrator key for signing transactions modifying this token's properties.
Declaration
public Endorsement? Administrator { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
CancellationToken
Optional cancellation token to interrupt the token creation submission process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
Ceiling
The maximum number of tokens allowed to be in circulation at any given time. If set to a value of zero or less, the total circulation will be allowed to grow to the maximum amount allowed by the network.
Declaration
public long Ceiling { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
Circulation
The initial number of tokens to place into the token treasury account upon creation of the token (specified in the smallest unit). The Treasury receives the initial circulation.
Declaration
public ulong Circulation { get; set; }
Property Value
| Type | Description |
|---|---|
| ulong |
ConfiscateEndorsement
Administrator key for signing transactions that completely remove tokens from a crypto address.
Declaration
public Endorsement? ConfiscateEndorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
Decimals
The number of decimal places a token may be subdivided.
Declaration
public uint Decimals { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
Expiration
Original expiration date for the token, fees will be charged as appropriate.
Declaration
public ConsensusTimeStamp Expiration { get; set; }
Property Value
| Type | Description |
|---|---|
| ConsensusTimeStamp |
GrantKycEndorsement
Administrator key for signing transactions updating the grant or revoke KYC status of an account.
Declaration
public Endorsement? GrantKycEndorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
InitializeSuspended
The default frozen setting for current and newly created accounts. A value
of
true
will default crypto account status of
Frozen
with relationship to this token. A value of
false
will default to an tradable/unfrozen relationship.
Declaration
public bool InitializeSuspended { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Memo
Additional Short description of the token, not checked for uniqueness.
Declaration
public string Memo { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MetadataEndorsement
Administrator key for changing metadata associated with Tokens and Assets.
Declaration
public Endorsement? MetadataEndorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
Name
Name of the token, not required to be globally unique.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PauseEndorsement
Administrator key for signing transactions that can pause or continue the exchange of all tokens across all accounts on the network.
Declaration
public Endorsement? PauseEndorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
RenewAccount
Optional address of the account supporting the auto renewal of the token at expiration time. The token lifetime will be extended by the RenewPeriod at expiration time if this account contains sufficient funds. The private key associated with this account must sign the transaction if RenewAccount is specified.
Declaration
public EntityId? RenewAccount { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Remarks
If specified, an Administrator Endorsement must also be specified.
RenewPeriod
Interval of the token and auto-renewal period. If the associated renewal account does not have sufficient funds to renew at the expiration time, it will be renewed for a period of time the remaining funds can support. If no funds remain, the token instance will be deleted.
Declaration
public TimeSpan? RenewPeriod { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
Royalties
The list of royalties applied to transactions transferring this token. If a royalty endorsement is not supplied upon creation, the royalties are immutable after creation.
Declaration
public IReadOnlyList<IRoyalty>? Royalties { get; set; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<IRoyalty> |
RoyaltiesEndorsement
Administrator key for signing transactions updating the royalty (custom transfer fees) associated with this token.
Declaration
public Endorsement? RoyaltiesEndorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
Signatory
Additional private key, keys or signing callback method required to create this token. Typically matches the Administrator, KycEndorsement, FreezeEndorsement and other listed endorsements associated with this token.
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.
SupplyEndorsement
Administrator key for signing transactions for minting or unminting tokens in the treasury account.
Declaration
public Endorsement? SupplyEndorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
SuspendEndorsement
Administrator key for signing transactions for freezing or unfreezing an account's ability to transfer tokens.
Declaration
public Endorsement? SuspendEndorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
Symbol
Symbol of the token, not required to be globally unique.
Declaration
public string Symbol { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Treasury
The treasury account receiving the Initial Circulation balance of tokens.
Declaration
public EntityId Treasury { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |