Skip to content

Commit

Permalink
add back in close uch.closeChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
RnkSngh committed Apr 25, 2024
1 parent 5aac758 commit a22db9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions contracts/core/UniversalChannelHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,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 {}
Expand Down
2 changes: 1 addition & 1 deletion contracts/libs/Ibc.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {ProtoChannel, ProtoCounterparty} from "proto/channel.sol";
import {Base64} from "base64/base64.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {IBCErrors} from "./IBCErrors.sol";
import {IBCErrors} from "./IbcErrors.sol";

/**
* Ibc.sol
Expand Down

0 comments on commit a22db9a

Please sign in to comment.