How to create a simple token smart contract
Tokens are the real killer applications on Ethereum. Tokens can represent many things, from virtual currency, loyalty points, shares in a company, or a venture into a representative of real-world assets. The most famous application of tokens is stablecoins, which represent fiat currency, usually US Dollars. Examples are USDC and USDT, where 1 USDC represents 1 US Dollar fiat. You can redeem 1 USDC with 1 US Dollar.
Without further ado and to help develop our notion of what a token is and how it works, let’s create a really simple token smart contract.
Let’s install Ape Framework:
$ python3 –m venv .venv $ source .venv/bin/activate (.venv) $ pip install eth-ape'[recommended-plugins]'==0.7.23
Then, create the project directory:
(.venv) $ mkdir token_project (.venv) $ cd token_project
After creating it, initialize the project:
(.venv) $ ape init Please enter project name: HelloToken SUCCESS:...