diff --git a/src/cli/config/options.ts b/src/cli/config/options.ts index 6e1e5e86..6c3079f4 100644 --- a/src/cli/config/options.ts +++ b/src/cli/config/options.ts @@ -469,7 +469,7 @@ export const debugOptions: CliCommandOptions = { "Should the bundler deploy the simulations contract on startup", type: "boolean", require: true, - default: false + default: true }, tenderly: { description: "RPC url follows the tenderly format", diff --git a/src/cli/deploySimulationsContract.ts b/src/cli/deploySimulationsContract.ts index da950b4f..9b9be004 100644 --- a/src/cli/deploySimulationsContract.ts +++ b/src/cli/deploySimulationsContract.ts @@ -24,6 +24,16 @@ export const deploySimulationsContract = async ({ ) } + if (args.entrypointSimulationContract) { + const simulations = args.entrypointSimulationContract + const simulationsCode = await publicClient.getCode({ + address: simulations + }) + if (simulationsCode !== undefined && simulationsCode !== "0x") { + return args.entrypointSimulationContract + } + } + const walletClient = createWalletClient({ transport: http(args.rpcUrl), account: utilityPrivateKey