Implementing Smart Contracts
Andreas M. Antonopoulos, Gavin Wood, Carlo Parisi, Alessandro Mazza, and Niccolò Pozzolini

#Ethereum
#Mastering
#DApps
#DeFi
#Vyper
#blockchain
#NASDAQ
#network
#Token
#Cryptography
🌐 اتریوم چیست؟
🚀 اتریوم به عنوان اولین پلتفرم بلاکچینی که مفهوم قراردادهای هوشمند رو معرفی کرد، در واقع دروازه ورود به یک پارادایم محاسباتی غیرمتمرکز جهانیه. توی این راهنمای کاربردی، نویسندهها هر چیزی که برای شروع ساخت قراردادهای هوشمند و برنامههای غیرمتمرکز (DApps) روی اتریوم و سایر بلاکچینهای مبتنی بر ماشین مجازی نیاز داری رو در اختیارت قرار میدن.
🔍 با پوشش جامع عملکردهای داخلی اتریوم، نه تنها نحوه کار، بلکه دلیل وجودی تکنولوژیهای نوآورانه اتریوم رو هم درک میکنی. بررسیهای عمیق و کاربردی در معماری و مکانیسمهای عملیاتی، تو رو به دانش و ابزارهایی مجهز میکنه که بتونی پیشرفتهای بعدی در اتریوم و دنیای گستردهتر بلاکچین رو کاوش کنی.
⚙️ اجرای یک کلاینت اتریوم، ایجاد و ارسال تراکنشهای پایه و برنامهنویسی قراردادهای هوشمند.
🔐 یادگیری اصول اولیه رمزنگاری کلید عمومی، هشها و امضاهای دیجیتال.
💼 درک اینکه چطور «کیف پولها» کلیدهای دیجیتالی که کنترل وجوه و قراردادهای هوشمند رو در دست دارن، نگهداری میکنن.
🛡️ یادگیری بهترین روشهای امنیتی، الگوهای طراحی و ضدالگوها با مثالهای واقعی.
📈 یادگیری موارد ضروری درباره امور مالی غیرمتمرکز (DeFi) و اثباتهای دانشصفر.
🤝 درک نحوه عملکرد مکانیزم اجماع در اتریوم و چالشهایی که باهاشون روبروست.
💻 خواندن و نوشتن کدهای پایه به زبانهای سولیدیتی و وایپر.
📑 فهرست مطالب
📖 نحوه استفاده از این کتاب
📚 این کتاب طوری طراحی شده که هم به عنوان یک مرجع و هم به عنوان یک جستجوگر کامل در دنیای اتریوم عمل کنه. دو فصل اول یک مقدمه ساده و مناسب برای کاربران تازهوارد ارائه میده و مثالهای این فصلها رو هر کسی با کمی مهارت فنی میتونه انجام بده. این دو فصل درک خوبی از مبانی بهت میده و اجازه میده از ابزارهای پایه اتریوم استفاده کنی. بخشهایی از فصل ۳ به بعد برای برنامهنویسها در نظر گرفته شده و شامل موضوعات فنی و مثالهای برنامهنویسی زیادی میشه، اما باز هم برای اکثر افراد قابل درکه.
🔄 برای اینکه کتاب هم مرجع باشه و هم یک روایت پیوسته، ناچارا برخی مطالب تکرار شدن. بعضی موضوعات مثل گس (Gas) باید به اندازه کافی زود معرفی بشن تا بقیه مباحث معنا پیدا کنن، اما در بخشهای خودشون به صورت عمیق هم بررسی میشن.
🗂️ در نهایت، نمایه انتهای کتاب به خوانندهها اجازه میده موضوعات خیلی خاص و بخشهای مرتبط رو به راحتی از طریق کلمات کلیدی پیدا کنن.
🎯 مخاطبان هدف
👥 این کتاب تقریبا برای همه مناسبه. اینجا یاد میگیری که بلاکچینهای قرارداد هوشمند چطور کار میکنن، چطور ازشون استفاده کنی و چطور قراردادهای هوشمند و برنامههای غیرمتمرکز رو توسعه بدی. چند فصل اول هم به عنوان یک مقدمه عمیق برای مبتدیها عالیه.
💻 مثالهای کد
🖥️ مثالها با زبانهای سولیدیتی، وایپر و جاوا اسکریپت و با استفاده از خط فرمان سیستمعاملهای شبه یونیکس توضیح داده شدن. تمام قطعهکدها رو میتونی روی بیشتر سیستمعاملها با حداقل نصب کامپایلرها و کتابخانههای مربوطه اجرا کنی. هر جا لازم بوده، دستورالعملهای نصب پایه و مثالهای مرحلهبهمرحله از خروجی کدها رو آوردیم.
📝 تمام قطعهکدها تا حد امکان از مقادیر و محاسبات واقعی استفاده میکنن تا بتونی مثالها رو دنبال کنی و همون نتایج رو توی کدهای خودت ببینی. مثلا کلیدهای خصوصی و عمومی و آدرسها همگی واقعی هستن. تراکنشهای نمونه، قراردادها و بلوکها همگی در بلاکچین واقعی اتریوم ثبت شدن و بخشی از دفتر کل عمومی هستن، بنابراین میتونی اونها رو بررسی کنی.
👤 درباره نویسندگان
👨💻 کارلو پاریسی که به نام بلکی هم شناخته میشه، توسعهدهنده ارشد قراردادهای هوشمند سولیدیتی، حسابرس ارشد و تولیدکننده محتوا با مدرک علوم کامپیوتره. اون دانش عمیقی در توسعه و ممیزی کدهای سولیدیتی داره. از سال ۲۰۱۳ علاقهمند به بیتکوین بوده و از ۲۰۱۸ از کاربران دیفای به حساب میاد.
👨💻 الساندرو مازا توسعهدهنده وب۳ و تولیدکننده محتوا با مدرک مهندسی نرمافزاره. اون تجربه کار روی پروتکل اصلی اتریوم، عمدتا در سمت لایه اجرا، و همچنین اکوسیستم کازماس رو داره. علاوه بر این، اون یکی از بزرگترین انجمنهای ایتالیا رو برای محتوای تخصصی در دنیای کریپتو مدیریت میکنه.
👨💻 نیکولو پوزولینی حسابرس ارشد قراردادهای هوشمند با مدرک کارشناسی ارشد مهندسی نرمافزاره. اون در امنیت بلاکچین تخصص داره و به توسعه ابزارهای بلاکچینی هم علاقهمنده.
👨💻 گوین وود یکی از پیشگامان بلاکچین با مدرک دکتری علوم کامپیوتره. اون اولین نسخه عملیاتی اتریوم رو کدنویسی کرد، زبان سولیدیتی رو به وجود آورد و نویسنده «یلواپیپر اتریوم» بود. اون قبل از اتریوم در مایکروسافت ریسرچ فعالیت میکرد. بعد از آشنایی با ویتالیک بوترین در سال ۲۰۱۴، به یکی از چهرههای کلیدی اتریوم تبدیل شد و بعدا پلتفرمهای پولکادات و کوساما رو بنیانگذاری کرد.
👨💻 آندریاس ام. آنتونوپولوس نویسنده پرفروش، سخنران و متخصص برجسته در زمینه بیتکوین و تکنولوژیهای بلاکچین بازه. اون به خاطر سادهسازی مفاهیم پیچیده و بررسی تاثیرات مثبت و منفی این تکنولوژیها روی جوامع جهانی شناخته میشه. ماموریت اون آموزش به بیشترین تعداد ممکن از افراد درباره تاثیرات تاریخی و اقتصادی بیتکوینه.
As the first blockchain platform to introduce the concept of smart contracts, Ethereum is the gateway to a worldwide decentralized computing paradigm. With this practical guide, the authors provide everything you need to know to start building smart contracts and DApps on Ethereum and other virtual machine blockchains.
Through comprehensive coverage of Ethereum's internal workings, you'll understand not just the how but also the why of Ethereum's innovative technology. And practical deep dives into the architecture and operational mechanics will equip you with the knowledge and tools to explore further developments in Ethereum and the wider blockchain world.
Table of Contents
Chapter 1. What Is Ethereum?
Chapter 2. Ethereum Basics
Chapter 3. Ethereum Nodes
Chapter 4. Cryptography
Chapter 5. Wallets
Chapter 6. Transactions
Chapter 7. Smart Contracts and Solidity
Chapter 8. Smart Contracts and Vyper
Chapter 9. Smart Contract Security
Chapter 10. Tokens
Chapter 11. Oracles
Chapter 12. Decentralized Applications
Chapter 13. Decentralized Finance
Chapter 14. The Ethereum Virtual Machine
Chapter 15. Consensus
Chapter 16. Scaling Ethereum
Chapter 17. Zero-Knowledge Proofs
How to Use This Book
The book is intended to serve both as a reference manual and as a cover-to-cover exploration of Ethereum. The first two chapters offer a gentle introduction, suitable for novice users, and the examples in those chapters can be completed by anyone with a bit of technical skill. Those two chapters will give you a good grasp of the basics and allow you to use the fundamental tools of Ethereum. Parts of Chapter 3 and beyond are intended for programmers and include many technical topics and programming examples, but they still should be understandable by anyone, for the most part.
To serve as both a reference manual and a cover-to-cover narrative about Ethereum, the book inevitably contains some duplication. Some topics, such as gas, have to be introduced early enough for the rest of the topics to make sense but are also examined in depth in their own sections.
Finally, the book’s index allows readers to find very specific topics and the relevant sections with ease, by keyword.
Intended Audience
This book is mostly intended for everyone. This book will teach you how smart contract blockchains work, how to use them, and how to develop smart contracts and decentralized applications with them. The first few chapters are also suitable as an in-depth introduction to Ethereum for beginners.
Code Examples
The examples are illustrated in Solidity, Vyper, and JavaScript, using the command line of a Unix-like operating system. All the code snippets can be replicated on most operating systems with a minimal installation of compilers, interpreters, and libraries for the corresponding languages. Where necessary, we provide basic installation instructions and step-by-step examples of the output of those instructions.
All the code snippets use real values and calculations where possible, so you can build from example to example and see the same results in any code you write to calculate the same values. For example, the private keys and corresponding public keys and addresses are all real. The sample transactions, contracts, blocks, and blockchain references have all been introduced to the actual Ethereum blockchain and are part of the public ledger, so you can review them.
Carlo Parisi, also known as Blackie, is a senior Solidity smart contract developer, senior auditor, and content creator with a degree in computer science. He has a deep knowledge in developing and auditing Solidity code, the main language used in Ethereum for smart contracts. He has been a Bitcoin enthusiast since 2013 and a DeFi user since 2018.
Alessandro Mazza is a web3 developer and content creator with a degree in software engineering. He has experience working on the Ethereum core protocol, mainly in the execution layer side, and on the Cosmos ecosystem, where he used to work on CosmWasm, the smart contract platform, and Cosmos SDK. Moreover, he has one of the biggest communities in Italy for highly technical content regarding the cryptocurrencies world.
Niccolò Pozzolini is a senior smart contract auditor with a master's in software engineering. Specializing in blockchain security, he also has a keen interest in developing blockchain tools.
Gavin Wood is a blockchain pioneer with a master’s and doctorate in computer science. He coded the first functional Ethereum implementation, created the Solidity contract language, and authored the "Ethereum Yellow Paper," the first formal blockchain protocol specification. Before Ethereum, he consulted for Microsoft Research and worked on startups in music semantics and presentation, visual meta-programming, and legal text analysis. Introduced to Vitalik Buterin in 2014, he has since been a key figure in Ethereum’s development, has gone on to found Polkadot and Kusama, and has created the Joint Accumulation Machine (JAM) protocol.
Andreas M. Antonopoulos is a best-selling author, speaker, educator, and highly sought after expert in Bitcoin and open blockchain technologies. He is known for making complex subjects easy to understand and for highlighting both the positive and negative impacts these technologies can have on our global societies. As an educator, his mission is to educate as many people as possible, in as many places as possible, in as many languages as possible, about the historical, technological, and socio-economic impacts of Bitcoin and open blockchain technologies.









