Book description
Mine Ether, deploy smart contracts, tokens, and ICOs, and manage security vulnerabilities of Ethereum
Key Features
- Build end-to-end decentralized Ethereum apps using Truffle, Web3, and Solidity
- Explore various solution-based recipes to build smart contracts and foolproof decentralized applications
- Develop decentralized marketplaces from scratch, build wallets, and manage transactions
Book Description
Ethereum and Blockchain will change the way software is built for business transactions. Most industries have been looking to leverage these new technologies to gain efficiencies and create new business models and opportunities.
The Ethereum Cookbook covers various solutions such as setting up Ethereum, writing smart contracts, and creating tokens, among others. You'll learn about the security vulnerabilities, along with other protocols of Ethereum.
Once you have understood the basics, you'll move on to exploring various design decisions and tips to make your application scalable and secure. In addition to this, you'll work with various Ethereum packages such as Truffle, Web3, and Ganache.
By the end of this book, you'll have comprehensively grasped the Ethereum principles and ecosystem.
What you will learn
- Efficiently write smart contracts in Ethereum
- Build scalable distributed applications and deploy them
- Use tools and frameworks to develop, deploy, and test your application
- Use block explorers such as Etherscan to find a specific transaction
- Create your own tokens, initial coin offerings (ICOs), and games
- Understand various security flaws in smart contracts in order to avoid them
Who this book is for
The Ethereum Cookbook is for you if you are a software engineer, Blockchain developer, or research scientist who wants to build smart contracts, develop decentralized applications, and facilitate peer-to-peer transaction. It is assumed that you are familiar with Blockchain concepts and have sound knowledge of JavaScript.
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Preface
-
Getting Started
- Introduction
- Choosing a client for Ethereum
- Setting up a node and participating in a network
- Working with the JavaScript console
- Saving time and money with INFURA
- Creating your own private Ethereum network
- Creating a blockchain network for development
- Using Azure Ethereum as a service
- Using MetaMask and other wallets
- Using block explorer
- Understanding everything about accounts
- Installing a solidity compiler
-
Smart Contract Development
- Introduction
- Choosing an IDE wisely
- Writing your first smart contract
- Testing your contract with Remix
- Static and dynamic types in solidity
- Constructor and fallback functions
- Working with struct and enum
- Control structures in Solidity
- Writing functions in solidity
- Deciding between arrays and mappings
- Where to use function modifiers
- Using visibility modifiers efficiently
- Essential events – EVM logger
- Using storage and memory efficiently
- Compiling your contract with the solc compiler
- Deploying contracts using geth
-
Interacting with the Contract
- Introduction
- Installing and configuring web3.js
- Using MetaMask as an injected provider
- Managing accounts and sending transactions
- Compiling and deploying your smart contract
- Reading data from smart contracts
- Writing data into a smart contract
- Watching events from your DApp
- Sending a raw transaction
- Batch requests using web3.js
- Interacting with Ethereum using JSON-RPC
- Other ways to interact with your contract
-
The Truffle Suite
- Introduction
- Installing and configuring the Truffle framework
- Making use of Truffle boxes
- Compiling smart contracts
- Advanced Truffle configuration
- Migration and deployment in Truffle
- Interacting with your contract
- Debugging a smart contract using Truffle
- Writing tests for smart contracts
- Building DApps and APIs using Truffle
- Package management in Truffle
- Getting started with Drizzle
- Using HD wallet in Truffle
-
Tokens and ICOs
- Introduction
- Creating a basic ERC20 token in Ethereum
- Transferring tokens between accounts
- Delegating other accounts to spend your token
- Creating a token that can be minted
- Creating a token that can be burnt
- Creating an ERC223 token
- Building your own Initial Coin Offering
- Adding features to the ICO contract
- Providing bonus tokens to investors
- Whitelisting users for the crowdsale
- Accepting crypto payments for the crowdsale
- Creating a wallet that supports all ERC20 tokens
- Games and DAOs
-
Advanced Solidity
- Introduction
- Handling errors properly in solidity
- Abstract and interface contracts
- Managing contracts from other contracts
- Contract inheritance in solidity
- Creating libraries in solidity
- Mathematical and cryptographic functions in solidity
- Creating upgradable smart contracts
- Fetching data from APIs using solidity
- Function as a type in solidity
- Understanding solidity assembly
- Implementing multisig wallets in solidity
-
Smart Contract Security
- Introduction
- Integer overflow and underflow
- Re-entrancy attack
- The parity hack
- Forcing Ether to a contract
- Use of private variables
- Transaction-Ordering Dependence (TOD)
- Call to the unknown
- DoS using loops
- Security analysis tools for solidity
- Uninitialized storage pointer in solidity
- Best practices in solidity
- Design Decisions
- Other Protocols and Applications
- Miscellaneous
- Other Books You May Enjoy
Product information
- Title: Ethereum Cookbook
- Author(s):
- Release date: August 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789133998
You might also like
video
Ethereum Fundamentals
When it comes to digitally recording and storing valuable information, no other technology can match the …
book
Blockchain and Ethereum Smart Contract Solution Development: Dapp Programming with Solidity
Build decentralized applications with smart contract programming. Following the curriculum from an active blockchain course taught …
video
Solidity Smart Contracts: Build DApps in Ethereum Blockchain
For the past couple of years, there has been no bigger breakthrough in the IT world …
book
Building Blockchain Apps
A Developer's Guide to Blockchain Programming Fundamentals Blockchain development is entering a period of explosive growth, …