chore: pass concurrentDeploy to more deployers (#4378)

resolves https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/4350
pull/4379/head
Paul Balaji 3 months ago committed by GitHub
parent 86b1c7646c
commit aaae6b5921
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      typescript/helloworld/src/deploy/deploy.ts
  2. 29
      typescript/infra/scripts/deploy.ts
  3. 2
      typescript/infra/src/deployment/testcontracts/testquerysender.ts
  4. 2
      typescript/sdk/src/core/HyperlaneCoreDeployer.ts
  5. 2
      typescript/sdk/src/core/TestRecipientDeployer.ts
  6. 2
      typescript/sdk/src/deploy/HyperlaneProxyFactoryDeployer.ts
  7. 3
      typescript/sdk/src/hook/HyperlaneHookDeployer.ts
  8. 3
      typescript/sdk/src/middleware/liquidity-layer/LiquidityLayerRouterDeployer.ts
  9. 2
      typescript/sdk/src/middleware/query/InterchainQueryDeployer.ts
  10. 4
      typescript/sdk/src/token/deploy.ts

@ -22,10 +22,12 @@ export class HelloWorldDeployer extends HyperlaneRouterDeployer<
multiProvider: MultiProvider,
readonly ismFactory?: HyperlaneIsmFactory,
readonly contractVerifier?: ContractVerifier,
concurrentDeploy = false,
) {
super(multiProvider, helloWorldFactories, {
ismFactory,
contractVerifier,
concurrentDeploy,
});
}

