Skip to content

Commit

Permalink
Add CalcJoinPoolShares and CalcExitPoolCoinsFromShares pool queries t…
Browse files Browse the repository at this point in the history
…o Stargate whitelist (#3217)

* TotalDelegationByValidatorForAsset query + tests

* TotalDelegationByValidatorForAsset + tests

* TotalDelegationByValidatorForAsset + test

* names changed

* save

* TotalDelegationByValidatorForDenom query

* TotalDelegationByValidatorForDenom

* JoinSwapExactAmountIn query

* ExitSwapShareAmountIn query

* JoinSwapExactAmountIn, ExitSwapShareAmountIn queries

* JoinSwapExactAmountIn, ExitSwapShareAmountIn queries

* JoinSwapExactAmountIn, ExitSwapShareAmountIn queries

* JoinSwapExactAmountIn, ExitSwapShareAmountIn queries

* JoinSwapExactAmountIn, ExitSwapShareAmountIn queries

* JoinSwapExactAmountIn, ExitSwapShareAmountIn queries

* save

* test: finish CalcJoinPoolShares query test

* tests for CalcExitPoolCoinsFromShares

* tests for CalcExitPoolCoinsFromShares

* save

* test: add additional exit coin tests

* docs rpc TotalDelegationByValidatorForDenom

* TotalDelegationByValidatorForDenom clean

* TotalDelegationByValidatorForDenom query

* TotalDelegationByValidatorForDenom query

* TotalDelegationByValidatorForDenom query

* query

* save

* Update x/gamm/keeper/grpc_query.go

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* Update x/gamm/keeper/grpc_query.go

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* Update x/gamm/keeper/grpc_query.go

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* queries

* docs fix

* feat: add two pool shares queries to stargate whitelist

* chore: update changelog

* feat: generate proto files

* chore: generate proto files

* autocli copy from cosmos

* reset

* save

* SimJoinPoolNoSwap

* docs

* JoinPoolNoSwap simulation

* more fixes

* fix docs and name

* fix: change tokens_in type

* test: fix TestCalcJoinPoolNoSwapShares test

* feat: build query.pb.go file

* name version >>

* update action v

* check variable

* action from personal fork

* remove tag

* chore: remove whitespace

Co-authored-by: Roman <[email protected]>

* chore: workflow files

* chore: fix docker.yml file

* chore: fix required_labels.yml

* chore: remove space

* Update CHANGELOG.md

Co-authored-by: Matt, Park <[email protected]>

Co-authored-by: Ruslan Akhtariev <[email protected]>
Co-authored-by: Ruslan Akhtariev <[email protected]>
Co-authored-by: Roman <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Matt, Park <[email protected]>
(cherry picked from commit 03ec730)
  • Loading branch information
georgemc98 authored and mergify[bot] committed Nov 15, 2022
1 parent c7aec3e commit 962a695
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#2788](https://github.com/osmosis-labs/osmosis/pull/2788) Add logarithm base 2 implementation.
* [#2739](https://github.com/osmosis-labs/osmosis/pull/2739),[#3356](https://github.com/osmosis-labs/osmosis/pull/3356) Add pool type query, and add it to stargate whitelist
* [#2956](https://github.com/osmosis-labs/osmosis/issues/2956) Add queries for calculating amount of shares/tokens you get by providing X tokens/shares when entering/exiting a pool
* [#3217](https://github.com/osmosis-labs/osmosis/pull/3217) Add `CalcJoinPoolShares`, `CalcExitPoolCoinsFromShares`, `CalcJoinPoolNoSwapShares` to the registered Stargate queries list.
* [#3313](https://github.com/osmosis-labs/osmosis/pull/3313) Upgrade to IBC v3.4.0, allowing for IBC transfers with metadata.
* [#3335](https://github.com/osmosis-labs/osmosis/pull/3335) Add v2 spot price queries
- The v1beta1 queries actually have base asset and quote asset reversed, so you were always getting 1/correct spot price. People fixed this by reordering the arguments.
Expand Down
3 changes: 3 additions & 0 deletions wasmbinding/stargate_whitelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func init() {
setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/TotalPoolLiquidity", &gammtypes.QueryTotalPoolLiquidityResponse{})
setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/TotalShares", &gammtypes.QueryTotalSharesResponse{})
setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/SpotPrice", &gammtypes.QuerySpotPriceResponse{})
setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/CalcJoinPoolShares", &gammtypes.QueryCalcJoinPoolSharesResponse{})
setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/CalcExitPoolCoinsFromShares", &gammtypes.QueryCalcExitPoolCoinsFromSharesResponse{})
setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", &gammtypes.QueryCalcJoinPoolNoSwapSharesResponse{})
setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/PoolType", &gammtypes.QueryPoolTypeResponse{})
setWhitelistedQuery("/osmosis.gamm.v2.Query/SpotPrice", &gammv2types.QuerySpotPriceResponse{})

Expand Down

0 comments on commit 962a695

Please sign in to comment.