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(CL): replace 6 return values in CreatePosition with a struct #5983

Merged
merged 6 commits into from
Aug 8, 2023

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Aug 8, 2023

Closes: #XXX

What is the purpose of the change

CreatePosition has too many return values. This PR refactors 6 of them with a struct.

A separate struct is created (instead of using model.Position or similar) so that all fields of the returned struct are guaranteed to be set without redundancy with respect to the input values.

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@p0mvn
Copy link
Member Author

p0mvn commented Aug 8, 2023

devbot add changelog api replace 6 return values in CL CreatePosition with a struct

@p0mvn p0mvn added the V:state/compatible/backport State machine compatible PR, should be backported label Aug 8, 2023
@p0mvn
Copy link
Member Author

p0mvn commented Aug 8, 2023

devbot add changelog misc allow testing with different chain-id's in E2E testing

@p0mvn
Copy link
Member Author

p0mvn commented Aug 8, 2023

Test failure here is coming from main and unrelated to this PR

@p0mvn p0mvn marked this pull request as ready for review August 8, 2023 13:31
@ValarDragon
Copy link
Member

devbot add changelog misc allow testing with different chain-id's in E2E testing

@ValarDragon
Copy link
Member

devbot add changelog api replace 6 return values in CL CreatePosition with a struct

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@ValarDragon ValarDragon merged commit 86f0c00 into main Aug 8, 2023
1 check passed
@ValarDragon ValarDragon deleted the roman/cl-lp-returns branch August 8, 2023 16:02
@ValarDragon ValarDragon added the A:backport/v16.x backport patches to v16.x branch label Aug 8, 2023
mergify bot pushed a commit that referenced this pull request Aug 8, 2023
…#5983)

* refactor(CL): replace 6 return values in CreatePosition with a struct

* changelog

* update changelog

* update changelog

* Apply suggestions from code review

* Update x/concentrated-liquidity/lp.go

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
(cherry picked from commit 86f0c00)

# Conflicts:
#	CHANGELOG.md
#	x/concentrated-liquidity/lp.go
#	x/concentrated-liquidity/msg_server.go
#	x/concentrated-liquidity/position.go
#	x/concentrated-liquidity/position_test.go
#	x/concentrated-liquidity/swaps_test.go
p0mvn added a commit that referenced this pull request Aug 9, 2023
ValarDragon pushed a commit that referenced this pull request Aug 9, 2023
p0mvn added a commit that referenced this pull request Aug 29, 2023
…#5983)

* refactor(CL): replace 6 return values in CreatePosition with a struct

* changelog

* update changelog

* update changelog

* Apply suggestions from code review

* Update x/concentrated-liquidity/lp.go

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
@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
A:backport/v16.x backport patches to v16.x branch C:x/concentrated-liquidity V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants