web3-testing

Test Solidity smart contracts with Hardhat and Foundry frameworks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ACGSpgp/ACGS --skill web3-testing-acgspgp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web3-testing
Source: https://github.com/ACGSpgp/ACGS/tree/main/.agent/workflows/blockchain-web3/1.2.1/skills/web3-testing
Command: npx skills add https://github.com/ACGSpgp/ACGS --skill web3-testing-acgspgp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a comprehensive framework for testing smart contracts, ensuring their reliability, security, and efficiency across various blockchain environments.

Core Features & Use Cases

  • Unit & Integration Testing: Write robust tests using Hardhat and Foundry.
  • Advanced Patterns: Implement mainnet forking, snapshotting, and account impersonation for realistic testing scenarios.
  • Gas Optimization: Analyze and optimize contract performance for cost-efficiency.
  • Use Case: You need to thoroughly test a new ERC20 token contract, including its transfer logic, access controls, and gas usage, before deploying it to a testnet.

Quick Start

Use the web3-testing skill to set up a Hardhat project and write unit tests for your Solidity smart contracts.

Frequently Asked Questions about web3-testing

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

FAQPage Schema
How do I write unit tests for Solidity smart contracts using Hardhat and Foundry?

To write unit tests for Solidity smart contracts, you can use this framework to set up a Hardhat project and implement robust unit and integration tests using both Hardhat and Foundry environments.

What is mainnet forking and how does it help test DeFi protocols?

Mainnet forking creates a realistic testing environment by copying mainnet state. It supports advanced patterns like snapshotting and account impersonation to thoroughly validate DeFi protocols and complex contract interactions.

Can I analyze smart contract gas optimization during integration testing?

Yes, you can analyze smart contract gas optimization during testing. The framework evaluates contract performance and cost-efficiency, allowing you to identify and resolve gas-heavy operations before testnet deployment.

Does web3 testing support fuzzing for Solidity contracts?

Web3 testing supports fuzzing for Solidity contracts. It provides comprehensive testing capabilities that include fuzzing alongside unit tests, integration tests, and gas optimization analysis to ensure contract reliability.

How do I integrate smart contract testing into CI/CD pipelines?

You can integrate smart contract testing into CI/CD pipelines for automated quality assurance. The framework connects your Hardhat and Foundry test suites directly to automated pipelines, ensuring continuous validation.

What is the best way to test ERC20 token transfer logic and access controls?

The best way to test ERC20 token transfer logic and access controls is using comprehensive unit and integration tests. This framework validates transfer mechanisms, permissions, and gas usage before mainnet deployment.