Fix CLI e2e issue due to TestRecipient ISM (#3487)

### Description

Fix issue with TestRecipient deployment introduced in #3360 

### Drive-by changes

Skip SmartProvider tests

### Backward compatibility

Yes
pull/3488/head
J M Rossy 8 months ago committed by GitHub
parent 77de7abdd4
commit 7913d7224e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      typescript/sdk/src/core/CoreDeployer.hardhat-test.ts
  2. 6
      typescript/sdk/src/core/HyperlaneCoreDeployer.ts
  3. 7
      typescript/sdk/src/core/TestRecipientDeployer.ts
  4. 7
      typescript/sdk/src/deploy/HyperlaneDeployer.ts
  5. 2
      typescript/sdk/src/providers/SmartProvider/SmartProvider.test.ts

@ -113,7 +113,8 @@ describe('core', async () => {
// 3x1 for aggregation ISM deploy
// 3x1 for setting ISM transaction for mailbox
const numTransactions = 2 * TestChains.length;
// 3x1 for setting ISM transaction for test recipient
const numTransactions = 3 * TestChains.length;
const nonceAfter = await signer.getTransactionCount();
expect(nonceAfter).to.equal(nonceBefore + numTransactions);
});

@ -212,7 +212,6 @@ export class HyperlaneCoreDeployer extends HyperlaneDeployer<
chain: ChainName,
interchainSecurityModule?: IsmConfig,
): Promise<TestRecipient> {
this.testRecipient.cacheAddressesMap(this.cachedAddresses);
const testRecipient = await this.testRecipient.deployContracts(chain, {
interchainSecurityModule,
});
@ -249,7 +248,10 @@ export class HyperlaneCoreDeployer extends HyperlaneDeployer<
};
}
const testRecipient = await this.deployTestRecipient(chain);
const testRecipient = await this.deployTestRecipient(
chain,
this.cachedAddresses[chain].interchainSecurityModule,
);
const contracts = {
mailbox,

@ -26,7 +26,6 @@ export const testRecipientFactories = {
testRecipient: new TestRecipient__factory(),
};
// TODO move this and related configs to the SDK
export class TestRecipientDeployer extends HyperlaneDeployer<
TestRecipientConfig,
typeof testRecipientFactories
@ -45,8 +44,10 @@ export class TestRecipientDeployer extends HyperlaneDeployer<
chain: ChainName,
config: TestRecipientConfig,
): Promise<TestRecipientContracts> {
this.logger(`Deploying TestRecipient on ${chain}`, config);
const testRecipient = await this.deployContract(chain, 'testRecipient', []);
if (config.interchainSecurityModule) {
this.logger(`Checking TestRecipient ISM on ${chain}`);
await this.configureIsm(
chain,
testRecipient,
@ -54,6 +55,10 @@ export class TestRecipientDeployer extends HyperlaneDeployer<
(tr) => tr.interchainSecurityModule(),
(tr, ism) => tr.populateTransaction.setInterchainSecurityModule(ism),
);
} else {
this.logger(
`WARNING: No ISM config provided for TestRecipient on ${chain}`,
);
}
return {
testRecipient,

@ -659,18 +659,19 @@ export abstract class HyperlaneDeployer<
const current = await ownable.owner();
const owner = config.ownerOverrides?.[contractName as K] ?? config.owner;
if (!eqAddress(current, owner)) {
this.logger('Current owner and config owner to not match');
const receipt = await this.runIfOwner(chain, ownable, () => {
this.logger(
`Transferring ownership of ${contractName} to ${owner} on ${chain}`,
);
const receipt = await this.runIfOwner(chain, ownable, () =>
this.multiProvider.handleTx(
return this.multiProvider.handleTx(
chain,
ownable.transferOwnership(
owner,
this.multiProvider.getTransactionOverrides(chain),
),
),
);
});
if (receipt) receipts.push(receipt);
}
}

@ -41,7 +41,7 @@ const configs: [string, ChainMetadata][] = [
['Combined configs', combinedConfig],
];
describe('SmartProvider', () => {
describe.skip('SmartProvider', () => {
let provider: HyperlaneSmartProvider;
const itDoesIfSupported = (method: ProviderMethod, fn: () => any) => {

Loading…
Cancel
Save