{"id":84764,"url":"https://github.com/xiaomingx/awesome-solidity","name":"awesome-solidity","description":"⟠ A curated list of awesome Solidity resources, libraries, tools and more","projects_count":71,"last_synced_at":"2026-08-19T09:00:17.277Z","repository":{"id":267973592,"uuid":"902938589","full_name":"XiaomingX/awesome-solidity","owner":"XiaomingX","description":"⟠ A curated list of awesome Solidity resources, libraries, tools and more","archived":false,"fork":false,"pushed_at":"2025-09-17T05:23:36.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-18T10:03:47.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XiaomingX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-13T15:25:18.000Z","updated_at":"2025-09-17T05:23:39.000Z","dependencies_parsed_at":"2024-12-13T17:12:35.454Z","dependency_job_id":"24c07971-5a85-47b9-aa7d-86b3123f7301","html_url":"https://github.com/XiaomingX/awesome-solidity","commit_stats":null,"previous_names":["xiaomingx/awesome-solidity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XiaomingX/awesome-solidity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomingX%2Fawesome-solidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomingX%2Fawesome-solidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomingX%2Fawesome-solidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomingX%2Fawesome-solidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XiaomingX","download_url":"https://codeload.github.com/XiaomingX/awesome-solidity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaomingX%2Fawesome-solidity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285894268,"owners_count":27249632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-23T02:00:06.149Z","response_time":135,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"created_at":"2025-02-18T06:29:47.224Z","updated_at":"2026-08-19T09:00:17.281Z","primary_language":null,"list_of_lists":false,"displayable":true,"categories":["五、实战示例（从 demo 到生产级）","二、入门到进阶教程（实战导向）","Resources","四、安全开发与审计（重中之重）","一、官方核心资源（权威基准）","三、深度文章与指南（体系化认知）","十、求职与学习进阶","Libraries","八、开发工具（提效必备）","Tools","Editor Plugins","九、编辑器插件（提升编码体验）","七、必备库（避免重复造轮子）","十一、经典书籍（体系化沉淀）","六、开发模板（快速启动项目）","Languages"],"sub_categories":["1. 教学示例（学思路）","1. 入门友好（零基础/转岗开发者）","2. 审计工具与资源","3. 语法/工具速查（高效开发）","1. 安全学习与实战","3. 公开审计报告（复盘学习）","2. 主流求职平台","1. 核心开发工具","3. 运维与监控工具","1. 安全核心库","2. 代码质量工具","2. 进阶提升（有基础想深化）","2. 主网真实项目（抄作业）","2. 工具类库","1. 实战练习平台"],"readme":"# Solidity 开发者核心资源指南（2024 优化版）\n本文整合了 Solidity 开发必备的权威资源，剔除过时内容，补充 2023-2024 年主流工具与实践，每个资源均附「核心用途+适用场景」说明，方便不同阶段开发者快速定位需求。\n\n\n## 一、官方核心资源（权威基准）\n这类资源是 Solidity 开发的「标准答案库」，语法、标准、工具更新以其为准。\n\n- **[Solidity 官方文档](https://docs.soliditylang.org/en/latest/)**  \n  涵盖 Solidity 语法、数据类型、智能合约生命周期、新特性（如 0.8.20+ 的自定义错误、原生代币支持）等所有核心内容，搭配代码示例，是入门到进阶的权威参考。\n- **[官方速查表（Cheatsheet）](https://docs.soliditylang.org/en/latest/cheatsheet.html)**  \n  官方提炼的「语法快捷键」，包含常用关键字、数据结构操作、函数修饰符等，适合开发时快速查询，避免记忆负担。\n- **[Ethereum Stack Exchange](https://ethereum.stackexchange.com/)**  \n  以太坊生态专属问答社区，90% 以上的 Solidity 开发问题（如「ERC20 转账失败排查」「gas 优化技巧」）都能找到解决方案，支持附代码提问。\n- **[solidity 源码仓库](https://github.com/ethereum/solidity/)**  \n  Solidity 编译器（solc）的核心源码，想深入理解语言实现或贡献代码时必看。\n- **[solc-bin 编译器仓库](https://github.com/ethereum/solc-bin)**  \n  包含所有历史版本和最新版 Solidity 编译器，配合 `solc-select` 工具可快速切换版本，解决「不同项目适配不同编译器」问题。\n- **[solidity-examples 官方示例](https://github.com/ethereum/solidity-examples)**  \n  官方维护的轻量示例集，覆盖基础合约（如计数器、钱包）到进阶场景（如代理模式），代码简洁且符合最佳实践。\n\n\n## 二、入门到进阶教程（实战导向）\n按「入门→进阶→专项」分类，优先选择 **2023 年后更新、社区活跃、带实操任务** 的资源。\n\n### 1. 入门友好（零基础/转岗开发者）\n- **[CryptoZombies](https://cryptozombies.io)**  \n  互动式编码游戏，通过「搭建加密收藏品游戏」学习 Solidity 基础，每步有提示，写完代码可实时运行，适合纯新手建立体感。\n- **[buildspace.so - Web3 入门课](https://buildspace.so/)**  \n  免费实操课程，从「部署第一个合约」到「开发 NFT 项目」，全程带代码模板，完成后可领 NFT 证书，配套 Discord 社区答疑。\n- **[WTF Solidity](https://github.com/AmazingAng/WTF-Solidity)**  \n  双语（中/英）开源教程，覆盖基础语法、ERC 标准、安全坑点，每节代码可直接复制运行，社区定期更新（2024 年仍有新增内容）。\n\n### 2. 进阶提升（有基础想深化）\n- **[Cadena.dev 跨链开发教程](https://cadena.dev)**  \n  不止讲 Ethereum，还覆盖 BSC、Polygon 等 EVM 链的合约适配，教你开发「多链兼容 dApp」，完成后可领技能证书。\n- **[Ludu.co - 去中心化 Twitter 克隆](https://www.ludu.co/course/ethereum)**  \n  以「复刻 Web3 版 Twitter」为目标，讲解 Solidity 最佳实践（如权限管理、数据存储优化）和全栈集成（前端+合约交互）。\n- **[ExtropyIO/defi-bot 套利机器人教程](https://github.com/ExtropyIO/defi-bot)**  \n  专项教程，教你用 Solidity + Ethers.js 开发 DeFi 套利机器人，涉及 Uniswap/Sushiswap 交互、闪贷使用等实战技能。\n\n### 3. 语法/工具速查（高效开发）\n- **[LearnXInY - 15 分钟学 Solidity](https://learnxinyminutes.com/docs/solidity/)**  \n  针对有其他语言基础（如 JS/Java）的开发者，快速梳理 Solidity 核心语法差异，跳过冗余解释。\n- **[Solidity + Vyper 语法对比](https://reference.auditless.com/cheatsheet)**  \n  想同时学两种 EVM 语言时用，左侧 Solidity、右侧 Vyper，清晰对比语法细节（如函数定义、数据类型）。\n- **[karmacoma-eth 转账最佳实践](https://gist.github.com/karmacoma-eth/4f206a46dedc6da6808c1ccdef3262d0)**  \n  详解「Ether 转账的 3 种方式（transfer/send/call）」及风险点，附避坑代码模板，解决「转账丢币」问题。\n\n\n## 三、深度文章与指南（体系化认知）\n精选 **2023 年后发布、聚焦实战问题** 的文章，避免过时内容。\n\n- **[Solidity 0.8.20+ 新特性详解](https://soliditydeveloper.com/blog/solidity-0.8.20-features)**  \n  解析最新编译器特性（如 `CREATE2` 优化、原生 ETH 支持），教你如何用新功能提升合约效率。\n- **[全栈 Ethereum 开发指南（2024 修订版）](https://dev.to/dabit3/full-stack-ethereum-development-2024-4h8f)**  \n  升级自 2021 年经典文章，讲解用 Hardhat + React + Ethers.js v6 开发 dApp，包含 TypeScript 适配技巧。\n- **[ERC20 代币+交易市场合约开发](https://stermi.medium.com/erc20-token-vendor-contract-2024)**  \n  2024 修订版教程，教你开发「可买卖的同质化代币」，包含滑点控制、手续费设置等生产级功能。\n- **[soliditydeveloper.com/blog](https://soliditydeveloper.com/blog)**  \n  持续更新的社区博客，涵盖设计模式（如工厂模式、代理模式）、L2 开发适配、安全审计案例，适合碎片化学习。\n\n\n## 四、安全开发与审计（重中之重）\n智能合约漏洞后果严重，这类资源帮你「事前避坑+事后复盘」。\n\n### 1. 安全学习与实战\n- **[Ethernaut](https://github.com/OpenZeppelin/ethernaut)**  \n  OpenZeppelin 开发的「黑客闯关游戏」，每关是一个有漏洞的合约，通过「破解合约」学习常见漏洞（如重入攻击、整数溢出），2024 年仍有新增关卡。\n- **[damn-vulnerable-defi](https://github.com/OpenZeppelin/damn-vulnerable-defi)**  \n  复现真实 DeFi 漏洞（如 Cream Finance 闪贷攻击、Uniswap 权限问题），提供完整攻击代码，是审计入门必练。\n- **[Capture the Ether](https://capturetheether.com/)**  \n  另一款安全闯关游戏，侧重基础漏洞（如伪随机数、权限控制），难度低于 Ethernaut，适合新手入门。\n- **[Consensys 智能合约安全最佳实践](https://consensys.github.io/smart-contract-best-practices/)**  \n  行业公认的安全指南，涵盖「编码规范」「已知攻击类型」「修复方案」，附代码示例（如重入攻击防御）。\n\n### 2. 审计工具与资源\n- **[Slither](https://github.com/crytic/slither)**  \n  主流静态分析工具，自动检测 30+ 种漏洞（如未检查返回值、使用过时函数），支持生成可视化调用流程图，集成 Hardhat/Foundry。\n- **[Echidna](https://github.com/crytic/echidna)**  \n  模糊测试工具，通过「随机输入数据」验证合约逻辑（如「转账后余额不减少」等异常），适合检测隐性漏洞。\n- **[Code4rena](https://code4rena.com/)**  \n  顶级社区审计平台，公开大量真实项目的审计报告和漏洞细节，可学习专业审计思路（2024 年新增百余个项目报告）。\n- **[crytic/awesome-ethereum-security](https://github.com/crytic/awesome-ethereum-security)**  \n  安全资源大合集，包含工具、教程、漏洞数据库，定期更新（2024 年新增 L2 安全相关内容）。\n\n### 3. 公开审计报告（复盘学习）\n| 审计机构         | 资源链接                                                                 | 特点                                  |\n|------------------|--------------------------------------------------------------------------|---------------------------------------|\n| Trail of Bits    | [publications/reviews](https://github.com/trailofbits/publications/tree/master/reviews) | 技术深度强，侧重底层漏洞分析          |\n| OpenZeppelin     | [security-audits](https://blog.openzeppelin.com/security-audits/)        | 覆盖主流项目（如 Uniswap、ENS）        |\n| Consensys Diligence | [audits](https://consensys.net/diligence/audits/)                        | 报告结构清晰，附修复建议              |\n| SpearbitDAO      | [portfolio](https://github.com/spearbit/portfolio)                       | 社区审计代表，覆盖中小型项目          |\n\n\n## 五、实战示例（从 demo 到生产级）\n### 1. 教学示例（学思路）\n- **[Solidity By Example](https://solidity-by-example.org/)**  \n  最经典的教学示例库，从「Hello World」到「DAO 投票合约」，每个示例仅几十行代码，注释清晰，适合边看边抄。\n- **[fravoll/solidity-patterns](https://github.com/fravoll/solidity-patterns)**  \n  整理 15+ 种 Solidity 设计模式（如工厂模式、代理模式），附使用场景（如「代理模式适合合约升级」）。\n- **[miguelmota/solidity-idiosyncrasies](https://github.com/miguelmota/solidity-idiosyncrasies)**  \n  汇总 Solidity 「坑点」（如「uint 默认为 256 位」「数组删除不改变长度」），每个坑点附错误代码和修复方案。\n\n### 2. 主网真实项目（抄作业）\n精选 **2024 年仍活跃** 的头部项目源码，学生产级代码规范：\n- **[Uniswap v3 核心合约](https://github.com/Uniswap/uniswap-v3-core)**：DeFi 龙头，学 AMM 核心逻辑、手续费机制。\n- **[ENS 域名合约](https://github.com/ensdomains/ens-contracts)**：Web3 基础设施，学权限管理、数据存储优化。\n- **[Aave v3 借贷合约](https://github.com/aave/aave-v3-core)**：DeFi 借贷标杆，学风险控制、抵押率计算。\n- **[Chainlink 预言机合约](https://github.com/smartcontractkit/LinkToken)**：Oracle 标准，学外部数据接入逻辑。\n\n\n## 六、开发模板（快速启动项目）\n每个模板标注「核心工具链+适用场景」，避免重复配置环境。\n\n| 模板名称                          | 核心工具链                          | 适用场景                                  |\n|-----------------------------------|-------------------------------------|-------------------------------------------|\n| [scaffold-eth](https://github.com/austintgriffith/scaffold-eth) | Hardhat + React + Ethers.js         | 全栈 dApp 快速原型（前端+合约一体化）      |\n| [paulrberg/solidity-template](https://github.com/paulrberg/solidity-template) | Hardhat + TypeChain + Solhint       | 生产级合约开发（含代码检查、测试、部署）    |\n| [transmissions11/foundry-template](https://github.com/transmissions11/foundry-template) | Foundry + Solmate                   | 追求 gas 优化的合约（如 DeFi、NFT）        |\n| [tomhirst/solidity-nextjs-starter](https://github.com/tomhirst/solidity-nextjs-starter) | Next.js + Hardhat                   | 需 SEO 的 Web3 应用（如去中心化博客）      |\n| [thirdweb/contracts](https://github.com/thirdweb-dev/contracts) | ThirdWeb SDK + 预编译合约           | 零代码开发 NFT/代币（直接复用预审计合约）  |\n\n\n## 七、必备库（避免重复造轮子）\n精选 **2024 年主流、维护活跃** 的库，覆盖安全、数学、工具类。\n\n### 1. 安全核心库\n- **[OpenZeppelin Contracts](https://github.com/OpenZeppelin/openzeppelin-contracts)**  \n  行业标准安全库，提供 ERC20/ERC721 实现、权限管理（Ownable）、重入防御（ReentrancyGuard）等，90% 项目都会依赖。\n- **[OpenZeppelin Contracts Upgradeable](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable)**  \n  支持「合约升级」的变体库，解决 Solidity 合约默认不可修改的问题（如 DeFi 项目迭代功能）。\n- **[solmate](https://github.com/transmissions11/solmate)**  \n  轻量且 gas 优化的库，比 OpenZeppelin 省 10-30% gas，适合对成本敏感的项目（如 L2 合约）。\n\n### 2. 工具类库\n- **[prb-math](https://github.com/hifi-finance/prb-math)**  \n  高精度数学计算库，解决 Solidity 浮点数缺失问题，支持加减乘除、幂运算，适合 DeFi 定价逻辑。\n- **[makerdao/multicall](https://github.com/makerdao/multicall)**  \n  批量调用合约方法，将多个 RPC 请求合并为 1 个，减少前端交互延迟（如「批量查询多个地址余额」）。\n- **[studydefi/money-legos](https://github.com/studydefi/money-legos)**  \n  整合主流 DeFi 协议（Uniswap、Aave）的 ABI 和地址，可直接调用（如「用 1 行代码实现 Uniswap 兑换」）。\n\n\n## 八、开发工具（提效必备）\n按「核心开发→代码质量→审计→运维」分类，标注「2024 主流度」。\n\n### 1. 核心开发工具\n| 工具名称       | 核心功能                                  | 主流度 | 适用人群                          |\n|----------------|-------------------------------------------|--------|-----------------------------------|\n| [Hardhat](https://hardhat.org/) | 编译、测试、部署合约，支持插件扩展        | ★★★★★  | JS/TS 开发者、全栈 dApp 开发      |\n| [Foundry](https://github.com/foundry-rs/foundry) | 编译、测试、部署（Rust 编写），速度极快  | ★★★★★  | 追求效率、Rust 偏好者、DeFi 开发  |\n| [Remix](https://remix.ethereum.org/) | 在线 IDE，实时编译运行，支持调试          | ★★★★★  | 新手入门、快速原型、合约调试      |\n| [Truffle](https://github.com/trufflesuite/truffle) | 老牌开发框架，生态成熟                    | ★★★☆☆  | 维护旧项目、习惯 Truffle 生态者   |\n\n### 2. 代码质量工具\n- **[solc-select](https://github.com/crytic/solc-select)**：快速切换 Solidity 编译器版本，解决「项目适配不同版本」问题。\n- **[solhint](https://github.com/protofire/solhint)**：代码检查工具，检测语法错误、安全风险（如「禁用 `tx.origin`」）。\n- **[solidity-coverage](https://github.com/sc-forks/solidity-coverage)**：测试覆盖率工具，确保关键逻辑都被测试覆盖。\n- **[prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity)**：自动格式化代码，统一团队风格。\n\n### 3. 运维与监控工具\n- **[Tenderly](https://tenderly.co)**：合约监控平台，支持「交易重放」「错误栈追踪」，实时告警合约异常（如转账失败）。\n- **[Sourcify](https://sourcify.dev/)**：去中心化合约验证服务，支持多链，确保「部署的字节码与源码匹配」。\n- **[OpenZeppelin Defender](https://openzeppelin.com/defender)**：安全运维工具，支持「多签部署」「紧急暂停合约」，预防黑客攻击。\n\n\n## 九、编辑器插件（提升编码体验）\n重点推荐 **VS Code 插件**（90% 开发者首选编辑器）：\n\n- **[vscode-solidity](https://github.com/juanfranblanco/vscode-solidity)**  \n  基础语法高亮、自动补全，支持跳转定义，是 Solidity 开发的「必备基础插件」。\n- **[Solidity Visual Developer](https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-visual-auditor)**  \n  安全审计辅助插件，自动标记漏洞风险点（如「未检查 `call` 返回值」），支持生成 UML 调用图。\n- **[Hardhat Solidity](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity)**  \n  适配 Hardhat 项目，支持代码格式化、测试运行、部署快捷操作，提升 Hardhat 开发效率。\n- **[Solidity Contract Flattener](https://marketplace.visualstudio.com/items?itemName=tintinweb.vscode-solidity-flattener)**  \n  将多文件合约合并为单个文件，方便在 Etherscan/Sourcify 上验证。\n\n\n## 十、求职与学习进阶\n### 1. 实战练习平台\n- **[ChainShot](https://www.chainshot.com/)**：付费实操课程，侧重「企业级开发」（如「DAO 治理合约」「跨链桥」），带导师答疑。\n- **[WTF Academy](https://wtf.academy/)**：中文开源社区，提供 Solidity 进阶课（如「zk-SNARK 入门」），支持在线刷题。\n\n### 2. 主流求职平台\n- **[cryptocurrencyjobs.co](https://cryptocurrencyjobs.co/)**：全球最大 Web3 招聘网站，覆盖 Solidity 开发、审计等岗位。\n- **[web3.career](https://web3.career)**：按「技能/地区」筛选岗位，支持订阅 Solidity 相关职位推送。\n- **[LinkedIn](https://www.linkedin.com/)**：搜索「Solidity Developer」，众多大厂（如 Coinbase、Consensys）直接招聘。\n\n\n## 十一、经典书籍（体系化沉淀）\n- **[《Mastering Ethereum》（2024 修订版）](https://github.com/ethereumbook/ethereumbook)**  \n  以太坊开发圣经，从底层原理（EVM 工作机制）到上层应用（智能合约开发），适合建立完整知识体系，开源免费。\n- **[《Solidity 编程：从入门到精通》](https://book.douban.com/subject/36508802/)**  \n  中文经典，侧重实战，包含「ERC 标准详解」「DeFi 合约开发」「安全审计案例」，适合中文读者入门。\n","projects_url":"https://awesome.ecosyste.ms/api/v1/lists/xiaomingx%2Fawesome-solidity/projects"}