Update cerc-io packages version in watcher generation (#224)

This commit is contained in:
prathamesh0 2022-11-11 03:30:48 -06:00 committed by GitHub
parent 861420a10f
commit 13edff143b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 19 deletions

View File

@ -37,7 +37,7 @@ export class Database implements DatabaseInterface {
}
get baseDatabase (): BaseDatabase {
return this.baseDatabase;
return this._baseDatabase;
}
async init (): Promise<void> {

View File

@ -564,6 +564,18 @@ export class Indexer implements IndexerInterface {
return this._baseIndexer.getAncestorAtDepth(blockHash, depth);
}
async resetWatcherToBlock (blockNumber: number): Promise<void> {
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<string, { [key: string]: string }> {
return this._entityTypesMap;
@ -597,18 +609,6 @@ export class Indexer implements IndexerInterface {
this._subgraphStateMap.clear();
}
async resetWatcherToBlock (blockNumber: number): Promise<void> {
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}}', {

View File

@ -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",

View File

@ -32,7 +32,7 @@ export class Database implements DatabaseInterface {
}
get baseDatabase (): BaseDatabase {
return this.baseDatabase;
return this._baseDatabase;
}
async init (): Promise<void> {

View File

@ -37,7 +37,7 @@ export class Database implements DatabaseInterface {
}
get baseDatabase (): BaseDatabase {
return this.baseDatabase;
return this._baseDatabase;
}
async init (): Promise<void> {