-
Notifications
You must be signed in to change notification settings - Fork 607
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
feat(x/cosmwasmpool): Sending token_in_max_amount
to the contract before running contract msg
#5855
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iboss-ptk
changed the title
feat(x/cosmwasmpool): Sending token_in_max_amount to the contract before running contract msg
feat(x/cosmwasmpool): Sending Jul 17, 2023
token_in_max_amount
to the contract before running contract msg
iboss-ptk
added
V:state/compatible/backport
State machine compatible PR, should be backported
V:state/compatible/no_backport
State machine compatible PR, depends on prior breaks
and removed
V:state/compatible/backport
State machine compatible PR, should be backported
labels
Jul 17, 2023
p0mvn
approved these changes
Jul 17, 2023
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
ValarDragon
approved these changes
Jul 28, 2023
ValarDragon
added
V:state/breaking
State machine breaking PR
and removed
V:state/compatible/no_backport
State machine compatible PR, depends on prior breaks
labels
Jul 28, 2023
VitalyV1337
pushed a commit
to VitalyV1337/osmosis-1
that referenced
this pull request
Jul 31, 2023
…efore running contract msg (osmosis-labs#5855) ## What is the purpose of the change In order for [transmuter to treat LP shares token as swappable asset](osmosis-labs/transmuter#6), on `SwapExactAmountOut` it needs to burn the expected token in, but previous implementation sends token to the contract after running sudo msg, which means at the time, contract does not have enough token to burn. This change fix the aforementioned issue by: - sending `token_in_denom` with `token_in_max_amount` to the contract - run sudo msg - send the remaining token back to sender *(E.g.: This pull request improves documentation of area A by adding ....* ## Testing and Verifying The existing test is updated to cover the changes ## Documentation and Release Note - [x] Changelog entry added to `Unreleased` section of `CHANGELOG.md`? Where is the change documented? - [x] Specification (`x/cosmwasmpool/README.md`)
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A:automerge
C:docs
Improvements or additions to documentation
V:state/breaking
State machine breaking PR
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
In order for transmuter to treat LP shares token as swappable asset, on
SwapExactAmountOut
it needs to burn the expected token in, but previous implementation sends token to the contract after running sudo msg, which means at the time, contract does not have enough token to burn.This change fix the aforementioned issue by:
token_in_denom
withtoken_in_max_amount
to the contract(E.g.: This pull request improves documentation of area A by adding ....
Testing and Verifying
The existing test is updated to cover the changes
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/cosmwasmpool/README.md
)