diff --git a/CHANGELOG.md b/CHANGELOG.md index 708b285e2df..a064fa0bbd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Misc Improvements + +* [#6309](https://github.com/osmosis-labs/osmosis/pull/6309) Add Cosmwasm Pool Queries to Stargate Query ### Features * [#6416](https://github.com/osmosis-labs/osmosis/pull/6416) feat[CL]: add num initialized ticks query diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index 75643230d5b..b15e1312342 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -17,6 +17,7 @@ import ( gammv2types "github.com/osmosis-labs/osmosis/v19/x/gamm/v2types" concentratedliquidityquery "github.com/osmosis-labs/osmosis/v19/x/concentrated-liquidity/client/queryproto" + cosmwasmpooltypes "github.com/osmosis-labs/osmosis/v19/x/cosmwasmpool/client/queryproto" downtimequerytypes "github.com/osmosis-labs/osmosis/v19/x/downtime-detector/client/queryproto" gammtypes "github.com/osmosis-labs/osmosis/v19/x/gamm/types" incentivestypes "github.com/osmosis-labs/osmosis/v19/x/incentives/types" @@ -33,6 +34,8 @@ import ( // stargateWhitelist keeps whitelist and its deterministic // response binding for stargate queries. +// CONTRACT: since results of queries go into blocks, queries being added here should always be +// deterministic or can cause non-determinism in the state machine. // // The query can be multi-thread, so we have to use // thread safe sync.Map. @@ -78,6 +81,10 @@ func init() { setWhitelistedQuery("/cosmos.staking.v1beta1.Query/Validator", &stakingtypes.QueryValidatorResponse{}) // osmosis queries + // cosmwasm pool + setWhitelistedQuery("/osmosis.cosmwasmpool.v1beta1.Query/Pools", &cosmwasmpooltypes.PoolsResponse{}) + setWhitelistedQuery("/osmosis.cosmwasmpool.v1beta1.Query/Params", &cosmwasmpooltypes.ParamsResponse{}) + setWhitelistedQuery("/osmosis.cosmwasmpool.v1beta1.Query/ContractInfoByPoolId", &cosmwasmpooltypes.ContractInfoByPoolIdResponse{}) // epochs setWhitelistedQuery("/osmosis.epochs.v1beta1.Query/EpochInfos", &epochtypes.QueryEpochsInfoResponse{})