What problem does it solve? Smart contract bugs can cause irreversible financial loss, yet many developers lack structured testing practices for Solidity code. This Skill provides complete testing patterns for Hardhat and Foundry, covering unit tests, fuzzing, mainnet forking, gas measurement, and coverage reporting. ## Core Features & Use Cases - Hardhat Testing Patterns: Fixtures with loadFixture, event assertions, balance change checks, time manipulation, and snapshot/revert state management. - Foundry (Forge) Testing: Solidity-native tests with cheatcodes like vm.prank, vm.deal, vm.expectRevert, fuzz testing, and mainnet fork simulation. - Gas & Coverage Analysis: Gas usage comparison between implementations, hardhat-gas-reporter setup, and solidity-coverage reporting integrated into CI/CD pipelines. - Use Case: Before deploying an ERC-20 token to mainnet, use this Skill to build a test suite that verifies transfers, access control, edge cases via fuzzing, and contract behavior against real mainnet state, then verify the contract on Etherscan. ## Quick Start Write a Hardhat test suite for my ERC-20 token contract covering deployment, transfers, and insufficient balance reverts.