message: MIGRATING entry for new schema gen
diff: @@ -4,6 +4,88 @@ 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.
  +## 1.0.0 -> ?
  +
  +- There are changes to how we generate schemas, resulting in less boilerplace
  + maintenance for smart contract devs. The changes are backwards-compatible -
  + old contracts will continue working for a while, but it's highly recommended
  + to migrate now.
  +
  + Your contract should have a `cosmwasm_schema` dependency in its `Cargo.toml`
  + file. Move it from `dev-dependencies`to regular `dependencies`.
  +
  + ```diff
  + [dependencies]
  + + cosmwasm-schema = { version = "1.0.0" }
  + cosmwasm-std = { version = "1.0.0", features = ["stargate"] }
  + cw-storage-plus = { path = "../../packages/storage-plus", version = "0.10.0" }
  + schemars = "0.8.1"
  + serde = { version = "1.0.103", default-features = false, features = ["derive"] }
  + thiserror = { version = "1.0.23" }
  +
  + [dev-dependencies]
  + - cosmwasm-schema = { version = "1.0.0" }
  + ```
  +
  + Types you send to the contract and receive back are annotated with a bunch of
  + derives and sometimes `serde` annotations. Remove all those attributes and
  + replace them with `#[cosmwasm_schema::cw_serde]`.
  +
  + ```diff
  + + use cosmwasm_schema::{cw_serde, QueryResponses};
  +
  + // *snip*
  +
  + - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
  + - #[serde(deny_unknown_fields, rename_all = "snake_case")]
  + + #[cw_serde]
  + pub enum ExecuteMsg {
  + Release {},
  + Argon2 {
  + mem_cost: u32,
  + time_cost: u32,
  + },
  + }
  + ```
  +
  + Derive `cosmwasm_schema::QueryResponses` for your `QueryMsg` type and annotate
  + each query with its return types. This lets the interface description file
  + (schema) generation know what return types to include - and therefore, any
  + clients relying on the generated schemas will also know how to interpret
  + response data from your contract.
  +
  + ```diff
  + #[cw_serde]
  + + #[derive(QueryResponses)]
  + pub enum QueryMsg {
  + + #[returns(VerifierResponse)]
  + Verifier {},
  + + #[returns(Uint128)]
  + Balance { address: String },
  + }
  + ```
  +
  + The boilerplate in `examples/schema.rs` is also replaced with a macro
  + invocation. Just give it all the types sent to the contract's entrypoints.
  + Skip the ones that are not present in the contract - the only mandatory field
  + is `instantiate`.
  +
  + ```rust
  + use cosmwasm_schema::write_api;
  +
  + use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg};
  +
  + fn main() {
  + write_api! {
  + instantiate: InstantiateMsg,
  + query: QueryMsg,
  + execute: ExecuteMsg,
  + sudo: SudoMsg,
  + migrate: MigrateMsg,
  + }
  + }
  + ```
  +
  ## 1.0.0-beta -> 1.0.0
  - The minimum Rust supported version is 1.56.1. Verify your Rust version is >=
  