Skip to content

Commit

Permalink
feat: wait for receipt of deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
adnpark committed Mar 7, 2024
1 parent b3722b8 commit 0242048
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/action/deployContracts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import chalk from "chalk"
import ora from "ora"
import { SmartAccountClient } from "permissionless"
import { SmartAccountClient, bundlerActions } from "permissionless"
import {
http,
Address,
Expand Down Expand Up @@ -88,6 +88,11 @@ export const deployToChain = async (
})
}
})

const bundlerClient = kernelAccountClient.extend(bundlerActions)
await bundlerClient.waitForUserOperationReceipt({
hash: opHash
})
return [getAddress(result.data as Address), opHash]
}

Expand Down

0 comments on commit 0242048

Please sign in to comment.