Skip to content

Commit

Permalink
docs: updated CHANGELOG and docs before v0.5.0 (#84)
Browse files Browse the repository at this point in the history
* docs: updated

* docs: updated readme
  • Loading branch information
srdtrk committed Feb 5, 2024
1 parent cf16563 commit bc30f22
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 22 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## v0.5.0 (2024-02-05)

### Features

- Added support for UNORDERED channels introduced to `icahost` in `ibc-go` v8.1.0. (https://github.com/srdtrk/cw-ica-controller/pull/74)
- Added `ExecuteMsg::CloseChannel` to close a channel so that it may be reopened with different options. (https://github.com/srdtrk/cw-ica-controller/pull/78)

### API Breaking Changes

- Removed `allow_channel_open_init` from `ContractState`. (https://github.com/srdtrk/cw-ica-controller/pull/76)
- Removed needless pass by value in `helpers.rs`. (https://github.com/srdtrk/cw-ica-controller/pull/76)
- Added `channel_ordering` field to `ChannelOpenInitOptions`. (https://github.com/srdtrk/cw-ica-controller/pull/74)

## v0.4.2 (2024-01-28)

### Changes
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,16 @@ cw-ica-controller = { version = "0.3.0", default-features = false }

### Channel Closing and Reopening

If the ICA channel is closed, for example, due to a timed out packet. (This is because the semantics of ordered channels in IBC requires that any timeout will cause the channel to be closed.) The contract is then able to create a new channel with the same interchain account address, and continue to use the same interchain account. To do this, you submit a `ExecuteMsg::CreateChannel`. This can also be seen in the end to end tests.
#### Channel Closing

An ICA channel can be closed due to a timed out packet if the channel is ordered.
Otherwise, the channel can be closed by the user by submitting a `ExecuteMsg::CloseChannel` message.

#### Channel Reopening

If the ICA channel is closed, the contract is then able to create a new channel with the same interchain account address, and continue to use the same interchain account. To do this, you submit a `ExecuteMsg::CreateChannel`.
Note that the `channel_open_init_options` can be changed when creating a new channel.
This is useful if the user wants to change the ordering of the channel.

## Demo

Expand Down Expand Up @@ -336,7 +345,6 @@ This contract follows [semantic versioning](https://semver.org/), but with the f
This contract is not meant to be used in production. It is meant to be used as a reference implementation for how to build a CosmWasm contract that can communicate with the golang ica/host module. The following are some of the limitations of this contract:

- The contract cannot create multiple interchain accounts. It can only create one.
- ICA channels must be ordered (enforced by golang ica/host module). Due to the semantics of ordered channels in IBC, any timeout will cause the channel to be closed.

## Acknowledgements

Expand Down
6 changes: 3 additions & 3 deletions src/ibc/types/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//!
//! This file contains the [`IcaMetadata`] struct and its methods.
//!
//! The metadata is the information that is communicated during the handshake between the
//! ICA controller and the ICA host. It encodes key information about the messages exchanged
//! between the ICA controller and the ICA host.
//! The version metadata is the information that is communicated during the ICS-27 channel
//! handshake between this contract and the ICA host. It encodes key information about the
//! interchain account.

use cosmwasm_schema::cw_serde;
use cosmwasm_std::{Deps, IbcChannel};
Expand Down
2 changes: 1 addition & 1 deletion src/ibc/types/packet.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! # Packet
//!
//! This module contains the packet data to be send to the ica host and acknowledgement data types.
//! This module contains the ICS-27 packet data and acknowledgement types.

use cosmwasm_schema::cw_serde;
use cosmwasm_std::{to_json_binary, CosmosMsg, Env, IbcMsg, IbcTimeout, StdError, StdResult};
Expand Down
12 changes: 2 additions & 10 deletions src/ibc/types/stargate.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
//! # Stargate
//!
//! This module contains all the IBC stargate types that are needed to communicate with the IBC
//! core module. The use of this module is optional, and it currently only needed if the ICA controller
//! is not provided with the [handshake version metadata](super::metadata::IcaMetadata) by the relayer.
//!
//! Not all blockchains support the stargate messages, it is therefore recommended to provide the
//! handshake version metadata to the ICA controller. See a full discussion of this topic
//! [here](https://github.com/cosmos/ibc-go/issues/3942).
//!
//! This module is not tested in the end-to-end tests as the default wasmd docker image does not support
//! stargate queries. It is tested anecdotally, so use it at your own risk.
//! This module contains protobuf types and helpers that are needed to communicate with
//! the core modules of the Cosmos SDK using [`cosmwasm_std::CosmosMsg::Stargate`].

/// Contains the stargate channel lifecycle helper methods.
pub mod channel {
Expand Down
4 changes: 2 additions & 2 deletions src/types/callbacks.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! # Callbacks
//!
//! This module contains the callbacks that this contract can make to other contracts upon
//! channel and packet lifecycle events.
//! This module contains the callbacks message type that this contract can make to other
//! contracts upon channel and packet lifecycle events.

use cosmwasm_schema::cw_serde;
use cosmwasm_std::{
Expand Down
3 changes: 2 additions & 1 deletion src/types/cosmos_msg.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! This module contains the helpers to convert [`CosmosMsg`] to [`cosmos_sdk_proto::Any`] or json string.
//! This module contains the helpers to convert [`CosmosMsg`] to [`cosmos_sdk_proto::Any`]
//! or a [`proto3json`](crate::ibc::types::metadata::TxEncoding::Proto3Json) string.

use cosmos_sdk_proto::{prost::EncodeError, Any};
use cosmwasm_std::{BankMsg, Coin, CosmosMsg, IbcMsg};
Expand Down
4 changes: 2 additions & 2 deletions src/types/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//!
//! Contains key constants definitions for the contract such as version info for migrations.

/// `CONTRACT_NAME` is the name of the contract recorded with cw2
/// `CONTRACT_NAME` is the name of the contract recorded with [`cw2`]
pub const CONTRACT_NAME: &str = "crates.io:cw-ica-controller";
/// `CONTRACT_VERSION` is the version of the cargo package.
/// This is also the version of the contract recorded in cw2
/// This is also the version of the contract recorded in [`cw2`]
pub const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
2 changes: 1 addition & 1 deletion src/types/msg.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! # Messages
//!
//! This module defines the messages the ICA controller contract receives.
//! This module defines the messages that this contract receives.

use cosmwasm_schema::{cw_serde, QueryResponses};
use cosmwasm_std::{Binary, CosmosMsg};
Expand Down

0 comments on commit bc30f22

Please sign in to comment.