Ethereum Cookbook
Book information
Description
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
Similar books
Ethereum Cookbook (Supplement)
2019 · ZIP
Ethereum Cookbook
2019 · MOBI
Ethereum Cookbook
2019 · EPUB
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF
THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.
1858 · PDF