Introducing tokens
Before getting into building our own tokens, it is important to understand the fundamental concept of tokens.
Tokens are everywhere. Imagine going to a funfair full of activities, rides, and sports. Upon entry, you get given some tokens that can then be exchanged for multiple rides or activities. The token is the currency of the fair. The fair stalls recognize tokens and do not accept any other currency, even though you get these tokens in exchange for some other currency to start with.
Another example of the usage of tokens is in casinos. You can buy tokens after entering the casino and then continue to play on different tables using the same tokens. Again, these tokens are the currency for the casino, and the tables do not accept any other currency.
So, what do we understand about tokens from the previous two examples? Tokens are a generic concept and can represent anything. A token is meant for gambling within a casino and, at the same time, it can...