Skip to content

Commit

Permalink
Fix: broadcast create transaction (#6)
Browse files Browse the repository at this point in the history
* chore: log contract deploy address

* fix: (foundry breaking change) create requires a  --broadcast flag now

* fix: fix review issue by krzkaczor
  • Loading branch information
0xteddybear authored Dec 16, 2024
1 parent d7cd124 commit 815e38f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/periphery/forge/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import core from '@actions/core'
import { $ } from 'dax-sh'
import { Address } from 'viem'

Expand All @@ -7,6 +8,9 @@ export async function deployContract({
from,
cwd,
}: { contractName: string; rpc: string; from: Address; cwd: string }): Promise<Address> {
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
}

0 comments on commit 815e38f

Please sign in to comment.