Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Blockchain Quick Reference

You're reading from  Blockchain Quick Reference

Product type Book
Published in Aug 2018
Publisher Packt
ISBN-13 9781788995788
Pages 350 pages
Edition 1st Edition
Languages
Concepts
Authors (4):
Mariko Amekodommo Mariko Amekodommo
Brenn Hill Brenn Hill
Profile icon Brenn Hill
Samanyu Chopra Samanyu Chopra
Profile icon Samanyu Chopra
Paul Valencourt Paul Valencourt
Profile icon Paul Valencourt
View More author details

Table of Contents (24) Chapters

Preface Blockchain 101 Components and Structure of Blockchain Decentralization Versus Distributed Systems Cryptography and Mechanics Behind Blockchain Bitcoin Altcoins Achieving Consensus Advanced Blockchain Concepts Cryptocurrency Wallets Alternate Blockchains Hyperledger and Enterprise Blockchains Ethereum 101 Solidity 101 Smart Contracts Ethereum Development Ethereum Accounts and Ether Tokens Decentralized Applications Mining ICO 101 Creating Your Own Currency Scalability and Other Challenges Future of Blockchain 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 $15.99/month. Cancel anytime}