From 815e38fb2f85d2aaad6f1b202bb068c2621b921c Mon Sep 17 00:00:00 2001 From: teddy Date: Mon, 16 Dec 2024 17:24:57 -0300 Subject: [PATCH] Fix: broadcast create transaction (#6) * chore: log contract deploy address * fix: (foundry breaking change) create requires a --broadcast flag now * fix: fix review issue by krzkaczor --- src/periphery/forge/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/periphery/forge/index.ts b/src/periphery/forge/index.ts index 2d1c01f..2a2c4c4 100644 --- a/src/periphery/forge/index.ts +++ b/src/periphery/forge/index.ts @@ -1,3 +1,4 @@ +import core from '@actions/core' import { $ } from 'dax-sh' import { Address } from 'viem' @@ -7,6 +8,9 @@ export async function deployContract({ from, cwd, }: { contractName: string; rpc: string; from: Address; cwd: string }): Promise
{ - const result = await $`forge create --rpc-url ${rpc} --from ${from} ${contractName} --unlocked --json`.cwd(cwd).json() + const result = await $`forge create --broadcast --rpc-url ${rpc} --from ${from} ${contractName} --unlocked --json` + .cwd(cwd) + .json() + core.info(`Deployed spell ${contractName} to address ${result.deployedTo}`) return result.deployedTo }