diff --git a/contracts/core/UniversalChannelHandler.sol b/contracts/core/UniversalChannelHandler.sol index bfdadc1c..131b0ab4 100644 --- a/contracts/core/UniversalChannelHandler.sol +++ b/contracts/core/UniversalChannelHandler.sol @@ -43,6 +43,15 @@ contract UniversalChannelHandler is IbcReceiverBaseUpgradeable, UUPSUpgradeable, __IbcReceiverBase_init(_dispatcher); } + /** + * @dev Close a universal channel. + * Cannot send or receive packets after the channel is closed. + * @param channelId The channel id of the channel to be closed. + */ + function closeChannel(bytes32 channelId) external onlyOwner { + dispatcher.channelCloseInit(channelId); + } + function onChanCloseInit(bytes32 channelId, string calldata, bytes32) external onlyIbcDispatcher {} function onChanCloseConfirm(bytes32 channelId, string calldata, bytes32) external onlyIbcDispatcher {}