Fetch event logs for a block range in a single upstream call (#433)

* Support fetching logs for a block range in rpc-eth-client

* Add a method to fetch block events for multiple blocks at once

* Add a method to save blocks with fetched events in a block range

* Fix transactions destructuring

* Fix get logs call args

* Add a separate ETH client method to get logs in a block range

* Codegen changes
This commit is contained in:
prathamesh0
2023-10-23 16:10:09 +05:30
committed by GitHub
parent 45b7489115
commit e8d8476bef
8 changed files with 201 additions and 25 deletions
@@ -106,6 +106,12 @@ export class Indexer implements IndexerInterface {
return '';
}
async fetchEventsAndSaveBlocks (blocks: DeepPartial<BlockProgressInterface>[]): Promise<{ blockProgress: BlockProgressInterface, events: DeepPartial<EventInterface>[] }[]> {
assert(blocks);
return [];
}
async saveBlockAndFetchEvents (block: BlockProgressInterface): Promise<[BlockProgressInterface, DeepPartial<EventInterface>[]]> {
return [block, []];
}