# Part 4: Registering and minting · Asset management system with React and FT4 · Learn Chromia

> This lesson shows you how to mint an asset with the FT4 token standard.

Source: https://chromia.com/learn/ft4-demo-app/module-frontend-application/register-and-mint/

Asset management system with React and FT4Lesson 13 of 16

1. [01Create an asset management system using FT4](https://chromia.com/learn/ft4-demo-app/introduction/)

Module 1: Initialize the full-stack application

1. [02Overview](https://chromia.com/learn/ft4-demo-app/module-init/)
2. [03Prepare the full-stack application](https://chromia.com/learn/ft4-demo-app/module-init/setup-application/)

Module 2: The blockchain dapp

1. [04Overview](https://chromia.com/learn/ft4-demo-app/module-blockchain/)
2. [05Part 1: Set up the blockchain dapp](https://chromia.com/learn/ft4-demo-app/module-blockchain/setup/)
3. [06Account management](https://chromia.com/learn/ft4-demo-app/module-blockchain/account-management/)
4. [07Asset Registration and Minting](https://chromia.com/learn/ft4-demo-app/module-blockchain/asset-registration/)
5. [08Test the asset management system](https://chromia.com/learn/ft4-demo-app/module-blockchain/test/)

Module 3: The frontend application

1. [09Overview](https://chromia.com/learn/ft4-demo-app/module-frontend-application/)
2. [10Part 1: Prepare the frontend application](https://chromia.com/learn/ft4-demo-app/module-frontend-application/setup/)
3. [11Part 2: Tools for Chromia development](https://chromia.com/learn/ft4-demo-app/module-frontend-application/tools/)
4. [12Part 3: Registering accounts](https://chromia.com/learn/ft4-demo-app/module-frontend-application/account-regisration/)
5. [13Part 4: Registering and minting](https://chromia.com/learn/ft4-demo-app/module-frontend-application/register-and-mint/)
6. [14Part 5: Burning tokens](https://chromia.com/learn/ft4-demo-app/module-frontend-application/burn/)
7. [15Part 6: Transferring assets](https://chromia.com/learn/ft4-demo-app/module-frontend-application/transfer/)
8. [16Part 7: Deploying onchain](https://chromia.com/learn/ft4-demo-app/module-frontend-application/deploy-onchain/)

[Learn](https://chromia.com/learn/)[Asset management system with React and FT4](https://chromia.com/learn/ft4-demo-app/)

13 / 16Module 3: The frontend applicationIntermediate

# Part 4: Registering and minting

This lesson shows you how to mint an asset with the FT4 token standard.

You create a new asset and mint it to an account by calling the `register_and_mint_asset` operation, which is defined in `asset_management/rell/src/main.rell`.

Calling an operation requires an FT4 session. The `useFtSession` hook from the `@chromia/react` package returns the current one.

asset\_management/src/hooks/token-hooks.ts

```
import { useFtSession } from "@chromia/react";
import { publicClientConfig as clientConfig } from "@/utils/generate-client-config";

interface MintTokenParams {
  ticker: string;
  name: string;
  amount: number;
}

function useMintToken() {
  const { data: ftAccounts } = useFtAccounts({ clientConfig });
  const { data: session } = useFtSession(
    ftAccounts?.length ? { clientConfig, account: ftAccounts[0] } : null,
  );

  const registerAsset = useCallback(
    async (token: MintTokenParams) => {
      if (!session) return;

      try {
        await session
          .transactionBuilder()
          .add(
            op(
              "register_and_mint_asset",
              token.name,
              token.ticker,
              8,
              BigInt(token.amount),
              "https://cdn-icons-png.flaticon.com/512/4863/4863873.png",
            ),
          )
          .buildAndSend();

        onSuccess?.(token);
      } catch (error) {
        console.error(error);

        onError?.(token);
      }
    },
    [session],
  );

  return mintToken;
}
```

The snippet defines a custom hook, `useMintToken`, which obtains the current session through `useFtSession`.

You pass `useMintToken` a `MintTokenParams` object with these properties:

* `ticker`: the asset's ticker symbol.
* `name`: the asset's name.
* `amount`: how much of the asset to mint.

To build a transaction, call the session object's `transactionBuilder` method, then append the `register_and_mint_asset` operation with `add`.

When you call `buildAndSend`, the configured keystore prompts for a signature on the transaction.

Written for this site from Chromia’s public course. Code samples are the course’s own.

[← Previous**Part 3: Registering accounts**](https://chromia.com/learn/ft4-demo-app/module-frontend-application/account-regisration/)[Next →**Part 5: Burning tokens**](https://chromia.com/learn/ft4-demo-app/module-frontend-application/burn/)
