From 0d55ac6144ec45670b2e56234deb310572a41b55 Mon Sep 17 00:00:00 2001 From: hudson Date: Tue, 26 Nov 2024 02:27:59 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B9=E4=BE=BF=20mirror=20=E4=B9=8B?= =?UTF-8?q?=E7=B1=BB=E7=9A=84=E5=B9=B3=E5=8F=B0=E5=88=86=E5=8F=91=EF=BC=8C?= =?UTF-8?q?=E4=B8=BB=E8=A6=81=E6=98=AF=E5=9B=BE=E7=89=87=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=20(#840)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: generate img cdn files --- .gitignore | 3 ++- mirror_gen.js | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 mirror_gen.js diff --git a/.gitignore b/.gitignore index bbebaa22e..47a261f59 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ artifacts .history **node_modules** **cache** -**artifacts** \ No newline at end of file +**artifacts** +**readme_mirror.md** \ No newline at end of file diff --git a/mirror_gen.js b/mirror_gen.js new file mode 100644 index 000000000..0676c1149 --- /dev/null +++ b/mirror_gen.js @@ -0,0 +1,68 @@ +const fs = require('fs'); +const path = require('path'); + +const CDN_PREFIX = 'https://cdn.jsdelivr.net/gh/AmazingAng/WTF-Solidity'; + +// 递归查找所有的 readme.md 文件 +function findReadmeFiles(dir) { + let results = []; + const files = fs.readdirSync(dir); + + for (const file of files) { + const filePath = path.join(dir, file); + const stat = fs.statSync(filePath); + + if (stat.isDirectory() && !file.startsWith('.')) { + results = results.concat(findReadmeFiles(filePath)); + } else if (file.toLowerCase() === 'readme.md') { + results.push(filePath); + } + } + + return results; +} + +// 处理图片链接 +function processImageLinks(content, dirName) { + const imageRegex = /!\[(.*?)\]\((\.\/[^)]+)\)/g; + return content.replace(imageRegex, (match, altText, imagePath) => { + const cleanImagePath = imagePath.replace(/^\.\//, ''); + const cdnUrl = `${CDN_PREFIX}/${dirName}/${cleanImagePath}`; + return `![${altText}](${cdnUrl})`; + }); +} + +// 删除 frontmatter +function removeFrontmatter(content) { + // 匹配开头的 --- 到结束的 --- 之间的所有内容 + return content.replace(/^---\n[\s\S]*?\n---\n/, ''); +} + +function main() { + try { + const readmeFiles = findReadmeFiles('.'); + console.log(`找到 ${readmeFiles.length} 个 readme.md 文件`); + + for (const readmePath of readmeFiles) { + let content = fs.readFileSync(readmePath, 'utf-8'); + const dirName = path.dirname(readmePath).replace(/^\.[\\/]/, ''); + + // 先删除 frontmatter + content = removeFrontmatter(content); + // 再处理图片链接 + const processedContent = processImageLinks(content, dirName); + + // 只有当内容有变化时才创建新文件 + if (content !== processedContent) { + const mirrorPath = path.join(path.dirname(readmePath), 'readme_mirror.md'); + fs.writeFileSync(mirrorPath, processedContent, 'utf-8'); + console.log(`已生成镜像文件: ${mirrorPath}`); + } + } + console.log('处理完成!'); + } catch (error) { + console.error('处理过程中出错:', error); + } +} + +main(); From c75871d60458a19a4775b2ee4110bf60d5dd051c Mon Sep 17 00:00:00 2001 From: Alan Xu Date: Tue, 26 Nov 2024 10:51:24 +0800 Subject: [PATCH 2/2] docs(readme): delete mirror link (#848) delete mirror link --- README.md | 196 +++++++++++++++++++++++++++--------------------------- 1 file changed, 97 insertions(+), 99 deletions(-) diff --git a/README.md b/README.md index 031c6749d..5655e1e91 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -![](./img/logo2.jpeg) +![logo](./img/logo2.jpeg) -:globe_with_meridians: **[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Languages/en/README.md) / [Español](https://github.com/AmazingAng/WTF-Solidity/tree/main/Languages/es/README.md) / [Português Brasileiro](./Languages/pt-br/README.md)** :globe_with_meridians: +:globe_with_meridians: **[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Languages/en/README.md) / [Español](https://github.com/AmazingAng/WTF-Solidity/tree/main/Languages/es/README.md) / [Português Brasileiro](./Languages/pt-br/README.md)** :globe_with_meridians: # WTF Solidity + 我最近在重新学solidity,巩固一下细节,也写一个“WTF Solidity极简入门”,供小白们使用(编程大佬可以另找教程),每周更新1-3讲。 路线图根据本仓库star数量来定: @@ -18,117 +19,113 @@ - [ ] 2048 :star: 发社群NFT - ## 入门 -**第1讲:三行代码HelloWeb3**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/01_HelloWeb3) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/01_HelloWeb3/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/WfM30QbSWB2_-9t98g05unTmb_2ZXucOAZMPDa7MX48) - -**第2讲:值类型**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/02_ValueTypes) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/02_ValueTypes/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/XHZVpWe8_sHBHgg6kkrNH2nAWYmQgoB7fKW8hoXnoyI) +**第1讲:三行代码HelloWeb3**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/01_HelloWeb3) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/01_HelloWeb3/readme.md) -**第3讲:函数 (external/internal/public/private, pure/view, payable)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/03_Function) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/03_Function/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/FWI887JBea4VpNiMlJ2ICyJ5aWUREReGo9Bz0X8iEVc) +**第2讲:值类型**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/02_ValueTypes) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/02_ValueTypes/readme.md) -**第4讲:函数输出(returns/return)**:[代码](https://github.com/AmazingAng/WTF-Solidity/tree/main/04_Return) | [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/04_Return/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/FIGf9tF7wiBlLnQGXfEjVkJ0efzKBNltJS1fRxPKYTk) +**第3讲:函数 (external/internal/public/private, pure/view, payable)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/03_Function) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/03_Function/readme.md) -**第5讲:变量作用域和数据存储 (storage/memory/calldata)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/05_DataStorage) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/05_DataStorage/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/w5zJWGwElN2ei4tgtuJbTTpKwrGhb-igPY7wTVKRCgY) +**第4讲:函数输出(returns/return)**:[代码](https://github.com/AmazingAng/WTF-Solidity/tree/main/04_Return) | [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/04_Return/readme.md) -**第6讲:数组(array)和结构体(struct)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/06_ArrayAndStruct) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/06_ArrayAndStruct/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/zNxhHPjK8kjx_bSaauDUcEr9rX3hroalEzvYDatshvw) +**第5讲:变量作用域和数据存储 (storage/memory/calldata)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/05_DataStorage) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/05_DataStorage/readme.md) -**第7讲:映射(mapping)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/07_Mapping) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/07_Mapping/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/iHYV1C-KUBn8JoJRirhgMmcSNgmpaL4cv4trdOoZJB0) +**第6讲:数组(array)和结构体(struct)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/06_ArrayAndStruct) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/06_ArrayAndStruct/readme.md) -**第8讲:变量初始值**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/08_InitialValue) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/08_InitialValue/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/WoWQ8s66meku9zPFsHGsXs4m7T6PauZPmfSak76qDkI) +**第7讲:映射(mapping)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/07_Mapping) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/07_Mapping/readme.md) -**第9讲:常量(constant/immutable)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/09_Constant) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/09_Constant/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/p9xMZTxCBLSKBqqP2dlyxHceev1V7Blmo5Wf-OY3R48) +**第8讲:变量初始值**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/08_InitialValue) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/08_InitialValue/readme.md) -**第10讲:控制流和插入排序**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/10_InsertionSort) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/10_InsertionSort/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/8Q0vr-dyHfiIXS9KnivaQDxpM9cIQTNWoC68TNvCZ9c) +**第9讲:常量(constant/immutable)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/09_Constant) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/09_Constant/readme.md) -**第11讲:构造函数(constructor)和修饰器(modifier)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/11_Modifier) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/11_Modifier/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/X8HHTaD8hqkfshhugHHp7ho3EaLjuviya_g1l3MsF_U) +**第10讲:控制流和插入排序**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/10_InsertionSort) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/10_InsertionSort/readme.md) -**第12讲:事件(events)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/12_Event) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/12_Event/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/nGSCuFbPHMo8mL1ErZMUwOZG_OUECzIWEsGhX0a5eOw) +**第11讲:构造函数(constructor)和修饰器(modifier)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/11_Modifier) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/11_Modifier/readme.md) -**第13讲:继承**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/13_Inheritance) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/13_Inheritance/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/HTCOqhsxTXs42NNv3wfzNRQMN6qGHGYY9iaTJhhKBb4) +**第12讲:事件(events)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/12_Event) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/12_Event/readme.md) -**第14讲:抽象合约(abstract)和接口(interface)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/14_Interface) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/14_Interface/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/KKnoJJfHG69Pg3GQda_B454z_nJ1tesyBd4uOvh1WNM) +**第13讲:继承**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/13_Inheritance) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/13_Inheritance/readme.md) -**第15讲:异常(errors)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/15_Errors) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/15_Errors/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/XhhLu7PV1cAhOp9_m-dk9OoTj7offC7DkYYgsV3e31I) +**第14讲:抽象合约(abstract)和接口(interface)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/14_Interface) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/14_Interface/readme.md) +**第15讲:异常(errors)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/15_Errors) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/15_Errors/readme.md) ## 进阶 -**第16讲:函数重载**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/16_Overloading) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/16_Overloading/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/ADt6g13gwqt42-9_nBxMunSkVHeft6-yb1mp0XH-4f8) +**第16讲:函数重载**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/16_Overloading) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/16_Overloading/readme.md) -**第17讲:库合约(library)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/17_Library) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/17_Library/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/5nhKjOI40nCT0nCk6iO2TXry3xi09F1Ts4e5lMBlZ1w) +**第17讲:库合约(library)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/17_Library) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/17_Library/readme.md) -**第18讲:Import**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/18_Import) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/18_Import/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/f43II54h19ucfkNDarEdDFGts0lBkJCyrZ57U5Njk3A) +**第18讲:Import**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/18_Import) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/18_Import/readme.md) -**第19讲:接收ETH(fallback/receive)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/19_Fallback) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/19_Fallback/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/EroVZqHW1lfJFai3umiu4tb9r1ZbDVPOYC-puaZklAw) +**第19讲:接收ETH(fallback/receive)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/19_Fallback) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/19_Fallback/readme.md) -**第20讲:发送ETH(transfer/send/call)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/20_SendETH) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/20_SendETH/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/NTNHraVAn2OWUKXpr0byphlxl8ytj7fRUAaOaLYfEtA) +**第20讲:发送ETH(transfer/send/call)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/20_SendETH) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/20_SendETH/readme.md) -**第21讲:调用其他合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/21_CallContract) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/21_CallContract/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/fI48BkuT7wWzRaVKkn1VWxnfLpkUEvIZIJcO5iOIzbk) +**第21讲:调用其他合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/21_CallContract) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/21_CallContract/readme.md) -**第22讲:Call**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/22_Call) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/22_Call/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/vMJ0AHl3b_A5Lyey5lLdFhzkGT9wJ-D6vJpZpH0vlls) +**第22讲:Call**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/22_Call) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/22_Call/readme.md) -**第23讲:Delegatecall**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/23_Delegatecall) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/23_Delegatecall/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/hW9iLCOUUqsRCCZbzGS3x5m0wXfJBhlYQWLq93rplcU) +**第23讲:Delegatecall**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/23_Delegatecall) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/23_Delegatecall/readme.md) -**第24讲:在合约中创建新合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/24_Create) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/24_Create/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/kojopp2CgDK3ehHxXc_2fkZe87uM0O5OmsEU6y83eJs) +**第24讲:在合约中创建新合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/24_Create) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/24_Create/readme.md) -**第25讲:Create2**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/25_Create2) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/25_Create2/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/Dz7kd6-RrcNvdHnptWKzsW9AcIOSA8PoVsMsQh8nlEM) +**第25讲:Create2**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/25_Create2) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/25_Create2/readme.md) -**第26讲:删除合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/26_DeleteContract) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/26_DeleteContract/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/080JeNq8X_HfciftWa-ed0S6Wb5YFuIb5GPVISu1gIc) +**第26讲:删除合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/26_DeleteContract) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/26_DeleteContract/readme.md) -**第27讲:ABI编码解码**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/27_ABIEncode) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/27_ABIEncode/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/jXJnvwkoQzvJaqVIxagxneSZim6Qxm-StuNNxLuKuw8) +**第27讲:ABI编码解码**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/27_ABIEncode) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/27_ABIEncode/readme.md) -**第28讲:Hash**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/28_Hash) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/28_Hash/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/csiRSVEpEwj7f0OOtSpm1KdGHRqD4fNogmiahHx60nE) +**第28讲:Hash**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/28_Hash) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/28_Hash/readme.md) -**第29讲:函数选择器(selector)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/29_Selector) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/29_Selector/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/_Q-N_VGUV8F4QZbggR8Swv16LStBdfkeQb8qwSfoNTw) - -**第30讲:Try-Catch**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/30_TryCatch) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/30_TryCatch/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/asj1-eKf6YdIoI9oMSLI3VECwqCzRHwaqIS01ALQ7qo) +**第29讲:函数选择器(selector)**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/29_Selector) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/29_Selector/readme.md) +**第30讲:Try-Catch**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/30_TryCatch) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/30_TryCatch/readme.md) ## 应用 -**第31讲:ERC20**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/31_ERC20) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/31_ERC20/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/-LNwtaA4Eb0e1GZEsaZEXs09Nm9l57HVvoeRUfxVZNg) +**第31讲:ERC20**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/31_ERC20) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/31_ERC20/readme.md) -**第32讲:代币水龙头**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/32_Faucet) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/32_Faucet/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/tr1pm32UYMO96gOsgQsU5beAAcD3rkHtaBYg9MBzCz0) +**第32讲:代币水龙头**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/32_Faucet) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/32_Faucet/readme.md) -**第33讲:空投合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/33_Airdrop) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/33_Airdrop/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/pRoRGe7V4djkWX-_ZkkrdzKE8RSO5ivoDktCacE-4R8) +**第33讲:空投合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/33_Airdrop) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/33_Airdrop/readme.md) -**第34讲:ERC721**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/34_ERC721) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/34_ERC721/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/7BbjaN4Zz1ycAlfvKARlijMusL0RV3SOAltSx0nJed4) +**第34讲:ERC721**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/34_ERC721) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/34_ERC721/readme.md) -**第35讲:荷兰拍卖**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/35_DutchAuction) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/35_DutchAuction/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/6v7-GIVSQIG5mNUIMP8VhXt6AS1Iq24kMt2DOh196Fc) +**第35讲:荷兰拍卖**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/35_DutchAuction) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/35_DutchAuction/readme.md) -**第36讲:Merkle Tree**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/36_MerkleTree) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/36_MerkleTree/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/kPBE6QzZeplo72UvGeJOcCEpZZMu9qVMmEu4KDZHzsM) +**第36讲:Merkle Tree**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/36_MerkleTree) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/36_MerkleTree/readme.md) -**第37讲:数字签名**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/37_Signature) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/37_Signature/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/pVjNv3xzVoOB1AtsXNsZ01b6FZy-iVbdNZsv0qVQ7Qo) +**第37讲:数字签名**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/37_Signature) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/37_Signature/readme.md) -**第38讲:NFT交易所**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/38_NFTSwap) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/38_NFTSwap/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/lHIwfCzjKYUN_1V7PQCo1FPY-t_WzbV6i7cQjge1ANc) +**第38讲:NFT交易所**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/38_NFTSwap) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/38_NFTSwap/readme.md) -**第39讲:随机数**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/39_Random) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/39_Random/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/JYXCXDLhHp8wxXPfClQKqW_5g1QhgVp44HFk9WtC6tk) +**第39讲:随机数**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/39_Random) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/39_Random/readme.md) -**第40讲:ERC1155**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/40_ERC1155) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/40_ERC1155/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/dGmLVDYjGXCKR5kPvQspMj6f0qYnJbCUshy9hlzld0c) +**第40讲:ERC1155**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/40_ERC1155) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/40_ERC1155/readme.md) -**第41讲:WETH**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/41_WETH) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/41_WETH/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/2Ma5ZRoAy54_aJXZw52xkItKykmQPpqsdFjVqEqB89k) +**第41讲:WETH**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/41_WETH) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/41_WETH/readme.md) -**第42讲:分账**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/42_PaymentSplit) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/42_PaymentSplit/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/j373uOA3btcD9xRWT_qaww4CSR-iaoqU6EClv1nXWsM) +**第42讲:分账**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/42_PaymentSplit) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/42_PaymentSplit/readme.md) -**第43讲:线性释放**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/43_TokenVesting) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/43_TokenVesting/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/j-so8JO_lcYye4N9S03v_VIljQ9rg8nGbmZrSbzak8A) +**第43讲:线性释放**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/43_TokenVesting) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/43_TokenVesting/readme.md) -**第44讲:代币锁**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/44_TokenLocker) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/44_TokenLocker/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/WJCju6bbg-r1Cf97f1abYdNUiO4ArthIAGqs1zZZHi0) +**第44讲:代币锁**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/44_TokenLocker) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/44_TokenLocker/readme.md) -**第45讲:时间锁**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/45_Timelock) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/45_Timelock/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/o8nvAnljLf7l4AGNRSdec17Knp3PsKTWyTXVSx1olM4) +**第45讲:时间锁**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/45_Timelock) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/45_Timelock/readme.md) ## Degen -**第46讲:代理合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/46_ProxyContract) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/46_ProxyContract/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/v4ov2J0xjtMnVflsLpbbh7S55fiyPljttbDh3Xhiqis) - -**第47讲:可升级合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/47_Upgrade) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/47_Upgrade/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/p1WBSV9yQ5Zfcui8kaWEoVq71rirv7-I4VqLFAhz4J0) +**第46讲:代理合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/46_ProxyContract) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/46_ProxyContract/readme.md) +**第47讲:可升级合约**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/47_Upgrade) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/47_Upgrade/readme.md) -**第48讲:透明代理**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/48_TransparentProxy) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/48_TransparentProxy/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/DmqC4Nyfyo2-pF5x5w9SFYqBr2DHo43AH6IfnePXcH8) +**第48讲:透明代理**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/48_TransparentProxy) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/48_TransparentProxy/readme.md) -**第49讲:通用可升级代理UUPS**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/49_UUPS) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/49_UUPS/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/KPwXlRDdL2XfBWi7Z9uk8eccbWKG3hffC-RjTgiTLi8) +**第49讲:通用可升级代理UUPS**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/49_UUPS) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/49_UUPS/readme.md) -**第50讲:多签钱包**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/50_MultisigWallet) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/50_MultisigWallet/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/DeediQG7FbXhCK68f2iPUoQkpN-gLdiuKhDV99gHpgg) +**第50讲:多签钱包**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/50_MultisigWallet) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/50_MultisigWallet/readme.md) **第51讲:ERC4626 代币化金库**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/51_ERC4626) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/51_ERC4626/readme.md) @@ -146,25 +143,25 @@ ## 合约安全 -**S01:重入攻击**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S01_ReentrancyAttack) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S01_ReentrancyAttack/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/SrNu6LLzwH7qlTVKbJY6lkTpmadGqUXw0L8iUMzfMxo) +**S01:重入攻击**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S01_ReentrancyAttack) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S01_ReentrancyAttack/readme.md) -**S02:选择器碰撞**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S02_SelectorClash) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S02_SelectorClash/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/5rwcsBZzphdlKZj4MoIpn8aqwQ1MzQ8qy50ZEGNU_HU) +**S02:选择器碰撞**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S02_SelectorClash) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S02_SelectorClash/readme.md) -**S03:中心化**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S03_Centralization) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S03_Centralization/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/0MlTKdaSGD9-A9WIbgbtrDlAazg-8DLpTJv7l8vsq3c) +**S03:中心化**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S03_Centralization) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S03_Centralization/readme.md) -**S04:权限管理**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S04_AccessControlExploit) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S04_AccessControlExploit/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/lWnJZJYygZtqe0GFwH6bJg80t2NaSCfdRXCh0EDHxqs) +**S04:权限管理**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S04_AccessControlExploit) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S04_AccessControlExploit/readme.md) -**S05:整型溢出**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S05_Overflow) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S05_Overflow/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/FCRPHFa5JkCuRVSIrQQubuDPwrAfZctZnjWTaqZpcRU) +**S05:整型溢出**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S05_Overflow) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S05_Overflow/readme.md) -**S06:签名重放**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S06_SignatureReplay) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S06_SignatureReplay/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/hHQO1EGe0vapiejyIrP8bcuPm50Djlse2MareeHLDwE) +**S06:签名重放**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S06_SignatureReplay) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S06_SignatureReplay/readme.md) -**S07:坏随机数**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S07_BadRandomness) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S07_BadRandomness/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/5NQbE-url7o8OV5UtpTPEkMEVwTZqdDIRYDMiG1bECw) +**S07:坏随机数**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S07_BadRandomness) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S07_BadRandomness/readme.md) -**S08:绕过合约检查**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S08_ContractCheck) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S08_ContractCheck/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/EbA6ZmPleFPtMgdVqRf65Ib8Hab_gIgt5Q3c0INy9mg) +**S08:绕过合约检查**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S08_ContractCheck) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S08_ContractCheck/readme.md) -**S09:拒绝服务漏洞**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S09_DoS) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S09_DoS/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/tiae-8Z9YQurL4RzCbcGgBonIGqIDp_KR0uKVy5101U) +**S09:拒绝服务漏洞**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S09_DoS) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S09_DoS/readme.md) -**S10:貔貅 Honeypot**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S10_Honeypot) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S10_Honeypot/readme.md) | [Mirror](https://mirror.xyz/wtfacademy.eth/tJmYTJbHlYX0Ah0k6m9gd4NpbKpBxsoU8fstLz3PqJY) +**S10:貔貅 Honeypot**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S10_Honeypot) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S10_Honeypot/readme.md) **S11:抢先交易**:[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/S11_Frontrun) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/S11_Frontrun/readme.md) @@ -234,78 +231,79 @@ ## Solidity 内部规则 -**SI01:基础存储布局**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/01_ValueStorage.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/01_ValueStorage/readme.md) +**SI01:基础存储布局**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/01_ValueStorage.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/01_ValueStorage/readme.md) -**SI02:映射和动态数组的存储布局**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/02_MappingStorage.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/02_MappingStorage/readme.md) +**SI02:映射和动态数组的存储布局**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/02_MappingStorage.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/02_MappingStorage/readme.md) -**SI03:字节数组和字符串的存储布局**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/03_BytesStorage.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/03_BytesStorage/readme.md) +**SI03:字节数组和字符串的存储布局**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/03_BytesStorage.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/03_BytesStorage/readme.md) -**SI04:内存布局**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/04_MemoryLayout.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/04_MemoryLayout/readme.md) +**SI04:内存布局**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/04_MemoryLayout.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/04_MemoryLayout/readme.md) -**SI05:ABI编码基础**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/05_AbiEncode.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/05_AbiEncode/readme.md) +**SI05:ABI编码基础**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/05_AbiEncode.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/05_AbiEncode/readme.md) -**SI06:动态类型的ABI编码**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/06_AbiDynamic.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/06_AbiDynamic/readme.md) +**SI06:动态类型的ABI编码**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/06_AbiDynamic.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/06_AbiDynamic/readme.md) -**SI07:ABI编码公式**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/07_AbiFormula.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/07_AbiFormula/readme.md) +**SI07:ABI编码公式**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/07_AbiFormula.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/07_AbiFormula/readme.md) -**SI08:calldata/returndata的ABI编码**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/08_AbiCalldata.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/08_AbiCalldata/readme.md) +**SI08:calldata/returndata的ABI编码**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/08_AbiCalldata.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/08_AbiCalldata/readme.md) -**SI09:事件的ABI编码**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/09_AbiEvent.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/09_AbiEvent/readme.md) +**SI09:事件的ABI编码**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/09_AbiEvent.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/09_AbiEvent/readme.md) -**SI10:Error的ABI编码**:[Code](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/10_AbiError.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/10_AbiError/readme.md) +**SI10:Error的ABI编码**:[代码](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/src/10_AbiError.sol) | [文章](https://github.com/WTFAcademy/WTF-Solidity-Internals/blob/master/tutorials/10_AbiError/readme.md) ## 主题 + ### 开发工具 -**第1讲:Remix, 最易用的Solidity IDE** 【[代码](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Tools/TOOL01_Remix)】 【[文章](https://mirror.xyz/wtfacademy.eth/dSYXG9zF_Vclw58Bgcvsv6HSA0SU6pmBoYLFwLAgVbU)】 +**第1讲:Remix, 最易用的Solidity IDE** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Tools/TOOL01_Remix) -**第2讲:Infura, 连接链下与链上的桥梁** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Tools/TOOL02_Infura/readme.md)】 +**第2讲:Infura, 连接链下与链上的桥梁** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Tools/TOOL02_Infura/readme.md) -**第3讲:Ganache,搭建本地测试网络** 【[文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL03_Ganache/readme.md)】 +**第3讲:Ganache,搭建本地测试网络** [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL03_Ganache/readme.md) -**第4讲:Alchemy, 区块链API和节点基础设施** 【[文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL04_Alchemy/readme.md)】 +**第4讲:Alchemy, 区块链API和节点基础设施** [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL04_Alchemy/readme.md) -**第5讲:Dune,使用Dune可视化区块链数据** 【[文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL05_Dune/readme.md)】 +**第5讲:Dune,使用Dune可视化区块链数据** [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL05_Dune/readme.md) -**第6讲:Hardhat,以太坊开发环境** 【[文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL06_Hardhat/readme.md)】 +**第6讲:Hardhat,以太坊开发环境** [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL06_Hardhat/readme.md) -**第7讲:Foundry,以Solidity为中心的开发工具包** 【[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL07_Foundry)】【[文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL07_Foundry/readme.md)】 +**第7讲:Foundry,以Solidity为中心的开发工具包** [代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL07_Foundry) | [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Tools/TOOL07_Foundry/readme.md) -**第8讲:ZAN,节点服务和合约审计等Web3技术服务** 【[文章](https://github.com/AmazingAng/WTFSolidity/blob/main/Topics/Tools/TOOL08_ZAN/readme.md)】 +**第8讲:ZAN,节点服务和合约审计等Web3技术服务** [文章](https://github.com/AmazingAng/WTFSolidity/blob/main/Topics/Tools/TOOL08_ZAN/readme.md) ### 链上威胁分析 -**第1讲:工具篇** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug//01_tools/)】 | 【[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/01_tools/en/)】 +**第1讲:工具篇** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug//01_tools/) | [英文文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/01_tools/en/) -**第2讲:热身篇** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/02_warmup/)】 | 【[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/02_warmup/en/)】 +**第2讲:热身篇** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/02_warmup/) | [英文文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/02_warmup/en/) -**第3讲:漏洞概念验证-上篇** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/03_write_your_own_poc/)】| 【[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/03_write_your_own_poc/en/)】 +**第3讲:漏洞概念验证-上篇** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/03_write_your_own_poc/) | [英文文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/03_write_your_own_poc/en/) -**第4讲:漏洞概念验证-中篇** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/04_write_your_own_poc/)】| 【[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/04_write_your_own_poc/en/)】 +**第4讲:漏洞概念验证-中篇** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/04_write_your_own_poc/) | [英文文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/04_write_your_own_poc/en/) -**第5讲:漏洞概念验证-下篇** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/05_write_your_own_poc/)】| 【[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/05_write_your_own_poc/en/)】 +**第5讲:漏洞概念验证-下篇** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/05_write_your_own_poc/) | [英文文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/05_write_your_own_poc/en/) -**第6讲:Rugpull 分析** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/06_Rugpull/)】| 【[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/06_Rugpull/en/)】 +**第6讲:Rugpull 分析** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/06_Rugpull/) | [英文文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/06_Rugpull/en/) -**第7讲:Nomad 跨链桥事件分析** 【[文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/07_analysis_bridge/)】| 【[English](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/07_analysis_bridge/en/)】 +**第7讲:Nomad 跨链桥事件分析** [文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/07_analysis_bridge/)| [英文文章](https://github.com/AmazingAng/WTF-Solidity/tree/main/Topics/Onchain_debug/07_analysis_bridge/en/) ### NFT -**第1讲:ERC721库:Address, Strings, Context** 【[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721)】 【[文章](https://mirror.xyz/wtfacademy.eth/PAsIFLAmEoMufZsXlX0NWsVF8DHpHz3OrYlooosy9Ho)】 +**第1讲:ERC721库:Address, Strings, Context** [代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721) | [文章](https://mirror.xyz/wtfacademy.eth/PAsIFLAmEoMufZsXlX0NWsVF8DHpHz3OrYlooosy9Ho) -**第2讲:ERC721相关接口** 【[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721)】 【[文章](https://mirror.xyz/wtfacademy.eth/4mPkMgHViRjx8OM7TAI-M-2oMfRle36ULzqlpC6S7IQ)】 +**第2讲:ERC721相关接口** [代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721) | [文章](https://mirror.xyz/wtfacademy.eth/4mPkMgHViRjx8OM7TAI-M-2oMfRle36ULzqlpC6S7IQ) -**第3讲:ERC721主合约** 【[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721/ERC721.sol)】 【[文章](https://mirror.xyz/wtfacademy.eth/-evZa3S--yw9vVcXfhn9I3UiNRaqWOTLG0eZFFgbcT0)】 +**第3讲:ERC721主合约** [代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721/ERC721.sol) | [文章](https://mirror.xyz/wtfacademy.eth/-evZa3S--yw9vVcXfhn9I3UiNRaqWOTLG0eZFFgbcT0) -**第4讲:BAYC主合约和严重漏洞**【[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721/BAYC.sol)】 【[文章](https://mirror.xyz/wtfacademy.eth/_buBOQflWtHDpLbg18Fp8zLe8AmLiPka2y-UhppK_u0)】 +**第4讲:BAYC主合约和严重漏洞** [代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721/BAYC.sol) | [文章](https://mirror.xyz/wtfacademy.eth/_buBOQflWtHDpLbg18Fp8zLe8AmLiPka2y-UhppK_u0) -**第5讲:Loot**【[代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721/5_Loot/Loot.sol)】 【[文章](https://mirror.xyz/wtfacademy.eth/-Bc_vjP9EX-wg6chtUFAz0zm5v-jaIekMlOlqHJ_IhE)】 +**第5讲:Loot** [代码](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/ERC721/5_Loot/Loot.sol) | [文章](https://mirror.xyz/wtfacademy.eth/-Bc_vjP9EX-wg6chtUFAz0zm5v-jaIekMlOlqHJ_IhE) ### 翻译 -**第1讲:Metamask项目方给Solidity程序员的16个安全建议**【[文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Translation/Consensys2020)】 【[Mirror](https://mirror.xyz/wtfacademy.eth/ygaDE0QQwn3lfI-AVaw0ZMqHQtWCdzo-XV450j2camc)】 +**第1讲:Metamask项目方给Solidity程序员的16个安全建议** [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Translation/Consensys2020) -**第2讲:深入EVM**【[文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Translation/DiveEVM2017)】 +**第2讲:深入EVM** [文章](https://github.com/AmazingAng/WTF-Solidity/blob/main/Topics/Translation/DiveEVM2017) ## WTF贡献者 @@ -327,7 +325,7 @@ - [Solidity 官方文档](https://docs.soliditylang.org/en/v0.8.17/) - [Solidity By Example](https://solidity-by-example.org/) - - [中文版](https://github.com/Web3-Club/solidity-by-example_Chinese) + - [中文版](https://github.com/Web3-Club/solidity-by-example_Chinese) - [OpenZeppelin Contract](https://github.com/OpenZeppelin/openzeppelin-contracts) - [solmate](https://github.com/transmissions11/solmate) - [Chainlink Docs](https://docs.chain.link/)