From 00af4c4c652e6379dd6cd91a5a5e8e06da1cf415 Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Wed, 22 May 2024 09:07:54 -0700 Subject: [PATCH] fix: uniswap v3 pair check universal router --- src/commands/detectContextualizers.ts | 4 +--- src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/detectContextualizers.ts b/src/commands/detectContextualizers.ts index 50c0a398..f7e62e76 100644 --- a/src/commands/detectContextualizers.ts +++ b/src/commands/detectContextualizers.ts @@ -16,9 +16,7 @@ export function registerDetectContextualizersCommand() { const txResult = contextualizer.contextualize(transaction, true); if (!txResult.from) { - console.error( - `No matching protocol contextualizer on ${transaction.hash}`, - ); + console.error(`No matching contextualizer on ${transaction.hash}`); } console.log('Successfully ran contextualizers'); diff --git a/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts b/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts index 549bc3f1..31d3f367 100644 --- a/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts +++ b/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts @@ -57,6 +57,7 @@ export const generate = (transaction: Transaction): Transaction => { const sender: string = decoded.args['sender'].toLowerCase(); const recipient: string = decoded.args['recipient'].toLowerCase(); const isUniversalRouter = + UNIVERSAL_ROUTERS[transaction.chainId] && UNIVERSAL_ROUTERS[transaction.chainId].includes(sender); if ( !transaction.netAssetTransfers[sender] ||