Commit Graph

15 Commits

Author SHA1 Message Date
Ashwin Phatak
afd7c954a2
Refactoring pruning and reorg handling code (#227)
* Refactor db methods getPrevEntityVersion and getFrothyRegion.

* Filter out entities from pruned blocks.

* Pull saveContract and getModelEntities to util.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-25 12:47:53 +05:30
Ashwin Phatak
3ff2fdf11b
Refactoring, extract uni-info-watcher GQL client (#226)
* Refactor common code in uni-watcher and uni-info-watcher.

* Implement client.ts in uni-info-watcher for queries and use in smoke-test.

* Disable cache in graphql client.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-24 11:55:29 +05:30
8489b5632a
Tests for pruning abandonded branches (#223)
* Create dummy test blocks and refactor test code.

* Intial test for pruning block in a chain without branches.

* Add test for pruning with multiple branches.

* Add test for pruning at frothy region.

* Test for pruning block at height more than max reorg depth.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-20 12:26:37 +05:30
Ashwin Phatak
35068b2c3d
Implement chain pruning in uni-info-watcher (#222)
* Refactor code for chain pruning.

* Implement chain pruning in uni-info-watcher.

* Refactor pruning code to util.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-19 13:27:32 +05:30
Ashwin Phatak
b8b216ea5b
Extract block filler into common package, implement in uni-info-watcher (#220)
* Implement block filler for uni-info-watcher.

* Pull common code for Block filler to util.

* Watch for job events in block filler command.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-18 15:50:44 +05:30
Ashwin Phatak
9e1ed70d18
Tests for getPrevEntityVersion (#217)
* Insert and remove a dummy BlockProgress from db.

* Test to fetch a Token entity from pruned region.

* Check if db is empty initially.

* Test to fetch a Token entity from frothy region.

* Test to fetch a Token from frothy region (same block num).

* Test to fetch a Token entity from another branch.

* Tests to fetch a Token entity (multiple tokens).

* Test to fetch updated Token entity in pruned region.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-16 15:42:34 +05:30
Ashwin Phatak
a7ec3d8da8
Add APGL license and copyright notices (#212)
* Add license & copyright declarations for add-watcher.

* Add copyright declarations for cache.

* Add copyright declarations for erc20-watcher.

* Add copyright declarations for ipld-eth-client.

* Add copyright declarations for tracing-client.

* Add copyright declarations for uni-watcher.

* Add copyright declarations for solidity-mapper.

* Add copyright declarations for uni-info-watcher.

* Add copyright declarations for util.

* Add copyright declarations for lighthouse-watcher.

* Change license identifier in .sol files.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-12 15:28:13 +05:30
Ashwin Phatak
6c05600b41
Test for entities after IncreaseLiquidityEvent. (#198)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-10 15:53:59 +05:30
Ashwin Phatak
0c2efde028
Test for entities after TransferEvent (#196)
* Add resolver for Position entity in uni-info-watcher.

* Test for entities after TransferEvent.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-10 12:09:00 +05:30
Ashwin Phatak
16b041c5cf
Test for Transaction entity after Mint, Burn & Swap events. (#193)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-09 12:08:37 +05:30
Ashwin Phatak
88121f9390
Test for entities after SwapEvent. (#191)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-06 19:10:25 +05:30
Ashwin Phatak
63620f0a0a
Smoke test for entities after BurnEvent (#189)
* Test for entities after BurnEvent.

* Fix event value types in uni-info-watcher.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-06 17:21:30 +05:30
Ashwin Phatak
95f830178d
Test for all entities after MintEvent. (#188)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-06 12:12:52 +05:30
Ashwin Phatak
df85f961db
Smoke test for entities after Mint event (#185)
* Test for Token & Factory entities after MintEvent.

* Test for Pool, Mint & Tick entities after MintEvent.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-05 17:12:11 +05:30
Ashwin Phatak
a9d411c6df
Smoke test for uni-info-watcher (#184)
* Smoke test for uni-info-watcher and refactor token deployment code.

* Test for Token entity after PoolCreated event.

* Test for Pool entity after PoolCreated event.

* Tests for entities after InitializeEvent.

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-04 18:57:44 +05:30