> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monad.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Solidity 资源

Monad 与 EVM 字节码完全兼容,支持截至 [Osaka 分叉](https://www.evm.codes/?fork=osaka)的所有操作码和预编译合约。Monad 还保留了标准的 Ethereum JSON-RPC 接口。

因此,大多数以太坊主网的开发资源同样适用于 Monad 的开发。

本页面推荐了一组**最少必要的**资源,帮助您开始为以太坊构建去中心化应用。子页面提供了更多细节或选项。

由于 [Solidity](https://docs.soliditylang.org/) 是以太坊智能合约最流行的语言,本页面上的资源侧重于 Solidity;此外可查看 [Vyper](/zh/guides/evm-resources/other-languages/vyper) 的资源。请注意,由于智能合约具有可组合性,原本用一种语言编写的合约仍可调用另一种语言编写的合约。

## **IDE**

* [Remix](https://remix.ethereum.org/#lang=en\&optimize=false\&runs=200\&evmVersion=null) 是一个交互式 Solidity IDE。这是开始编写和编译 Solidity 智能合约最简单、最快捷的方式,无需额外安装工具。
* [VSCode](https://code.visualstudio.com/) + [Solidity 扩展](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity)

## **Solidity 基础**

* [CryptoZombies](https://cryptozombies.io/en/course) 是一份出色的端到端 EVM dApp 构建入门。它为从未编过程的初学者以及希望探索区块链开发的其他领域资深开发者都提供了资源和课程。
* [Solidity by Example](https://solidity-by-example.org/) 通过简单示例逐步介绍概念;适合已具备其他语言基础经验的开发者。
* [Cyfrin Updraft 的 Blockchain Basics 课程](https://updraft.cyfrin.io/courses/blockchain-basics)教授区块链、DeFi 和智能合约的基础知识。
* [Cyfrin Updraft 的 Solidity Smart Contract Development 课程](https://updraft.cyfrin.io/courses/solidity)将教您如何成为一名智能合约开发者。通过项目学习并获得动手实践经验。

## **Solidity 中级**

* [Solidity 语言](https://docs.soliditylang.org/en/v0.8.21/introduction-to-smart-contracts.html)官方文档是关于智能合约和区块链基础(以 EVM 环境为核心)的端到端说明。除 Solidity 语言文档外,它还涵盖了将代码编译以部署到 EVM 的基础知识,以及在 EVM 上部署智能合约时相关的基础组件。
* [Solidity Patterns](https://github.com/fravoll/solidity-patterns) 仓库提供了代码模板库及其用法说明。
* [Uniswap V2](https://github.com/Uniswap/v2-core) 合约是一份专业但易于理解的智能合约,很好地概览了一份处于生产状态的 Solidity dApp。可在[此处](https://ethereum.org/en/developers/tutorials/uniswap-v2-annotated-code/)找到对该合约的引导式讲解。
* [OpenZeppelin](https://www.openzeppelin.com/contracts) 为常见的以太坊代币部署(如 ERC20、ERC712 和 ERC1155)提供了可自定义的模板合约库。请注意,它们并未针对 gas 进行优化。
* [Rareskills 博客](https://www.rareskills.io/category/solidity)有一些关于 Solidity 各种概念的深入文章。
* [Cyfrin Updraft 的 Foundry Fundamentals 课程](https://updraft.cyfrin.io/courses/foundry)是一门全面的 web3 开发课程,旨在教您了解 Foundry——业界标准的智能合约构建、部署和测试框架。
* [Smart Contract Programmer YT 频道](https://www.youtube.com/@smartcontractprogrammer)有大量关于各种 Solidity 概念(如 ABI 编码、EVM 内存等)的深入视频。

## **Solidity 高级**

* [Solmate 仓库](https://github.com/transmissions11/solmate)和 [Solady 仓库](https://github.com/Vectorized/solady/tree/main)提供了利用 Solidity 或 Yul 的 gas 优化合约。
* [Yul](https://docs.soliditylang.org/en/latest/yul.html) 是一种面向 Solidity 的中间语言,通常可以视为 EVM 的内联汇编。它并非纯粹的汇编,提供了控制流构造并将栈的内部工作方式加以抽象,同时仍向开发者暴露原始内存后端。Yul 面向需要访问 EVM 原始内存后端的开发者,以构建高性能、gas 优化的 EVM 代码。
* [Cyfrin Updraft 的 Advanced Foundry 课程](https://updraft.cyfrin.io/courses/advanced-foundry)教您了解 Foundry、如何开发 DeFi 协议和稳定币、如何开发 DAO、高级智能合约开发、高级智能合约测试与模糊测试以及手动验证。
* [Cyfrin Updraft 的 Smart Contract Security 课程](https://updraft.cyfrin.io/courses/security)将教您入门审计和编写安全协议所需的一切知识。
* [Cyfrin Updraft 的 Assembly and Formal Verification 课程](https://updraft.cyfrin.io/courses/formal-verification)教您了解汇编、使用 Yul 编写智能合约、以太坊虚拟机操作码、形式化验证测试、智能合约不变量测试以及 Halmos、Certora、Kontrol 等工具。
* [Cyfrin Updraft 的 Smart Contract DevOps 课程](https://updraft.cyfrin.io/courses/wallets)教授在使用钱包时的访问控制最佳实践、部署后安全、智能合约与 web3 DevOps 以及在线协议的维护与监控。
* [Secureum YT 频道](https://www.youtube.com/@SecureumVideos/videos)有大量关于 Solidity 的视频,从 Solidity 基础一直到模糊测试和 Solidity 审计等高级概念。

## 教程

* [Ethernaut](https://ethernaut.openzeppelin.com/):通过解题学习
* [Damn Vulnerable DeFi](https://www.damnvulnerabledefi.xyz):DVD 是一系列智能合约挑战,由存在漏洞的合约组成,您需要设法攻击它。这些挑战是练习和应用您所掌握的 Solidity 技能的好方法。

## 最佳实践/模式

* [DeFi 开发者路线图](https://github.com/OffcierCia/DeFi-Developer-Road-Map)
* [RareSkills Gas 优化之书](https://www.rareskills.io/post/gas-optimization)

## 测试

* [Echidna](https://github.com/crytic/echidna):模糊测试
* [Slither](https://github.com/crytic/slither):用于漏洞检测的静态分析
* [solidity-coverage](https://github.com/sc-forks/solidity-coverage/tree/master):Solidity 测试的代码覆盖率

## 智能合约档案

* [Smart contract sanctuary](https://github.com/tintinweb/smart-contract-sanctuary) - Etherscan 上已验证的合约
* [EVM 函数签名数据库](https://www.4byte.directory/)
