“
如果構建區塊鏈就是做菜的話,這本 《Substrate 菜譜》 可以陪伴你從烹飪小白成長為大廚。這本 “菜譜” 展示了使用 Substrate 構建區塊鏈時的最佳實踐,每個菜譜均包含完整的工作程式碼示例及描述該程式碼的詳細文章。PolkaWorld 社羣正在翻譯本文件,後續將在 PolkaWorld 網站和公眾號上連載。
Substrate 菜譜 🍴😋🍴[1]
為心懷理想的區塊鏈大廚準備的實操烹飪指南
Substrate 菜譜是一本工作示例的菜譜,展示了使用 Substrate[2] 構建區塊鏈時的最佳實踐。每個菜譜均包含完整的工作程式碼示例以及描述該程式碼的詳細文章。這本書是開源[3]的。如果你想參與其中,請檢視貢獻指南[4]來了解參與貢獻的結構和方向。
如何使用這本書[5]
要讀到這本書,最簡單方法的是訪問 https://substrate.dev/recipes。
前兩章應該按順序閱讀。
在第 1 章佈置廚房[6],你將建立工具鏈,編譯區塊鏈節點,並學習與區塊鏈進行互動。
在第 2 章開胃菜[7]中,你將烹飪你的前幾個菜譜,學習 Substrate 開發的基礎知識。
本書的其餘部分即 “主菜” 可以按任何順序閱讀;你可以跳到你感興趣的任何菜譜。
記住,你不可能光靠閱讀就學會做飯。在閱讀本書時,穿上圍裙,拿出鍋碗瓢盆,練習對食譜進行編譯、測試和修改。在廚房中寫寫程式碼,提取模式,並將其應用於你要解決的問題吧!
尋求幫助[8]
學習任何新技能時,都會不可避免地在某些地方卡住。當你遇到困難時,可以透過以下幾種方式尋求幫助:
在 Stack Overflow[9] 上提問
在 Substrate Technical Riot channel[10] 中提問
在 repo 中建立一個新 issue[11]
Substrate 是什麼?[12]
Substrate[13] 是用於構建區塊鏈的框架。閱讀以下部落格文章,會讓你對 Substrate 有一個概括的瞭解:
Substrate 是什麼?[14]
Substrate 簡明概述[15]
Substrate 和 Polkadot 簡要總結[16]
要了解有關 Substrate 的更多資訊,請參見官方文件[17]。
學習 Rust[18]
要想在使用 Substrate 時事半功倍,就需要對 Rust 有所瞭解。幸運的是,Rust 社羣以全面的文件和教程而聞名。最初學習 Rust 的最常見資源是 The Rust Book[19]。如果你想檢視常用的 crate 使用方式示例, Rust by Example[20] 也很方便。
雖然瞭解一些 Rust 是必要的,但是等修煉成 Rust 專家之後再開始學習 Substrate 是不明智的。與其在學習 Substrate 之前先學習 Rust,不如在學習 Substrate 時學習 Rust。如果你不瞭解 Rust 的基礎知識,那麼本書結尾處還有更多 Rust 資源[21] 。參考連結
[1]
Substrate 菜譜 🍴😋🍴: https://substrate.dev/recipes/introduction.html#substrate-recipes-[2]
Substrate: https://github.com/paritytech/substrate[3]
開源: https://github.com/substrate-developer-hub/recipes[4]
貢獻指南: https://github.com/substrate-developer-hub/recipes/blob/master/CONTRIBUTING.md[5]
如何使用這本書: https://substrate.dev/recipes/introduction.html#how-to-use-this-book[6]
佈置廚房: https://substrate.dev/recipes/1-prepare-kitchen/index.html[7]
開胃菜: https://substrate.dev/recipes/2-appetizers/index.html[8]
尋求幫助: https://substrate.dev/recipes/introduction.html#getting-help[9]
Stack Overflow: https://stackoverflow.com/questions/tagged/substrate[10]
Substrate Technical Riot channel: https://riot.im/app/#/room/#substrate-technical:matrix.org[11]
新 issue: https://github.com/substrate-developer-hub/recipes/issues/new[12]
Substrate 是什麼?: https://substrate.dev/recipes/introduction.html#what-is-substrate[13]
Substrate: https://github.com/paritytech/substrate[14]
Substrate 是什麼?: https://www.parity.io/what-is-substrate/[15]
Substrate 簡明概述: https://www.parity.io/substrate-in-a-nutshell/[16]
Substrate 和 Polkadot 簡要總結: https://www.parity.io/a-brief-summary-of-everything-substrate-polkadot/[17]
官方文件: https://substrate.dev/[18]
學習 Rust: https://substrate.dev/recipes/introduction.html#learning-rust[19]
The Rust Book: https://doc.rust-lang.org/book/index.html[20]
Rust by Example: https://doc.rust-lang.org/rust-by-example/index.html[21]
更多 Rust 資源: https://substrate.dev/recipes/more-resources.html
原文:https://substrate.dev/recipes/introduction.html
翻譯:PolkaWorld 社羣
歡迎學習 Substrate:
https://substrate.dev/
關注 Substrate 進展:
https://github.com/paritytech/substrate
關注 Polkadot 進展:
https://github.com/paritytech/polkadot