Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Migrating cw-orch

This guide explains how to upgrade cw-orch in your contracts.

## cw-orch-core 1.x.x -> 2.x.x (Cosmwasm 2.0)

- Update cw-orch dependencies

```diff
-cw-orch = { version = "0.24.0" }
-cw-orch-interchain = { version = "0.3.0" }
+cw-orch = { version = "0.25.0" }
+cw-orch-interchain = { version = "0.4.0" }
```

- Update cosmwasm dependencies

```diff
-cosmwasm-std = { version = "1.5.0", features = ["cosmwasm_1_2"] }
-cosmwasm-schema = { version = "1.2" }
-cw-controllers = { version = "1.0" }
-cw-storage-plus = "1.2.0"
+cosmwasm-std = { version = "2.0.0", features = ["cosmwasm_1_2"] }
+cosmwasm-schema = { version = "2.0" }
+cw-controllers = { version = "2.0" }
+cw-storage-plus = "2.0.0"
```

For more detailed cosmwasm migration see: <https://github.com/CosmWasm/cosmwasm/blob/main/MIGRATING.md#15x---20x>

- Update cosmwasm specifications dependencies

```diff
-cw2 = { version = "1.0" }
-cw20 = { version = "1.0" }
+cw2 = { version = "2.0" }
+cw20 = { version = "2.0" }
```

- Update prost dependencies to 0.13.x

```diff
-prost = { version = "0.12.3", default-features = false }
+prost = { version = "0.13.1", default-features = false }
```

- Update cosmos-sdk-proto dependency to 0.24+

```diff
-cosmos-sdk-proto = { version = "0.20.0", default-features = false }
+cosmos-sdk-proto = { version = "0.24.0", default-features = false }
+ibc-proto = { version = "0.47.0" } # ibc types from cosmos-sdk-proto replaced by `ibc-proto` package
```

- `TxHandler::sender()` was deprecated in 1.1.2 and in 2.x.x versions returned value is `&TxHandler::Sender`, instead of `Addr`, for address please use `TxHandler::sender_addr()`

```diff
-let sender_addr = chain.sender();
+let sender_addr = chain.sender_addr();
```

- Methods from `cw_orch::prelude::Deploy` trait that was related to the daemon state is now inside `cw_orch::daemon::DeployedChains` (feature `daemon` required)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ A Rust tool for interacting with [CosmWasm](https://cosmwasm.com/) smart contrac

The documentation here gives you a brief overview of the functionality that cw-orchestrator provides. We provide more documentation at [orchestrator.abstract.money](https://orchestrator.abstract.money).

> Versions >= 0.25.0 are compatible with CosmWasm 2.x. For more information on migrating from CosmWasm 1.x to 2.x, see the [MIGRATING.md](./MIGRATING.md) file.

## How it works

Interacting with a [CosmWasm](https://cosmwasm.com/) contract involves calling the contract's endpoints using the appropriate message for that endpoint (`ExecuteMsg`,`InstantiateMsg`, `QueryMsg`, `MigrateMsg`, etc.). cw-orchestrator generates typed interfaces for your contracts, allowing them to be type-checked at compile time. This generic interface then allows you to write environment-generic code, meaning that you can re-use the code that you write to deploy your application to `cw-multi-test` when deploying to test/mainnet.
Expand Down