Ethereum Cookbook : Over 100 Recipes Covering Ethereum-based Tokens, Games, Wallets, Smart Contracts, Protocols, and Dapps
معرفی کتاب «Ethereum Cookbook : Over 100 Recipes Covering Ethereum-based Tokens, Games, Wallets, Smart Contracts, Protocols, and Dapps» نوشتهٔ Manoj P. R، منتشرشده توسط نشر Packt Publishing - ebooks Account در سال 2019. این کتاب در 20 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است.
Become an Ethereum Blockchain developer using a blend of concepts and hands-on implementationsKey FeaturesUnderstand the Ethereum Ecosystem and its differences from its rich cousin BitcoinExplore the Solidity programming language and smart contract optimizationsGet a developer's perspective of Blockchain-as-a-technology with exposure to common challenges faced while building decentralized applicationsBook DescriptionEthereum 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. 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 approachWho 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. Cover Title Page Copyright and Credits Dedication Packt Upsell Contributors Table of Contents Preface Chapter 1: Getting Started Introduction Choosing a client for Ethereum Getting ready How to do it... Geth Parity There's more... Setting up a node and participating in a network Getting ready How to do it... Working with the JavaScript console Getting ready How to do it... There's more... Saving time and money with INFURA How to do it... There's more... Creating your own private Ethereum network Getting ready How to do it... How it works... There's more... See also Creating a blockchain network for development Getting ready How to do it... There's more... Using Azure Ethereum as a service Getting ready How to do it... How it works... Using MetaMask and other wallets Getting ready How to do it... MetaMask MyCrypto Ethereum wallet–Mist Using block explorer How to do it... There's more... Understanding everything about accounts Getting ready How to do it... There's more... Installing a solidity compiler Getting ready How to do it... There's more... Chapter 2: Smart Contract Development Introduction Choosing an IDE wisely How to do it... There's more... Writing your first smart contract Getting ready How to do it... How it works... There's more... Testing your contract with Remix How to do it... There's more... Static and dynamic types in solidity Getting ready How to do it... There's more... Constructor and fallback functions How to do it... Constructor Fallback function Working with struct and enum How to do it... Structs Enums Control structures in Solidity How to do it... Writing functions in solidity How to do it... There's more... Deciding between arrays and mappings How to do it... Arrays Mapping Where to use function modifiers How to do it... Using visibility modifiers efficiently How to do it... Essential events – EVM logger Getting ready How to do it... Using storage and memory efficiently How to do it... There's more... Compiling your contract with the solc compiler Getting ready How to do it... There's more... Deploying contracts using geth Getting ready How to do it... There's more... Chapter 3: Interacting with the Contract Introduction Installing and configuring web3.js Getting ready How to do it... Using MetaMask as an injected provider Getting ready How to do it... How it works... Managing accounts and sending transactions Getting ready How to do it... Compiling and deploying your smart contract Getting ready How to do it... There's more... Reading data from smart contracts Getting ready How to do it... Writing data into a smart contract Getting ready How to do it... There's more... Watching events from your DApp Getting ready How to do it... Sending a raw transaction Getting ready How to do it... There's more... Batch requests using web3.js Getting ready How to do it... Interacting with Ethereum using JSON-RPC Getting ready How to do it... Other ways to interact with your contract Getting ready How to do it... Nethereum Web3J Chapter 4: The Truffle Suite Introduction Installing and configuring the Truffle framework Getting ready How to do it... Making use of Truffle boxes Getting ready How to do it... There's more... Compiling smart contracts Getting ready How to do it... Advanced Truffle configuration Getting ready How to do it... Migration and deployment in Truffle Getting ready How to do it... Interacting with your contract Getting ready How to do it... There's more... Debugging a smart contract using Truffle Getting ready How to do it... Writing tests for smart contracts Getting ready How to do it... Writing tests in JavaScript Writing tests in Solidity Building DApps and APIs using Truffle Getting ready How to do it... Package management in Truffle Getting ready How to do it... EthPM npm There's more... Getting started with Drizzle Getting ready How to do it... There's more... Using HD wallet in Truffle Getting ready How to do it... Chapter 5: Tokens and ICOs Introduction Creating a basic ERC20 token in Ethereum Getting ready How to do it... There's more... Transferring tokens between accounts Getting ready How to do it... There's more... Delegating other accounts to spend your token Getting ready How to do it... There's more... Creating a token that can be minted Getting ready How to do it... Creating a token that can be burnt Getting ready How to do it... There's more... Creating an ERC223 token Getting ready How to do it... Building your own Initial Coin Offering Getting ready How to do it... Adding features to the ICO contract Getting ready How to do it... There's more... Providing bonus tokens to investors Getting ready How to do it... There's more... Whitelisting users for the crowdsale Getting ready How to do it... There's more... Accepting crypto payments for the crowdsale Getting ready How to do it... MetaMask Shapeshift BTC Relay Creating a wallet that supports all ERC20 tokens Getting ready How to do it... There's more... Chapter 6: Games and DAOs Introduction Creating a non-fungible token Getting ready How to do it... There's more... Asset tracking and movement Getting ready How to do it... Creating a basic game on Ethereum Getting ready How to do it... Building a decentralized lottery on Ethereum Getting ready How to do it... Selecting a winner based on the ticket number Getting ready How to do it... Sharing dividends among investors Getting ready How to do it... Affiliating programs to attract more users Getting ready How to do it... Chapter 7: Advanced Solidity Introduction Handling errors properly in solidity Getting ready How to do it... require() revert() assert() Abstract and interface contracts Getting ready How to do it... Abstract contracts Interface contracts Managing contracts from other contracts Getting ready How to do it... There's more... Contract inheritance in solidity Getting ready How to do it... Creating libraries in solidity Getting ready How to do it... How it works... There’s more... Mathematical and cryptographic functions in solidity Getting ready How to do it... There's more... Creating upgradable smart contracts Getting ready... How to do it... How it works... Fetching data from APIs using solidity Getting ready How to do it... How it works... There's more... Function as a type in solidity Getting ready How to do it... Understanding solidity assembly Getting ready How to do it... There's more... Implementing multisig wallets in solidity Getting ready How to do it... Chapter 8: Smart Contract Security Introduction Integer overflow and underflow Getting ready How to do it... There's more... Re-entrancy attack Getting ready How to do it... The parity hack Getting ready How to do it... Forcing Ether to a contract Getting ready How to do it... There's more... Use of private variables Getting ready How to do it... Transaction-Ordering Dependence (TOD) Getting ready How to do it... Call to the unknown Getting ready How to do it... DoS using loops Getting ready How to do it... Security analysis tools for solidity Getting ready How to do it... Uninitialized storage pointer in solidity Getting ready How to do it... Best practices in solidity How to do it... Chapter 9: Design Decisions Introduction Serverless architecture for DApps Getting ready How to do it... Implementing an application-specific wallet Getting ready How to do it... What if you find a bug after deployment? Getting ready How to do it... Generating random numbers in Solidity Getting ready How to do it... Keeping contracts simple, modular, and up to date Getting ready How to do it... Implementing user authentication in Ethereum Getting ready How to do it... Chapter 10: Other Protocols and Applications Introduction Registering on Ethereum Name Service Getting ready How to do it... How it works... Whisper–communication protocol for DApps Getting ready How to do it... Swarm–distributed storage platform Getting ready How to do it... Watching Bitcoin transactions using BTCRelay Getting ready How to do it... Scheduling Ethereum transactions using an alarm clock Getting ready How to do it... Using the openzeppelin library Getting ready How to do it... Chapter 11: Miscellaneous Introduction Using Vyper to write smart contracts Getting ready How to do it... There's more... Debugging smart contracts with Remix Getting ready How to do it... Deploying contracts using Remix Getting ready How to do it... Generating documentation for solidity code Getting ready How to do it... Writing better code with the help of a linter Getting ready How to do it... Sharing solidity code with others Getting ready How to do it... Other Books You May Enjoy Index Become an Ethereum Blockchain developer using a blend of concepts and hands-on implementations About 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 applications Who This Book Is For If 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 approach In Detail Ethereum 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 b .. Understand the Ethereum platform to build distributed applications that are secured and decentralized using blockchain technology Key Features Build your own decentralized applications using real-world blockchain examples Implement Ethereum for building smart contracts and cryptocurrency applications with easy-to-follow projects Enhance your application security with blockchain Book Description Ethereum enables the development of efficient, smart contracts that contain code. These smart contracts can interact with other smart contracts to make decisions, store data, and send Ether to others.Ethereum Projects for Beginners provides you with a clear introduction to creating cryptocurrencies, smart contracts, and decentralized applications. As you make your way through the book, you'll get to grips with detailed step-by-step processes to build advanced Ethereum projects. Each project will teach you enough about Ethereum to be productive right away. You will learn how tokenization works, think in a decentralized way, and build blockchain-based distributed computing systems. Towards the end of the book, you will develop interesting Ethereum projects such as creating wallets and secure data sharing.By the end of this book, you will be able to tackle blockchain challenges by implementing end-to-end projects using the full power of the Ethereum blockchain. What you will learn Develop your ideas fast and efficiently using the Ethereum blockchain Make writing and deploying smart contracts easy and manageable Work with private data in blockchain applications Handle large files in blockchain applications Ensure your decentralized applications are safe Explore how Ethereum development frameworks work Create your own cryptocurrency or token on the Ethereum blockchain Make sure your cryptocurrency is ERC20-compliant to launch an ICO Who this book is for This book is for individuals who want to build decentralized applications using blockchain technology and the power of Ethereum from scratch. Some prior knowledge of JavaScript is required, since most examples use a web frontend. Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you 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. Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you Ethereum is an open-source, public, Blockchain-based distributed computing platform, and operating system featuring smart contract functionality which builds decentralized applications. If you want to get started with Ethereum and Solidity or you are among the many developers already working with this platform, this book is your one-stop guide. Ethereum is a public, blockchain-based distributed computing platform featuring smart contract functionality. In this book, you'll learn about Ethereum and Smart Contracts, and we cover the Ethereum virtual machine (EVM) in detail. Then, you'll get acquainted with DApps and DAOs and they how work. At the end of this book, we discuss ... Ethereum enables the development of efficient, smart contracts that contain code. These smart contracts interact with other smart contracts to make decisions, store data, and send Ether to others. This book begins with an introduction to Ethereum and then a detailed step-by-step process required to building advanced Ethereum Projects.
دانلود کتاب Ethereum Cookbook : Over 100 Recipes Covering Ethereum-based Tokens, Games, Wallets, Smart Contracts, Protocols, and Dapps