Skip to content
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

refactor: remove GetTotalShares, GetTotalLiquidity and GetExitFee from PoolI #4801

Merged
merged 7 commits into from
Mar 31, 2023

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Mar 30, 2023

Closes: #4787

What is the purpose of the change

This PR refactors PoolI to remove/move APIs that are either incompatible for all pools or must be defined on the pool module instead of a pool struct.

Brief Changelog

  • Move poolmanager.PoolI.GetTotalPoolLiquidity to
    • poolmanager.PoolModuleI
    • keep it on gammtypes.CFMMPoolI as well
  • Remove/move from poolmanager.GetExitFee to gammtypes.CFMMPoolI
  • Remove/move poolmanager.GetTotalShares to gammtypes.CFMMPoolI
    • Don't have a concept of shares on CL pool.
  • Implement GetTotalPoolLiquidity on gamm keeper
  • Implement and test GetTotalPoolLiquidity on CL keeper
  • Pass through helper function renames and exports where required.

Testing and Verifying

Added tests and covered by existing

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not applicable

@github-actions github-actions bot added C:app-wiring Changes to the app folder C:x/concentrated-liquidity C:x/gamm Changes, features and bugs related to the gamm module. C:x/poolmanager T:build labels Mar 30, 2023
@p0mvn p0mvn added the V:state/breaking State machine breaking PR label Mar 30, 2023
@p0mvn p0mvn marked this pull request as ready for review March 31, 2023 02:46
@p0mvn p0mvn mentioned this pull request Mar 31, 2023
Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor comments, well done 🙌

x/concentrated-liquidity/pool_test.go Outdated Show resolved Hide resolved
x/concentrated-liquidity/pool_test.go Outdated Show resolved Hide resolved
x/gamm/keeper/pool.go Outdated Show resolved Hide resolved
x/gamm/keeper/pool_service_test.go Show resolved Hide resolved
@p0mvn p0mvn merged commit 8ec7dad into main Mar 31, 2023
@p0mvn p0mvn deleted the roman/refactor-pooli branch March 31, 2023 23:23
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
@github-actions github-actions bot mentioned this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:app-wiring Changes to the app folder C:x/concentrated-liquidity C:x/gamm Changes, features and bugs related to the gamm module. C:x/poolmanager T:build V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: handle GetTotalPoolLiquidity incompatibility with the CL pool
2 participants