From e6f6eb25b1985c264d7095bbadef4144aacc5205 Mon Sep 17 00:00:00 2001 From: teddy Date: Fri, 13 Dec 2024 11:49:00 -0300 Subject: [PATCH 1/3] chore: log contract deploy address --- src/periphery/forge/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/periphery/forge/index.ts b/src/periphery/forge/index.ts index 2d1c01f..4a17995 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' @@ -8,5 +9,7 @@ export async function deployContract({ 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() + core.info(`Deployed spell ${contractName} to address ${result.deployedTo}`) + core.debug(`Deploy result: ${result}`) return result.deployedTo } From a2656e347001082db7457d50c0b5f9df1180932a Mon Sep 17 00:00:00 2001 From: teddy Date: Fri, 13 Dec 2024 12:12:55 -0300 Subject: [PATCH 2/3] fix: (foundry breaking change) create requires a --broadcast flag now --- src/periphery/forge/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/periphery/forge/index.ts b/src/periphery/forge/index.ts index 4a17995..74f3eaf 100644 --- a/src/periphery/forge/index.ts +++ b/src/periphery/forge/index.ts @@ -8,7 +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}`) core.debug(`Deploy result: ${result}`) return result.deployedTo From e75276a0a381bd2e980aeba5c58ddacfa65a01a7 Mon Sep 17 00:00:00 2001 From: teddy Date: Mon, 16 Dec 2024 17:23:01 -0300 Subject: [PATCH 3/3] fix: fix review issue by krzkaczor --- src/periphery/forge/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/periphery/forge/index.ts b/src/periphery/forge/index.ts index 74f3eaf..2a2c4c4 100644 --- a/src/periphery/forge/index.ts +++ b/src/periphery/forge/index.ts @@ -12,6 +12,5 @@ export async function deployContract({ .cwd(cwd) .json() core.info(`Deployed spell ${contractName} to address ${result.deployedTo}`) - core.debug(`Deploy result: ${result}`) return result.deployedTo }