Skip to main content

Create a Foundry

Only an alias can create new foundries, therefore the process starts with an existing Alias Output. To create a new foundry you only need to transition the alias' state and create a new Foundry Output on the output side of the transaction.

Example Transaction

Transaction A shows an example transaction that creates a foundry:

  • The controlling alias' state is transitioned, its State Index and Foundry Counter are incremented.
  • To cover for the storage deposit of the created Foundry Output, the alias deposits 100i into the output.
  • The Serial Number of the foundry must correspond to the updated Foundry Counter. Each foundry created by the alias is unique because of the unique Serial Number.
  • The foundry uses the Simple Token Scheme as a supply control rule. It defines an upper cap (Maximum Supply) for tokens in circulation.
  • Minted Tokens defines how many tokens have been minted by the foundry. Since we don't immediately mint tokens in this transaction, it is set to 0.
  • Melted Tokens defines how many tokens have been melted by the foundry. At creation there are no tokens to be melted, therefore this must be 0.
  • Foundries support only one unlock condition, the Immutable Alias Address Unlock Condition. It can never be changed during the foundry's lifetime, therefore the issuer role can only be transferred via the controlling alias.
  • Metadata about the token may be put in the Immutable Metadata Feature of the foundry. For example, it may hold an IRC30 compatible JSON file. By hosting token metadata on-chain in a foundry output, we make the data available on all network nodes 24/7. There is no need for additional, off-chain metadata servers.

Transaction A - Creating a Foundry