Skip to content

Commit 006ba5a

Browse files
committed
Add entries to CHANGELOG and MIGRATING
1 parent 8133151 commit 006ba5a

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ and this project adheres to
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- cosmwasm-std: Change type of `Reply::result` from `ContractResult` to the new
12+
`SubMsgResult`. Both types are equal when serialized but `ContractResult` is
13+
documented to be the result of a contract execution, which is not the case
14+
here. ([#1232])
15+
16+
[#1232]: https://github.com/CosmWasm/cosmwasm/pull/1232
17+
918
## [1.0.0-beta5] - 2022-02-08
1019

1120
### Changed

MIGRATING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ major releases of `cosmwasm`. Note that you can also view the
3333
deps.storage.set(b"foo", b"bar");
3434
```
3535

36+
- Replace `ContractResult` with `SubMsgResult` in `Reply` handling:
37+
38+
```diff
39+
@@ -35,10 +35,10 @@ pub fn instantiate(
40+
#[entry_point]
41+
pub fn reply(deps: DepsMut, _env: Env, reply: Reply) -> StdResult<Response> {
42+
match (reply.id, reply.result) {
43+
- (RECEIVE_DISPATCH_ID, ContractResult::Err(err)) => {
44+
+ (RECEIVE_DISPATCH_ID, SubMsgResult::Err(err)) => {
45+
Ok(Response::new().set_data(encode_ibc_error(err)))
46+
}
47+
- (INIT_CALLBACK_ID, ContractResult::Ok(response)) => handle_init_callback(deps, response),
48+
+ (INIT_CALLBACK_ID, SubMsgResult::Ok(response)) => handle_init_callback(deps, response),
49+
_ => Err(StdError::generic_err("invalid reply id or result")),
50+
}
51+
}
52+
```
53+
3654
## 0.16 -> 1.0.0-beta
3755

3856
- Update CosmWasm dependencies in Cargo.toml (skip the ones you don't use):

0 commit comments

Comments
 (0)