Assignment 3: Create a Minting Page for your Token

The goal of this assignment is to create your first private dApp on Aleo. You will create an interface for minting your token and displaying the user's balance.

Learning Objectives

By completing this assignment, you will:

  • Create your first private dApp

  • Use the Aleo tooling such as the wallet adapter library, client RPC API and SDK.

  • Create a minting interface for your token

  • Show users their private and public balance

Tasks

  1. Deploy the token program from "Assignement 2" correction on the Aleo Testnet Beta blockchain.

  2. Call the initialize function to register the token.

  3. Use create-aleo-app to create an empty Aleo app.

  4. Update the app so it includes, in a single landing page:

    1. A "MINT 10" button to mint 10 tokens. Clicking it should trigger a call to the mint transition from previously reployed program using aleo-wallet-adapter.

    2. A public token balance for your token, for instance: 10.002221. It is obtained by reading the authorized_balances mapping from the token registry program, for the bhp256 hash of user's TokenOwner struct.

    3. A private token balance, for instance: 8.01212. It is obtained by summing all the amounts from the user's Token records from the token registy program.

Last updated