Skip to content

Commit 99ef996

Browse files
beihailiclaude
andcommitted
feat: add Module 6 "Web3 生态与实用工具" with 6 lessons and 18 quiz questions
- Add Module 6 to courseData with 6 lessons: DeFi, Ethereum, Layer 2, 新兴公链, AI+Web3, 实用工具 (sourced from zh/其它学习资源整理/) - Add module-6 achievement badge (Epic rarity, 300 XP) - Update sync-content.mjs to sync 其它学习资源整理 subdirectories - Add 18 quiz questions (3 per lesson) to quizData - Hide debug skip button in MultiQuiz behind import.meta.env.DEV - Expand Fuse.js search to include moduleTitle - Add Umami analytics placeholder to index.html Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ca91586 commit 99ef996

7 files changed

Lines changed: 243 additions & 13 deletions

File tree

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
}
6161
</script>
6262

63+
<!-- Analytics (Umami) - TODO: Replace data-website-id and src with your Umami instance -->
64+
<script defer src="https://YOUR_UMAMI_INSTANCE/script.js" data-website-id="YOUR_WEBSITE_ID"></script>
65+
6366
<!-- Favicon -->
6467
<link rel="icon" type="image/svg+xml" href="/Get-Started-with-Web3/favicon.svg">
6568

scripts/sync-content.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ const SOURCE_FOLDERS = [
1313
'Web3QuickStart',
1414
'GetStartedWithBitcoin',
1515
'Web3Thoughts',
16+
'其它学习资源整理/DeFi',
17+
'其它学习资源整理/Etherum',
18+
'其它学习资源整理/Layer2',
19+
'其它学习资源整理/新兴公链生态',
20+
'其它学习资源整理/AI_Web3',
21+
'其它学习资源整理/实用工具',
1622
];
1723

1824
const ensureExists = async (dir) => {

src/components/SearchDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const SearchDialog = () => {
2222
}))
2323
);
2424
return new Fuse(items, {
25-
keys: ['lessonTitle'],
25+
keys: ['lessonTitle', 'moduleTitle'],
2626
threshold: 0.4,
2727
includeMatches: true,
2828
});

src/config/courseData.js

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BookOpen, BrainCircuit, Shield, Globe, Cpu } from 'lucide-react';
1+
import { BookOpen, BrainCircuit, Shield, Globe, Cpu, Layers } from 'lucide-react';
22

33
// GitHub 配置
44
export const GITHUB_USERNAME = 'beihaili';
@@ -234,4 +234,48 @@ export const COURSE_DATA = [
234234
},
235235
],
236236
},
237+
{
238+
id: 'module-6',
239+
title: 'Web3 生态与实用工具',
240+
icon: Layers,
241+
color: 'from-teal-400 to-emerald-400',
242+
lessons: [
243+
{
244+
id: '6-1',
245+
title: 'DeFi 去中心化金融',
246+
path: 'zh/其它学习资源整理/DeFi',
247+
fallbackContent: FALLBACK,
248+
},
249+
{
250+
id: '6-2',
251+
title: '以太坊生态概览',
252+
path: 'zh/其它学习资源整理/Etherum',
253+
fallbackContent: FALLBACK,
254+
},
255+
{
256+
id: '6-3',
257+
title: 'Layer 2 扩容技术',
258+
path: 'zh/其它学习资源整理/Layer2',
259+
fallbackContent: FALLBACK,
260+
},
261+
{
262+
id: '6-4',
263+
title: '新兴公链生态 (Solana/Sui/Aptos)',
264+
path: 'zh/其它学习资源整理/新兴公链生态',
265+
fallbackContent: FALLBACK,
266+
},
267+
{
268+
id: '6-5',
269+
title: 'AI + Web3 融合',
270+
path: 'zh/其它学习资源整理/AI_Web3',
271+
fallbackContent: FALLBACK,
272+
},
273+
{
274+
id: '6-6',
275+
title: 'Web3 实用工具大全',
276+
path: 'zh/其它学习资源整理/实用工具',
277+
fallbackContent: FALLBACK,
278+
},
279+
],
280+
},
237281
];

