From f3d0fe1cff23f59a6fe819ce9be70e675c8fb9a0 Mon Sep 17 00:00:00 2001 From: yawhide <5014112+yawhide@users.noreply.github.com> Date: Tue, 9 Jan 2024 20:38:50 -0500 Subject: [PATCH] Log simulation errors --- rocketarb.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rocketarb.mjs b/rocketarb.mjs index 0161935..1c7424c 100755 --- a/rocketarb.mjs +++ b/rocketarb.mjs @@ -639,7 +639,10 @@ if (options.dryRun) { console.log(`Target block number: ${targetBlockNumber}`) const signedBundle = await flashbotsProvider.signBundle(bundle) const simulation = await flashbotsProvider.simulate(signedBundle, targetBlockNumber) - console.log(JSON.stringify(simulation, null, 2)) + console.log(`Simulation results: ${JSON.stringify(simulation, null, 2)}`) + if ('error' in simulation) { + console.error(`Simulation error: ${simulation.error.message}`) + } } else { if (!options.yes) {