@@ -135,6 +135,39 @@ major releases of `cosmwasm`. Note that you can also view the
135135 +StdError::generic_err(msg)
136136 ```
137137
138+ - Replace addresses in unit tests with valid bech32 addresses. This has to be
139+ done for all addresses that are validated or canonicalized during the test or
140+ within the contract. The easiest way to do this is by using
141+ ` MockApi::addr_make ` . It generates a bech32 address from any string:
142+
143+ ``` diff
144+ -let msg = InstantiateMsg {
145+ - verifier: "verifier".to_string(),
146+ - beneficiary: "beneficiary".to_string(),
147+ -};
148+ +let msg = InstantiateMsg {
149+ + verifier: deps.api.addr_make("verifier").to_string(),
150+ + beneficiary: deps.api.addr_make("beneficiary").to_string(),
151+ +};
152+ ```
153+
154+ - Replace addresses in integration tests using ` cosmwasm-vm ` with valid bech32
155+ addresses. This has to be done for all addresses that are validated or
156+ canonicalized during the test or within the contract. The easiest way to do
157+ this is by using ` MockApi::addr_make ` . It generates a bech32 address from any
158+ string:
159+
160+ ``` diff
161+ -let msg = InstantiateMsg {
162+ - verifier: "verifier".to_string(),
163+ - beneficiary: "beneficiary".to_string(),
164+ -};
165+ +let msg = InstantiateMsg {
166+ + verifier: instance.api().addr_make("verifier").to_string(),
167+ + beneficiary: instance.api().addr_make("beneficiary").to_string(),
168+ +};
169+ ```
170+
138171## 1.4.x -> 1.5.0
139172
140173- Update ` cosmwasm-* ` dependencies in Cargo.toml (skip the ones you don't use):
0 commit comments