Commit Graph

610 Commits

Author SHA1 Message Date
prathamesh0
2faf905d99
Implement remaining graph-node host APIs for templates (#475)
* 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
2023-11-20 15:02:08 +05:30
c2070a80cb
Handle null block error in rpc-eth-client (#477)
* Remove block-size-cache util methods as full block with size fetched already

* Handle null block error in rpc-eth-client

* Upgrade package versions
2023-11-17 11:58:43 +05:30
e54f4c9276
Implement host API for big decimal equals (#476)
* Implement host api for big decimal equals

* Add test cases for big decimal equals

* Use boolean type conversion

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-11-17 10:26:03 +05:30
7c8f84b1dc
Remove prefetchBlocksInMem flag along with functionality (#474)
* Remove prefetchBlocksInMem flag

* Remove Indexer method fetchEventsAndSaveBlocks

* Throw error if pruning not safe

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-11-16 19:03:13 +05:30
3e898914ba
Add GQL where filter and nested order by params based on entity fields (#472)
* 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>
2023-11-16 12:38:47 +05:30
5b95335fde
Filter logs by events specified in subgraph config (#473)
* 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>
2023-11-16 11:54:49 +05:30
8e9d5092fc
Fix generated watcher GQL query name and add _change_block filter (#471)
* 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
2023-11-15 10:14:14 +05:30
7c4f9fb797
Fix events queue job retry by resetting watcher in job-runner (#470)
* Reset watcher after events job retry in job-runner

* Push next historical job from job-runner instead of event-watcher
2023-11-14 18:43:17 +05:30
6ce8d4746d
Upgrade package versions before release (#469) 2023-11-14 15:01:52 +05:30
803f7c3b3d
Fix retry on error for events processing job with exponential backoff (#468)
* 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
2023-11-14 14:53:23 +05:30
7b5fbf3d13
Implement new graph-node host API for BigDecimal exponentiation (#467)
* Implement host API for BigDecimal pow

* Handle FEVM future block error in rpc-eth-client getFullBlocks

* Handle future block error in rpc-eth-client getBlockWithTransactions

* Upgrade package versions
2023-11-13 12:22:23 +05:30
66d613767e
Upgrade version to 0.2.69 (#466) 2023-11-10 19:36:21 +05:30
c01c1d07db
Fix switch from historical to realtime processing when template create block exists near head (#465)
* Fix duplicate historical processing jobs created on template create

* Fix switch from historical to realtime processing when template create block is near head
2023-11-10 19:13:17 +05:30
prathamesh0
be24166ea7
Update package versions (#463) 2023-11-10 14:48:35 +05:30
edf72c1dd6
Update indexer template in codegen for block optimization changes (#464)
* Update indexer template for block optimization

* Trim address strings in graph-node host API
2023-11-10 12:14:38 +05:30
prathamesh0
32d5cd10d0
Prioritize block hash over number in singular time travel queries (#462)
* 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
2023-11-10 09:39:58 +05:30
695723955f
Prefetch block and txs in historical processing instead of fetching them in events processing (#460)
* Set gzip true in ethersjs provider

* Add timer logs and use StaticJsonRpcProvider

* Fetch block data in historical processing and cache in map

* Fetch txs required for event logs in historical processing

* Process events with prefetched block and txs data in realtime processing

* Clear old TODOs
2023-11-09 18:42:37 +05:30
prathamesh0
c7bcd4c276
Generate resolvers for plural subgraph GQL queries (#461) 2023-11-09 16:33:35 +05:30
prathamesh0
6860f1a26f
Handle tsvector type columns when forming the db query (#459)
* Support full text search queries

* Handle text search for all query types
2023-11-09 14:15:31 +05:30
prathamesh0
483a73fc3e
Load schema file path from subgraph config (#458)
* Get subgraph schema from config file

* Use default value if schema not given

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-11-09 12:17:09 +05:30
5aa98326cb
Send transaction data directly in rpc-eth-client instead of serialization (#457)
* Fix tx serialization using ethers v6

* Send tx data directly in rpc-eth-client instead of serializing it
2023-11-08 17:32:26 +05:30
f2c5f67777
Handle restarts during historical processing in watcher (#455)
* 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
2023-11-08 14:28:53 +05:30
prathamesh0
97bd4014d6
Support nested entity sorting in plural GQL queries (#456)
* Move method to apply block filter to base database

* Handle nested entity sorting

* Handle nested entity sorting for distinct on type queries

* Handle nested entity sorting for all query types
2023-11-08 12:20:32 +05:30
prathamesh0
5efab298a3
Add support for meta query in watcher GQL API (#453)
* 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
2023-11-07 14:37:05 +05:30
8547876764
Add isFEVM flag in config to avoid filtering event logs by topics (#454)
* Pass upstream config to indexer instance

* Add isFEVM flag and refactor watcher config fields

* Codegen changes for indexer

* Add missing getter in dummy indexer for graph-node tests
2023-11-07 12:07:49 +05:30
dd92b4feb2
Fix bigint and decimal transformers not added for null type entity field in codegen (#451) 2023-11-06 15:01:48 +05:30
prathamesh0
d5c92aa150
Add BigInt and BigDecimal GraphQL scalars (#452) 2023-11-06 15:00:24 +05:30
8a720ef175
Wait for events processing to complete before continuing historical blocks processing (#450)
* Wait for events queue to be empty before continuing historical processing

* Make historicalLogsBlockRange and historicalMaxFetchAhead configurable

* Perform single RPC request for multiple addresses
2023-11-06 11:34:48 +05:30
prathamesh0
546af92638
Support logical filter operations in plural GQL queries (#449)
* Handle logical operators in where input

* Handle logical filter operators while building the database query

* Refactor code to build where clause for database query
2023-11-06 11:17:54 +05:30
0d7e3ddc8b
Handle subgraph template create when filterLogsByAddresses set to true (#447)
* 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
2023-11-03 14:08:55 +05:30
prathamesh0
7f37dac888
Support filters for array and derived type fields in plural GQL queries (#448)
* Handle nested filters for array type fields

* Transform Decimal param values to strings for db queries

* Handle nested filters for derived fields

* Handle filters for array type fields
2023-11-03 12:14:32 +05:30
prathamesh0
92f3fb8252
Support nested filters for plural queries on subgraph entities (#446)
* Handle nested filters while building the database query

* Build nested filters for relational fields

* Avoid queries to get canonical block hashes for loading relations

* Handle nested filters in all query types

* Give precedence to block hash over number in time travel queries
2023-11-02 10:37:33 +05:30
9fb51e89f6
Implement fetch and save of filtered event logs and required blocks (#445)
* 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
2023-11-01 19:07:06 +05:30
prathamesh0
1b6ca6edeb
Implement block filter for plural queries on subgraph entities (#444)
* Fix bigint values transformation

* Fix starts and ends filter operator resolution

* Support case insensitive filters for string fields

* Add support for global filter _change_block

* Handle _change_block filter in all query types
2023-11-01 10:42:56 +05:30
6c17662cad
Add new job queue for historical blocks processing (#442)
* 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
2023-11-01 10:38:59 +05:30
prathamesh0
15ee523e71
Generate plural GQL query schema for subgraph entities (#443)
* Generate plural GQL queries for subgraph entities

* Use pluralize for plural query names

* Handle bigint values for filters in db query
2023-10-31 09:24:49 +05:30
prathamesh0
a8e59eb6b9
Support filtering by topics when fetching logs in rpc-eth-client (#441)
* Support filtering by topics when fetching logs

* Include event signatures from all contracts in topics list

* Refactor common code

* Update package versions
2023-10-26 17:25:56 +05:30
43463af1f2
Avoid updating StateSyncStatus table when enableState flag is set to false (#440)
* Handle zero hash canonical block incase of FEVM null block

* Fix json-bigint parse in processBatchEvents

* Avoid updating SyncStatus table when enableState is false
2023-10-26 15:14:46 +05:30
prathamesh0
445d5a9293
Process template events at last when following subgraph events order (#439)
* Process template events at last when following subgraph events order

* Update mock test indexer
2023-10-26 12:05:29 +05:30
b63a93d8a0
Skip checking of events order while processing due to incorrect logIndex in FEVM (#438)
* 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
2023-10-26 11:21:48 +05:30
prathamesh0
8bba0aeb94
Handle null blocks for FEVM (#437)
* Handle null blocks in chain pruning

* Skip FEVM null blocks while prefetching

* Fix BaseFee assignment while fetching block in rpc-eth-client

* Convert blockNumber field to number type before saving block to db

* Avoid saving blocks after null block twice
2023-10-25 18:37:02 +05:30
prathamesh0
320bf02938
Fetch txs only for blocks having relevant events (#436)
* Fix address filter usage in rpc-eth-client getLogs implementation

* Avoid fetching block txs when no relevant logs exist
2023-10-25 14:36:03 +05:30
07887c160e
Use block number for eth_call in rpc-eth-client (#435)
* Update subgraph readme to run fill before job-runner

* Fix getContractEntitiesMap incase of template data sources

* Use rpcSupportsBlockHashParam flag to use blockNumber for rpc client eth_call

* Fix optional baseFeePerGas in rpc-eth-client

* Fix graph-node tests after changes

* Remove completed TODO
2023-10-25 11:04:12 +05:30
prathamesh0
e8d8476bef
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
2023-10-23 16:10:09 +05:30
45b7489115
Update codegen reamde for subgraph build using cerc-io dependencies (#434) 2023-10-23 12:21:38 +05:30
f8d5404c25
Fix codegen for creating subgraph watcher for Sushiswap (#432)
* Fix EthClient import in codegen and graph-node package

* Fix codegen for resolving common events between contracts
2023-10-23 09:23:20 +05:30
prathamesh0
72ccaa0381
Upgrade nitro-node dependency (#430)
* Upgrade nitro-node to v0.1.15

* Upgrade packages version to v0.2.66

* Add default value for Nitro node store path

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-10-17 18:39:08 +05:30
dc06ada7c4
Add validation methods for watcher config (#425)
* Add validation for config file

* Add support for websocket endpoints to be checked for contract deployment

* Add flag to toggle validation

* Update log message for paid rpc method validation

* Update log message for validation

* Rename enableValidation to enableConfigValidation

* Check deployment only if contract address is in a valid format

* Update httpValidateEndpoint method to check if endpoint is up instead of response as ok

* Update log messages

* Update log messages

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2023-10-16 16:39:21 +05:30
75b177cffd
Add useDurableStore flag in Nitro setupNode (#428)
* Add useDurableStore flag in seUpNode

* Upgrade nitro-node to 0.1.14

* Change payment amount to string

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-10-13 12:47:23 +05:30
prathamesh0
e6767c3aca
Pass vouchers for RPC requests in header (#429)
* Send voucher in request header instead of url params

* Handle review changes

* Update package versions

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2023-10-12 17:42:19 +05:30
2b83f38ab6
Upgrade package version to 0.2.64 (#427)
* Upgrade package version to 0.2.64

* Comment CI workflow to publish docker image

* Update CI workflow names
2023-10-12 11:43:17 +05:30
8515630f49
Add validateGQLRequest method in PaymentsManager (#426)
* Refactor GQL validation for payment

* Export payment util const PAYMENT_HEADER_KEY

* Check payment header only for paid queries
2023-10-12 10:58:13 +05:30
prathamesh0
caa8da7090
Upgrade nitro-node and add Nitro config option for chain URL (#424)
* Upgrade @cerc-io/nitro-node dependency

* Add a separate config option for chain URL used by Nitro node

* Avoid adding ETH RPC method to request URL as no longer needed

* Update package versions
2023-10-05 11:28:13 +05:30
prathamesh0
ae60bbe1ce
Setup config for paid RPC methods and funding amounts with upstream ETH server (#423)
* Add config option for paid RPC methods

* Change rpcProviderNitroNode to nitro

* Add config option for funding amounts

* Handle review changes

* Refactor config and add a method to setup provider with payments

* Upgrade package versions

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2023-10-04 16:10:54 +05:30
prathamesh0
e203154ac7
Support payments to upstream ETH server for RPC requests (#418)
* Add config option for upstream RPC mutation endpoint

* Use mutation endpoint as chain URL for Nitro node

* Add a method to setup an upstream payment channel

* Add a method to send payments to upstream Nitro node

* Upgrade package versions
2023-09-28 15:24:45 +05:30
prathamesh0
32c78a907c
Add a config option to set gossipub direct peers (#414)
* Add support for setting gossipsub direct peers

* Use string array for direct peers config

* Handle empty nitro and consensus config

* Increase consensus write retry attempts

* Rename config option for watcher party peers file

* Handle directPeers array being passed undefined

* Upgrade package versions

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2023-09-22 13:46:20 +05:30
prathamesh0
48e7785367
Upgrade nitro-node package (#415)
* Upgrade nitro-node package

* Update package versions
2023-09-21 18:32:03 +05:30
77312a2f95
Add yamux stream multiplexer in peer package (#413)
* Add yamux muxer to peer

* Upgrade version to 0.2.58

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-09-15 12:19:51 +05:30
prathamesh0
bd73dae1b1
Implement consensus mechanism using mokka (#412)
* Add Consensus class with placeholders

* Implement Consensus constructor

* Move PubsubType to peer package

* Implement remaining methods in Consensus class

* Use existing consensus stream if it exists

* Setup send and receive pipes on consensus streams

* Refactor P2P and consensus setup in server command

* Add Nitro node initialization in server command

* Return objects from server initializations

* Use dynamic imports for ES modules in util package

* Fix util deps

* Change target to es6 to allow creating a Mokka instance

* Set moduleResolution to node16 in util for dynamic imports

* Upgrade @cerc-io/nitro-node package

* Implement retries while sending consensus messages

* Use bunyan for consensus logs and subscribe to state changes

* Use debug for logging state change events

* Handle empty watcher party file path

* Return object from initP2P

* Upgrade @cerc-io/nitro-node package

* Update package versions
2023-09-14 13:47:31 +05:30
prathamesh0
c80e4d0ab7
Add support for gossipsub (#410)
* Replace floodsub with gossipsub

* Add a pubsub flag to support both floodsub and gossipsub

* Fix deps

* Handle empty string values

* Upgrade @cerc-io/libp2p dependency

* Upgrade package versions
2023-09-05 17:54:52 +05:30
f89eea0d2f
Upgrade package versions (#407) 2023-08-30 15:55:35 +05:30
1d3bbf89c8
Update graph-cli version to fix concat-stream dependency issue (#405)
* Update yarn lock

* Upgrade @cerc-io/graph-cli version to 0.22.4-watcher-ts-0.1.2

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-08-25 14:26:00 +05:30
444901eb87
Upgrade package versions to 0.2.54 (#403)
Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-08-16 19:07:30 +05:30
f2bc054c19
Rename nitro-client to nitro-node (#402)
* Rename nitro-client to nitro-node

* Upgrade package versions to 0.2.53

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
2023-08-16 17:57:15 +05:30
b600524c8c
Fix dependencies in cli and eth-client packages (#401)
* Fix dependencies in cli and eth-client packages

* Upgrade package versions
2023-08-10 09:58:50 +05:30
prathamesh0
3b090b3987
Handle null blocks in FEVM (#400)
* Avoid gasPrice while serializing tx in getRawTransaction

* Convert base fee to bigint when fetching block data

* Fix methods to get block data in rpc-eth-client

* Fix error checking in rpc-eth-client

* Continue processig after missing null block in FEVM

* Self review fix

* Upgrade package versions

---------

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
2023-08-09 17:31:11 +05:30
c06330dd06
Implement rpc-eth-client for Ethereum compatible JSON-RPC endpoint (#398)
* Implement rpc-eth-client with getStorageAt method

* Add test for comparing RPC and GQL eth-client getStorageAt method

* Add getBlockWithTransactions and getBlocks method

* Implement getFullBlocks with RLP encoded data

* Implement getFullTransaction method with raw tx

* Implement getBlockByHash and getLogs methods

* Add flag and interface to switch between RPC and GQL eth clients

* Fix getBlocks to return empty array when block not present

* Return empty array in getBlocks for missing block and use blockNumber in getLogs

* Fix getRawTransaction method for zero signature.v value

* Remove duplicate util from rpc-eth-client
2023-08-08 18:48:55 +05:30
prathamesh0
47d4b667f4
Payment plugin fixes (#396)
* Avoid deducting from free quota for queries with unconfigured rates

* Check query selections on an introspection query

* Update comment
2023-07-31 17:09:58 +05:30
prathamesh0
198d3e65db
Add payments config and charge according to configured rates (#395)
* Track amount paid on payment channels and charge as per query cost

* Add payments manager config

* Fix received payment checks

* Separate out payment not received and amount insufficient errors

* Serve a query for free if its rate is not configured

* Load open payment channels from the stored state

* Take list of free queries from config

* Take mutation rates from config

* Rename query rates config fields

* Take cache settings and request timeout from config

* Upgrade ts-nitro packages

* Upgrade package versions
2023-07-27 15:52:36 +05:30
prathamesh0
aa10a2dc05
Cleanup dead connections in peer heartbeat checker (#394)
* Cleanup dead connections in peer heartbeat checker

* Remove yamux muxer
2023-07-26 13:37:16 +05:30
prathamesh0
6731a640a2
Use a single payment header in payments plugin (#393)
* Add client address field to payments manager

* Use a single payment header in payments plugin

* Upgrade ts-nitro packages

* Rename method to authenticateVoucherForSender

* Upgrade package versions

---------

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
2023-07-25 13:34:02 +05:30
10fa9d6b4b
Wait for receiving voucher on GQL query (#392)
* Wait for receiving voucher on GQL query

* Add timeout while authenticating voucher and remove listener channel

* Clear timeout after payment received

* Rename variable to paymentListener

* Upgrade package versions

* Add rpcSupportsBlockHashParam flag in config
2023-07-24 13:36:13 +05:30
prathamesh0
eec1965980
Add a payments plugin to GQL server (#391)
* Add a custom payments plugin in server process

* Fix voucher channel read in voucher subscription

* Use voucher hash and signature for payment authentication

* Use a LRU hash map for storing received vouchers

* Avoid hoisting level types to resolve build errors

* Upgrade ts-nitro packages

* Add payments related logs

* Upgrade package versions

* Always allow latestBlock query

* Upgrade ts-nitro packages
2023-07-20 17:22:48 +05:30
11930c0107
Expose peer instance in server CLI and add nitro config options (#390)
* Expose peer instance in server CLI and add nitro config options

* Update package versions

---------

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2023-07-13 15:30:31 +05:30
c6e685fc13
Use local lerna for publishing package in CI (#389)
* Use local lerna for publishing package in CI

* Upgrade package versions

* Add new line at EOF
2023-06-28 12:14:51 +05:30
b0780da52f
Upgrade package versions before publish (#388) 2023-06-28 11:38:07 +05:30
1b6c2a486a
Add peer config options for transports and peerDiscovery (#387)
* Add peer config options for transports and peerDiscovery

* Add yamux muxer to peer libp2p
2023-06-28 11:25:03 +05:30
prathamesh0
c5cbe33059
Pin typeorm version to avoid discrepancies with generated watchers (#385) 2023-05-15 17:55:36 +05:30
dfd38d3329
Upgrade package versions (#384)
* Upgrade package versions

* Use node 18.x in github CI
2023-05-15 12:30:24 +05:30
76522afa8d
Implement CLI to create checkpoint state from existing GQL endpoint (#382)
* Add util method for preparing state from GQL response entity

* Refactor method to create or update state data

* Fix typeorm bigint transformer and convert to checksum contract address

* Skip resetting to previous block in job-runner if isComplete set to true

* Fix creating subgraph event with struct params

* Use quotes for table names in custom queries

* Fix indexer prepareStateEntry method

* Fix toEthereumValue method when used with ethereum.decode

* Add CLI for creating snapshot checkpoint state from GQL endpoint

* Skip import-state if block is already indexed

* Review changes
2023-05-15 12:10:27 +05:30
prathamesh0
79898bc3df
Update package version (#383) 2023-05-12 15:11:33 +05:30
2b4d98b9c6
Fix watch contract to update checksum address in stateStatusMap (#377)
* Fix comment for codegen config contract kind property

* Update stateStatusMap with checksum address of contract

* Use non-null object composer for object types

---------

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2023-05-10 18:49:11 +05:30
prathamesh0
2e1652d772
Block connections with blacklisted multiaddrs (#373)
* Block connections from blacklisted multiaddrs in relay node

* Block connections from blacklisted multiaddrs in peer nodes

* Block dials for blacklisted multiaddrs

* Update package version
2023-05-04 16:33:29 +05:30
f2595d7ae4
Support DB caching for multiple and array return types in eth_call queries (#372)
* Generate indexer and entities with DB caching for multiple return types

* Generate database file code for multiple return types

* Remove returnType from client codegen as not required

* Changes for fixing lint warnings

* Handle mapping type values in storage mode

* Generate entities for array return type queries

* Refactor visitor for DB caching of array return types

* Fix saving bigint array type in DB
2023-04-27 18:27:54 +05:30
26c1607663
Create queries for only inherited contract methods in codegen generated watchers (#371)
* Codegen create queries only for inherited contracts

* Refactor recursive method to filter inherited contracts

* Comment code and refactor

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-04-27 09:37:27 +05:30
ca844dbe47
Upgrade package version before release (#370) 2023-04-25 18:29:07 +05:30
11cab24505
Handle multiple return type contract functions in codegen (#369)
* Genrate schema GQL for multiple return types

* Generate indexer file for multiple return types

* Fix whitespaces in generated watcher

* Refactor storage mode queries after multiple return type changes
2023-04-25 18:18:01 +05:30
096a0081e6
Changes in codegen to remove lint warnings in generated watcher (#368)
* Codegen declare resultDataTypes before queries in gql schema

* Update codegen templates to remove lint warnings

* Add flag to overwrite existing watcher in target directory

* Codegen set up pre-commit lint

* Codegen generate .npmrc

* Codegen refactor  code for pre-commit lint

* Update codegen templates with eslint rule exceptions

* Fix missing comma in codegen template

* Set husky preCommit file permission to executable

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-04-24 12:04:24 +05:30
49d67899be
Support basic array return types of contract methods in codegen (#363)
* Fix ValueTransformers to check for undefined value

* Create Result types if needed

* Update codegen to include array return type queries in schema

* Update codegen to include array return type queries in resolvers

* Update codegen to include array return type queries in indexers

* Codegen skip db caching methods for queries returning unhandled types

* Codegen handle bigint array in indexer

* Update codegen to handle basic array types

* Remove redundant code and refactor

* Codegen map Solidity types directly to GraphQL types

* Codegen get TS from GQL types

* Codegen handle ethers BigNumber array in indexer template

* Fix GQL type returned in client queries

* Codegen unused method isElementaryType should not be exported

* Codegen update README with solc version in config

* Codegen update README with continue-on-error flag

* Codegen add continue-on-error flag for storage mode

* Codegen generate gitignore and license for watchers

* Codegen refactor gitignore and license generation utils

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-04-20 13:31:41 +05:30
aaa60430e4
Update readme content and package versions (#366)
* Upgrade package versions

* Update readme for watchers
2023-04-14 18:11:15 +05:30
7f91fa7ed8
Remove watchers after moving them out to their own repos (#365)
* Remove all watchers after moving them out

* Add missing dependencies
2023-04-14 17:22:44 +05:30
e841b6a7c3
Publish package for tracing-client (#364)
* Publish tracing-client package

* Upgrade package versions
2023-04-14 15:43:15 +05:30
3f2dc56261
Fix json-bigint package version in yarn.lock file (#361)
* Fix json-bigint package version in lock file

* Upgrade package versions
2023-04-13 17:38:50 +05:30
72ec6c8e5b
Upgrade package versions (#360)
* Set eslint max-warnings to 0 in codegen generated watcher

* Upgrade package versions
2023-04-13 17:07:09 +05:30
25df38ace2
Add log for handling muliple returned values (#359)
Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-04-12 14:46:43 +05:30
7dada71fa3
Add boolean flag to enable sending L2 txs from watcher peer (#354) 2023-04-10 09:56:55 +05:30
754db311f0
Add flag in codegen to ignore errors for unhandled types (#350)
* Add --continue-on-error flag to codegen for skipping unhandled data types

* Use solc version defined in config

* Fix codegen log for unhandled array types

* Log solc compilation errors

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-04-06 15:24:11 +05:30
8c928516f8
Remove peer listener (#349) 2023-03-30 12:57:23 +05:30
622e49915f
Update codegen templates (#347)
Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
2023-03-30 11:47:39 +05:30
prathamesh0
91816db6f3
Upgrade js-libp2p (#346)
* Upgrade js-libp2p

* Upgrade package version
2023-03-29 09:37:06 +05:30