Book Image

Ethereum Projects for Beginners

Book Image

Ethereum Projects for Beginners

Overview of this book

Ethereum enables the development of efficient, smart contracts that contain code. These smart contracts can interact with other smart contracts to make decisions, store data, and send Ether to others.Ethereum Projects for Beginners provides you with a clear introduction to creating cryptocurrencies, smart contracts, and decentralized applications. As you make your way through the book, you’ll get to grips with detailed step-by-step processes to build advanced Ethereum projects. Each project will teach you enough about Ethereum to be productive right away. You will learn how tokenization works, think in a decentralized way, and build blockchain-based distributed computing systems. Towards the end of the book, you will develop interesting Ethereum projects such as creating wallets and secure data sharing.By the end of this book, you will be able to tackle blockchain challenges by implementing end-to-end projects using the full power of the Ethereum blockchain.
Table of Contents (12 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributor
Preface
Index

Bug fixing and debugging smart contracts


This section tells you how to go about bug fixing and debugging your code. Usually, the code will be debugged in the developer console which is similar to developing regular JavaScript code. If there is an error present in the JavaScript code, you could easily rectify it on the developer console. However, if the bug is in your smart contract, you are going to want to go a bit deeper. How are you going to debug your smart contract once it is live? Well, you cannot—not locally at least. What if somebody finds a bug? You need to find out where it came from. For these very reasons, we can use remix.ethereum.org and etherscan.io.

The modified version of the MetaCoin Solidity file found at remix.ethereum.org is as follows:

You can create this file yourself by clicking the little plus icon in the top-left corner and giving it a name of your choice. Once you compile this code, you will notice a green bar which indicates that the code has been compiled successfully...