Skip to content

Commit 871df7a

Browse files
committed
make core deploy work
1 parent a96448f commit 871df7a

6 files changed

Lines changed: 22 additions & 39 deletions

File tree

‎typescript/sdk/src/core/EvmCoreModule.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,10 @@ export class EvmCoreModule extends HyperlaneModule<
449449
const chainName = multiProvider.getChainName(chain);
450450

451451
const domain = multiProvider.getDomainId(chainName);
452-
const mailbox = await deployer.deployProxiedContract(
452+
const mailbox = await deployer.deployContractWithName(
453453
chainName,
454454
'mailbox',
455455
'mailbox',
456-
proxyAdmin,
457456
[domain],
458457
);
459458

‎typescript/sdk/src/core/HyperlaneCoreDeployer.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ export class HyperlaneCoreDeployer extends HyperlaneDeployer<
6868
proxyAdmin: Address,
6969
): Promise<Mailbox> {
7070
const domain = this.multiProvider.getDomainId(chain);
71-
const mailbox = await this.deployProxiedContract(
71+
const mailbox = await this.deployContractWithName(
7272
chain,
7373
'mailbox',
7474
'mailbox',
75-
proxyAdmin,
7675
[domain],
7776
);
7877

‎typescript/sdk/src/deploy/HyperlaneDeployer.ts‎

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import { ChainMap, ChainName } from '../types.js';
3939

4040
import {
4141
UpgradeConfig,
42-
isInitialized,
4342
isProxy,
4443
proxyAdmin,
4544
proxyConstructorArgs,
@@ -404,36 +403,25 @@ export abstract class HyperlaneDeployer<
404403
);
405404

406405
if (initializeArgs) {
407-
if (
408-
await isInitialized(
409-
this.multiProvider.getProvider(chain),
410-
contract.address,
411-
)
412-
) {
413-
this.logger.debug(
414-
`Skipping: Contract ${contractName} (${contract.address}) on ${chain} is already initialized`,
415-
);
416-
} else {
417-
this.logger.debug(
418-
`Initializing ${contractName} (${contract.address}) on ${chain}...`,
419-
);
406+
this.logger.debug(
407+
`Initializing ${contractName} (${contract.address}) on ${chain}...`,
408+
);
420409

421-
// Estimate gas for the initialize transaction
422-
const estimatedGas = await contract.estimateGas.initialize(
423-
...initializeArgs,
424-
);
410+
// Estimate gas for the initialize transaction
411+
const estimatedGas = await contract.estimateGas.initialize(
412+
...initializeArgs,
413+
);
425414

426-
// deploy with buffer on gas limit
427-
const overrides = this.multiProvider.getTransactionOverrides(chain);
428-
const initTx = await contract.initialize(...initializeArgs, {
429-
gasLimit: addBufferToGasLimit(estimatedGas),
430-
...overrides,
431-
});
432-
const receipt = await this.multiProvider.handleTx(chain, initTx);
433-
this.logger.debug(
434-
`Successfully initialized ${contractName} (${contract.address}) on ${chain}: ${receipt.transactionHash}`,
435-
);
436-
}
415+
// deploy with buffer on gas limit
416+
const overrides = this.multiProvider.getTransactionOverrides(chain);
417+
const initTx = await contract.initialize(...initializeArgs, {
418+
gasLimit: addBufferToGasLimit(estimatedGas),
419+
...overrides,
420+
});
421+
const receipt = await this.multiProvider.handleTx(chain, initTx);
422+
this.logger.debug(
423+
`Successfully initialized ${contractName} (${contract.address}) on ${chain}: ${receipt.transactionHash}`,
424+
);
437425
}
438426

439427
const verificationInput = getContractVerificationInput({

‎typescript/sdk/src/gas/HyperlaneIgpDeployer.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export class HyperlaneIgpDeployer extends HyperlaneDeployer<
4343
storageGasOracle: StorageGasOracle,
4444
config: IgpConfig,
4545
): Promise<InterchainGasPaymaster> {
46-
const igp = await this.deployProxiedContract(
46+
const igp = await this.deployContractWithName(
4747
chain,
4848
'interchainGasPaymaster',
4949
'interchainGasPaymaster',
50-
proxyAdmin.address,
5150
[],
5251
[await this.multiProvider.getSignerAddress(chain), config.beneficiary],
5352
);

‎typescript/sdk/src/hook/EvmHookModule.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,11 +999,10 @@ export class EvmHookModule extends HyperlaneModule<
999999
);
10001000

10011001
// Deploy the InterchainGasPaymaster
1002-
const igp = await this.deployer.deployProxiedContract(
1002+
const igp = await this.deployer.deployContractWithName(
10031003
this.chain,
10041004
HookType.INTERCHAIN_GAS_PAYMASTER,
10051005
HookType.INTERCHAIN_GAS_PAYMASTER,
1006-
this.args.addresses.proxyAdmin,
10071006
[],
10081007
[deployerAddress, config.beneficiary],
10091008
);

‎typescript/sdk/src/router/ProxiedRouterDeployer.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,10 @@ export abstract class ProxiedRouterDeployer<
137137
return;
138138
});
139139

140-
const proxiedRouter = await this.deployProxiedContract(
140+
const proxiedRouter = await this.deployContractWithName(
141141
chain,
142142
this.routerContractKey(config),
143143
this.routerContractName(config),
144-
proxyAdmin.address,
145144
await this.constructorArgs(chain, config),
146145
await this.initializeArgs(chain, config),
147146
);

0 commit comments

Comments
 (0)