many-things / cw-hyperlane

51 stars 25 forks source link

Previously set hooks or ISMs cannot be unset, so contracts can't opt back into using the default hook / ISM #140

Open tkporter opened 1 month ago

tkporter commented 1 month ago

Background

The ConnectionMsg::SetIsm message only lets you set a new ISM, and same for ConnectionMsg::SetHook: https://github.com/many-things/cw-hyperlane/blob/4f5656d4704178ac54d10467ca7edc3df2312c4b/packages/connection/src/lib.rs#L51-L68

The implication of this is that getting the ISM or Hook will only return None (indicating to use the default hook or ISM configured on the Mailbox) if it hasn't been set before: https://github.com/many-things/cw-hyperlane/blob/4f5656d4704178ac54d10467ca7edc3df2312c4b/packages/connection/src/lib.rs#L72-L100

Which means that any contract using connection that has previously set an ISM or Hook won't be able to opt back into using the default ISM or Hook.

Required Criteria

Appendix