From 2837c256047f260380a84f9c15db79186f32cde5 Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Sun, 4 Feb 2024 03:40:10 +0300 Subject: [PATCH] docs: add close channel docs and update 'README.md' (#81) --- README.md | 4 +++- docs/docs/contract-api/02-execute-msg.mdx | 10 ++++++++++ docs/docs/contract-api/03-query-msg.mdx | 6 +----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d64781f7..d3263b5b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ ![cw-ica-controller](./docs/static/img/cw-ica-controller.svg) -This is a CosmWasm smart contract that communicates with the golang `ica/host` module on the counterparty chain to create and manage **one** interchain account. This contract can also execute callbacks based on the result of the interchain account transaction. Because this is a CosmWasm implementation of the entire ICA controller, the chain that this contract is deployed on need **not** have the ICA module enabled. Moreover, the counterparty chain need not have CosmWasm support. This contract can be deployed on chains that support CosmWasm `v1.2+`. +This is a CosmWasm smart contract that communicates with the golang `ica/host` module on the counterparty chain to create and manage **one** interchain account. This contract can also execute callbacks based on the result of the interchain account transaction. Because this is a CosmWasm implementation of the entire ICA controller, the chain that this contract is deployed on need **not** have the ICA module enabled. Moreover, the counterparty chain need not have CosmWasm support. This contract can be deployed on chains that support CosmWasm `v1.3+`. + +**A documentation website for this contract is [here](https://srdtrk.github.io/cw-ica-controller/).** This contract now supports both `proto3json` and protobuf encoding/decoding for ICA transactions. **The recommended encoding is protobuf.** If no encoding is specified, then the contract will default to protobuf encoding. diff --git a/docs/docs/contract-api/02-execute-msg.mdx b/docs/docs/contract-api/02-execute-msg.mdx index 61a1fdbb..425652ae 100644 --- a/docs/docs/contract-api/02-execute-msg.mdx +++ b/docs/docs/contract-api/02-execute-msg.mdx @@ -25,6 +25,16 @@ passed to the `InstantiateMsg` or `CreateChannel` messages. If this parameter is set, then the contract will use the `channel_open_init_options` that are passed to this message and save them for future `CreateChannel` messages. +## `CloseChannel` + +```rust reference +https://github.com/srdtrk/cw-ica-controller/blob/9890793d3a19a9ec068e26627ec99ec48b3b9d92/src/types/msg.rs#L38-L39 +``` + +This message is used to close the ICS-27 channel. It is only callable by the owner. +The channel can then be reopened with parameters (e.g. channel ordering and version) that are different from the +original channel open handshake. + ## `SendCosmosMsgs` ```rust reference diff --git a/docs/docs/contract-api/03-query-msg.mdx b/docs/docs/contract-api/03-query-msg.mdx index 8b06537f..f9898b0a 100644 --- a/docs/docs/contract-api/03-query-msg.mdx +++ b/docs/docs/contract-api/03-query-msg.mdx @@ -31,7 +31,7 @@ https://github.com/srdtrk/cw-ica-controller/blob/v0.4.0/src/types/msg.rs#L106-L1 This message is used to query the state of the contract. It returns ```rust reference -https://github.com/srdtrk/cw-ica-controller/blob/v0.4.0/src/types/state.rs#L31-L45 +https://github.com/srdtrk/cw-ica-controller/blob/9890793d3a19a9ec068e26627ec99ec48b3b9d92/src/types/state.rs#L39-L50 ``` Lets look at the fields of the `ContractState`: @@ -45,10 +45,6 @@ following information: https://github.com/srdtrk/cw-ica-controller/blob/v0.4.0/src/types/state.rs#L109-L115 ``` -### `allow_channel_open_init` - -This field is used internally and should be ignored. It will be removed in a future version. - ### `callback_address` This is the contract address that the `cw-ica-controller` contract will send callbacks to. If this field is empty,