Skip to content

Commit 2d8baa9

Browse files
committed
Add migrating entry for grpc query
1 parent 9d9131b commit 2d8baa9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

MIGRATING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,23 @@ major releases of `cosmwasm`. Note that you can also view the
189189
+};
190190
```
191191

192+
- If you were using `QueryRequest::Stargate`, you might want to enable the
193+
`cosmwasm_2_0` cargo feature and migrate to `QueryRequest::Grpc` instead.
194+
While the stargate query sometimes returns protobuf encoded data and sometimes
195+
JSON encoded data, depending on the chain, the gRPC query always returns
196+
protobuf encoded data.
197+
198+
```diff
199+
-deps.querier.query(&QueryRequest::Stargate {
200+
- path: "/service.Path/ServiceMethod".to_string(),
201+
- data: Binary::new(b"DATA"),
202+
-})?;
203+
+deps.querier.query(&QueryRequest::Grpc(GrpcQuery {
204+
+ path: "/service.Path/ServiceMethod".to_string(),
205+
+ data: Binary::new(b"DATA"),
206+
+}))?;
207+
```
208+
192209
## 1.4.x -> 1.5.0
193210

194211
- Update `cosmwasm-*` dependencies in Cargo.toml (skip the ones you don't use):

0 commit comments

Comments
 (0)