File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -23,5 +23,5 @@ might define others.
2323 ` DistributionQuery::DelegationTotalRewards ` and
2424 ` DistributionQuery::DelegatorValidators ` queries. Only chains running CosmWasm
2525 ` 1.4.0 ` or higher support this.
26- - ` cosmwasm_2_0 ` enables ` CosmosMsg::Any ` . Only chains running CosmWasm ` 2.0.0 `
27- or higher support this.
26+ - ` cosmwasm_2_0 ` enables ` CosmosMsg::Any ` and ` QueryRequest::Grpc ` . Only chains
27+ running CosmWasm ` 2.0.0 ` or higher support this.
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ cosmwasm_1_3 = ["cosmwasm_1_2"]
4747# It requires the host blockchain to run CosmWasm `1.4.0` or higher.
4848cosmwasm_1_4 = [" cosmwasm_1_3" ]
4949# This enables functionality that is only available on 2.0 chains.
50- # It adds `CosmosMsg::Any`, replacing `CosmosMsg::Stargate`.
50+ # It adds `CosmosMsg::Any`, replacing `CosmosMsg::Stargate`. It also adds `QueryRequest::Grpc`.
5151cosmwasm_2_0 = [" cosmwasm_1_4" ]
5252
5353[dependencies ]
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ pub enum QueryRequest<C> {
6666 #[ cfg( feature = "stargate" ) ]
6767 Ibc ( IbcQuery ) ,
6868 Wasm ( WasmQuery ) ,
69+ #[ cfg( feature = "cosmwasm_2_0" ) ]
6970 Grpc ( GrpcQuery ) ,
7071}
7172
@@ -139,6 +140,7 @@ impl<C: CustomQuery> From<WasmQuery> for QueryRequest<C> {
139140 }
140141}
141142
143+ #[ cfg( feature = "cosmwasm_2_0" ) ]
142144impl < C : CustomQuery > From < GrpcQuery > for QueryRequest < C > {
143145 fn from ( msg : GrpcQuery ) -> Self {
144146 QueryRequest :: Grpc ( msg)
Original file line number Diff line number Diff line change @@ -606,6 +606,7 @@ impl<C: CustomQuery + DeserializeOwned> MockQuerier<C> {
606606 QueryRequest :: Stargate { .. } => SystemResult :: Err ( SystemError :: UnsupportedRequest {
607607 kind : "Stargate" . to_string ( ) ,
608608 } ) ,
609+ #[ cfg( feature = "cosmwasm_2_0" ) ]
609610 QueryRequest :: Grpc ( _) => SystemResult :: Err ( SystemError :: UnsupportedRequest {
610611 kind : "GRPC" . to_string ( ) ,
611612 } ) ,
You can’t perform that action at this time.
0 commit comments