Solana/Thai Baht Coin/Introduction
Student: "Teacher, I've been thinking lately, could the simple on-chain data storage system we created earlier be extended into a Thai Baht Coin program that can perform transfers? It seems like all we need is for each user to record their balance in their own data account, right?"
Teacher: "Haha, you're at a very crucial stage now. In fact, any on-chain program is essentially a state machine. What functionality you want to implement depends entirely on how you interpret the data."
Student: "Yeah, I think we just need the program to create a data account for each user to store their balance."
Teacher: "Exactly. You can keep thinking about what instructions the Thai Baht Coin program needs to implement."
Student: "We could start simple. The program supports two instructions: minting and transferring. The former increases the total token supply, while the latter transfers tokens between two accounts."
Teacher: "Don't forget, you'll also need to define the list of accounts involved."
Student: "Yes, Teacher. I think I now have a deeper understanding of Solana program design. We always need to follow these three steps: first, design the data format; then, design the instructions; and finally, define the list of accounts."
Teacher: "Great! You're starting to make connections now. The Thai Baht Coin program will be your homework for the week!"
Student: "Awesome! I'll start sketching out the design and write it step by step."