Add filterLogs flag to fetch logs by contract (#144)

This commit is contained in:
2022-07-18 14:04:59 +05:30
committed by GitHub
parent 9a35955166
commit e2668690b5
33 changed files with 157 additions and 47 deletions
+32 -1
View File
@@ -5,10 +5,15 @@ import {
IndexerInterface,
BlockProgressInterface,
EventInterface,
SyncStatusInterface
SyncStatusInterface,
ServerConfig as ServerConfigInterface
} from '@vulcanize/util';
export class Indexer implements IndexerInterface {
get serverConfig () {
return new ServerConfig();
}
async getBlockProgress (blockHash: string): Promise<BlockProgressInterface | undefined> {
assert(blockHash);
@@ -140,3 +145,29 @@ class SyncStatus implements SyncStatusInterface {
this.latestCanonicalBlockNumber = 0;
}
}
class ServerConfig implements ServerConfigInterface {
host: string;
port: number;
mode: string;
kind: string;
checkpointing: boolean;
checkpointInterval: number;
ipfsApiAddr: string;
subgraphPath: string;
wasmRestartBlocksInterval: number;
filterLogs: boolean;
constructor () {
this.host = '';
this.port = 0;
this.mode = '';
this.kind = '';
this.checkpointing = false;
this.checkpointInterval = 0;
this.ipfsApiAddr = '';
this.subgraphPath = '';
this.wasmRestartBlocksInterval = 0;
this.filterLogs = false;
}
}