diff --git a/.changeset/new-olives-applaud.md b/.changeset/new-olives-applaud.md new file mode 100644 index 000000000..c0f18e6d3 --- /dev/null +++ b/.changeset/new-olives-applaud.md @@ -0,0 +1,5 @@ +--- +"@hyperlane-xyz/sdk": patch +--- + +feat: use message context in hook reader IGP derivation diff --git a/typescript/sdk/src/hook/EvmHookReader.ts b/typescript/sdk/src/hook/EvmHookReader.ts index f84eecc8a..9ebcd8ae0 100644 --- a/typescript/sdk/src/hook/EvmHookReader.ts +++ b/typescript/sdk/src/hook/EvmHookReader.ts @@ -243,7 +243,9 @@ export class EvmHookReader extends HyperlaneReader implements HookReader { let oracleKey: string | undefined; - const domainIds = this.multiProvider.getKnownDomainIds(); + const domainIds = this.messageContext + ? [this.messageContext.parsed.destination] + : this.multiProvider.getKnownDomainIds(); const allKeys = await concurrentMap( this.concurrency,