From 9841e92121a22f33459872f20f53a9ad55dfe8eb Mon Sep 17 00:00:00 2001 From: James Prestwich Date: Wed, 8 Sep 2021 14:21:50 -0700 Subject: [PATCH] bug: move assertion lower down --- typescript/optics-deploy/src/core/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/typescript/optics-deploy/src/core/index.ts b/typescript/optics-deploy/src/core/index.ts index 1fcb35fd3..8e6fb1fb4 100644 --- a/typescript/optics-deploy/src/core/index.ts +++ b/typescript/optics-deploy/src/core/index.ts @@ -29,12 +29,11 @@ function warn(text: string, padded: boolean = false) { } export async function deployUpgradeBeaconController(deploy: CoreDeploy) { - assert(deploy.contracts.upgradeBeaconController); - let factory = new contracts.UpgradeBeaconController__factory(deploy.deployer); deploy.contracts.upgradeBeaconController = await factory.deploy( deploy.overrides, ); + assert(deploy.contracts.upgradeBeaconController); await deploy.contracts.upgradeBeaconController.deployTransaction.wait( deploy.chain.confirmations, );