|
|
|
@ -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]; |
|
|
|
|
} |
|
|
|
|