Skip to content

Commit

Permalink
wait for contract deployment to avoid nonce too low error
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed Mar 6, 2024
1 parent 04a598f commit 37881f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/utils/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const userRegistryNames: Record<string, string> = {
brightid: 'BrightIdUserRegistry',
snapshot: 'SnapshotUserRegistry',
merkle: 'MerkleUserRegistry',
semaphore: 'SemaphoreUserRegistry',
}

// Mapping of recipient registry type to the contract name
Expand Down Expand Up @@ -93,7 +94,9 @@ export async function deployPoseidon({
signer
)

return Poseidon.deploy()
const poseidonContract = await Poseidon.deploy()

return await poseidonContract.waitForDeployment()
}

export type deployContractOptions = {
Expand Down

0 comments on commit 37881f4

Please sign in to comment.