Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Ethereum Projects for Beginners

You're reading from  Ethereum Projects for Beginners

Product type Book
Published in Jul 2018
Publisher Packt
ISBN-13 9781789537406
Pages 106 pages
Edition 1st Edition
Languages

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}