
Ethereum Cookbook
Over 100 recipes covering Ethereum-based tokens, games, wallets, smart contracts, protocols, and Dapps
- 404 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Ethereum Cookbook
Over 100 recipes covering Ethereum-based tokens, games, wallets, smart contracts, protocols, and Dapps
About this book
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.
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
Interacting with the Contract
- 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
Introduction
Installing and configuring web3.js
Getting ready
How to do it...
- Install web3 using the npm install command:
npm install web3
npm install [email protected]
npm view web3 versions
- Use the library as a browser module by downloading the JavaScript version directly from the web3.js repository at github.com/ethereum/web3.js. Navigate to the dist folder to find the web3.js files. Once you have downloaded them, import them into the HTML with a regular script tag:
<script src="./dist/web3.min.js"></script>
- Import web3 into your application using the require function. If you are using it as a browser module, it will be available as a global object:
var Web3 = require("web3");
- If you are using web3.js 1.x.x, reference individual packages under web3 using their module names. For example, you can directly import we3.eth using ...
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Preface
- Getting Started
- Smart Contract Development
- Interacting with the Contract
- The Truffle Suite
- Tokens and ICOs
- Games and DAOs
- Advanced Solidity
- Smart Contract Security
- Design Decisions
- Other Protocols and Applications
- Miscellaneous
- Other Books You May Enjoy