* Handle ThunkComposer field types when generating nested filters
* Fix type setting for relational fields when loading a subgraph entity from db
* Fix loading nullable relational fields in GQL queries
* Update package versions
* Filter out pruned subgraph entities while fetching from db
* Sort events by tx index first incase upstream is FEVM
* Upgrade package versions
---------
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
* Add a cli to export chain head block numbers
* Use ETH RPC endpoint and allow env overrides
* Use ethers provider
* Export upstream chain head block number in watcher metrics
* Remove unnecessary exports
* Upgrade package versions
* Fix defaults usage
* Export watcher config in metrics
* Add metric for watcher sync mode
* Remove cache flag from watcher config metrics
* Update watcher config field names
* Update subgraph watcher demo readme
* Pass extra block data required in subgraph block handler (#486)
* Use codegen config directory name instead of file path
* Get block data from extra event data
* Add extra event data in processBlockAfterEvents
---------
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
* Update example subgraph mapping code for graph-cli upgrade
* Return 0 value for block size in ipld-eth-client
---------
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
* Fill watcher start block only in active mode
* Fix sync status update in historical processing
* Upgrade package versions
* Upgrade package versions in codegen template
* Fix graph-node test indexer
* Add check for from and to block in eventsInRange query
* Update sync status query for more fields
---------
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
* Skip generating meta query if non subgraph watcher
* Fix linting errors in generated watcher
* Add space for meta query
* Add meta query types after adding block height type
---------
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
* Use shelljs to run graph-cli codegen command
* Replace graph-cli and graph-ts with cerc-io forks
* Add steps to build subgraph
* Add config packageManager for different subgraph repo setup
* Copy over the subgraph build to generated watcher
* Remove TODO
* Change subgraph path in generated watcher config
* Implement createWithContext graph-node dataSource host API
* Parse individual context entries
* Implement graph-node dataSource context host API
* Handle array type fields and refactor code
* Resolve all values when parsing an array field
* Fix wasm entity creation with array type fields
* Required codegen changes
* Add where filter equals fields based on entity fields
* Add different where filter operations for entity fields
* Add nested where filter for relation fields and filter params or & and
* Remove filters not required for derived fields
* Add nested order by params in schema
* Throw error on trying to sort by array or derived type fields
* Handle array fields while generating order by and where clauses
* Upgrade package versions
---------
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
* Use topic hash of events from config file
* Add eventSignaturesMap field in IndexerInterface
* Add eventSignaturesMap property in Indexer class
---------
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
* Add lower case method for camel case entity names
* Add BlockChangedFilter required in where filter
* Use lower camel case in resolvers and fix lower case transformation
* Throw error in job-runner events processing queue for retry
* Restart block processing after completion of retried events queue job
* Check events queue size in retry state from active historical processing job
* Clear watched contracts from memory map on reset
* Update sync status with zero hash during historical processing
* Update codegen for changes
* Add clearProcessedBlockData in graph-node test dummy indexer
* Keep return value for singular subgraph entity queries nullable
* Prioritize block hash over number in time travel queries
* Throw error when block with given hash doesn't exist in db
* Reset to latest processed block on restarting job-runner
* Update sync status during historical processing in job-runner
* Codegen changes
* Use sync status latest processed block for subgraph _meta GQL query
* Set job per interval for subscribing events queue to 1
* Fix events processing skipped for blocks after template create
* Add a method to get meta data for watcher indexing status
* Add a flag indicating indexing error to sync status
* Codegen changes
* Clear indexing error on job-runner startup
* Fix lint errors
* Wait for events queue to be empty before continuing historical processing
* Make historicalLogsBlockRange and historicalMaxFetchAhead configurable
* Perform single RPC request for multiple addresses
* Handle subgraph template create when filterLogsByAddresses set to true
* Fix historical processing stopping after running for multiple batches
* Add new method in graph-node test dummy indexer
* Fix async block size caching for missing blocks in historical processing
* Start historical block processing only if filter logs is set to true
* Fetch filtered logs by topics and save required blocks
* Fix realtime processing start block after historical processing
* Avoid publishing events and blocks in historical processing
* Add new method to graph-node test indexer
* Get full block data for subgraph block handler only if configured
* Add useBlockRanges flag for switching between historical and realtime processing
* Add TODOs for historical blocks processing
* Add new job for historical blocks processing
* Handle historical job completion
* Fetch latest block in chain and start historical block processing
* Fix starting realtime block processing from latest canonical block
* Refactor historical block processing method and add logs
* Add dummy indexer methods in graph-node to pass test
* Changes in codegen for historical processing in generated watcher
* Support filtering by topics when fetching logs
* Include event signatures from all contracts in topics list
* Refactor common code
* Update package versions
* Skip log index order in events processing
* Use json-bigint stringify in processBatchEvents
* Set eventSignature in event processing for contracts watched later
* Check for null block in async caching of block sizes