diff --git a/packages/codegen/src/templates/database-template.handlebars b/packages/codegen/src/templates/database-template.handlebars index f128f34c..4d5538ec 100644 --- a/packages/codegen/src/templates/database-template.handlebars +++ b/packages/codegen/src/templates/database-template.handlebars @@ -37,7 +37,7 @@ export class Database implements DatabaseInterface { } get baseDatabase (): BaseDatabase { - return this.baseDatabase; + return this._baseDatabase; } async init (): Promise { diff --git a/packages/codegen/src/templates/indexer-template.handlebars b/packages/codegen/src/templates/indexer-template.handlebars index e64af650..c8b70a5c 100644 --- a/packages/codegen/src/templates/indexer-template.handlebars +++ b/packages/codegen/src/templates/indexer-template.handlebars @@ -564,6 +564,18 @@ export class Indexer implements IndexerInterface { return this._baseIndexer.getAncestorAtDepth(blockHash, depth); } + async resetWatcherToBlock (blockNumber: number): Promise { + const entities = [ + {{#each queries as | query |}} + {{query.entityName}}, + {{/each}} + {{#each subgraphEntities as | subgraphEntity |}} + {{subgraphEntity.className}}, + {{/each}} + ]; + await this._baseIndexer.resetWatcherToBlock(blockNumber, entities); + } + {{#if (subgraphPath)}} getEntityTypesMap (): Map { return this._entityTypesMap; @@ -597,18 +609,6 @@ export class Indexer implements IndexerInterface { this._subgraphStateMap.clear(); } - async resetWatcherToBlock (blockNumber: number): Promise { - const entities = [ - {{#each queries as | query |}} - {{query.entityName}}, - {{/each}} - {{#each subgraphEntities as | subgraphEntity |}} - {{subgraphEntity.className}}, - {{/each}} - ]; - await this._baseIndexer.resetWatcherToBlock(blockNumber, entities); - } - _populateEntityTypesMap (): void { {{#each subgraphEntities as | subgraphEntity |}} this._entityTypesMap.set('{{subgraphEntity.className}}', { diff --git a/packages/codegen/src/templates/package-template.handlebars b/packages/codegen/src/templates/package-template.handlebars index ae80862e..66e220d6 100644 --- a/packages/codegen/src/templates/package-template.handlebars +++ b/packages/codegen/src/templates/package-template.handlebars @@ -42,11 +42,11 @@ "@apollo/client": "^3.3.19", "@ethersproject/providers": "^5.4.4", "@ipld/dag-cbor": "^6.0.12", - "@cerc-io/ipld-eth-client": "^0.1.0", - "@cerc-io/solidity-mapper": "^0.1.0", - "@cerc-io/util": "^0.1.0", + "@cerc-io/ipld-eth-client": "^0.2.13", + "@cerc-io/solidity-mapper": "^0.2.13", + "@cerc-io/util": "^0.2.13", {{#if (subgraphPath)}} - "@cerc-io/graph-node": "^0.1.0", + "@cerc-io/graph-node": "^0.2.13", {{/if}} "apollo-server-express": "^2.25.0", "apollo-type-bigint": "^0.1.3", diff --git a/packages/eden-watcher/src/database.ts b/packages/eden-watcher/src/database.ts index 8f5fb0a2..bae3bc5d 100644 --- a/packages/eden-watcher/src/database.ts +++ b/packages/eden-watcher/src/database.ts @@ -32,7 +32,7 @@ export class Database implements DatabaseInterface { } get baseDatabase (): BaseDatabase { - return this.baseDatabase; + return this._baseDatabase; } async init (): Promise { diff --git a/packages/graph-test-watcher/src/database.ts b/packages/graph-test-watcher/src/database.ts index dd146063..34cf5ae2 100644 --- a/packages/graph-test-watcher/src/database.ts +++ b/packages/graph-test-watcher/src/database.ts @@ -37,7 +37,7 @@ export class Database implements DatabaseInterface { } get baseDatabase (): BaseDatabase { - return this.baseDatabase; + return this._baseDatabase; } async init (): Promise {