Refactor fill and fill-state CLIs to cli package (#257)

* Refactor fill CLI to cli package

* Refactor method to fill-state to graph-node

* Refactor fill-state CLI to cli package

* Move subgraph state utils to a separate file

* Refactor subgraph state helper methods to graph-node

* Update mock indexer

* Move watcher job-runner to util

* Remove mock server and data from erc20-watcher

* Import watcher job-runner from util
This commit is contained in:
prathamesh0
2022-11-24 15:28:38 +05:30
committed by GitHub
parent 7717601408
commit aba0c665f3
42 changed files with 597 additions and 1100 deletions
+13 -1
View File
@@ -58,6 +58,10 @@ export class Indexer implements IndexerInterface {
);
}
async getEntitiesForBlock (blockHash: string, tableName: string): Promise<any[]> {
return [];
}
async getBlockProgress (blockHash: string): Promise<BlockProgressInterface | undefined> {
assert(blockHash);
@@ -217,6 +221,14 @@ export class Indexer implements IndexerInterface {
return undefined;
}
async getStates (where: FindConditions<StateInterface>): Promise<StateInterface[]> {
return [];
}
async createDiff (contractAddress: string, blockHash: string, data: any): Promise<void> {
return undefined;
}
async createCheckpoint (contractAddress: string, blockHash: string): Promise<string | undefined> {
return undefined;
}
@@ -230,7 +242,7 @@ export class Indexer implements IndexerInterface {
}
async removeStates (blockNumber: number, kind: StateKind): Promise<void> {
// TODO Implement
return undefined;
}
getStateData (state: StateInterface): any {