From ba0122279bf96a817d68300da6986293ccd64975 Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Thu, 7 Nov 2024 14:26:57 -0500 Subject: [PATCH] feat: use message context in IGP derivation too (#4836) ### Description Speeds up IGP derivation in TS relayer ### Backward compatibility Yes ### Testing Manual --- .changeset/new-olives-applaud.md | 5 +++++ typescript/sdk/src/hook/EvmHookReader.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/new-olives-applaud.md 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,