@subql/node-ethereum 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ const schedule_1 = require("@nestjs/schedule");
15
15
  const node_core_1 = require("@subql/node-core");
16
16
  const x_sequelize_1 = require("@subql/x-sequelize");
17
17
  const configure_module_1 = require("../configure/configure.module");
18
+ const ethereum_1 = require("../ethereum");
18
19
  const ds_processor_service_1 = require("../indexer/ds-processor.service");
19
20
  const dynamic_ds_service_1 = require("../indexer/dynamic-ds.service");
20
21
  const unfinalizedBlocks_service_1 = require("../indexer/unfinalizedBlocks.service");
@@ -42,10 +43,21 @@ exports.ReindexFeatureModule = ReindexFeatureModule = __decorate([
42
43
  useClass: dynamic_ds_service_1.DynamicDsService,
43
44
  },
44
45
  ds_processor_service_1.DsProcessorService,
46
+ node_core_1.ConnectionPoolStateManager,
47
+ node_core_1.ConnectionPoolService,
45
48
  {
46
- // Used to work with DI for unfinalizedBlocksService but not used with reindex
47
49
  provide: node_core_1.ApiService,
48
- useFactory: () => undefined,
50
+ useFactory: async (project, connectionPoolService, eventEmitter, nodeConfig) => {
51
+ const apiService = new ethereum_1.EthereumApiService(project, connectionPoolService, eventEmitter, nodeConfig);
52
+ await apiService.init();
53
+ return apiService;
54
+ },
55
+ inject: [
56
+ 'ISubqueryProject',
57
+ node_core_1.ConnectionPoolService,
58
+ event_emitter_1.EventEmitter2,
59
+ node_core_1.NodeConfig,
60
+ ],
49
61
  },
50
62
  schedule_1.SchedulerRegistry,
51
63
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"reindex.module.js","sourceRoot":"","sources":["../../src/subcommands/reindex.module.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;;;;;;;AAEnC,2CAAwC;AACxC,yDAA0E;AAC1E,+CAAqD;AACrD,gDAS0B;AAC1B,oDAA+C;AAC/C,oEAAgE;AAChE,0EAAqE;AACrE,sEAAiE;AACjE,oFAAgF;AA+BzE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oDAAoB;+BAApB,oBAAoB;IA7BhC,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,UAAU,EAAE,6BAAiB;gBAC7B,MAAM,EAAE,CAAC,sBAAU,EAAE,6BAAa,EAAE,4BAAiB,EAAE,uBAAS,CAAC;aAClE;YACD,wBAAY;YACZ,0BAAc;YACd,sBAAU;YACV,6BAAiB;YACjB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,oDAAwB;aACnC;YACD;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,QAAQ,EAAE,qCAAgB;aAC3B;YACD,yCAAkB;YAClB;gBACE,8EAA8E;gBAC9E,OAAO,EAAE,sBAAU;gBACnB,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS;aAC5B;YACD,4BAAiB;SAClB;QACD,WAAW,EAAE,EAAE;KAChB,CAAC;GACW,oBAAoB,CAAG;AAW7B,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IATzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,oBAAQ,CAAC,OAAO,EAAE;YAClB,kCAAe,CAAC,QAAQ,EAAE;YAC1B,oBAAoB;YACpB,kCAAkB,CAAC,OAAO,EAAE;SAC7B;QACD,WAAW,EAAE,EAAE;KAChB,CAAC;GACW,aAAa,CAAG","sourcesContent":["// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport { Module } from '@nestjs/common';\nimport { EventEmitter2, EventEmitterModule } from '@nestjs/event-emitter';\nimport { SchedulerRegistry } from '@nestjs/schedule';\nimport {\n ApiService,\n DbModule,\n ForceCleanService,\n StoreService,\n ReindexService,\n PoiService,\n NodeConfig,\n storeModelFactory,\n} from '@subql/node-core';\nimport { Sequelize } from '@subql/x-sequelize';\nimport { ConfigureModule } from '../configure/configure.module';\nimport { DsProcessorService } from '../indexer/ds-processor.service';\nimport { DynamicDsService } from '../indexer/dynamic-ds.service';\nimport { UnfinalizedBlocksService } from '../indexer/unfinalizedBlocks.service';\n\n@Module({\n providers: [\n {\n provide: 'IStoreModelProvider',\n useFactory: storeModelFactory,\n inject: [NodeConfig, EventEmitter2, SchedulerRegistry, Sequelize],\n },\n StoreService,\n ReindexService,\n PoiService,\n ForceCleanService,\n {\n provide: 'UnfinalizedBlocksService',\n useClass: UnfinalizedBlocksService,\n },\n {\n provide: 'DynamicDsService',\n useClass: DynamicDsService,\n },\n DsProcessorService,\n {\n // Used to work with DI for unfinalizedBlocksService but not used with reindex\n provide: ApiService,\n useFactory: () => undefined,\n },\n SchedulerRegistry,\n ],\n controllers: [],\n})\nexport class ReindexFeatureModule {}\n\n@Module({\n imports: [\n DbModule.forRoot(),\n ConfigureModule.register(),\n ReindexFeatureModule,\n EventEmitterModule.forRoot(),\n ],\n controllers: [],\n})\nexport class ReindexModule {}\n"]}
1
+ {"version":3,"file":"reindex.module.js","sourceRoot":"","sources":["../../src/subcommands/reindex.module.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,mCAAmC;;;;;;;;;AAEnC,2CAAwC;AACxC,yDAA0E;AAC1E,+CAAqD;AACrD,gDAW0B;AAC1B,oDAA+C;AAC/C,oEAAgE;AAEhE,0CAAiD;AAEjD,0EAAqE;AACrE,sEAAiE;AACjE,oFAAgF;AAoDzE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oDAAoB;+BAApB,oBAAoB;IAlDhC,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,UAAU,EAAE,6BAAiB;gBAC7B,MAAM,EAAE,CAAC,sBAAU,EAAE,6BAAa,EAAE,4BAAiB,EAAE,uBAAS,CAAC;aAClE;YACD,wBAAY;YACZ,0BAAc;YACd,sBAAU;YACV,6BAAiB;YACjB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,oDAAwB;aACnC;YACD;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,QAAQ,EAAE,qCAAgB;aAC3B;YACD,yCAAkB;YAClB,sCAA0B;YAC1B,iCAAqB;YACrB;gBACE,OAAO,EAAE,sBAAU;gBACnB,UAAU,EAAE,KAAK,EACf,OAAwB,EACxB,qBAAmE,EACnE,YAA2B,EAC3B,UAAsB,EACtB,EAAE;oBACF,MAAM,UAAU,GAAG,IAAI,6BAAkB,CACvC,OAAO,EACP,qBAAqB,EACrB,YAAY,EACZ,UAAU,CACX,CAAC;oBACF,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;oBACxB,OAAO,UAAU,CAAC;gBACpB,CAAC;gBACD,MAAM,EAAE;oBACN,kBAAkB;oBAClB,iCAAqB;oBACrB,6BAAa;oBACb,sBAAU;iBACX;aACF;YACD,4BAAiB;SAClB;QACD,WAAW,EAAE,EAAE;KAChB,CAAC;GACW,oBAAoB,CAAG;AAW7B,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IATzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,oBAAQ,CAAC,OAAO,EAAE;YAClB,kCAAe,CAAC,QAAQ,EAAE;YAC1B,oBAAoB;YACpB,kCAAkB,CAAC,OAAO,EAAE;SAC7B;QACD,WAAW,EAAE,EAAE;KAChB,CAAC;GACW,aAAa,CAAG","sourcesContent":["// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors\n// SPDX-License-Identifier: GPL-3.0\n\nimport { Module } from '@nestjs/common';\nimport { EventEmitter2, EventEmitterModule } from '@nestjs/event-emitter';\nimport { SchedulerRegistry } from '@nestjs/schedule';\nimport {\n ApiService,\n DbModule,\n ForceCleanService,\n StoreService,\n ReindexService,\n PoiService,\n NodeConfig,\n storeModelFactory,\n ConnectionPoolService,\n ConnectionPoolStateManager,\n} from '@subql/node-core';\nimport { Sequelize } from '@subql/x-sequelize';\nimport { ConfigureModule } from '../configure/configure.module';\nimport { SubqueryProject } from '../configure/SubqueryProject';\nimport { EthereumApiService } from '../ethereum';\nimport { EthereumApiConnection } from '../ethereum/api.connection';\nimport { DsProcessorService } from '../indexer/ds-processor.service';\nimport { DynamicDsService } from '../indexer/dynamic-ds.service';\nimport { UnfinalizedBlocksService } from '../indexer/unfinalizedBlocks.service';\n\n@Module({\n providers: [\n {\n provide: 'IStoreModelProvider',\n useFactory: storeModelFactory,\n inject: [NodeConfig, EventEmitter2, SchedulerRegistry, Sequelize],\n },\n StoreService,\n ReindexService,\n PoiService,\n ForceCleanService,\n {\n provide: 'UnfinalizedBlocksService',\n useClass: UnfinalizedBlocksService,\n },\n {\n provide: 'DynamicDsService',\n useClass: DynamicDsService,\n },\n DsProcessorService,\n ConnectionPoolStateManager,\n ConnectionPoolService,\n {\n provide: ApiService,\n useFactory: async (\n project: SubqueryProject,\n connectionPoolService: ConnectionPoolService<EthereumApiConnection>,\n eventEmitter: EventEmitter2,\n nodeConfig: NodeConfig,\n ) => {\n const apiService = new EthereumApiService(\n project,\n connectionPoolService,\n eventEmitter,\n nodeConfig,\n );\n await apiService.init();\n return apiService;\n },\n inject: [\n 'ISubqueryProject',\n ConnectionPoolService,\n EventEmitter2,\n NodeConfig,\n ],\n },\n SchedulerRegistry,\n ],\n controllers: [],\n})\nexport class ReindexFeatureModule {}\n\n@Module({\n imports: [\n DbModule.forRoot(),\n ConfigureModule.register(),\n ReindexFeatureModule,\n EventEmitterModule.forRoot(),\n ],\n controllers: [],\n})\nexport class ReindexModule {}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subql/node-ethereum",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "",
5
5
  "author": "Ian He",
6
6
  "license": "GPL-3.0",