From 924f35723f40d389290e115510cc387864b81665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20Mart=C3=ADnez?= Date: Wed, 7 May 2025 14:03:56 +0000 Subject: [PATCH] Fixes #4982 --- src.ts/providers/abstract-provider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src.ts/providers/abstract-provider.ts b/src.ts/providers/abstract-provider.ts index 0d75b435cc..c321def5ab 100644 --- a/src.ts/providers/abstract-provider.ts +++ b/src.ts/providers/abstract-provider.ts @@ -986,7 +986,7 @@ export class AbstractProvider implements Provider { } catch (error: any) { // CCIP Read OffchainLookup - if (!this.disableCcipRead && isCallException(error) && error.data && attempt >= 0 && blockTag === "latest" && transaction.to != null && dataSlice(error.data, 0, 4) === "0x556f1830") { + if (!this.disableCcipRead && isCallException(error) && error.data && attempt >= 0 && blockTag === "latest" && transaction.to != null && getBytes(error.data).length >= 4 && dataSlice(error.data, 0, 4) === "0x556f1830") { const data = error.data; const txSender = await resolveAddress(transaction.to, this);