CosmWasm / wasmd

Basic cosmos-sdk app with web assembly smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

confusing "module does not own channel capability" when passing wrong channel

taitruong opened this issue · comments

I was passing a wrong channgel belonging to another contract. So it wasn't my module/(IBC) contract, but the wrong channel I passed.

return nil, nil, errorsmod.Wrap(channeltypes.ErrChannelCapabilityNotFound, "module does not own channel capability")

Contracts can only send ibc packets on channels that are connected to them. Otherwise it would be easy to abuse.
I can see that the error message may be confusing though. When we tested this early, the scenario to prevent was more contracts sending to other ibc modules like ics20 transfer.
Would contract does not own channel capability be a better error message?

Hi @taitruong , could you please give us feedback if would contract does not own channel capability be a better error message? Thank you

Hi @taitruong , could you please give us feedback if would contract does not own channel capability be a better error message? Thank you

Yes, way better, ser!