- Notifications
You must be signed in to change notification settings - Fork386
feat: create pool and create/remove liquidity position for v3#264
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Very nice! Let me know when you want a review :) Any idea why the CI chokes on the CLI tests? |
Thanks! Will do. Not sure as to why the CI isn't passing - was working earlier when I ran tests locally. I'll take a look tonight and see what's up. |
Btw, do you think this would be easy to do at the same time?#254 |
Long story short: |
Sure thing, seems pretty straightforward to implement |
Took a peek at the logs for the CI, seems like provider env variable may not have set |
ErikBjare commentedJul 14, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ah yeah, I just now remember that secrets (like our PROVIDER credentials) aren't set on PRs. Might get a second key, obfuscate it slightly, and use it for PRs. |
Should have fixed it in#266, feel free to rebase so the tests get green :) |
codecovbot commentedJul 15, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #264 +/- ##==========================================+ Coverage 82.42% 84.59% +2.16%========================================== Files 10 10 Lines 808 1032 +224 ==========================================+ Hits 666 873 +207- Misses 142 159 +17
Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here. |
Now that we have all green :) Going to write tests for the methods that address#254 and should be good for a review |
…V3 subgraph as on-chain method takes long to run
After implementing a version of this - seems this takes quite a while to run as it iterates across the entire tick range of a pool and calls the .tick() function of the contract each iteration. So, I added a method to fetch the TVL data from the uniswap subgraph using the built-in request library. Do you think I should remove the subgraph query function? suppose it's easy enough for users to make similar requests on their own (this is also failing some tests at the moment). |
KeremP commentedAug 18, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@ErikBjare this is now ready for review :) wrt to#254 I've added a function get_tvl_in_pool() and have commented the logic (some weird hacks with the tickBitmap to get it working), but let me know if any questions. Edit: I've removed my prior functions for querying subgraph, feel that's out of scope here and there are known issues w/ its calculation of TVL |
Amazing job, that's impressive. The only thing I just can't get why IMO if we have a scenario when this function has the reason to be implemented for our address, then we also have a similar/same scenario for others. |
Fair point, I agree. I'll make that change quick. |
@ErikBjare just take a look at this grandeur! |
ErikBjare left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Awesome work@KeremP! You da MVP! 🥇
Found no major issues, just a couple nits. I'll fix and merge :)
Sorry for the late review.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
… position, TVL calculation (#264)implementing V3 features. added methods to fetch on-chain pool datafeature: adding position miniting (WIP)WIP testing V3 pool position mintingwip v3 featuresfeat: create v3 pool and mint/add liquidity positionfix: add 0x0 address assert in get_pool_instancefeat: close v3 liquidity positionminor cleanupsadd get_tvl_in_pool to return total value locked in poolimplementing V3 features. added methods to fetch on-chain pool datafeature: adding position miniting (WIP)WIP testing V3 pool position mintingwip v3 featuresfeat: create v3 pool and mint/add liquidity positionfeat: close v3 liquidity positionminor cleanupsfixing minor errors afer rebasecleanup asset amounts for testsfix: ensure asset amounts are correct for v3 liquidity position testsadd tests for TVL calculations. include method for fetching TVL from V3 subgraph as on-chain method takes long to runadd arbitrum subgraph endpointfix typoskip tvl tests for nowfeat: get TVL on chainminor cleanupsfix aribitrum multicall2 address. clean up TVL testupdate get_liquidity_positions to take arbitrary address param
Merged a squashed version in9edfbaa (which was messy), now trying to address some issues during rebase. |
Alright, I can't manage to get this PR to get marked as "Merged" for some reason (keeps complaining about some conflict?). Changes are merged though, fixing some lingering issues on master. Thanks again for contributing@KeremP! ❤️ |
Sounds good! Thanks for the review :) |
ghost commentedSep 28, 2023
What is the difference between mint_liquidity and mint_position here? I tried to create positions using both. mint_liquidity was successful but mint_position didn't seem to create a position though the function execution was successful. |
Added V3 features: