Skip to content

Commit

Permalink
#1748 fixing compatibiliti with geth prestate
Browse files Browse the repository at this point in the history
  • Loading branch information
kladkogex committed Dec 27, 2023
1 parent a28ca6d commit b84fab3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/historicstate/hardhat/scripts/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ let CALL_TRACER = "callTracer";
let PRESTATE_TRACER = "prestateTracer";
let PRESTATEDIFF_TRACER = "prestateDiffTracer";
let FOUR_BYTE_TRACER = "4byteTracer";
let REPLAY_TRACER = "replayTracer"


async function getTraceJsonOptions(_tracer: string): Promise<object> {
Expand All @@ -45,6 +46,7 @@ const TEST_CONTRACT_CALL_CALLTRACER_FILE_NAME = TEST_CONTRACT_NAME + "." + CALL_
const TEST_CONTRACT_CALL_PRESTATETRACER_FILE_NAME = TEST_CONTRACT_NAME + "." + CALL_FUNCTION_NAME + ".prestateTracer.json";
const TEST_CONTRACT_CALL_PRESTATEDIFFTRACER_FILE_NAME = TEST_CONTRACT_NAME + "." + CALL_FUNCTION_NAME + ".prestateDiffTracer.json";
const TEST_CONTRACT_CALL_FOURBYTETRACER_FILE_NAME = TEST_CONTRACT_NAME + "." + CALL_FUNCTION_NAME + ".4byteTracer.json";
const TEST_CONTRACT_CALL_REPLAYTRACER_FILE_NAME = TEST_CONTRACT_NAME + "." + CALL_FUNCTION_NAME + ".replayTracer.json";

async function deleteAndRecreateDirectory(dirPath: string): Promise<void> {
try {
Expand Down Expand Up @@ -484,6 +486,9 @@ async function main(): Promise<void> {
await callDebugTraceCall(deployedContract, FOUR_BYTE_TRACER, TEST_CONTRACT_CALL_FOURBYTETRACER_FILE_NAME);
await callDebugTraceCall(deployedContract, PRESTATE_TRACER, TEST_CONTRACT_CALL_PRESTATETRACER_FILE_NAME);
await callDebugTraceCall(deployedContract, PRESTATEDIFF_TRACER, TEST_CONTRACT_CALL_PRESTATEDIFFTRACER_FILE_NAME);
await callDebugTraceCall(deployedContract, REPLAY_TRACER, TEST_CONTRACT_CALL_REPLAYTRACER_FILE_NAME);



await verifyDefaultTraceAgainstGethTrace(TEST_CONTRACT_DEPLOY_FILE_NAME)
await verifyDefaultTraceAgainstGethTrace(TEST_CONTRACT_RUN_FILE_NAME)
Expand Down

0 comments on commit b84fab3

Please sign in to comment.