Название: Building With Ethereum: Products, Protocols, and Platforms Автор: Jamie Rumbelow Издательство: Apress Год: 2023 Страниц: 261 Язык: английский Формат: pdf Размер: 10.2 MB
Build products on top of Ethereum's new and expansive technological stack.
Writing any good web application requires planning, care, and deft technical skills, but Ethereum's execution model presents its own challenges for engineers wishing to build applications on top of its smart contract layer. Building performant and engaging product experiences is one of the most important – and often underappreciated – roles in any company.
This book looks at the full product stack needed to build such experiences on top of Ethereum smart contracts, weaving tutorials and case studies through more conversational discussions of the various constraints, trade-offs, and complexities involved in doing so. You’ll learn about the fundamentals of Ethereum from a new perspective, developing a strong understanding of how the Ethereum Virtual Machine (EVM) works and how it affects product engineering, as well as all the pieces of technology that go into decentralized apps (dapps) behind the front end: RPC nodes, wallets, indexers, application hosts, and more. You’ll be exposed to plenty of UI, jаvascript code, and idiomatic ways to bring on-chain data into your front ends. And you’ll be given up-to-date knowledge of the best practices and future possibilities that decentralized computation might offer the product engineer.
The smart contract can implement a getter function: a function that returns the value you’re interested in. These functions can be inspected on Etherscan and invoked through the sort of tooling we’ve already discussed. Libraries like ethers.js can wrap a known contract, with a known ABI, giving you a simple function to call in your jаvascript. Sometimes, you might run into some weirdness with the types of inputs and outputs, but these confusions are usually cleared up by a careful reading of the smart contract code (or a productive conversation with its authors!).
Unit tests provide focused testing for your application’s business logic. The majority of your tests should be unit tests. Unit testing is easy in jаvascript, and mocking out the boundaries between your on-chain API and your frontend code makes it easier. You should also perform lots of manual end-to-end tests, because these tests provide robustness guarantees and expose you to the UX. You can use tools such as anvil to run a local fork of the mainnet. These manual tests need test setup. Creating files for test scenarios allows you to produce replicable, deterministic initial conditions for your manual testing. It’s also very easy to write good, small, composable units of code in Type/jаvascript, even when you’re working within a React application. jаvascript is an excellent language for this sort of testing, because it gives us lightweight functions and simple data representation structures such as maps/objects and arrays. Testing in jаvascript is cheap.
What You Will Learn Understand the EVM and how it works Gain insight into smart contracts and how apps connect to them Understand the difference between live data and indexed data How decentralization affects the UI of applications Build engaging, tasteful product experiences on top of Ethereum
Who This Book Is For A confident – mid-level or senior – software engineer or web developer who hasn’t properly branched out into Ethereum; someone who might have scratched the surface, but wants a deeper understanding of the principles behind dapps, and who wants a head start on the hurdles faced while building them.
Скачать Building With Ethereum Products, Protocols, and Platforms
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.