Simulating Production State with Hardhat Mainnet Forking
Learn how to use Hardhat Mainnet Forking to simulate production environments, pin block numbers for deterministic testing, and impersonate live accounts for administrative testing.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to use Hardhat Mainnet Forking to simulate production environments, pin block numbers for deterministic testing, and impersonate live accounts for administrative testing.
Learn how Solidity’s `unchecked` block lets you skip automatic overflow checks for gas savings, when it’s safe to use, and a practical token transfer example that shows the trade‑offs and how to audit the code.
An architecture note on consuming Ethereum contract events with web3.js 4.x: why checkpointed getLogs polling beats naive subscriptions, how reorgs and the RPC trust boundary shape the design, and when to move to an indexer.
Learn how to use web3.js to send a contract transaction with automatic gas estimation, including code, pitfalls, and verification steps.
Vyper's @nonreentrant decorator gives you a storage-backed mutex with one line of code. This post shows a worked withdraw() example comparing manual checks-effects-interactions vs. the decorator, the gas/composability trade-offs, and a verification checklist to prove the lock actually holds.
Clarity's decidable, interpreted design means contract cost and termination are knowable before execution. Here's what that buys you — and where bounded iteration pushes back.
Replace require strings with Solidity custom errors (0.8.4+): declaration, revert syntax, Foundry/ethers decoding, gas verification, and migration pitfalls.
A practical web3.js guide to choosing between .call(), .send(), and getPastEvents — with version caveats, gas estimation, bounded log queries, and polling vs WebSocket trade-offs.
Learn how Solidity custom errors (since 0.8.4) replace costly revert strings with cheap, typed data, saving gas while keeping error messages readable off‑chain.