diff --git a/MIGRATING.md b/MIGRATING.md index 6099eda4..53b7a6cb 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -2,6 +2,54 @@ This guide explains what is needed to upgrade contracts when migrating over major releases of `sylvia`. Note that you can also view the [complete CHANGELOG](https://github.com/CosmWasm/sylvia/blob/main/CHANGELOG.md) to understand the differences. + +## 1.0.2 -> + +### Remove types forwarding to interface in `sv::messages` + +1. Types forwarding to the messages' associated types is not required: +```diff +-#[contract] +-#[sv::messages(generic as Generic +-impl Contract {} ++#[contract] ++#[sv::messages(generic as Generic)] ++impl Contract {} +``` + +This change is optional, since the generics are still accepted by the parser. Though they are +ignored in the further process. + + +2. Multitest's `CodeId` is now generic over the contract type, not only the generics of the contract: +```diff +-let code_id: CodeId< +- SvCustomMsg, +- SvCustomMsg, +- _, +-> = CodeId::store_code(&app); ++let code_id: CodeId< ++ GenericContract< ++ SvCustomMsg, ++ SvCustomMsg, ++ >, ++ _, ++> = CodeId::store_code(&app); +``` + +3. Lifetime ellision in a contract's implementation block is not supported anymore. +```diff +-#[contract] +-impl Cw1SubkeysContract<'_> { +- // [...] +-} ++#[contract] ++impl<'a> Cw1SubkeysContract<'a> { ++ // [...] ++} +``` + + ## 0.9.3 -> 0.10.0 ## Multitest proxy