fix: use `ism.route(message)` for supporting self relay of ICA ISM (#4772)

### Description

ICA ISM does not implement `module(uint32)` but rather `route(message)`.
This modifies ISM derivation with message context to use this function.

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

Yes

### Testing

Manual
pull/4775/head
Yorke Rhodes 4 weeks ago committed by GitHub
parent f9919c447e
commit 56328e6e13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .changeset/sweet-houses-type.md
  2. 4
      typescript/sdk/src/ism/EvmIsmReader.ts

@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': patch
---
Fix ICA ISM self relay

@ -148,7 +148,9 @@ export class EvmIsmReader extends HyperlaneReader implements IsmReader {
);
return;
}
const module = await ism.module(domainId);
const module = this.messageContext
? await ism.route(this.messageContext.message)
: await ism.module(domainId);
domains[chainName] = await this.deriveIsmConfig(module);
});

Loading…
Cancel
Save