Skip to content

Commit

Permalink
fix: use ism.route(message) for supporting self relay of ICA ISM (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
yorhodes authored Oct 28, 2024
1 parent f9919c4 commit 56328e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sweet-houses-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': patch
---

Fix ICA ISM self relay
4 changes: 3 additions & 1 deletion typescript/sdk/src/ism/EvmIsmReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit 56328e6

Please sign in to comment.