From 0acf138d79f5edd2a31b4ab6d61d33052aeb527a Mon Sep 17 00:00:00 2001 From: Noisekit Date: Tue, 29 Oct 2024 13:37:02 +1100 Subject: [PATCH] Catch 0x Multicall return in withERC7412 helper --- liquidity/lib/withERC7412/withERC7412.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liquidity/lib/withERC7412/withERC7412.ts b/liquidity/lib/withERC7412/withERC7412.ts index 86ff8054..e4096630 100644 --- a/liquidity/lib/withERC7412/withERC7412.ts +++ b/liquidity/lib/withERC7412/withERC7412.ts @@ -359,6 +359,9 @@ export async function erc7412Call( delete newCall._calls; const res = await provider.call(newCall); + if (res === '0x') { + throw new Error(`[${label}] Call returned 0x`); + } if (newCall.to?.toLowerCase() === Multicall3Contract.address.toLowerCase()) { // If this was a multicall, decode and remove price updates.