- English
- ePUB (mobile friendly)
- Available on iOS & Android
Ethereum Smart Contract Development
About This Book
Become an Ethereum Blockchain developer using a blend of concepts and hands-on implementationsAbout This Book⢠Understand the Ethereum Ecosystem and its differences from its rich cousin Bitcoin⢠Explore the Solidity programming language and smart contract optimizations⢠Get a developer's perspective of Blockchain-as-a-technology with exposure to common challenges faced while building decentralized applicationsWho This Book Is ForIf you want to know the ins and outs of the Ethereum network and build your own decentralized applications, then this book is what you need! This book is for anyone who is interested in blockchain and wants to become an Ethereum developer. It's ideal for existing Ethereum developers who want to develop Ethereum using smart contracts. Basic knowledge of cryptography is expected but is not mandatory.What You Will Learn⢠Know how to build your own smart contracts and cryptocurrencies⢠Understand the Solidity language⢠Find out about data types, control structure, functions, inheritance, mathematical operations, and much more⢠See the various types of forks and discover how they are related to Ethereum⢠Get to know the various concepts of web3.js and its APIs so you can build client-side apps⢠Build a DAO from scratch and acquire basic knowledge of DApps on Ethercast⢠Be guided through the project so you can optimize EVM for smart contracts⢠Build your own decentralized applications (DApps) by taking a practical approachIn DetailEthereum is a public, blockchain-based distributed computing platform featuring smart contract functionality. This book is your one-stop guide to blockchain and Ethereum smart contract development.We start by introducing you to the basics of blockchain. You'll learn about hash functions, Merkle trees, forking, mining, and much more. Then you'll learn about Ethereum and smart contracts, and we'll cover Ethereum virtual machine (EVM) in detail. Next, you'll get acquainted with DApps and DAOs and see how they work. We'll also delve into the mechanisms of advanced smart contracts, taking a practical approach.You'll also learn how to develop your own cryptocurrency from scratch in order to understand the business behind ICO. Further on, you'll get to know the key concepts of the Solidity programming language, enabling you to build decentralized blockchain-based applications. We'll also look at enterprise use cases, where you'll build a decentralized microblogging site.At the end of this book, we discuss blockchain-as-a-service, the dark web marketplace, and various advanced topics so you can get well versed with the blockchain principles and ecosystem.Style and approachThis comprehensive guide takes a practical approach by showing you how to implement Blockchain in different Enterprise use cases. You'll quickly brush up on the basics of the blockchain database, then learn the advanced intricacies of smart contract development.
Frequently asked questions
Information
Hello World of Smart Contracts
- Write your first Hello World smart contract
- Code a contract with basic increment and decrement operation
- Code a loop
- Raise an issue on GitHub
- Create a private blockchain and mine ethers to run a smart contract
A smart contract in seven lines of code
- Open your Google Chrome browser and type remix solidity in Google, as show in Figure 3.1:
- Click the highlighted link in Figure 3.2. You can also type the following in your browser URL box to get to the website directly: http://remix.ethereum.org:
- Click the plus sign as marked in Figure 3.3 to create a new untitled Solidity (.sol) file.
- Write the following seven lines of code in the HelloWorld.sol file, as shown in Figure 3.5:
- Click the Create button, as highlighted in Figure 3.7. Voila! You just created your smart contract. The only caveat is that we would be simulating it on our local machine using in-memory, which mimics an Ethereum blockchain:
- To execute this contract, we press that myFirstHelloWorld button, as shown in Figure 3.8. We get the desired output: Hello World !
- We can also explore the byte codes, which are generated as a result of this smart contract execution, by pressing the Launch debugger | Instructions or just by clicking the Contract details (bytecode, interface etc) link. Figure 3.9 depicts the 368 bytes of virtual machine code generated by the hello world smart contract execution:
Remix in a nutshell
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Preface
- Blockchain Basics
- Grokking Ethereum
- Hello World of Smart Contracts
- A Noob's Guide to DApps and DAO
- Deep-Diving into Smart Contracts
- Solidity in Depth
- Primer on Web3.js
- Developing a Cryptocurrency from Scratch
- Enterprise Use Cases
- BaaS and the Dark Web Market
- Advanced Topics and the Road Ahead
- Other Books You May Enjoy