Skip to content

Commit

Permalink
fix: check for deployment address when error
Browse files Browse the repository at this point in the history
  • Loading branch information
leekt committed Jan 16, 2024
1 parent 4c9a493 commit 1f00aa7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/action/deployContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ export const deployToChain = async (
) {
throw new AlreadyDeployedError(address)
}
if (
expectedAddress &&
expectedAddress.toLowerCase() !== address.toLowerCase()
) {
throw new Error(
`Contract will be deployed at ${address.toLowerCase()} does not match expected address ${expectedAddress.toLowerCase()}`
)
}
throw new Error(
`Error calling contract ${DEPLOYER_CONTRACT_ADDRESS} : ${error}`
)
Expand Down

0 comments on commit 1f00aa7

Please sign in to comment.