Check ACM address (#1273)

pull/1277/head
Trevor Porter 2 years ago committed by GitHub
parent 625a09e39a
commit a0f45c614c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      typescript/sdk/src/deploy/router/HyperlaneRouterChecker.ts

@ -24,6 +24,7 @@ export class HyperlaneRouterChecker<
async checkChain(chain: Chain): Promise<void> {
await this.checkEnrolledRouters(chain);
await this.checkOwnership(chain);
await this.checkConnectionManager(chain);
}
async checkEnrolledRouters(chain: Chain): Promise<void> {
@ -39,6 +40,18 @@ export class HyperlaneRouterChecker<
);
}
async checkConnectionManager(chain: Chain): Promise<void> {
const router = this.app.getContracts(chain).router;
const expectedConnectionManager = this.configMap[chain].connectionManager;
const routerConnectionManager = await router.abacusConnectionManager();
utils.assert(
expectedConnectionManager === routerConnectionManager,
`Incorrect ConnectionManager for ${chain}. Expected ${expectedConnectionManager}, found ${routerConnectionManager}`,
);
}
ownables(chain: Chain): Ownable[] {
return [this.app.getContracts(chain).router];
}

Loading…
Cancel
Save