src/features/badges/badgeData.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Rocket, Brain, Crown, Shield, Globe, Flame, Target, Calendar } from 'lucide-react';
1+
import { Rocket, Brain, Crown, Shield, Globe, Flame, Target, Calendar, Layers } from 'lucide-react';
22

33
/**
44
* EWP-721 (Education Web3 Protocol) - 学习徽章协议
@@ -106,6 +106,25 @@ export const ACHIEVEMENT_BADGES = {
106106
title: '👑 Web3 思想家',
107107
experience: 300,
108108
unlockedFeatures: ['AI 哲学对话模式', 'Web3 未来趋势预测'],
109+
nextBadgeHint: '继续学习 Web3 生态与实用工具',
110+
},
111+
},
112+
'module-6': {
113+
id: 'web3-ecosystem-explorer',
114+
name: 'Web3 Ecosystem Explorer',
115+
title: 'Web3 生态探索者',
116+
description: '掌握 DeFi、以太坊、新兴公链和 AI+Web3 等多元生态知识',
117+
icon: Layers,
118+
rarity: 'Epic',
119+
color: 'from-teal-500 to-emerald-500',
120+
glowColor: 'shadow-teal-500/50',
121+
borderColor: 'border-teal-500',
122+
bgColor: 'bg-teal-500/10',
123+
requirement: '完成 Web3 生态与实用工具的所有 6 个课程',
124+
rewards: {
125+
title: '🌍 Web3 生态专家',
126+
experience: 300,
127+
unlockedFeatures: ['多链生态数据看板', 'DeFi 收益计算器'],
109128
nextBadgeHint: '恭喜完成所有模块!你已成为真正的 Web3 Builder',
110129
},
111130
},

src/features/quiz/MultiQuiz.jsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,17 @@ const MultiQuiz = ({ lessonId, onPass }) => {
223223
>
224224
🔄 重新挑战
225225
</button>
226-
<button
227-
onClick={() => {
228-
onPass();
229-
setQuizState('idle');
230-
}}
231-
className="bg-slate-600 hover:bg-slate-500 text-white py-3 px-6 rounded-lg transition-colors"
232-
>
233-
跳过 (调试用)
234-
</button>
226+
{import.meta.env.DEV && (
227+
<button
228+
onClick={() => {
229+
onPass();
230+
setQuizState('idle');
231+
}}
232+
className="bg-slate-600 hover:bg-slate-500 text-white py-3 px-6 rounded-lg transition-colors"
233+
>
234+
跳过 (调试用)
235+
</button>
236+
)}
235237
</div>
236238
</>
237239
)}

src/features/quiz/quizData.js

Lines changed: 157 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* 测验题库数据
3-
* 覆盖全部 30 课 × 3 题 = 90
3+
* 覆盖全部 36 课 × 3 题 = 108
44
*/
55

