-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing first pass of veAllocate schema, handlers, and test cove… #490
Conversation
Ocean-contracts v1.1.0 was released, so make sure your local barge is using that by doing:
|
Please use pascal case in schema.graphql , for example |
…s/schema is working as intended.
…ng, and fixed lint errors.
A first pass for this has been completed. Next Steps for Feature/Epic:
Review:It would be good to get feedback on schema/structure/parameter names How to test
committed to ocean-subgraph
Recommendation - Harden veAllocation.setAllocation()Add a cost to allocate. Users can currently DDOS the subgraph by injecting a bunch of garbage allocates. Make the fee from this go back to veOcean/farmers. Recommendation - User-Friendly AllocationId:The only thing I don't like about this, is that we need to do a bunch of offchain ingestion/calculations/mappings to understand which exchangeId + chainid the user is interacting with. It's not obvious by just looking at the data. Consideration: Perhaps it might be a good idea if veAllocate keeps track of exchangeId + chainId, and can return that in the events. This way, we could use that information (exchangeId + chainId) in the subgraph. This would make the mapping a lot easier. Queries
|
Tests fail because |
…he user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not..
36e130a
to
eccd3e5
Compare
Fixed conflict. New version of ocean-contract module has to be deployed so CI/CD can pass. |
for (let line = 0; line < lines.length; line++) { | ||
subgraph += ' ' + lines[line] + '\n' | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Alex, this "looks good" although crazy to see the need to fix indentation from the build.
Merge is still blocked awaiting for you or Mihai's review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My VS Code will "fix" indentation for every save on subgraph_ve.yaml, making impossible to join them :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will merge it but:
- DF contracts are not handled
- there are no tests
PR is WIP (not ready for merging)
DoD:
[x] - Designed gql schema
[x] Implemented event handlers
[x] Implemented getters & basic functionality
[ ] Implement tx,block,ts to create & update events
[ ] Implement & validate tests
[ ] Sign off on schema and handler design/implementation
Identified issues outside current design scope:
See veAllocate.test.ts
[ ] veAllocate objects & interfaces inside of oceanprotocol/lib
[ ] implementing veAllocate + other functionality inside of contracts repo =>
deploy_pool_template.js
. We need to add vyper dependencies + vyper compile steps intodeploy_docker.sh
and any other places required to deploy contracts via barge or other CI/CD workflows.