Blog, page 3
Notes on testing web3 products and on test automation.
-
Build realistic DeFi test data: fee-on-transfer, rebasing and blacklistable token mocks, forked mainnet state and failure scenarios, with Hardhat code.
-
Use gas ceilings, gas reports and snapshot tests to find and lock in gas savings in smart contracts, with measured Hardhat examples.
-
How to test upgradeable contracts: storage layout checks, proxy upgrade simulation, initializer tests, gas checks and a pre-upgrade checklist.
-
Set up automated smart contract tests with Hardhat and ethers v6, run them in GitHub Actions on every push, and add gas, fuzz and fork tests.
-
Budget for web3 testing: audits, QA salaries, infrastructure and gas, with sourced ranges and a sample annual budget for a mid-sized project.
-
How to test the contract-to-frontend flow in a dapp: a local Hardhat chain, an injected wallet provider, Playwright tests and a CI run, with a DEX swap example.