Objective: Create a smart contract that works like a simple bank. It should keep track of how many tokens each person has and allow people to mint new tokens, check their balance, and transfer tokens to others.
- Like a bank = Keeps track of everyone’s money
- Mint tokens = Create new money (only the owner can do this)
- Check balance = See how much money someone has
- Transfer tokens = Send money from one person to another
- Handle errors = Make sure people can’t do impossible things (like spend more than they have)
- Use Mapping<AccountId, u128> to store balances (like a phone book: person -> amount of money)
- Implement mint message to create new tokens (like printing new money)
- Implement balance_of message to check account balance (like checking your bank balance)
- Implement transfer message to move tokens between accounts (like sending money to someone)
- Add proper error handling (like making sure people can’t spend more than they have)
- Include events for important operations (like sending receipts for transactions)