dex-subgraph icon indicating copy to clipboard operation
dex-subgraph copied to clipboard

Indexing CMM brackets

Open josojo opened this issue 5 years ago • 2 comments

This PR makes sure that the basic Fleet deployments are indexed. A later PR will index more information, which will allow more advanced queries like getting the bracket-strategy price span.

Testplan:

Run through the steps of the Readme

and then check that you see the 1 strategy with 2 brackets deployed on your localhost with this query:

http://127.0.0.1:8000/subgraphs/name/gnosis/protocol/graphql?query=subscription%20UserData%20%7B%0A%20%20fleetDeployeds%20%7Bid%2C%20fleet%7D%0A%7D

josojo avatar Aug 06 '20 15:08 josojo

Currently, the fleetdeployment, ordersetting and transferApproveDeposits are happing in a separate transaction and hence, I think they need to be indexed separately and we have to go the roundtrips.

But, @andre-meyer told me yesterday, that this several step process is a huge issue for the gnosis safe. Maybe we would be quicker, if we would do all interaction(fleetdeployment, orderplacement and depositing) in one transaction. I will discuss it with him

josojo avatar Aug 13 '20 14:08 josojo

I'm not super aware of the scripts/model. In my opinion, it will help, both the design and the review, if you can write some UML with the entities and their relations.

I see we are not using the entities we have already defined. something in the direction of what we have for the other parts: image

Otherwise, if we see is better to have it separated, we can make it as an independent subgraph

anxolin avatar Aug 21 '20 15:08 anxolin