66
export const QUIZ_BANK = {
@@ -820,6 +820,162 @@ export const QUIZ_BANK = {
820820
'交易覆盖了 P2PK、P2PKH、P2SH、P2WPKH、P2WSH、P2TR 等几乎所有比特币脚本类型的演进。',
821821
},
822822
],
823+
'6-1': [
824+
// DeFi 去中心化金融
825+
{
826+
question: 'DeFi 中,TVL (Total Value Locked) 代表什么含义?',
827+
options: ['每日交易总量', '锁定在协议中的资产总价值', '年化收益率', '代币总供应量'],
828+
correctAnswer: 1,
829+
explanation:
830+
'TVL (Total Value Locked) 即总锁定价值,是衡量 DeFi 协议中锁定资产总价值的重要指标,反映了用户对协议的信任度和规模。',
831+
},
832+
{
833+
question: '以下哪个协议是以太坊流动性质押 (LSDFi) 领域 TVL 最高的?',
834+
options: ['Rocket Pool', 'Frax Ether', 'Lido', 'Coinbase cbETH'],
835+
correctAnswer: 2,
836+
explanation:
837+
'Lido 以超过 320 亿美元的 TVL 位居以太坊流动性质押龙头,远超第二名 Rocket Pool。',
838+
},
839+
{
840+
question: 'RWA (现实世界资产) 代币化的市场规模预计到 2030 年将达到多少?',
841+
options: ['1 万亿美元', '5 万亿美元', '16 万亿美元', '50 万亿美元'],
842+
correctAnswer: 2,
843+
explanation:
844+
'RWA 代币化市场规模预计到 2030 年将达到 16 万亿美元,BlackRock BUIDL、Ondo Finance 等是核心项目。',
845+
},
846+
],
847+
'6-2': [
848+
// 以太坊生态概览
849+
{
850+
question: '以太坊的 "The Merge"(合并)在何时完成?',
851+
options: ['2020 年 12 月', '2021 年 6 月', '2022 年 9 月', '2023 年 3 月'],
852+
correctAnswer: 2,
853+
explanation:
854+
'以太坊的 The Merge 于 2022 年 9 月完成,主网从工作量证明 (PoW) 转变为权益证明 (PoS),能耗降低了 99.95%。',
855+
},
856+
{
857+
question: '要成为以太坊 PoS 验证者,最低需要质押多少 ETH?',
858+
options: ['1 ETH', '16 ETH', '32 ETH', '64 ETH'],
859+
correctAnswer: 2,
860+
explanation: '以太坊权益证明 (PoS) 机制要求验证者至少质押 32 个 ETH 才能参与网络验证。',
861+
},
862+
{
863+
question: '以太坊中外部账户 (EOA) 的特点是什么?',
864+
options: [
865+
'由智能合约代码控制',
866+
'包含合约代码',
867+
'只能被动响应调用',
868+
'由私钥控制,可以主动发起交易',
869+
],
870+
correctAnswer: 3,
871+
explanation:
872+
'外部账户 (EOA) 由私钥控制,可以主动发起交易。而合约账户由智能合约代码控制,只能被动响应调用。',
873+
},
874+
],
875+
'6-3': [
876+
// Layer 2 扩容技术
877+
{
878+
question: 'Optimistic Rollups 的提款周期通常需要多长时间?',
879+
options: ['1 小时', '1 天', '7 天', '30 天'],
880+
correctAnswer: 2,
881+
explanation:
882+
'Optimistic Rollups 假设所有交易都是有效的,只在被质疑时才进行验证,因此提款需等待 7 天的挑战期。',
883+
},
884+
{
885+
question: '截至 2025 年 1 月,哪个 Layer 2 项目的 TVL 最高?',
886+
options: ['Optimism', 'Base', 'Arbitrum', 'zkSync Era'],
887+
correctAnswer: 2,
888+
explanation:
889+
'截至 2025 年 1 月,Arbitrum 以 150 亿美元的 TVL 排名第一,占 Layer 2 市场份额的 43.2%。',
890+
},
891+
{
892+
question: '以太坊主网 (Layer 1) 的 TPS 大约是多少?',
893+
options: ['约 15 TPS', '约 100 TPS', '约 1,000 TPS', '约 10,000 TPS'],
894+
correctAnswer: 0,
895+
explanation:
896+
'以太坊主网的 TPS 约为 15,远低于 Layer 2 的 2,000-10,000+ TPS,这正是 Layer 2 扩容方案存在的根本原因。',
897+
},
898+
],
899+
'6-4': [
900+
// 新兴公链生态
901+
{
902+
question: 'Solana 区块链使用的独创性共识机制核心技术是什么?',
903+
options: ['权益证明 (PoS)', '历史证明 (PoH)', '委托权益证明 (DPoS)', '工作量证明 (PoW)'],
904+
correctAnswer: 1,
905+
explanation:
906+
'Solana 的核心创新是历史证明 (Proof of History, PoH),通过创建历史记录证明来为交易排序,配合 PoS 共识实现 65,000+ 的高 TPS。',
907+
},
908+
{
909+
question: 'Aptos 和 Sui 都使用哪种编程语言进行智能合约开发?',
910+
options: ['Solidity', 'Rust', 'Move', 'Go'],
911+
correctAnswer: 2,
912+
explanation:
913+
'Aptos 和 Sui 都使用 Move 语言,以资源导向编程为特色,编译时保证资源不能被复制或丢弃,安全性更高。',
914+
},
915+
{
916+
question: '在新兴公链的 TPS 性能对比中,以下哪个公链的理论 TPS 最高?',
917+
options: ['Solana (65,000+)', 'Aptos (160,000+)', 'Sui (297,000+)', 'Cosmos (10,000+)'],
918+
correctAnswer: 2,
919+
explanation:
920+
'Sui 凭借 Narwhal & Bullshark 共识算法达到了 297,000+ 的 TPS,高于 Aptos 和 Solana。',
921+
},
922+
],
923+
'6-5': [
924+
// AI + Web3 融合
925+
{
926+
question: 'zkML (零知识机器学习) 的核心优势是什么?',
927+
options: [
928+
'加速 AI 模型训练速度',
929+
'在不暴露模型参数或训练数据的情况下证明 AI 模型的正确执行',
930+
'降低 AI 模型的存储成本',
931+
'提高 AI 模型的准确率',
932+
],
933+
correctAnswer: 1,
934+
explanation:
935+
'zkML 结合零知识证明和机器学习,在不暴露模型参数或训练数据的情况下,通过数学保证证明 AI 模型的正确执行。',
936+
},
937+
{
938+
question: '根据 Vitalik Buterin 的框架,AI 在加密领域有几种角色?',
939+
options: ['两种', '三种', '四种', '五种'],
940+
correctAnswer: 2,
941+
explanation: '根据 Vitalik 的框架,AI 在 Crypto 中有四种角色:参与者、接口、规则和目标。',
942+
},
943+
{
944+
question: '去中心化 AI 基础设施项目 Render Network (RNDR) 主要提供什么服务?',
945+
options: ['去中心化数据存储', 'GPU 渲染和 AI 训练', '跨链通信协议', '隐私信用评估'],
946+
correctAnswer: 1,
947+
explanation:
948+
'Render Network 是去中心化 GPU 渲染网络,主要应用于 3D 渲染和 AI 模型训练,是去中心化计算基础设施的代表。',
949+
},
950+
],
951+
'6-6': [
952+
// Web3 实用工具大全
953+
{
954+
question: 'Slither 是由哪个安全团队开发的智能合约静态分析工具?',
955+
options: ['OpenZeppelin', 'Certora', 'Trail of Bits', 'ConsenSys Diligence'],
956+
correctAnswer: 2,
957+
explanation:
958+
'Slither 是由 Trail of Bits 团队用 Python 开发的静态分析工具,能够检测 90+ 种漏洞类型。',
959+
},
960+
{
961+
question: '1inch DEX 聚合器支持多少条链和多少个 DEX?',
962+
options: [
963+
'5+ 条链,50+ DEX',
964+
'12+ 条链,200+ DEX',
965+
'20+ 条链,500+ DEX',
966+
'8+ 条链,100+ DEX',
967+
],
968+
correctAnswer: 1,
969+
explanation: '1inch 支持 12+ 条区块链和 200+ 个 DEX,通过智能路由为用户寻找最优交易价格。',
970+
},
971+
{
972+
question: 'Foundry 开发工具链是用什么编程语言编写的?',
973+
options: ['JavaScript', 'Python', 'Rust', 'Go'],
974+
correctAnswer: 2,
975+
explanation:
976+
'Foundry 是用 Rust 编写的现代化 Solidity 开发工具链,具有极速编译、内置模糊测试等特点。',
977+
},
978+
],
823979
// 默认通用题目
824980
default: [
825981
{

0 commit comments

Comments
 (0)