feat(simulator): agent simulation with forked mainnet support#90
Merged
memplethee-lab merged 1 commit intoJun 24, 2026
Merged
Conversation
…XXL#69) - Add timeScaleFactor to CreateSimulationDto and Simulation entity for time-scaled (fast-forward) block simulation - Add replayTxHashes to RunSimulationDto and Simulation entity for historical transaction replay - Implement replayTransactions() to fetch and record real on-chain tx data by hash with replayed flag - Add GET /simulator/:id/export endpoint for full JSON report export - Update comparison report to distinguish simulated vs replayed tx counts - Switch to named ethers v6 imports (JsonRpcProvider, formatEther, formatUnits) - Add 15 unit tests covering all new and existing behaviour
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enhances the simulator module to fully satisfy issue #69.
Changes
timeScaleFactorfield onCreateSimulationDtoand entity; controls fast-forward speed for block processingreplayTxHashesonRunSimulationDto; fetches real historical tx + receipt by hash and records them with areplayedflagGET /simulator/:id/exportreturns the full simulation data as a structured JSON reportimport { ethers }namespace to named imports (JsonRpcProvider,formatEther,formatUnits)Acceptance criteria met
blocksToSimulate)GET /simulator/:id/exporttimeScaleFactorreplayTxHashesCloses #69