CosmWasm / docs

https://cosmwasm-docs.vercel.app
Apache License 2.0
6 stars 3 forks source link

IBC: Add storage to "Channel lifecycle" examples #45

Closed chipshort closed 3 months ago

chipshort commented 3 months ago

Currently the channel lifecycle is not guarded in any way in the examples. There is a description in the text that you should guard it and some different ways, but it would certainly be better to have it in the examples. Let's face it, people will end up just copying code out of the docs to get stuff to work.

I think it makes sense to save the channel info in storage in ibc_channel_connect and also check it in ibc_channel_open to avoid bad actors overwriting the existing channel.