Skip to content

Commit

Permalink
Add migrating entry for grpc query
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Dec 20, 2023
1 parent 9d9131b commit 2d8baa9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,23 @@ major releases of `cosmwasm`. Note that you can also view the
+};
```

- If you were using `QueryRequest::Stargate`, you might want to enable the
`cosmwasm_2_0` cargo feature and migrate to `QueryRequest::Grpc` instead.
While the stargate query sometimes returns protobuf encoded data and sometimes
JSON encoded data, depending on the chain, the gRPC query always returns
protobuf encoded data.

```diff
-deps.querier.query(&QueryRequest::Stargate {
- path: "/service.Path/ServiceMethod".to_string(),
- data: Binary::new(b"DATA"),
-})?;
+deps.querier.query(&QueryRequest::Grpc(GrpcQuery {
+ path: "/service.Path/ServiceMethod".to_string(),
+ data: Binary::new(b"DATA"),
+}))?;
```

## 1.4.x -> 1.5.0

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

0 comments on commit 2d8baa9

Please sign in to comment.