diff --git a/packages/erc20-watcher/src/indexer.ts b/packages/erc20-watcher/src/indexer.ts index aecc4728..f64bbc03 100644 --- a/packages/erc20-watcher/src/indexer.ts +++ b/packages/erc20-watcher/src/indexer.ts @@ -515,8 +515,9 @@ export class Indexer implements IndexerInterface { parentHash }: DeepPartial): Promise<[BlockProgress, DeepPartial[]]> { assert(blockHash); + assert(blockNumber); - const dbEvents = await this._baseIndexer.fetchEvents(blockHash, this.parseEventNameAndArgs.bind(this)); + const dbEvents = await this._baseIndexer.fetchEvents(blockHash, blockNumber, this.parseEventNameAndArgs.bind(this)); const block = { id, diff --git a/packages/uni-info-watcher/src/indexer.ts b/packages/uni-info-watcher/src/indexer.ts index bc154397..06ef46f8 100644 --- a/packages/uni-info-watcher/src/indexer.ts +++ b/packages/uni-info-watcher/src/indexer.ts @@ -26,8 +26,7 @@ import { eventProcessingEthCallDuration, getFullTransaction, getFullBlock, - StateKind, - cachePrunedEntitiesCount + StateKind } from '@cerc-io/util'; import { EthClient } from '@cerc-io/ipld-eth-client'; import { StorageLayout, MappingKey } from '@cerc-io/solidity-mapper'; @@ -611,6 +610,7 @@ export class Indexer implements IndexerInterface { parentHash }: DeepPartial): Promise<[BlockProgress, DeepPartial[]]> { assert(blockHash); + assert(blockNumber); const events = await this._uniClient.getEvents(blockHash); @@ -624,7 +624,7 @@ export class Indexer implements IndexerInterface { await Promise.all( Array.from(txHashSet).map(async (txHash: any) => { - const transaction = await getFullTransaction(this._ethClient, txHash); + const transaction = await getFullTransaction(this._ethClient, txHash, blockNumber); transactionsMap.set(txHash, transaction); }) ); diff --git a/packages/uni-watcher/src/indexer.ts b/packages/uni-watcher/src/indexer.ts index 81f5ad05..ee556651 100644 --- a/packages/uni-watcher/src/indexer.ts +++ b/packages/uni-watcher/src/indexer.ts @@ -559,9 +559,10 @@ export class Indexer implements IndexerInterface { parentHash }: DeepPartial): Promise<[BlockProgress, DeepPartial[]]> { assert(blockHash); + assert(blockNumber); // serverConfig.filterLogs should not be set to allow fetching unknown events - const dbEvents = await this._baseIndexer.fetchEvents(blockHash, this.parseEventNameAndArgs.bind(this)); + const dbEvents = await this._baseIndexer.fetchEvents(blockHash, blockNumber, this.parseEventNameAndArgs.bind(this)); const block = { id,