Prompt

Can you recommend a testing framework for deterministic unit and integration tests on forked mainnet state?

Cryptocurrency & Web3 / Blockchain Infrastructure2 observationsLast seen Jul 22, 2026

Latest observation

Jul 22, 2026OpenAI APIWeb search: off

Yes — for deterministic unit + integration tests against forked mainnet state, my default recommendation is:

Foundry (forge)

It’s the best fit if you want:

  • Fast execution
  • Deterministic forks
  • Easy mainnet forking
  • Strong Solidity-native testing
  • Great cheatcodes for mocking, time travel, impersonation, storage edits, etc.

Why Foundry is a strong choice

  • Forking support is built in: you can pin to a specific block on mainnet, so tests always run against the same chain state.
  • Deterministic by default when you use a fixed fork URL + block number.
  • Excellent for integration tests involving real deployed contracts, token balances, Uniswap pools, lending protocols, etc.
  • Very fast compared with many JS-based frameworks.

Typical setup

You’d use:

  • anvil to run a local fork
  • forge test for unit/integration tests
  • a pinned block like:
    anvil --fork-url <RPC_URL> --fork-block-number <BLOCK>
    

When you might choose something else

Hardhat

Good if:

  • your team is already JS/TS-heavy
  • you need a very mature plugin ecosystem
  • you prefer writing tests in TypeScript

Hardhat can fork mainnet too, and can be deterministic if you pin block numbers, but it’s generally slower than Foundry for Solidity-first workflows.

Tenderly

Good for:

  • simulation/debugging
  • reproducing complex transaction sequences
  • richer visualization and tracing

But it’s more of a simulation/debug platform than a primary testing framework.

Recommendation summary

  • Best overall: Foundry
  • Best JS/TS option: Hardhat
  • Best for simulation/debugging: Tenderly

If you want, I can also give you:

  1. a Foundry fork-testing template, or
  2. a Foundry vs Hardhat comparison for your exact use case.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.