Topics
- hardhat
- foundry
- solidity
- smart-contracts
- unit-testing
- integration-testing
- ethereum
- gas-optimization
- fuzzing
- mainnet-forking
What it does
Provides comprehensive testing patterns for Solidity smart contracts using Hardhat and Foundry, covering unit tests, integration tests, gas optimization, fuzzing, and mainnet forking. Targets developers validating token contracts, DeFi protocols, or setting up automated test suites with coverage reporting and Etherscan verification.
Generated from the current SKILL.md.
Frequently asked
Does this skill cover both Hardhat and Foundry?
Yes. The skill includes setup and testing patterns for both Hardhat (JavaScript/TypeScript) and Foundry (Solidity), so you can choose or use both frameworks in the same project.
Can I test against mainnet contracts?
Yes. The skill covers mainnet forking with both Hardhat and Foundry, allowing you to test against real contract addresses and state at specific block heights.
Does this include fuzzing and property-based testing?
Yes. The Foundry section demonstrates fuzzing tests with the `testFuzz` pattern to validate contract behavior across randomized inputs.
How do I test gas consumption?
Hardhat's gas reporter plugin is configured in the skill and will measure gas used per transaction; you can also assert on specific gas thresholds in individual tests.
Generated from the current SKILL.md. These answers refresh after source changes.