From 518223ba85b9ddeeb58a2fb0b606d5ae93f7b7f1 Mon Sep 17 00:00:00 2001 From: Danylo Kanievskyi Date: Fri, 7 Jun 2024 00:20:35 +0300 Subject: [PATCH] temp: thegrpah logs 2 --- .../transactions-indexing/swaps-subgraph.ts | 2 +- src/lib/block-info.ts | 18 +++++++++++++++--- src/lib/swaps-tracker.ts | 2 +- src/lib/utils/helpers.ts | 5 +++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/scripts/gas-refund-program/transactions-indexing/swaps-subgraph.ts b/scripts/gas-refund-program/transactions-indexing/swaps-subgraph.ts index de04e055..b8ee9e82 100644 --- a/scripts/gas-refund-program/transactions-indexing/swaps-subgraph.ts +++ b/scripts/gas-refund-program/transactions-indexing/swaps-subgraph.ts @@ -129,7 +129,7 @@ export async function getSuccessfulSwaps({ : {}, ); - console.log('fetcSwaps', subgraphURL, variables); + console.log('fetcSwaps', subgraphURL, JSON.stringify(variables)); const { data } = await thegraphClient.post(subgraphURL, { query: regorgBlockHashes ? SwapsQueryBlockHash : SwapsQuery, variables, diff --git a/src/lib/block-info.ts b/src/lib/block-info.ts index 03d97e38..ed102d9b 100644 --- a/src/lib/block-info.ts +++ b/src/lib/block-info.ts @@ -66,7 +66,11 @@ export class BlockInfo { number_lt: lastFetchedBlock + 100, }; try { - console.log('updateBlockInfo', this.subgraphURL, variables); + console.log( + 'updateBlockInfo', + this.subgraphURL, + JSON.stringify(variables), + ); const { data: { data }, } = await Utils._post( @@ -100,7 +104,11 @@ export class BlockInfo { block, }; try { - console.log('getBlockTimeStamp', this.subgraphURL, variables); + console.log( + 'getBlockTimeStamp', + this.subgraphURL, + JSON.stringify(variables), + ); const { data: { data }, } = await thegraphClient.post( @@ -130,7 +138,11 @@ export class BlockInfo { time_gte: time, }; try { - console.log('getBlockAfterTimeStamp', this.subgraphURL, variables); + console.log( + 'getBlockAfterTimeStamp', + this.subgraphURL, + JSON.stringify(variables), + ); const { data: { data }, } = await Utils._post( diff --git a/src/lib/swaps-tracker.ts b/src/lib/swaps-tracker.ts index a8cf0432..8bd81cc2 100644 --- a/src/lib/swaps-tracker.ts +++ b/src/lib/swaps-tracker.ts @@ -154,7 +154,7 @@ export class SwapsTracker { number_lt: toBlock, }; - console.log('indexSwaps', this.subgraphURL, variables); + console.log('indexSwaps', this.subgraphURL, JSON.stringify(variables)); const { data: { data }, } = await Utils._post( diff --git a/src/lib/utils/helpers.ts b/src/lib/utils/helpers.ts index a4ff4f14..a870f901 100644 --- a/src/lib/utils/helpers.ts +++ b/src/lib/utils/helpers.ts @@ -103,6 +103,11 @@ export async function fetchBlocksTimestamps({ blocks: blockNumberSliced, }; + console.log( + 'fetchBlocksTimestamps', + subgraphURL, + JSON.stringify(variables), + ); const { data: { data }, } = await thegraphClient.post<{