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:
2022-07-22 13:17:56 +05:30
committed by GitHub
parent b577db287f
commit 1bcabd64f2
69 changed files with 825 additions and 575 deletions
+5 -1
View File
@@ -82,7 +82,11 @@ export class Indexer {
async fetchEvents (blockHash: string): Promise<Array<ResultEvent>> {
assert(this._config.watch);
const contract = this._config.watch.lighthouse;
const { logs, block } = await this._ethClient.getLogs({ blockHash, contract });
const [{ logs }, { block }] = await Promise.all([
this._ethClient.getLogs({ blockHash, contract }),
this._ethClient.getBlockByHash(blockHash)
]);
const {
allEthHeaderCids: {