mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-08-01 12:12:07 +00:00
Update cerc-io packages version in watcher generation (#224)
This commit is contained in:
parent
861420a10f
commit
13edff143b
@ -37,7 +37,7 @@ export class Database implements DatabaseInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get baseDatabase (): BaseDatabase {
|
get baseDatabase (): BaseDatabase {
|
||||||
return this.baseDatabase;
|
return this._baseDatabase;
|
||||||
}
|
}
|
||||||
|
|
||||||
async init (): Promise<void> {
|
async init (): Promise<void> {
|
||||||
|
@ -564,6 +564,18 @@ export class Indexer implements IndexerInterface {
|
|||||||
return this._baseIndexer.getAncestorAtDepth(blockHash, depth);
|
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)}}
|
{{#if (subgraphPath)}}
|
||||||
getEntityTypesMap (): Map<string, { [key: string]: string }> {
|
getEntityTypesMap (): Map<string, { [key: string]: string }> {
|
||||||
return this._entityTypesMap;
|
return this._entityTypesMap;
|
||||||
@ -597,18 +609,6 @@ export class Indexer implements IndexerInterface {
|
|||||||
this._subgraphStateMap.clear();
|
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 {
|
_populateEntityTypesMap (): void {
|
||||||
{{#each subgraphEntities as | subgraphEntity |}}
|
{{#each subgraphEntities as | subgraphEntity |}}
|
||||||
this._entityTypesMap.set('{{subgraphEntity.className}}', {
|
this._entityTypesMap.set('{{subgraphEntity.className}}', {
|
||||||
|
@ -42,11 +42,11 @@
|
|||||||
"@apollo/client": "^3.3.19",
|
"@apollo/client": "^3.3.19",
|
||||||
"@ethersproject/providers": "^5.4.4",
|
"@ethersproject/providers": "^5.4.4",
|
||||||
"@ipld/dag-cbor": "^6.0.12",
|
"@ipld/dag-cbor": "^6.0.12",
|
||||||
"@cerc-io/ipld-eth-client": "^0.1.0",
|
"@cerc-io/ipld-eth-client": "^0.2.13",
|
||||||
"@cerc-io/solidity-mapper": "^0.1.0",
|
"@cerc-io/solidity-mapper": "^0.2.13",
|
||||||
"@cerc-io/util": "^0.1.0",
|
"@cerc-io/util": "^0.2.13",
|
||||||
{{#if (subgraphPath)}}
|
{{#if (subgraphPath)}}
|
||||||
"@cerc-io/graph-node": "^0.1.0",
|
"@cerc-io/graph-node": "^0.2.13",
|
||||||
{{/if}}
|
{{/if}}
|
||||||
"apollo-server-express": "^2.25.0",
|
"apollo-server-express": "^2.25.0",
|
||||||
"apollo-type-bigint": "^0.1.3",
|
"apollo-type-bigint": "^0.1.3",
|
||||||
|
@ -32,7 +32,7 @@ export class Database implements DatabaseInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get baseDatabase (): BaseDatabase {
|
get baseDatabase (): BaseDatabase {
|
||||||
return this.baseDatabase;
|
return this._baseDatabase;
|
||||||
}
|
}
|
||||||
|
|
||||||
async init (): Promise<void> {
|
async init (): Promise<void> {
|
||||||
|
@ -37,7 +37,7 @@ export class Database implements DatabaseInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get baseDatabase (): BaseDatabase {
|
get baseDatabase (): BaseDatabase {
|
||||||
return this.baseDatabase;
|
return this._baseDatabase;
|
||||||
}
|
}
|
||||||
|
|
||||||
async init (): Promise<void> {
|
async init (): Promise<void> {
|
||||||
|
Loading…
Reference in New Issue
Block a user