Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Tests Solidity smart contracts with Hardhat and Foundry, covering unit, integration, fuzz, gas, coverage, and mainnet forking.
91% 95%+5 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
Write `beforeEach` and `afterEach` hooks in a Hardhat test file that capture an EVM state snapshot before each test and revert to that snapshot after each test completes.
Calls network.provider.send with evm_snapshot in beforeEach
3 of 3 safety checks passed
Master comprehensive testing strategies for smart contracts using Hardhat, Foundry, and advanced testing patterns.
// hardhat.config.js
require("@nomicfoundation/hardhat-toolbox");
require("@nomiclabs/hardhat-etherscan");
require("hardhat-gas-reporter");
require("solidity-coverage");
module.exports = {
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
hardhat: {
forking: {
url: process.env.MAINNET_RPC_URL,
blockNumber: 15000000
}
},
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.