From a4839a0cbc13d701cc235c0cbcc18dd2e6b2d210 Mon Sep 17 00:00:00 2001 From: t11s Date: Wed, 5 Jun 2024 09:46:51 -0700 Subject: [PATCH] fix: use legacy tx for postdeploy on garnet/redstone --- packages/cli/src/runDeploy.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/runDeploy.ts b/packages/cli/src/runDeploy.ts index ce9f48fb75..0f40ffa8cd 100644 --- a/packages/cli/src/runDeploy.ts +++ b/packages/cli/src/runDeploy.ts @@ -137,7 +137,13 @@ export async function runDeploy(opts: DeployOptions): Promise { modules, withWorldProxy: configV2.deploy.upgradeableWorldImplementation, }); + const chainId = await getChainId(client); if (opts.worldAddress == null || opts.alwaysRunPostDeploy) { + // Manual workaround for Garnet/Redstone which currently always require a + // non-zero priority fee. See: https://github.com/foundry-rs/foundry/issues/7806 + if (chainId == 17069 || chainId == 690) { + opts.forgeScriptOptions = (opts.forgeScriptOptions ?? "") + " --legacy"; + } await postDeploy( config.postDeployScript, worldDeploy.address, @@ -155,7 +161,6 @@ export async function runDeploy(opts: DeployOptions): Promise { }; if (opts.saveDeployment) { - const chainId = await getChainId(client); const deploysDir = path.join(config.deploysDirectory, chainId.toString()); mkdirSync(deploysDir, { recursive: true }); writeFileSync(path.join(deploysDir, "latest.json"), JSON.stringify(deploymentInfo, null, 2));