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

override QueryFnName #4132

Merged
merged 3 commits into from
Jan 31, 2023
Merged

override QueryFnName #4132

merged 3 commits into from
Jan 31, 2023

Conversation

vuong177
Copy link
Contributor

Closes: #4084

What is the purpose of the change

  • Add override QueryFnName for EstimateSwapExactAmountIn.`
  • We need this override because when adding this query cmd, functionParseExpectedQueryFnName return SwapExactAmountIn instead of EstimateSwapExactAmountIn.
  • Also, we have the same issue with `EstimateSwapExactAmountOut query cmd.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? (yes / no) no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? (yes / no) no
  • How is the feature or change documented? (not applicable / specification (x/<module>/spec/) / Osmosis docs repo / not documented) no

@github-actions github-actions bot added C:CLI C:x/gamm Changes, features and bugs related to the gamm module. labels Jan 29, 2023
@vuong177
Copy link
Contributor Author

Oh, we'll move those queries to pool-manager module, right? Do we need this PR anymore?

Copy link
Member

@pysel pysel left a comment

Choose a reason for hiding this comment

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

Hey @vuong177! Thanks for the PR

osmoutils/osmocli/query_cmd_wrap.go Show resolved Hide resolved
@p0mvn
Copy link
Member

p0mvn commented Jan 30, 2023

Thanks, @vuong177 . Can you please make this change for poolmanager module too?

Also, please confirm that manual tests have been done

@vuong177
Copy link
Contributor Author

yep, @p0mvn. This is a log when I try to query in mainnet. It's good.

estimate-swap-exact-amount :

osmosisd q gamm estimate-swap-exact-amount-in 722 osmo1xwazl8ftks4gn00y5x3c47auquc62ssuds42sz 9746109223341728563ibc/6AE98883D4D5D5FF9E50D7130F1305DA2FFA0C652D1DD9C123657C6B4EB2DF8A --swap-route-pool-ids 722,678 --swap-route-denoms uosmo,ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858 --output json
{"token_out_amount":"4280659"}

estimate-swap-exact-amount-out :

osmosisd q gamm estimate-swap-exact-amount-out 722 osmo1xwazl8ftks4gn00y5x3c47auquc62ssuds42sz 9746109uosmo --swap-route-pool-ids 722 --swap-route-denoms ibc/6AE98883D4D5D5FF9E50D7130F1305DA2FFA0C652D1DD9C123657C6B4EB2DF8A --output json     
{"token_in_amount":"21878426175162868869"}

I also add CustomFlagOverrides for those query cmd.

@czarcas7ic czarcas7ic added V:state/compatible/backport State machine compatible PR, should be backported A:backport/v14.x backport patches to v14.x branch labels Jan 30, 2023
Copy link
Member

@p0mvn p0mvn left a comment

Choose a reason for hiding this comment

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

Amazing. Thank you

@p0mvn p0mvn merged commit e15fc6b into main Jan 31, 2023
@p0mvn p0mvn deleted the QueryFnNamefix branch January 31, 2023 04:24
mergify bot pushed a commit that referenced this pull request Jan 31, 2023
* override QueryFnName

* duplicate prepareDescriptor

* add CustomFlagOverrides && make change for poolmanager cli

(cherry picked from commit e15fc6b)

# Conflicts:
#	x/poolmanager/client/cli/query.go
p0mvn added a commit that referenced this pull request Jan 31, 2023
p0mvn added a commit that referenced this pull request Jan 31, 2023
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v14.x backport patches to v14.x branch C:CLI C:x/gamm Changes, features and bugs related to the gamm module. C:x/poolmanager V:state/compatible/backport State machine compatible PR, should be backported
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Method SwapExactAmountIn does not exist on the querier.
4 participants