bug: move assertion lower down

buddies-main-deployment
James Prestwich 3 years ago
parent 6053a6515e
commit 9841e92121
No known key found for this signature in database
GPG Key ID: 7CC174C250AD83AD
  1. 3
      typescript/optics-deploy/src/core/index.ts

@ -29,12 +29,11 @@ function warn(text: string, padded: boolean = false) {
} }
export async function deployUpgradeBeaconController(deploy: CoreDeploy) { export async function deployUpgradeBeaconController(deploy: CoreDeploy) {
assert(deploy.contracts.upgradeBeaconController);
let factory = new contracts.UpgradeBeaconController__factory(deploy.deployer); let factory = new contracts.UpgradeBeaconController__factory(deploy.deployer);
deploy.contracts.upgradeBeaconController = await factory.deploy( deploy.contracts.upgradeBeaconController = await factory.deploy(
deploy.overrides, deploy.overrides,
); );
assert(deploy.contracts.upgradeBeaconController);
await deploy.contracts.upgradeBeaconController.deployTransaction.wait( await deploy.contracts.upgradeBeaconController.deployTransaction.wait(
deploy.chain.confirmations, deploy.chain.confirmations,
); );

Loading…
Cancel
Save