Welcome to the world of decentralized blockchain: The document begins with an introduction to blockchain technology and Ethereum, providing essential context for understanding smart contracts. It then delves into the syntax and features of Solidity, covering key concepts such as data types, functions, modifiers, and inheritance. Practical examples are included to illustrate how to write and deploy smart contracts, along with best practices for security and optimization. Additionally, the document addresses common pitfalls and debugging strategies to help learners navigate challenges they may encounter. Finally, the document provides resources for further learning, including links to online courses, documentation, and community forums. This structured approach aims to equip readers with the knowledge and skills needed to confidently create and manage their own smart contracts in Solidity
This book will guide you through the development of a decentralized application, including:
- smart-contract development (in Solidity);
This book is not for complete beginners.
I expect you to be an experienced developer, who has ever programmed in any programming language. It'll also be helpful if you know the syntax of Solidity, the main programming language of this book. If not, it's not a big problem: we'll learn a lot about Solidity and Ethereum Virtual Machine during our journey.
However, this book is for blockchain beginners.
If you only heard about blockchains and were interested but haven't had a chance to dive deeper, this book is for you! Yes, for you! You'll learn how to develop for blockchains (specifically, Ethereum), how blockchains work, how to program and deploy smart contracts, and how to run and test them on your computer.
Alright, let's get started!
- This book is hosted on GitHub: https://github.com/yuhuajing/web3-development-with-go-book
- Milestone 0. Base Golang Knowledge
- init
- rune
- slice
- data-mapping
- data-channel
- func
- defer
- GMP
- GC
- Milestone 1. Golang Blockchain
- initBlockchainConn
- getAccountBalance
- getAccountCodes
- generateAccount
- getBlockchainBlocks
- getBlockchainTransactions
- subscribeBlockchainNewHead
- subscribeBlockchainNewTransactions
- subscribeBlockchainNewLogs
- Milestone 2. Golang Blockchain Transactions
- buildRawTransactions
- callContractByRawTransactions
- estimateTransactionsGas
- readContractByABI
- writeContractByABI
- Milestone 3. Golang Blockchain Contract Slot
- slotKnowledge
- staticUint
- staticInt
- staticBool
- staticAddress
- staticBytes
- staticArray
- staticStruct
- staticString
- staticMapping
- Milestone 4. Golang Blockchain Tools
- merkleProof
- signature
To run the book locally:
- Install Rust.
- Install mdBook:
$ cargo install mdbook $ cargo install mdbook-katex
- Clone the repo:
$ git clone https://github.com/yuhuajing/web3-development-with-go-book.git $ cd solidity-book
- Run:
$ mdbook serve --open
- Visit http://localhost:3000/ (or whatever URL the previous command outputs!)