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
Deploy the token program from "Assignement 2" correction on the Aleo Testnet Beta blockchain.
Call the
initialize
function to register the token.Use create-aleo-app to create an empty Aleo app.
Update the app so it includes, in a single landing page:
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.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 thebhp256
hash of user'sTokenOwner
struct.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