diff --git a/typescript/optics-deploy/src/proxyUtils.ts b/typescript/optics-deploy/src/proxyUtils.ts index d3b7ff6ba..a8440bca5 100644 --- a/typescript/optics-deploy/src/proxyUtils.ts +++ b/typescript/optics-deploy/src/proxyUtils.ts @@ -1,11 +1,8 @@ import { BytesLike, ethers } from 'ethers'; import * as contracts from '@optics-xyz/ts-interface/dist/optics-core'; +import { Deploy } from './deploy'; import { CoreDeploy } from './core/CoreDeploy'; -import { BridgeDeploy } from './bridge/BridgeDeploy'; -import TestBridgeDeploy from './bridge/TestBridgeDeploy'; - -type Deploy = CoreDeploy | BridgeDeploy | TestBridgeDeploy; export type ProxyNames = | 'Home' @@ -47,7 +44,7 @@ export type ProxyAddresses = { */ export async function deployProxy( name: ProxyNames, - deploy: Deploy, + deploy: Deploy, factory: ethers.ContractFactory, initData: BytesLike, ...deployArgs: any[] @@ -100,7 +97,7 @@ export async function deployProxy( */ export async function duplicate( name: ProxyNames, - deploy: Deploy, + deploy: Deploy, prev: BeaconProxy, initData: BytesLike, ): Promise> { @@ -131,7 +128,7 @@ export async function duplicate( */ export async function deployImplementation( name: ProxyNames, - deploy: Deploy, + deploy: Deploy, factory: ethers.ContractFactory, ...deployArgs: any[] ): Promise { @@ -177,7 +174,7 @@ export function overrideBeaconProxyImplementation( * @param deployArgs - The arguments to pass to the implementation constructor */ async function _deployImplementation( - deploy: Deploy, + deploy: Deploy, factory: ethers.ContractFactory, deployArgs: any[] ): Promise { @@ -195,7 +192,7 @@ async function _deployImplementation( * @param implementation - The implementation */ async function _deployBeacon( - deploy: Deploy, + deploy: Deploy, implementation: ethers.Contract, ): Promise { let factory = new contracts.UpgradeBeacon__factory(deploy.chain.deployer); @@ -219,7 +216,7 @@ async function _deployBeacon( * @param implementation - The implementation */ async function _deployProxy( - deploy: Deploy, + deploy: Deploy, beacon: contracts.UpgradeBeacon, initData: BytesLike, ): Promise {