mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-07 16:34:06 +00:00
Add filterLogs flag to fetch logs by contract (#144)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user