-
Notifications
You must be signed in to change notification settings - Fork 0
misc changes #21
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
misc changes #21
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Pull Request Overview
This pull request refactors the codebase to use standardized "currency" terminology instead of "token", aligning with Uniswap V4 SDK conventions. It also introduces new utility functions for fetching position and tick information while improving code organization and test coverage.
Key changes:
- Renamed
token0/token1tocurrency0/currency1throughout the codebase - Split
getPositionfunctionality intogetPosition(returns SDK instances) andgetPositionInfo(returns raw data) - Added new
getTickInfoutility function for fetching tick-level pool data
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/preparePermit2Data.ts | Updated documentation example to use currency0 instead of token0 |
| src/utils/preparePermit2BatchData.ts | Updated documentation example to use currency0/currency1 instead of token0/token1 |
| src/utils/getTickInfo.ts | New utility to fetch tick information from V4 StateView |
| src/utils/getPositionInfo.ts | New utility to fetch raw position data without SDK instances |
| src/utils/getPosition.ts | Refactored to use getPositionInfo and renamed variables to currency0/currency1 |
| src/utils/buildRemoveLiquidityCallData.ts | Updated getPosition call signature (removed object wrapper) |
| src/utils/buildCollectFeesCallData.ts | Updated getPosition call signature (removed object wrapper) |
| src/utils/buildAddLiquidityCallData.ts | Updated terminology and variable names to use currency0/currency1 |
| src/types/utils/index.ts | Added export for getTickInfo types |
| src/types/utils/getTickInfo.ts | New type definitions for tick information |
| src/types/utils/getPosition.ts | Updated types to use currency0/currency1 and added GetPositionInfoResponse |
| src/types/utils/buildAddLiquidityCallData.ts | Updated documentation to use currency0/currency1 |
| src/test/utils/getTickInfo.test.ts | New tests for getTickInfo utility |
| src/test/utils/getPositionInfo.test.ts | New tests for getPositionInfo utility |
| src/test/utils/getPosition.test.ts | Refactored tests to use mocked getPositionInfo |
| src/test/utils/getPool.test.ts | Renamed test variables to use currency terminology |
| src/test/utils/buildRemoveLiquidityCallData.test.ts | Updated test expectations for new getPosition signature |
| src/test/utils/buildAddLiquidityCallData.test.ts | Updated tests to use currency0/currency1 terminology |
| src/test/helpers/testFactories.ts | Updated factory functions to use currency0/currency1 parameters |
| src/helpers/tokens.ts | Updated parameter names and documentation to use currency terminology |
| src/core/uniDevKitV4.ts | Added getTickInfo and getPositionInfo methods, updated documentation |
| package.json | Version bump from 1.1.1 to 2.1.1 |
| README.md | Updated documentation for new methods and terminology |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
luchobonatti
left a comment
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.
LGTM 💯 !
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Uh oh!
There was an error while loading. Please reload this page.