web3-testing

Test Solidity smart contracts with Hardhat and Foundry frameworks.

Updated Jan 13, 2026
One-click install
npx skills add https://github.com/ollieb89/vibe_coding --skill web3-testing-ollieb89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web3-testing
Source: https://github.com/ollieb89/vibe_coding/tree/main/.agent/blockchain-web3/skills/web3-testing
Command: npx skills add https://github.com/ollieb89/vibe_coding --skill web3-testing-ollieb89

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 before deployment.

Core Features & Use Cases

  • Unit & Integration Testing: Write robust tests for individual contract functions and their interactions.
  • Mainnet Forking: Test contract logic against a live fork of the Ethereum mainnet for realistic scenarios.
  • Gas Optimization: Analyze and optimize gas usage for cost-effective contract execution.
  • Contract Verification: Automate the process of verifying contracts on block explorers like Etherscan.
  • Use Case: You've developed a new DeFi protocol and need to ensure all its components function correctly under various conditions, including interactions with existing mainnet protocols.

Quick Start

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

Frequently Asked Questions about web3-testing

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

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

To test smart contracts using Hardhat and Foundry, you can write unit and integration tests that validate individual Solidity functions and complex contract interactions to ensure protocol reliability before deployment.

What is mainnet forking and when do I need it for blockchain testing?

Mainnet forking creates a live replica of the Ethereum mainnet for testing. You need it to validate how new DeFi protocols interact with existing mainnet conditions and liquidity under realistic scenarios.

How do I analyze and optimize gas usage for Solidity smart contracts?

You analyze and optimize gas usage by running tests that measure execution costs across contract functions, allowing you to identify inefficiencies and validate optimizations for cost-effective blockchain transactions.

Does this support automating contract verification on Etherscan?

Yes, contract verification on Etherscan is supported. You can automate the verification process directly within your testing workflow to ensure deployed contract code is publicly readable and validated.

How do I set up a blockchain test suite for a new DeFi protocol?

You set up a blockchain test suite by initializing a Hardhat project, writing unit tests for Solidity smart contracts, and configuring integration tests to validate all protocol components under various conditions.