From 1f537a1caf30c1a91e72c567e1b99d1ff05cc332 Mon Sep 17 00:00:00 2001 From: v1xingyue Date: Tue, 10 Sep 2024 17:13:24 +0800 Subject: [PATCH] co-learn-3 --- Co-learn-2.md | 127 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 128 +++++++------------------------------------------- 2 files changed, 143 insertions(+), 112 deletions(-) create mode 100644 Co-learn-2.md diff --git a/Co-learn-2.md b/Co-learn-2.md new file mode 100644 index 000000000..56dc0c261 --- /dev/null +++ b/Co-learn-2.md @@ -0,0 +1,127 @@ +# Solana Co-Learning + +## Module 1 Solana 入门 + +Rust 速览、Solana Local Node、Solana CLI Tools、Network Wallet 交互 + +### 1. Rust 速览 + +🔗 [Rust 共学文档](https://github.com/CreatorsDAO/rust-co-learn/blob/main/rust-co-learn.md) + +- **环境安装** +- **Cargo 使用配置** +- **Rust 语法基础** + - 变量(可变量、类型、复合类型、引用、集合、结构体、枚举) + - 函数、闭包 + - 泛型 + - 控制流 + - 模式匹配 + - 注释 + +### 2. Solana Local Node + +🔗 [CLI 安装指南](https://solana.com/zh/developers/guides/getstarted/setup-local-development) + +- **CLI 安装** +- **操作指南** + - 初始化账户,秘钥对,获得 airdrop + - 导入导出秘钥,切换网络 + - 启动本地节点,监控 logs + +### 3. Network Wallet 交互 + +- **浏览器扩展安装** + - Backpack + - Phantom +- **账户操作** + - 初始化账户,导入导出秘钥 + - 网络浏览器查看账户、交易 + +## Module 2 Solana Native 开发 + +使用 Solana Native 开发、读写 Account Data、Account 数据传输序列化,数据检查(TypeScript SDK 基本使用) + +### 1. Solana Native + +[Hello world](https://solana.com/zh/developers/guides/getstarted/local-rust-hello-world) + +- 编译合约、部署合约、调用合约 +- 区块浏览器查看合约 + +### 2. Account 数据基本读写 + +[实例实现数据读写](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module3/native-solana-development/build-a-movie-review-program/) + +[状态管理和序列化](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module3/native-solana-development/state-management/) + +- 合约读取数据 +- 合约使用 PDA 账户 +- 迭代用户 +- 序列化反序列化数据 + +### 3. TypeScript SDK + +[https://solana.com/docs/clients/javascript](https://solana.com/docs/clients/javascript) + +[https://solana.com/docs/clients/javascript-reference](https://solana.com/docs/clients/javascript-reference) + +- 生成账户 +- 获取 airdrop +- 读取 account 数据 +- 通过指令调用合约 + +## Module 3 使用 Anchor 框架开发 + +[https://www.anchor-lang.com/](https://www.anchor-lang.com/) + +### 1. 合约部分 + +- 安装 anchor [https://www.anchor-lang.com/docs/installation](https://www.anchor-lang.com/docs/installation) +- anchor 程序基本结构 [https://www.anchor-lang.com/docs/high-level-overview](https://www.anchor-lang.com/docs/high-level-overview) +- account 数据传递 [https://www.anchor-lang.com/docs/the-accounts-struct](https://www.anchor-lang.com/docs/the-accounts-struct) +- 不同的调用 [https://www.anchor-lang.com/docs/the-program-module](https://www.anchor-lang.com/docs/the-program-module) + +### 2. 客户端部分 + +[https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module5/anchor-on-the-front-end/anchor-into-typescript/](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module5/anchor-on-the-front-end/anchor-into-typescript/) + +- 连接钱包 +- 获取合约的 IDL 数据,初始化 program 对象 +- 调用合约方法 +- 发送交易 +- 构建一个完整的 Anchor 的 Solana 应用 + +## Module 4 Solana 进阶 + +### 1. PDA 生命周期 + +[https://solanacookbook.com/zh/core-concepts/pdas.html#%E7%BB%BC%E8%BF%B0](https://solanacookbook.com/zh/core-concepts/pdas.html#%E7%BB%BC%E8%BF%B0) + +- 生成 PDA 地址 (合约部分,客户端) +- 创建 PDA 账户 (合约创建) +- 写入 数据 到 PDA + +### 2. CPI 调用 + +[https://solana.com/docs/core/cpi](https://solana.com/docs/core/cpi) + +- 合约内部如何调用其他程序 + +### 3. SPL Token + +[https://spl.solana.com/token](https://spl.solana.com/token) + +[https://www.quicknode.com/guides/solana-development/spl-tokens/how-to-create-a-fungible-spl-token-with-the-new-metaplex-token-standard](https://www.quicknode.com/guides/solana-development/spl-tokens/how-to-create-a-fungible-spl-token-with-the-new-metaplex-token-standard) + +- 创建 Token +- mint Token +- 添加 Metadata + +### 4. NFT + +[https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/nfts-and-minting-with-metaplex/](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/nfts-and-minting-with-metaplex/) + +[https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/displayings-nfts-in-a-ui/displaying-nfts/](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/displayings-nfts-in-a-ui/displaying-nfts/) + +- Metaplex SDK 发布 NFT +- 获取不同的 NFT diff --git a/README.md b/README.md index 9af4d4c2e..494729856 100644 --- a/README.md +++ b/README.md @@ -1,127 +1,31 @@ -# Solana Co-Learning +# Solana Co-Learning#3 -## Module 1 Solana 入门 +## Module1 -Rust 速览、Solana Local Node、Solana CLI Tools、Network Wallet 交互 +### 1. 初识 solana -### 1. Rust 速览 +Solana Local Node、Solana CLI Tools、Network Wallet 交互 -🔗 [Rust 共学文档](https://github.com/CreatorsDAO/rust-co-learn/blob/main/rust-co-learn.md) +### 2. solana 基本读写 -- **环境安装** -- **Cargo 使用配置** -- **Rust 语法基础** - - 变量(可变量、类型、复合类型、引用、集合、结构体、枚举) - - 函数、闭包 - - 泛型 - - 控制流 - - 模式匹配 - - 注释 +使用 Solana Native 开发、读写 Account Data、 -### 2. Solana Local Node +## Module 2 -🔗 [CLI 安装指南](https://solana.com/zh/developers/guides/getstarted/setup-local-development) +### 1. Sdk 和序列化数据 -- **CLI 安装** -- **操作指南** - - 初始化账户,秘钥对,获得 airdrop - - 导入导出秘钥,切换网络 - - 启动本地节点,监控 logs +Account 数据传输序列化,数据检查(TypeScript SDK 基本使用) -### 3. Network Wallet交互 +### 2. solana 快速开发 -- **浏览器扩展安装** - - Backpack - - Phantom -- **账户操作** - - 初始化账户,导入导出秘钥 - - 网络浏览器查看账户、交易 +使用 Anchor framework 开发 -## Module 2 Solana Native 开发 +## Module 3 -使用Solana Native开发、读写 Account Data、Account 数据传输序列化,数据检查(TypeScript SDK基本使用) +### 1. solana 进阶 -### 1. Solana Native +PDA , CPI , SPL Token -[Hello world](https://solana.com/zh/developers/guides/getstarted/local-rust-hello-world) +### 2. solana 前沿 -- 编译合约、部署合约、调用合约 -- 区块浏览器查看合约 - -### 2. Account 数据基本读写 - -[实例实现数据读写](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module3/native-solana-development/build-a-movie-review-program/) - -[状态管理和序列化](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module3/native-solana-development/state-management/) - -- 合约读取数据 -- 合约使用PDA 账户 -- 迭代用户 -- 序列化反序列化数据 - -### 3. TypeScript SDK - -[https://solana.com/docs/clients/javascript](https://solana.com/docs/clients/javascript) - -[https://solana.com/docs/clients/javascript-reference](https://solana.com/docs/clients/javascript-reference) - -- 生成账户 -- 获取 airdrop -- 读取account 数据 -- 通过指令调用合约 - -## Module 3 使用 Anchor 框架开发 - -[https://www.anchor-lang.com/](https://www.anchor-lang.com/) - -### 1. 合约部分 - -- 安装 anchor [https://www.anchor-lang.com/docs/installation](https://www.anchor-lang.com/docs/installation) -- anchor 程序基本结构 [https://www.anchor-lang.com/docs/high-level-overview](https://www.anchor-lang.com/docs/high-level-overview) -- account 数据传递 [https://www.anchor-lang.com/docs/the-accounts-struct](https://www.anchor-lang.com/docs/the-accounts-struct) -- 不同的调用 [https://www.anchor-lang.com/docs/the-program-module](https://www.anchor-lang.com/docs/the-program-module) - -### 2. 客户端部分 - -[https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module5/anchor-on-the-front-end/anchor-into-typescript/](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module5/anchor-on-the-front-end/anchor-into-typescript/) - -- 连接钱包 -- 获取合约的 IDL 数据,初始化 program 对象 -- 调用合约方法 -- 发送交易 -- 构建一个完整的Anchor的Solana应用 - -## Module 4 Solana 进阶 - -### 1. PDA 生命周期 - -[https://solanacookbook.com/zh/core-concepts/pdas.html#%E7%BB%BC%E8%BF%B0](https://solanacookbook.com/zh/core-concepts/pdas.html#%E7%BB%BC%E8%BF%B0) - -- 生成 PDA 地址 (合约部分,客户端) -- 创建 PDA 账户 (合约创建) -- 写入 数据 到 PDA - -### 2. CPI 调用 - -[https://solana.com/docs/core/cpi](https://solana.com/docs/core/cpi) - -- 合约内部如何调用其他程序 - -### 3. SPL Token - -[https://spl.solana.com/token](https://spl.solana.com/token) - -[https://www.quicknode.com/guides/solana-development/spl-tokens/how-to-create-a-fungible-spl-token-with-the-new-metaplex-token-standard](https://www.quicknode.com/guides/solana-development/spl-tokens/how-to-create-a-fungible-spl-token-with-the-new-metaplex-token-standard) - -- 创建 Token -- mint Token -- 添加 Metadata - -### 4. NFT - -[https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/nfts-and-minting-with-metaplex/](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/nfts-and-minting-with-metaplex/) - -[https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/displayings-nfts-in-a-ui/displaying-nfts/](https://creatorsdao.github.io/solana-co-learn/Solana-Co-Learn/module2/displayings-nfts-in-a-ui/displaying-nfts/) - -- Metaplex SDK 发布 NFT -- 获取不同的NFT +Actions and Blinks