Toolverse
All skills

web3-testing

by wshobson

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
wshobson
Category
Testing
Views
83

About this skill

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.

How to use

  1. Zainstaluj umiejętność w swoim projekcie agenta, dodając referencję do web3-testing w konfiguracji.

  2. Skonfiguruj plik hardhat.config.js — ustaw wersję Solidity (np. 0.8.19), włącz optymalizator, dodaj sieci testowe (Goerli, Sepolia) oraz zmienne środowiskowe dla RPC URL i kluczy prywatnych.

  3. Przygotuj fixture do testów — zdefiniuj funkcję deployTokenFixture (lub analogiczną dla twojego kontraktu), która zwraca instancję kontraktu i konta testowe za pomocą ethers.getSigners().

  4. Napisz testy jednostkowe w pliku test/*.js — użyj describe() i it() z biblioteki Chai, importuj loadFixture i time z hardhat-network-helpers, testuj funkcje kontraktu i sprawdzaj oczekiwane wyniki.

  5. Uruchom testy poleceniem npx hardhat test — narzędzie automatycznie raportuje pokrycie kodu, zużycie gazu (jeśli włączysz gasReporter) i wyniki każdego testu.

  6. Dla testów integracyjnych i realistycznych scenariuszy włącz forking mainnet w konfiguracji — ustaw blockNumber i URL RPC, aby testować interakcje z rzeczywistymi kontraktami na sieci.

Related skills

backtesting-frameworks

by wshobson

Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.

Testing
12105

test-cases

by cexll

This skill should be used when generating comprehensive test cases from PRD documents or user requirements. Triggers when users request test case generation, QA planning, test scenario creation, or need structured test documentation. Produces detailed test cases covering

Testing
2862

crypto-research

by stevengonsalvez

Comprehensive cryptocurrency market research and analysis using specialized AI agents. Analyzes market data, price trends, news sentiment, technical indicators, macro correlations, and investment opportunities. Use when researching cryptocurrencies, analyzing crypto markets,

Testing
14118

hono

by openstatusHQ

Efficiently develop Hono applications using Hono CLI. Supports documentation search, API reference lookup, request testing, and bundle optimization.

Testing
1257

webapp-testing

by anthropics

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

Testing
130255

lean4-theorem-proving

by cameronfreer

Use when developing Lean 4 proofs, facing type class synthesis errors, managing sorries/axioms, or searching mathlib - provides build-first workflow, instance management patterns (haveI/letI), and domain-specific tactics

Testing
9108