Commit Graph

39 Commits

Author SHA1 Message Date
Ashwin Phatak
1372fc74ef
Test for entities after CollectEvent. (#202)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-10 17:31:50 +05:30
Ashwin Phatak
ed9577b830
Test for entities after DecreaseLiquidityEvent. (#199)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-10 16:32:35 +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
nikugogoi
abd3175c09
Import test utils separately. (#194)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-09 21:34:55 +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
a9d9b39c37
Fix transaction query runner in event handlers. (#192)
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-09 11:30:43 +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
0487c05ee1
Event handlers should update db atomically (#186)
* Run db operations inside event handlers atomically using transaction.

* Implement database transaction for Pool Initialize event.

* Implement typeorm transaction without callback.

* Implement transaction for NFPM event handlers.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-06 10:25:56 +05:30
Ashwin Phatak
b6fe8a8c47
Import TICK_MIN from util and fix lint errors. (#187)
Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2021-08-05 18:33:47 +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
Ashwin Phatak
73e0475dfa
Misc changes for uni-info-watcher resolvers (#183)
* Implement transaction from to set entity origin field.

* Add all transaction fields specified in schema and add delay in uni-info block processing.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-04 18:42:59 +05:30
Ashwin Phatak
eea3a5864b
Implement filters for uni-info-watcher resolvers. (#180)
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-03 11:56:25 +05:30
Ashwin Phatak
f1a96e8ba9
Resolver for Ticks and Token(s) methods (#177)
* Add query resolvers for Tick and Token entities.

* Implemented query for orderBy.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-08-02 15:46:21 +05:30
Ashwin Phatak
18ebed0b36
Resolver for Mint, Pool, PoolDayData and Swap entities (#173)
* Use getEntities to get result for queries.

* Implement resolver for Mint entity.

* Implement resolvers for Pool and PoolDayData entities.

* Add query resolver for Swap entity.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-30 17:49:22 +05:30
Ashwin Phatak
d4a19d15a9
Implemented query resolvers for entities Burn and Factory. (#171)
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-29 18:12:35 +05:30
Ashwin Phatak
df01b6539b
Implement resolvers for querying Bundle entity. (#170)
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-29 14:45:38 +05:30
Ashwin Phatak
f93c0e3cb6
Track last processed event index (#168)
* Implement last processed event in uni-info-watcher.

* Check if block or event is already processed.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-28 17:36:43 +05:30
Ashwin Phatak
c677e5942c
ERC20 watcher based on eth_call (#165)
* Implement eth_call for ERC20 totalSupply.

* Use eth_call for erc20-watcher.

* Implement fallback for ERC20 symbol method call.

* Implement fallback for ERC20 name and totalSupply.

* implement fallback for erc20 decimals method.

* Lint fixes.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-28 10:04:07 +05:30
Ashwin Phatak
a5d6bfa285
Get/create entity based on block hash and parent traversal (#163)
* Watch all blocks and fetch events for each block.

* Implement getPrevVersionEntity in database.

* Implement getPrevVersionEntity for PoolCreated event.

* Implement getPrevEntityVersion for Pool events.

* Implement getPrevEntityVersion for NFPM events.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-23 19:22:55 +05:30
Ashwin Phatak
f8335aad03
Add block hash to entities, split get and set methods (#161)
* Split get and set entity for PoolCreated and Initialize events.

* Split get/set entity for Mint, Burn and Swap events.

* Split get/set entity for IncreaseLiquidity and DecreaseLiquidity events.

* Split get/set for NFPM Transfer and Collect events.

* Add blockHash to entities.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-23 11:00:40 +05:30
Ashwin Phatak
34de3d51b3
Handle collect event (#158)
* Handle NFPM Collect event.

* Handle NFPM Transfer event.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-22 11:45:21 +05:30
Ashwin Phatak
0d39363467
Move uni-info-watcher event procesing to job queue. (#156)
* Move event procesing to job queue.

* Store block properties in blocks table.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-22 10:02:06 +05:30
Ashwin Phatak
c1ef96ba2e
Handle Position Manager DecreaseLiquidity event. (#148)
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-19 10:43:29 +05:30
Ashwin Phatak
3477366458
Handle increase liquidity event (#143)
* Implement handler for NFPM IncreaseLiquidity event.

* Get contract values by querying uni-watcher.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-16 18:34:51 +05:30
Ashwin Phatak
70e88b1004
Block filler for uni-watcher. (#140) 2021-07-15 13:10:07 +05:30
Ashwin Phatak
ecfa3ed386
Handle swap event (#138)
* Create Swap entity.

* Update day and hour interval data in Swap event handler.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-15 10:45:35 +05:30
Ashwin Phatak
03ceb95a1b
Job queue to process events (#137)
* Job queue to process events.

* Event queue processing changes.
2021-07-14 18:00:26 +05:30
Ashwin Phatak
a4f5d43bc5
Extra info for handling events (tx, block) (#136)
* Extra info in events for downstream processing.

* Changes in uni-info-watcher after change in uni-watcher event schema.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-13 17:32:57 +05:30
Ashwin Phatak
208b0f7f4f
Handle Pool burn event. (#134)
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-13 12:36:10 +05:30
Ashwin Phatak
3a6af9f9cc
Handle mint event (#130)
* Handle mint event and update Factory fields.

* Integrate decimal.js with typeorm.

* Update transaction in Mint event.

* Update day and hour data.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-13 12:01:54 +05:30
Ashwin Phatak
61f211f2d5
Handle pool initialize event (#127)
* Move getConfig to util package.

* Handle Pool initialize event.

* Update Bundle entity ethPriceUSD.

* Update Pool day and hour data.

* Update token derivedETH and complete handleInitialize.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-09 12:38:25 +05:30
Ashwin Phatak
7f5229bf2f
Watch pool burn and swap events (#128)
* Remove test scripts, moved to vulcanize/uniswap-v3-core#watcher-ts.

* Move uniswap analysis docs.

* Watch pool burn and swap events.
2021-07-09 12:30:50 +05:30
Ashwin Phatak
f7df56bb75
Handle pool created event (#124)
* Update Token entities.

* Complete handlePoolCreated in events.

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-07 11:10:10 +05:30
Ashwin Phatak
aec9281fb8
Factory PoolCreated event handler (#120)
* Setup handler for PoolCreated event.

* Create Pool entity.

* Subscribe to uni-watcher for watching events.

* Refactor code to create GraphQLClient in ipld-eth-client.

Co-authored-by: nikugogoi <95nikass@gmail.com>
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-06 16:55:11 +05:30
Ashwin Phatak
b7ffb7c672
uniswap-info-watcher package with frontend schema (#114)
* Implement mock bundle query in watcher.

* Use chance js for generating mock data.

* Add bundles query.

* Setup resolvers with uniswap info schema.

* Add mock query for Burn entity.

* Add mock query for Factory entity.

* Add mock queries for entities Mint, Pool and Transaction.

* Add mock query for Swap entity.

* Add mock queries for day data entities.

* Implment mock ticks query.

* Add mock tokenHourDatas query.

* Add mock queries for uni-info-watcher to readme.

Co-authored-by: nikugogoi <95nikass@gmail.com>
2021-07-02 16:26:32 +05:30