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.
Requirements & limits
- The fork requires access to an Ethereum archive node and an
ARCHIVE_URLenvironment 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.
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
Install the repository dependencies with the command below.
npm iCopy
.env.templateto.envand setARCHIVE_URLto the Ethereum archival-node URL.Run the selected test with the command below.
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
/testto choose a test. - An archival-node URL is required for the fork.
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
Configure
tenderly.yamlin the repository root and follow the referenced Tenderly setup article.Start a local node with the command below.
npx hardhat nodeRun 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.
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
--forceis required to skip Tenderly's gas estimation check.
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

