diff --git a/packages/ethereum/src/services/indexer/factory.ts b/packages/ethereum/src/services/indexer/factory.ts index a7ec5f8..3346661 100644 --- a/packages/ethereum/src/services/indexer/factory.ts +++ b/packages/ethereum/src/services/indexer/factory.ts @@ -14,6 +14,7 @@ import { IndexableEntityType, IndexerMsClient, IndexerWorkerDomainI, + NonceTimestamp, ParserMsClient, } from '@aleph-indexer/framework' import { EthereumParsedLog, EthereumParsedTransaction } from '../parser/src/types.js' @@ -46,6 +47,8 @@ export async function ethereumIndexerFactory( // Instances + const nonce = new NonceTimestamp() + const transactionFetcher = new EthereumIndexerTransactionFetcher( blockchainId, fetcherMsClient, @@ -53,6 +56,7 @@ export async function ethereumIndexerFactory( transactionRequestIncomingEntityDAL, transactionRequestPendingSignatureDAL, transactionRequestResponseDAL, + nonce ) const transactionFetcherMain = new BaseEntityIndexer( @@ -73,6 +77,7 @@ export async function ethereumIndexerFactory( logRequestIncomingEntityDAL, logRequestPendingSignatureDAL, logRequestResponseDAL, + nonce ) const logFetcherMain = new BaseEntityIndexer( diff --git a/packages/ethereum/src/services/indexer/src/logFetcher.ts b/packages/ethereum/src/services/indexer/src/logFetcher.ts index 3deacb4..a0b73f2 100644 --- a/packages/ethereum/src/services/indexer/src/logFetcher.ts +++ b/packages/ethereum/src/services/indexer/src/logFetcher.ts @@ -21,7 +21,7 @@ export class EthereumIndexerLogFetcher extends BaseIndexerEntityFetcher, protected logRequestPendingSignatureDAL: EntityRequestPendingEntityStorage, protected logRequestResponseDAL: EntityRequestResponseStorage, - protected nonce: NonceTimestamp = new NonceTimestamp(), + protected nonce: NonceTimestamp, ) { super( blockchainId, diff --git a/packages/ethereum/src/services/indexer/src/transactionFetcher.ts b/packages/ethereum/src/services/indexer/src/transactionFetcher.ts index 52bbda4..ffaae98 100644 --- a/packages/ethereum/src/services/indexer/src/transactionFetcher.ts +++ b/packages/ethereum/src/services/indexer/src/transactionFetcher.ts @@ -21,7 +21,7 @@ export class EthereumIndexerTransactionFetcher extends BaseIndexerEntityFetcher< protected transactionRequestIncomingTransactionDAL: EntityRequestIncomingEntityStorage, protected transactionRequestPendingSignatureDAL: EntityRequestPendingEntityStorage, protected transactionRequestResponseDAL: EntityRequestResponseStorage, - protected nonce: NonceTimestamp = new NonceTimestamp(), + protected nonce: NonceTimestamp, ) { super( blockchainId, diff --git a/packages/framework/src/services/indexer/src/entityFetcher.ts b/packages/framework/src/services/indexer/src/entityFetcher.ts index 2103f18..1a3fa30 100644 --- a/packages/framework/src/services/indexer/src/entityFetcher.ts +++ b/packages/framework/src/services/indexer/src/entityFetcher.ts @@ -71,7 +71,7 @@ export abstract class BaseIndexerEntityFetcher< protected entityRequestIncomingEntityDAL: EntityRequestIncomingEntityStorage, protected entityRequestPendingEntityDAL: EntityRequestPendingEntityStorage, protected entityRequestResponseDAL: EntityRequestResponseStorage, - protected nonce: NonceTimestamp = new NonceTimestamp(), + protected nonce: NonceTimestamp, ) { this.incomingEntities = new PendingWorkPool({ id: `${type}-indexer-incoming-entities`, diff --git a/packages/solana/src/services/indexer/factory.ts b/packages/solana/src/services/indexer/factory.ts index fa32cab..7ff721c 100644 --- a/packages/solana/src/services/indexer/factory.ts +++ b/packages/solana/src/services/indexer/factory.ts @@ -14,7 +14,8 @@ import { IndexerWorkerDomainI, ParserMsClient, BaseEntityIndexer, - BaseIndexer + BaseIndexer, + NonceTimestamp } from '@aleph-indexer/framework' import { SolanaParsedTransaction } from '../../types.js' import { SolanaIndexerTransactionFetcher } from './src/transactionFetcher.js' @@ -36,6 +37,8 @@ export async function solanaIndexerFactory( const transactionRequestResponseDAL = createEntityRequestResponseDAL(basePath, IndexableEntityType.Transaction) const transactionIndexerStateDAL = createEntityIndexerStateDAL(basePath, IndexableEntityType.Transaction) + const nonce = new NonceTimestamp() + const transactionFetcher = new SolanaIndexerTransactionFetcher( blockchainId, fetcherMsClient, @@ -43,6 +46,7 @@ export async function solanaIndexerFactory( transactionRequestIncomingTransactionDAL, transactionRequestPendingSignatureDAL, transactionRequestResponseDAL, + nonce ) const transactionFetcherMain = new BaseEntityIndexer( diff --git a/packages/solana/src/services/indexer/src/transactionFetcher.ts b/packages/solana/src/services/indexer/src/transactionFetcher.ts index 7a96f77..1c01874 100644 --- a/packages/solana/src/services/indexer/src/transactionFetcher.ts +++ b/packages/solana/src/services/indexer/src/transactionFetcher.ts @@ -21,7 +21,7 @@ export class SolanaIndexerTransactionFetcher extends BaseIndexerEntityFetcher, protected transactionRequestPendingSignatureDAL: EntityRequestPendingEntityStorage, protected transactionRequestResponseDAL: EntityRequestResponseStorage, - protected nonce: NonceTimestamp = new NonceTimestamp(), + protected nonce: NonceTimestamp, ) { super( blockchainId,