Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Blockchain Quick Reference

You're reading from   Blockchain Quick Reference A guide to exploring decentralized blockchain application development

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781788995788
Length 350 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (4):
Arrow left icon
Brenn Hill Brenn Hill
Author Profile Icon Brenn Hill
Brenn Hill
Paul Valencourt Paul Valencourt
Author Profile Icon Paul Valencourt
Paul Valencourt
Samanyu Chopra Samanyu Chopra
Author Profile Icon Samanyu Chopra
Samanyu Chopra
Mariko Amekodommo Mariko Amekodommo
Author Profile Icon Mariko Amekodommo
Mariko Amekodommo
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Blockchain 101 2. Components and Structure of Blockchain FREE CHAPTER 3. Decentralization Versus Distributed Systems 4. Cryptography and Mechanics Behind Blockchain 5. Bitcoin 6. Altcoins 7. Achieving Consensus 8. Advanced Blockchain Concepts 9. Cryptocurrency Wallets 10. Alternate Blockchains 11. Hyperledger and Enterprise Blockchains 12. Ethereum 101 13. Solidity 101 14. Smart Contracts 15. Ethereum Development 16. Ethereum Accounts and Ether Tokens 17. Decentralized Applications 18. Mining 19. ICO 101 20. Creating Your Own Currency 21. Scalability and Other Challenges 22. Future of Blockchain 23. Other Books You May Enjoy

Working on a smart contract

Let's dive into the task of creating a smart contract, along with the process of testing the smart contract on TestNet. The easiest way to run the code discussed in the following is on Remix. Just follow these steps:

  1. When you open Remix in the browser, by default, it opens the ballot.sol file; you can create a new file and start editing your first smart contract. Take a look at this:
pragma solidity ^0.4.24;

//This is a test comment, details about the contract can be added here
/*details like Total supply, contract address, Name, Symbol an decimals which will help someone knowing about the contract instead of finding these details within the source code

*/

contract Gotham{

string public name;
string public symbol;
uint8 public decimals;
//most suggested decimal places in 18
uint256 public totalSupply;


}
  1. In the previous code snippet...
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 $19.99/month. Cancel anytime