Skip to content

Commit

Permalink
docs: add close channel docs and update 'README.md' (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk authored Feb 4, 2024
1 parent 9890793 commit 2837c25
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
10 changes: 10 additions & 0 deletions docs/docs/contract-api/02-execute-msg.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions docs/docs/contract-api/03-query-msg.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand All @@ -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,
Expand Down

0 comments on commit 2837c25

Please sign in to comment.