mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-07-27 10:42:06 +00:00
Update codegen templates
This commit is contained in:
parent
190580f668
commit
85ca9e3efb
@ -25,6 +25,9 @@
|
||||
# Flag to specify whether RPC endpoint supports block hash as block tag parameter
|
||||
rpcSupportsBlockHashParam = true
|
||||
|
||||
# Enable ETH JSON RPC server at /rpc
|
||||
enableEthRPCServer = true
|
||||
|
||||
# Server GQL config
|
||||
[server.gql]
|
||||
path = "/graphql"
|
||||
|
@ -199,6 +199,12 @@ export class Database implements DatabaseInterface {
|
||||
return this._baseDatabase.getEventsInRange(repo, fromBlockNumber, toBlockNumber);
|
||||
}
|
||||
|
||||
async getEvents (options: FindManyOptions<Event>): Promise<Array<Event>> {
|
||||
const repo = this._conn.getRepository(Event);
|
||||
|
||||
return this._baseDatabase.getEvents(repo, options);
|
||||
}
|
||||
|
||||
async saveEventEntity (queryRunner: QueryRunner, entity: Event): Promise<Event> {
|
||||
const repo = queryRunner.manager.getRepository(Event);
|
||||
return this._baseDatabase.saveEventEntity(repo, entity);
|
||||
|
@ -188,6 +188,10 @@ export class Indexer implements IndexerInterface {
|
||||
return this._storageLayoutMap;
|
||||
}
|
||||
|
||||
get contractMap (): Map<string, ethers.utils.Interface> {
|
||||
return this._contractMap;
|
||||
}
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
get graphWatcher (): GraphWatcher {
|
||||
return this._graphWatcher;
|
||||
@ -671,6 +675,10 @@ export class Indexer implements IndexerInterface {
|
||||
return this._baseIndexer.getEventsInRange(fromBlockNumber, toBlockNumber, this._serverConfig.gql.maxEventsBlockRange);
|
||||
}
|
||||
|
||||
async getEvents (options: FindManyOptions<Event>): Promise<Array<Event>> {
|
||||
return this._db.getEvents(options);
|
||||
}
|
||||
|
||||
async getSyncStatus (): Promise<SyncStatus | undefined> {
|
||||
return this._baseIndexer.getSyncStatus();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user