mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-09 17:24:07 +00:00
Update codegen with changes implemented in mobymask watcher (#148)
* Update codegen with index-block CLI and remove graph-node * Add filter logs by contract flag * Skip generating GQL API for immutable variables * Add config for maxEventsBlockRange * Add new flags in existing watchers
This commit is contained in:
@@ -75,7 +75,7 @@ export class Indexer implements IndexerInterface {
|
||||
this._contract = new ethers.utils.Interface(this._abi);
|
||||
}
|
||||
|
||||
get serverConfig () {
|
||||
get serverConfig (): ServerConfig {
|
||||
return this._serverConfig;
|
||||
}
|
||||
|
||||
@@ -388,7 +388,10 @@ export class Indexer implements IndexerInterface {
|
||||
|
||||
async _fetchAndSaveEvents ({ cid: blockCid, blockHash }: DeepPartial<BlockProgress>): Promise<BlockProgress> {
|
||||
assert(blockHash);
|
||||
let { block, logs } = await this._ethClient.getLogs({ blockHash });
|
||||
let [{ block }, { logs }] = await Promise.all([
|
||||
this._ethClient.getBlockByHash(blockHash),
|
||||
this._ethClient.getLogs({ blockHash })
|
||||
]);
|
||||
|
||||
const dbEvents: Array<DeepPartial<Event>> = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user