@ -112,6 +112,7 @@ async function main() {
deployer = new HyperlaneProxyFactoryDeployer(
multiProvider,
contractVerifier,
concurrentDeploy,
);
} else if (module === Modules.CORE) {
config = envConfig.core;
@ -138,6 +139,7 @@ async function main() {
multiProvider,
ismFactory,
contractVerifier,
concurrentDeploy,
);
} else if (module === Modules.INTERCHAIN_GAS_PAYMASTER) {
config = envConfig.igp;
@ -159,7 +161,11 @@ async function main() {
} else if (module === Modules.INTERCHAIN_QUERY_SYSTEM) {
const { core } = await getHyperlaneCore(environment, multiProvider);
config = core.getRouterConfig(envConfig.owners);
deployer = new InterchainQueryDeployer(multiProvider, contractVerifier);
deployer = new InterchainQueryDeployer(
multiProvider,
contractVerifier,
concurrentDeploy,
);
} else if (module === Modules.LIQUIDITY_LAYER) {
const { core } = await getHyperlaneCore(environment, multiProvider);
const routerConfig = core.getRouterConfig(envConfig.owners);
@ -173,7 +179,11 @@ async function main() {
...routerConfig[chain],
}),
);
deployer = new LiquidityLayerDeployer(multiProvider, contractVerifier);
deployer = new LiquidityLayerDeployer(
multiProvider,
contractVerifier,
concurrentDeploy,
);
} else if (module === Modules.TEST_RECIPIENT) {
const addresses = getAddresses(environment, Modules.CORE);
@ -184,7 +194,11 @@ async function main() {
ethers.constants.AddressZero, // ISM is required for the TestRecipientDeployer but onchain if the ISM is zero address, then it uses the mailbox's defaultISM
};
}
deployer = new TestRecipientDeployer(multiProvider, contractVerifier);
deployer = new TestRecipientDeployer(
multiProvider,
contractVerifier,
concurrentDeploy,
);
} else if (module === Modules.TEST_QUERY_SENDER) {
// Get query router addresses
const queryAddresses = getAddresses(
@ -194,7 +208,11 @@ async function main() {
config = objMap(queryAddresses, (_c, conf) => ({
queryRouterAddress: conf.router,
}));
deployer = new TestQuerySenderDeployer(multiProvider, contractVerifier);
deployer = new TestQuerySenderDeployer(
multiProvider,
contractVerifier,
concurrentDeploy,
);
} else if (module === Modules.HELLO_WORLD) {
const { core } = await getHyperlaneCore(environment, multiProvider);
config = core.getRouterConfig(envConfig.owners);
@ -202,6 +220,7 @@ async function main() {
multiProvider,
undefined,
contractVerifier,
concurrentDeploy,
);
} else if (module === Modules.HOOK) {
const ismFactory = HyperlaneIsmFactory.fromAddressesMap(
@ -212,6 +231,8 @@ async function main() {
multiProvider,
getEnvAddresses(environment),
ismFactory,
contractVerifier,
concurrentDeploy,
);
// Config is intended to be changed for ad-hoc use cases:
config = {

@ -19,9 +19,11 @@ export class TestQuerySenderDeployer extends HyperlaneDeployer<
constructor(
multiProvider: MultiProvider,
contractVerifier?: ContractVerifier,
concurrentDeploy = false,
) {
super(multiProvider, TEST_QUERY_SENDER_FACTORIES, {
contractVerifier,
concurrentDeploy,
});
}

@ -47,10 +47,12 @@ export class HyperlaneCoreDeployer extends HyperlaneDeployer<
{},
ismFactory,
contractVerifier,
concurrentDeploy,
);
this.testRecipient = new TestRecipientDeployer(
multiProvider,
contractVerifier,
concurrentDeploy,
);
}

@ -31,10 +31,12 @@ export class TestRecipientDeployer extends HyperlaneDeployer<
constructor(
multiProvider: MultiProvider,
contractVerifier?: ContractVerifier,
concurrentDeploy = false,
) {
super(multiProvider, testRecipientFactories, {
logger: rootLogger.child({ module: 'TestRecipientDeployer' }),
contractVerifier,
concurrentDeploy,
});
}

@ -19,10 +19,12 @@ export class HyperlaneProxyFactoryDeployer extends HyperlaneDeployer<
constructor(
multiProvider: MultiProvider,
contractVerifier?: ContractVerifier,
concurrentDeploy: boolean = false,
) {
super(multiProvider, proxyFactoryFactories, {
logger: rootLogger.child({ module: 'IsmFactoryDeployer' }),
contractVerifier,
concurrentDeploy,
});
}

@ -48,14 +48,17 @@ export class HyperlaneHookDeployer extends HyperlaneDeployer<
readonly core: ChainMap<Partial<CoreAddresses>>,
readonly ismFactory: HyperlaneIsmFactory,
contractVerifier?: ContractVerifier,
concurrentDeploy = false,
readonly igpDeployer = new HyperlaneIgpDeployer(
multiProvider,
contractVerifier,
concurrentDeploy,
),
) {
super(multiProvider, hookFactories, {
logger: rootLogger.child({ module: 'HookDeployer' }),
contractVerifier,
concurrentDeploy,
});
}

@ -62,11 +62,14 @@ export class LiquidityLayerDeployer extends ProxiedRouterDeployer<
constructor(
multiProvider: MultiProvider,
contractVerifier?: ContractVerifier,
concurrentDeploy = false,
) {
super(multiProvider, liquidityLayerFactories, {
contractVerifier,
concurrentDeploy,
});
}
routerContractName(): string {
return 'LiquidityLayerRouter';
}

@ -22,9 +22,11 @@ export class InterchainQueryDeployer extends ProxiedRouterDeployer<
constructor(
multiProvider: MultiProvider,
contractVerifier?: ContractVerifier,
concurrentDeploy = false,
) {
super(multiProvider, interchainQueryFactories, {
contractVerifier,
concurrentDeploy,
});
}

@ -46,11 +46,13 @@ abstract class TokenDeployer<
loggerName: string,
ismFactory?: HyperlaneIsmFactory,
contractVerifier?: ContractVerifier,
concurrentDeploy = false,
) {
super(multiProvider, factories, {
logger: rootLogger.child({ module: loggerName }),
ismFactory,
contractVerifier,
concurrentDeploy,
}); // factories not used in deploy
}
@ -184,6 +186,7 @@ export class HypERC20Deployer extends TokenDeployer<HypERC20Factories> {
multiProvider: MultiProvider,
ismFactory?: HyperlaneIsmFactory,
contractVerifier?: ContractVerifier,
concurrentDeploy = false,
) {
super(
multiProvider,
@ -191,6 +194,7 @@ export class HypERC20Deployer extends TokenDeployer<HypERC20Factories> {
'HypERC20Deployer',
ismFactory,
contractVerifier,
concurrentDeploy,
);
}

Loading…
Cancel
Save