@buidly/nestjs-transaction-processor
v0.0.1-alpha.2
Published
MultiversX NestJs Transaction Processor
Downloads
2
Readme
MultiversX NestJs Transaction Processor
TransactionProcessorModule.forRootAsync({
imports: [
ApiConfigModule,
DynamicModuleUtils.getCachingModule(),
],
inject: [ApiConfigService, CachingService],
useFactory: (apiConfigService: ApiConfigService, cachingService: CachingService) => ({
gatewayUrl: apiConfigService.getApiUrl(),
maxLookBehind: apiConfigService.getTransactionProcessorMaxLookBehind(),
persistence: {
getLastProcessedNonce: async () => {
return await cachingService.getCache(`lastProcessedNonce`);
},
setLastProcessedNonce: async (nonce: number) => {
await cachingService.setCache(`lastProcessedNonce`, nonce, Constants.oneMonth());
},
},
}),
}),