OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Replaying Ethereum Hacks

Replaying Ethereum Hacks is a Solidity and Hardhat repository of tests that replay historical Ethereum hack scenarios on a local Hardhat network forked from Ethereum mainnet, with instructions for transaction debugging through Tenderly.

Independent OpenViST project profile, based on linked sources.

Replaying Ethereum Hacks — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need a reproducible local Hardhat test for an included Ethereum hack scenario and can provide an archive-node URL.

Who it is for

  • Smart-contract developers investigating exploit behavior
  • Security researchers reproducing historical Ethereum scenarios
  • Educators creating transaction-level exploit demonstrations

Documented uses

  • Run a selected hack test against forked Ethereum mainnet state.
  • Inspect transaction behavior in a local replay environment.
  • Export a replay transaction to Tenderly for debugging.
  • Adapt replay cases into regression tests for contract changes.
Before you choose

Requirements & limits

  • The fork requires access to an Ethereum archive node and an ARCHIVE_URL environment variable.
  • Hack scenarios are implemented as tests in /test; review the repository to confirm it includes the case you need.
  • Tenderly export is a separately configured debugging workflow rather than part of the basic replay command.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up and run a selected hack test

Prepare the repository for a replay on a local fork of Ethereum mainnet and run a named Hardhat test.

Before you start

  • Node.js and npm
  • Access to an Ethereum archive node
  • An archive-node URL

Steps

  1. Install the repository dependencies with the command below.

    Documented command
    npm i
  2. Copy .env.template to .env and set ARCHIVE_URL to the Ethereum archival-node URL.

  3. Run the selected test with the command below.

    Documented command
    npx hardhat test test/.ts

Expected outcome

The selected repository test runs through Hardhat against the configured local mainnet fork.

Guide limitations

  • The README does not identify which specific hack scenarios are included; inspect /test to choose a test.
  • An archival-node URL is required for the fork.
Source-based practical guide

Export a replay transaction for Tenderly debugging

Use the documented Hardhat and Tenderly workflow to export a transaction from a replay scenario.

Before you start

  • A configured Tenderly project in tenderly.yaml
  • A local Hardhat node and a test scenario
  • Tenderly CLI access

Steps

  1. Configure tenderly.yaml in the repository root and follow the referenced Tenderly setup article.

  2. Start a local node with the command below.

    Documented command
    npx hardhat node
  3. Run a test against the local network; the README notes that explicit gas values may be needed to obtain a transaction ID rather than failing at gas estimation.

  4. Export the transaction with tenderly export --force.

Expected outcome

Tenderly receives the exported transaction artifact for debugging.

Guide limitations

  • This workflow requires local Tenderly configuration.
  • The README says --force is required to skip Tenderly's gas estimation check.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
MrToph/replaying-ethereum-hacks · Official homepage title · retained in its source language