什么是 testing?
使用 Foundry 进行智能合约测试 — 单元测试、模糊测试、分叉测试、不变测试。应该测试什么,不应该测试什么,以及法学硕士会犯什么错误。 来源:austintgriffith/ethskills。
使用 Foundry 进行智能合约测试 — 单元测试、模糊测试、分叉测试、不变测试。应该测试什么,不应该测试什么,以及法学硕士会犯什么错误。
通过命令行快速安装 testing AI 技能到你的开发环境
来源:austintgriffith/ethskills。
You test getters and trivial functions. Testing that name() returns the name is worthless. Test edge cases, failure modes, and economic invariants — the things that lose money when they break.
You don't fuzz. forge test finds the bugs you thought of. Fuzzing finds the ones you didn't. If your contract does math, fuzz it. If it handles user input, fuzz it. If it moves value, definitely fuzz it.
You don't fork-test. If your contract calls Uniswap, Aave, or any external protocol, test against their real deployed contracts on a fork. Mocking them hides integration bugs that only appear with real state.
使用 Foundry 进行智能合约测试 — 单元测试、模糊测试、分叉测试、不变测试。应该测试什么,不应该测试什么,以及法学硕士会犯什么错误。 来源:austintgriffith/ethskills。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/austintgriffith/ethskills --skill testing使用 Foundry 进行智能合约测试 — 单元测试、模糊测试、分叉测试、不变测试。应该测试什么,不应该测试什么,以及法学硕士会犯什么错误。 来源:austintgriffith/ethskills。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/austintgriffith/ethskills --skill testing 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/austintgriffith/ethskills