diff --git a/docs/content/developer/iota-101/create-coin/create-coin.mdx b/docs/content/developer/iota-101/create-coin/create-coin.mdx index c8f45981a1c..7964b35247e 100644 --- a/docs/content/developer/iota-101/create-coin/create-coin.mdx +++ b/docs/content/developer/iota-101/create-coin/create-coin.mdx @@ -1,33 +1,47 @@ --- -title: Create Coins and Tokens +description: Learn how to create coins and tokens on the IOTA blockchain using Move. --- import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/iota-101/create-coin/create-coin.json'; +# Creating Coins and Tokens -Coins and tokens on IOTA are similar. In practice, the terms are used interchangeably, but there are some differences in their implementation. You can learn about these differences in the respective standard documentation, [Closed-Loop Token](../../standards/closed-loop-token.mdx) and [Coin](../../standards/coin.mdx). +Coins and tokens in IOTA are similar concepts, often used interchangeably, +but there are subtle differences in their implementation. +To understand these differences, refer to the standard documentation for [Closed-Loop Token](../../standards/closed-loop-token.mdx) and [Coin](../../standards/coin.mdx). -Publishing a coin on IOTA is nearly as straightforward as publishing a new type. The main difference is the requirement of a [one-time witness](../move-overview/one-time-witness.mdx) when creating a coin. +## Publishing a Coin + +Publishing a coin on IOTA is almost as straightforward as publishing a new type. +The key difference is the requirement of a [one-time witness](../move-overview/one-time-witness.mdx) when creating a coin. ```move file=/examples/move/coin/sources/my_coin.move ``` -The `Coin` is a generic implementation of a coin on IOTA. Access to the `TreasuryCap` provides control over the minting and burning of coins. Further transactions can be sent directly to the `iota::coin::Coin` with `TreasuryCap` object as authorization. +The [`Coin`](../../../references/framework/iota-framework/coin.mdx) is a generic coin implementation in IOTA. +By accessing the [`TreasuryCap`](../../../references/framework/iota-framework/coin.mdx#resource-treasurycap), +you gain control over minting and burning coins. +You can send further transactions directly to `iota::coin::Coin` using the `TreasuryCap` object for authorization. -Extending the example further, add a `mint` function to the module. Use the `mint` function of the `Coin` module to create (mint) a coin and then transfer it to an address. +## Extending the Coin Module -```move file=/examples/move/coin/sources/my_coin.move#L23-L32 -``` +To extend the coin module, add a `mint` function. +This function utilizes the [`mint`](../../../references/framework/iota-framework/coin.mdx#function-mint) method from the `Coin` module +to create a coin and transfer it to a specified address. -### IOTA CLI +## IOTA CLI -If you published the previous example to a IOTA network, you can use the `iota client call` command to mint coins and deliver them to the address you provide. See [IOTA CLI](../../../references/cli.mdx) for more information on the command line interface. +### Minting Coins + +After publishing the coin module to the IOTA network, +you can mint coins and send them to an address using the `iota client call` command. +For more details on the command-line interface, see [IOTA CLI](../../../references/cli.mdx). ```shell iota client call --function mint --module mycoin --package --args ``` -If the call is successful your console displays the result, which includes a **Balance Changes** section with the following information included: +Upon successful execution, the console displays output including a **Balance Changes** section: ```shell ... @@ -39,34 +53,40 @@ Amount: ... ``` -## DenyList - -See [`DenyList`](./regulated.mdx#denylist). +## Implementing a Deny List -## Create regulated coin +If you need to restrict specific addresses from accessing your coin, consider implementing a [`DenyList`](./regulated.mdx#managing-the-deny-list). -If you need the ability to deny specific addresses from having access to your coin, you can use the `create_regulated_currency` function (instead of `create_currency`) to create it. +## Creating a Regulated Coin -Behind the scenes, `create_regulated_currency` uses the `create_currency` function to create the coin, but also produces a `DenyCap` object that allows its bearer to control access to the coin's deny list in a `DenyList` object. Consequently, the way to create a coin using `create_regulated_currency` is similar to the previous example, with the addition of a transfer of the `DenyCap` object to the module publisher. +To deny specific addresses from holding your coin, +use the [`create_regulated_currency`](../../../references/framework/iota-framework/coin.mdx#function-create_regulated_currency_v1) function instead of [`create_currency`](../../../references/framework/iota-framework/coin.mdx#function-create_currency). -## Create tokens +Internally, `create_regulated_currency` calls `create_currency` to create the coin +and also produces a [`DenyCap`](../../../references/framework/iota-framework/coin.mdx#resource-denycapv1) object. +This object allows you to manage the deny list in a `DenyList` object. +The process is similar to the previous example but includes transferring the `DenyCap` object to the module publisher. -Tokens reuse the `TreasuryCap` defined in the `iota::coin` module and therefore have the same initialization process. The `coin::create_currency` function guarantees the uniqueness of the `TreasuryCap` and forces the creation of a `CoinMetadata` object. +## Creating Tokens -Coin-like functions perform the minting and burning of tokens. Both require the `TreasuryCap`: +Tokens reuse the [`TreasuryCap`](../../../references/framework/iota-framework/coin.mdx#resource-treasurycap) defined in the `iota::coin` module +and follow the same initialization process. +The `coin::create_currency` function ensures the uniqueness of the `TreasuryCap` and enforces the creation of a `CoinMetadata` object. -- `token::mint` - mint a token -- `token::burn` - burn a token +You can mint and burn tokens using functions similar to those for coins, both requiring the `TreasuryCap`: -See [Closed-Loop Token](../../standards/closed-loop-token.mdx) standard for complete details of working with tokens. +- [`token::mint`](../../../references/framework/iota-framework/token.mdx#function-mint) — Mint a token. +- [`token::burn`](../../../references/framework/iota-framework/token.mdx#function-burn) — Burn a token. -## Examples +For complete details on working with tokens, refer to the [Closed-Loop Token](../../standards/closed-loop-token.mdx) standard. -See the following topics for examples of some common use cases for coin and token creation. +## Additional Examples -- [Regulated Coin and Deny List](regulated.mdx): Create a regulated coin and add or remove names from the deny list. -- [Loyalty Token](loyalty.mdx): Create a token to reward user loyalty. -- [In-Game Token](in-game-token.mdx): Create tokens that can be used only within a mobile game. +Explore these topics for practical examples of coin and token creation: +- [Migrate to CoinManager](migrate-to-coin-manager.mdx): Learn about IOTA's unique [`CoinManager`](../../../references/framework/iota-framework/coin_manager.mdx), and how it simplify managing your [Coins](../../../references/framework/iota-framework/coin.mdx). +- [Regulated Coin and Deny List](regulated.mdx): Learn how to create a regulated coin and manage the deny list. +- [Loyalty Token](loyalty.mdx): Discover how to create a token to reward user loyalty. +- [In-Game Token](in-game-token.mdx): Understand how to create tokens usable within a mobile game. \ No newline at end of file diff --git a/docs/content/developer/iota-101/create-coin/in-game-token.mdx b/docs/content/developer/iota-101/create-coin/in-game-token.mdx index e252bfdbfc8..d73b84420e5 100644 --- a/docs/content/developer/iota-101/create-coin/in-game-token.mdx +++ b/docs/content/developer/iota-101/create-coin/in-game-token.mdx @@ -1,43 +1,67 @@ --- -title: In-Game Currency +description: Learn how to create in-game currency on IOTA using the Closed-Loop Token standard. --- import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/iota-101/create-coin/in-game-token.json'; +# Creating In-Game Currency -Using the IOTA [Closed-Loop Token](../../standards/closed-loop-token.mdx) standard, you can create in-game currency (such as gems or diamonds in mobile games) that you can grant to players for their actions or make available to purchase. You mint the tokens on IOTA, but players can only use the tokens within the economy of the game itself. These types of tokens are usually not transferrable and you would typically mint them in predefined amounts to maintain scarcity and game balance. +You can use the IOTA [Closed-Loop Token](../../standards/closed-loop-token.mdx) standard +to develop in-game currencies like gems or diamonds commonly found in mobile games. +These tokens can be awarded to players for their actions or made available for purchase. +While minted on the IOTA network, players can only use these tokens within the game's ecosystem. +Typically, such tokens are non-transferable and are minted in predefined quantities to maintain scarcity and balance within the game. -The following example creates an in-game currency called a GEM, which represents a certain number of IOTA. In the example, the user can buy fungible GEMs using IOTA, which can then be used as currency within the game. Use the code comments to follow the logic of the example. +## Setting Up the GEM Currency -## Example +In the following example creates an in-game currency called `GEM`, representing a specific amount of IOTA. +Players can purchase fungible `GEMs` using IOTA, which they can then spend within the game. -The IOTA repo hosts a basic example of creating in-game currency. The Move modules that create the economy of the example are in the gems.move source file. +### Example Overview -### Module examples::sword +The IOTA repository includes a [basic example of creating an in-game currency]https://github.com/iotaledger/iota/tree/develop/examples/move/token. +The Move modules responsible for establishing the game's economy are located in the [`gems.move`](https://github.com/iotaledger/iota/blob/develop/examples/move/token/sources/gems.move) source file. -The `examples::sword` module creates one of the objects, a `sword`, that has in-game value. The module assigns a value in GEMs (the other valuable in-game item) to the sword. The module also provides the logic for trading GEMs to receive a sword. +### The `examples::sword` Module + +The [`examples::sword` module](https://github.com/iotaledger/iota/blob/develop/examples/move/token/sources/gems.move#L8) defines an in-game object, a `sword`, +which holds value within the game. +This module assigns a `GEM` value to the sword and includes the logic for trading `GEMs` to acquire a sword. ```move file=/examples/move/token/sources/gems.move#L8-L32 ``` -### Module examples::gem +### The `examples::gem` Module + +The [`examples::gem` module](https://github.com/iotaledger/iota/blob/develop/examples/move/token/sources/gems.move#L36) is responsible +for creating the `GEM` in-game currency. +Players spend IOTA to purchase `GEMs`, which they can trade for swords or other in-game items. +The module defines three tiers of `GEM` packages—small, medium, and large—each representing different in-game values. +Constants within the module specify both the value and the quantity of GEMs in each package. + +```move file=/examples/move/token/sources/gems.move#L73-L69 +``` -The `examples::gem` module creates the in-game currency, GEMs. Users spend IOTA to purchase GEMs, which can then be traded for swords. The module defines three groups of GEMs (small, medium, and large), with each group representing a different in-game value. Constants hold both the value of each package and the actual number of GEMs the groups contain. +#### Initializing the GEM Currency -The module's `init` function uses `coin::create_currency` to create the GEM. The `init` function, which runs only the one time when the module publishes, also sets the policies for the in-game currency, freezes the metadata for the coin, and transfers the policy capability to the publisher of the package. +The `init` function in the module uses `coin::create_currency` to create the GEM currency. This function runs only once upon module publication. It sets the policies for the in-game currency, freezes the coin's metadata, and transfers the policy capability to the package publisher. ```move file=/examples/move/token/sources/gems.move#L76-L100 ``` -The module handles the purchase of GEMs with the `buy_gems` function. +#### Purchasing GEMs + +The module handles the purchase of `GEMs` through the `buy_gems` function. ```move file=/examples/move/token/sources/gems.move#L104-L125 ``` +## Viewing the Complete Module Code + +For a comprehensive understanding, you can view the complete code of the `gems.move` module below. +
- -Toggle complete module code - +Click to expand the full module code ```move file=/examples/move/token/sources/gems.move ``` diff --git a/docs/content/developer/iota-101/create-coin/loyalty.mdx b/docs/content/developer/iota-101/create-coin/loyalty.mdx index f279e89ab43..fb109ccb178 100644 --- a/docs/content/developer/iota-101/create-coin/loyalty.mdx +++ b/docs/content/developer/iota-101/create-coin/loyalty.mdx @@ -1,49 +1,77 @@ --- -title: Loyalty Tokens +description: Learn how to create loyalty tokens on IOTA for use in digital services. --- import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/iota-101/create-coin/loyalty.json'; -Using the IOTA [Closed-Loop Token](../../standards/closed-loop-token.mdx) standard, you can create tokens that are valid only for a specific service, like an airline that wants to grant tokens to frequent flyers to purchase tickets or upgrades. +# Creating Loyalty Token -The following example demonstrates the creation of a loyalty token that bearers can use to make purchases in a digital gift shop. +You can use the IOTA [Closed-Loop Token](../../standards/closed-loop-token.mdx) standard +to create [tokens](../../../references/framework/iota-framework/token.mdx) that are valid only within a specific service. +For example, an airline might grant tokens to frequent flyers that they can use to purchase tickets or upgrades. -## Example +In this guide, you'll learn how to create a loyalty token that users can use to make purchases in a digital gift shop. -The Loyalty Token example illustrates a loyalty token that is created with the Closed Loop Token standard. If you were to implement this example, the Admin would send `LOYALTY` tokens to the users of your service as a reward for their loyalty. The example creates a `GiftShop` where holders can spend `LOYALTY` tokens to buy `Gift`s. +## Overview -### examples::loyalty +The following example demonstrates how to create a loyalty token using the Closed-Loop Token standard. +As the administrator, you would send `LOYALTY` tokens to your service's users as a reward for their loyalty. +The example includes a `GiftShop` where holders can spend `LOYALTY` tokens to buy `Gift` items. -The loyalty.move source file contains the `examples::loyalty` module code that creates the loyalty token. The module includes the one-time witness (OTW) that creates the coin (with the same name as the module, `LOYALTY`), possesses only the `drop` ability, and has no fields. These are the characteristics of a OTW, which ensures the `LOYALTY` type has a single instance. +## Module: `examples::loyalty` + +The `examples::loyalty` module, found in the `loyalty.move` source file, contains the code to create the loyalty token. +The module defines a [one-time witness (OTW)](../move-overview/one-time-witness.mdx) +that creates the coin named `LOYALTY`. +This coin possesses only the `drop` ability and has no fields. +These characteristics ensure the `LOYALTY` type has a single instance. ```move file=/examples/move/token/sources/loyalty.move#L22-L23 ``` -The `init` function of the module uses the `LOYALTY` OTW to create the token. All `init` functions run one time only at the package publish event. The initializer function makes use of the OTW `LOYALTY` type defined previously in its call to `create_currency`. The function also defines a policy, sending both the policy capability and trasury capability to the address associated with the publish event. The holder of these transferrable capabilities can mint new `LOYALTY` tokens and modify their policies. +### Initialization Function + +The module's [`init` function](../move-overview/init.mdx) uses the `LOYALTY` OTW to create the token. +Remember that all `init` functions run only once at the package publish event. +The initializer function calls [`create_currency`](../../../references/framework/iota-framework/coin.mdx#function-create_currency) +using the `LOYALTY` type defined earlier. +It also sets up a policy by sending both the [policy capability](../../../references/framework/iota-framework/token.mdx#resource-tokenpolicycap) +and the [treasury capability](../../../references/framework/iota-framework/coin.mdx#resource-treasurycap) to the address associated with the publish event. +The holder of these transferable capabilities can mint new `LOYALTY` tokens and modify their policies. ```move file=/examples/move/token/sources/loyalty.move#L37-L63 ``` -The `LOYALTY` minting function is called `reward_user`. As mentioned previously, the holder of the `TreasuryCap` can call this function to mint new loyalty tokens and send them to the desired address. The function uses the `token::mint` function to create the token and `token::transfer` to send it to the intended recipient. +### Minting Function: `reward_user` + +The `reward_user` function allows the holder of the `TreasuryCap` +to mint new loyalty tokens and send them to specified addresses. +It uses the [`token::mint`](../../../references/framework/iota-framework/token.mdx#function-mint) function +to create the tokens and [`token::transfer`](../../../references/framework/iota-framework/token.mdx#function-transfer) to deliver them to the intended recipients. ```move file=/examples/move/token/sources/loyalty.move#L71-L81 ``` -Finally, the example includes a `buy_a_gift` function to handle the redemption of `LOYALTY` tokens for `Gift` types. The function ensures the gift price matches the number of loyalty tokens spent, then uses the `token::spend` function to handle the treasury bookkeeping. +#### Redeeming Tokens: `buy_a_gift` +Finally, the module includes a `buy_a_gift` function to handle the redemption of `LOYALTY` tokens for `Gift` items. +This function ensures that the gift's price matches the number of loyalty tokens spent. +It uses the [`token::spend`](../../../references/framework/iota-framework/token.mdx#function-spend) function to manage the treasury bookkeeping. ```move file=/examples/move/token/sources/loyalty.move#L85-L100 ``` +## Full Source Code + +For a complete view of the module, you can review the full source code below. +
- -Toggle complete source code - +Click to view the complete source code ```move file=/examples/move/token/sources/loyalty.move ```
- + \ No newline at end of file diff --git a/docs/content/developer/iota-101/create-coin/regulated.mdx b/docs/content/developer/iota-101/create-coin/regulated.mdx index a2c9b512619..f51e4419559 100644 --- a/docs/content/developer/iota-101/create-coin/regulated.mdx +++ b/docs/content/developer/iota-101/create-coin/regulated.mdx @@ -1,13 +1,21 @@ --- -title: Regulated Coin and Deny List -description: You can create regulated coins on IOTA, such as stablecoins. These coins are similar to other coins like IOTA, but include the ability to control access to the coin using a deny list. +description: Learn how to create regulated coins on IOTA using deny lists for access control. --- import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/iota-101/create-coin/regulated.json'; -The IOTA [Coin](../../standards/coin.mdx) standard provides a `create_regulated_currency` function to create coins. This function is different than `create_currency` in that it generates a coin that you can block certain addresses from being able to use those coins in transactions. This ability is a requirement for assets like stablecoins. +# Creating Regulated Coins with Deny Lists on IOTA -Behind the scenes, `create_regulated_currency` uses the `create_currency` function to create the coin, but also produces a `DenyCap` object that allows its bearer to control access to the coin's deny list in a `DenyList` object. Consequently, the way to create a coin using `create_regulated_currency` is similar to the previous example, with the addition of a transfer of the `DenyCap` object to the module publisher. +Regulated coins on IOTA allow you to control access by restricting certain addresses, +which is crucial for assets like stablecoins. +These coins are similar to standard IOTA coins but provide additional control through a deny list. + +The IOTA [Coin](../../standards/coin.mdx) standard offers the [`create_regulated_currency`](../../../references/framework/iota-framework/coin.mdx#function-create_regulated_currency_v1) function +to create such coins. +This function not only creates the coin but also generates a [`DenyCap`](../../../references/framework/iota-framework/coin.mdx#resource-denycapv1) object, +\enabling you to manage a deny list via a [`DenyList`](../../../references/framework/iota-framework/deny_list.mdx) object. +The process is akin to using [`create_currency`](../../../references/framework/iota-framework/coin.mdx#function-create_currency), +with the added step of handling the `DenyCap` object. ```move title="regcoin.move" module examples::regcoin { @@ -24,7 +32,7 @@ module examples::regcoin { } ``` -When you deploy the previous module using `iota client publish`, the console responds with transaction effects, including the creation of the following objects: +Deploying this module with `iota client publish` results in transaction effects that include the creation of several objects: ```shell ... @@ -72,43 +80,52 @@ Created Objects: ... ``` -As you might have noticed, the publish action creates a `RegulatedCoinMetadata` object along with the standard `CoinMetadata` object. You don't need to explicitly call the `freeze_object` on the `RegulatedCoinMetadata` object, however, because `create_regulated_currency` automatically performs this action. +Notice that a [`RegulatedCoinMetadata`](../../../references/framework/iota-framework/coin.mdx#resource-regulatedcoinmetadata) object +is created alongside the standard [`CoinMetadata`](../../../references/framework/iota-framework/coin.mdx#resource-coinmetadata) object. +You don't need to explicitly freeze the `RegulatedCoinMetadata` object because `create_regulated_currency` does this automatically. + +The output also shows three objects now owned by the publisher: -The output also shows the three objects that the publisher now owns: `UpgradeCap` for [package upgrades](../move-overview/package-upgrades/upgrade.mdx), `TreasuryCap` for minting or burning coins, and the `DenyCap` for adding or removing addresses to or from the deny list for this coin. +- [`UpgradeCap`](../../../references/framework/iota-framework/package.mdx#resource-upgradecap) for [package upgrades](../move-overview/package-upgrades/upgrade.mdx). +- [`TreasuryCap`](../../../references/framework/iota-framework/coin.mdx#resource-treasurycap) for minting or burning coins. +- [`DenyCap`](../../../references/framework/iota-framework/coin.mdx#resource-denycapv1) for managing the deny list associated with this coin. -## DenyList +## Understanding the DenyList -The IOTA framework provides a `DenyList` singleton, shared object that the bearer of a `DenyCap` can access to specify a list of addresses that are unable to use a IOTA core type. The initial use case for `DenyList`, however, focuses on limiting access to coins of a specified type. This is useful, for example, when creating a regulated coin on IOTA that requires the ability to block certain addresses from using it as inputs to transactions. Regulated coins on IOTA satisfy any regulations that require the ability to prevent known bad actors from having access to those coins. +The IOTA framework provides a `DenyList` singleton shared object, identified by the address `0x403`. +Holders of a `DenyCap` can specify addresses prohibited from using certain IOTA core types, +which is particularly useful for regulated coins needing to comply with regulations. :::info -The `DenyList` object is a system object that has the address `0x403`. You cannot create it yourself. +You cannot create the `DenyList` object yourself; it is a system object at address `0x403`. ::: +### Managing the Deny List -### Manipulate deny list - -For the ability to manipulate the addresses assigned to the deny list for your coin, you must add a few functions to the previous example. +To manipulate the deny list for your coin, add these functions to your module: ```move -public fun add_addr_from_deny_list(denylist: &mut DenyList, denycap: &mut DenyCap, denyaddy: address, ctx: &mut TxContext){ - coin::deny_list_add(denylist, denycap, denyaddy, ctx ); +public fun add_address_to_deny_list(denylist: &mut DenyList, denycap: &mut DenyCap, address_to_deny: address, ctx: &mut TxContext){ + coin::deny_list_add(denylist, denycap, address_to_deny, ctx); } -public fun remove_addr_from_deny_list(denylist: &mut DenyList, denycap: &mut DenyCap, denyaddy: address, ctx: &mut TxContext){ - coin::deny_list_remove(denylist, denycap, denyaddy, ctx ); +public fun remove_address_from_deny_list(denylist: &mut DenyList, denycap: &mut DenyCap, address_to_allow: address, ctx: &mut TxContext){ + coin::deny_list_remove(denylist, denycap, address_to_allow, ctx); } ``` -To use these functions, you pass the `DenyList` object (`0x403`), your `DenyCap` object ID, and the address you want to either add or remove. Using the IOTA CLI, you could use `iota client call` with the required information: +To use these functions, pass the `DenyList` object (`0x403`), your `DenyCap` object ID, and the address you wish to add or remove. + +Using the IOTA CLI: ```shell -iota client call --function add_addr_from_deny_list --module regcoin --package --args +iota client call --function add_address_to_deny_list --module regcoin --package --args Transaction Digest: ``` -The console displays the response from the network, where you can verify the `DenyList` object is mutated. +The console will display the network response, confirming that the `DenyList` object has been mutated: ```shell ... @@ -123,9 +140,8 @@ MutatedObjects: Digest: ... - ``` -For all `Coin` functions available, see the IOTA framework [`coin` module documentation](/references/framework/iota-framework/coin.mdx). +For a complete list of available `Coin` functions, refer to the IOTA framework [`coin` module documentation](../../../references/framework/iota-framework/coin.mdx). \ No newline at end of file diff --git a/docs/content/developer/stardust/exchanges.mdx b/docs/content/developer/stardust/exchanges.mdx index 150d636cfb4..a57ba49711a 100644 --- a/docs/content/developer/stardust/exchanges.mdx +++ b/docs/content/developer/stardust/exchanges.mdx @@ -41,7 +41,7 @@ The most common use case for exchanges and custody providers regarding integrati - All `Coin` objects can be freely transferred by the owner of this object. - Only the owner of the `Coin` object can interact with it. -- The only restriction that can be added to a `Coin` object is the optional blocking of transfers for addresses on a [`DenyList`](../iota-101/create-coin/regulated.mdx#denylist). This only applies to `Coin` objects that have been instantiated as [Regulated Coins](../standards/coin.mdx#regulated-coins). +- The only restriction that can be added to a `Coin` object is the optional blocking of transfers for addresses on a [`DenyList`](../iota-101/create-coin/regulated.mdx#managing-the-deny-list). This only applies to `Coin` objects that have been instantiated as [Regulated Coins](../standards/coin.mdx#regulated-coins). - It is not possible to add other limiting functionality to `Coin` objects directly, like vesting or time-locks; this can only be done by wrapping the unrestricted `Coin` object within another restricting object. It's safe to assume that if you receive a `Coin` object, you can use it without limitations. - A `Coin` is tied to a `CoinMetadata` object containing `name`, `symbol`, `decimals`, `description`, and an `icon_url`. - The holder of the TreasuryCap handles administrative tasks of a Coin like minting new tokens or changing metadata; without a `TreasuryCap` these actions can no longer be performed.