web3-testing

Validate Solidity smart contracts with Hardhat and Foundry testing workflows.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/haxlys/skills --skill web3-testing-haxlys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web3-testing
Source: https://github.com/haxlys/skills/tree/main/vendored/wshobson-agents/plugins/blockchain-web3/skills/web3-testing
Command: npx skills add https://github.com/haxlys/skills --skill web3-testing-haxlys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validate and secure Solidity smart contracts with comprehensive testing workflows using Hardhat and Foundry.

Core Features & Use Cases

  • End-to-end testing of smart contracts with unit tests, integration tests, and mainnet forking.
  • Gas optimization checks, coverage reporting, and fuzzing to improve contract reliability.
  • Real-world use cases include DeFi tokens, NFT marketplaces, and governance contracts where robust testing is critical.

Quick Start

Run the provided test suite against your Solidity contracts to validate correctness and security.

Frequently Asked Questions about web3-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test Solidity smart contracts using Hardhat and Foundry?

Test Solidity smart contracts by running unit tests, integration tests, and mainnet forking workflows using Hardhat and Foundry. This validates contract correctness and security for DeFi tokens, NFT marketplaces, and governance contracts.

What is mainnet forking in smart contract testing and when do I need it?

Mainnet forking simulates real blockchain state locally to test contract interactions against live protocols. You need it when validating integration with existing DeFi or NFT ecosystem contracts before deployment.

Can I integrate Foundry Forge tests into my CI/CD pipeline?

Yes, Foundry Forge tests can be integrated into CI/CD pipelines. The testing workflow supports continuous validation of Solidity contracts, ensuring automated checks for correctness and security on every code commit.

Does Hardhat support gas optimization checks and coverage reporting?

Hardhat supports gas optimization checks and coverage reporting. These features identify inefficient code paths and measure test coverage to improve contract reliability and reduce deployment costs.

What's the best way to run fuzzing tests for DeFi smart contracts?

Run fuzzing tests using Foundry Forge to input random data and identify edge cases in DeFi smart contracts. This testing technique improves contract reliability by exposing unexpected state transitions and vulnerabilities.

Why do I need both Hardhat and Foundry for comprehensive Solidity testing?

Hardhat and Foundry complement each other for comprehensive Solidity testing. Hardhat handles configuration and mainnet forking, while Foundry Forge provides fast fuzzing tests, together covering unit, integration, and security validation.