message: Hackatom builds properly
diff: @@ -4,7 +4,7 @@ This guide explains what is needed to upgrade contracts when migrating over
  major releases of `cosmwasm`. Note that you can also view the
  [complete CHANGELOG](./CHANGELOG.md) to understand the differences.
  -## 0.11 -> 0.10
  +## 0.10 -> 0.11
  - Contracts now support any custom error type `E: ToString + From<StdError>`.
  Previously this has been `StdError`, which you can still use. However, you can
  @@ -178,6 +178,51 @@ major releases of `cosmwasm`. Note that you can also view the
  let api = MockApi::default();
  ```
  +- Add `MessageInfo` as separate arg after `Env` for `init`, `handle`, `migrate`. Add
  + `Env` arg to `query`. Use `info.sender` instead of `env.message.sender` and
  + `info.sent_funds` rather than `env.message.sent_funds`. Just changing the function signatures
  + of the 3-4 export functions should be enough, then the compiler will warn you anywhere you use
  + `env.message`
  +
  + ```rust
  + // before
  + pub fn init<S: Storage, A: Api, Q: Querier>(
  + deps: &mut Extern<S, A, Q>,
  + env: Env,
  + msg: InitMsg,
  + ) {
  + deps.storage.set(
  + CONFIG_KEY,
  + &to_vec(&State {
  + verifier: deps.api.canonical_address(&msg.verifier)?,
  + beneficiary: deps.api.canonical_address(&msg.beneficiary)?,
  + funder: deps.api.canonical_address(&env.message.sender)?,
  + })?,
  + );
  + }
  +
  + // after
  + pub fn init<S: Storage, A: Api, Q: Querier>(
  + deps: &mut Extern<S, A, Q>,
  + _env: Env,
  + info: MessageInfo,
  + msg: InitMsg,
  + ) {
  + deps.storage.set(
  + CONFIG_KEY,
  + &to_vec(&State {
  + verifier: deps.api.canonical_address(&msg.verifier)?,
  + beneficiary: deps.api.canonical_address(&msg.beneficiary)?,
  + funder: deps.api.canonical_address(&info.sender)?,
  + })?,
  + );
  + }
  + ```
  +
  +- Test code now has `mock_info` which takes the same args `mock_env` used to. You can just pass `mock_env()`
  + directly into the function calls unless you need to change height/time.
  +- One more object to pass in for both unit and integration tests.
  +
  ## 0.9 -> 0.10
  Integration tests:
  