many-things / cw-hyperlane

52 stars 26 forks source link

Do not revert on dispatch due to excess funds #86

Closed yorhodes closed 10 months ago

yorhodes commented 10 months ago

This change defers to the default hook to enforce its fees and perform refunds (if necessary). Hooks can do this by using the hyperlane message.sender (info.sender from the mailbox.dispatch call). This is more consistent with the EVM implementation. We must however, check the required fees in the mailbox because, unlike the EVM, the post dispatch calls come after the dispatch returns and we need to pass the difference to the default hook call.

Fixes https://github.com/hyperlane-xyz/issues/issues/933

byeongsu-hong commented 10 months ago

👍 for using remaining funds to hook