Stable coin

You have created a digital token that can be sold autonomously. However, you should not restrict yourself to the generic token. You could be more creative in your token smart contract by adding more methods to spice up your smart contract. What methods you should add are dependent on your smart contract's purpose. The token smart contract that is used in a game as currency will have different methods to the token smart contract that is used in a supply chain tracking system.

Let's create a stable coin smart contract. This is a token smart contract that is pegged to fiat money, such as the US dollar. We also want this smart contract to be a bank where we, as an owner, can freeze an account.

We can base our work on an ERC 20 token ...

Get Hands-On Blockchain for Python Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.