From e6b4faab78752f10272e37b285350a51c981c1d0 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Sun, 29 Sep 2024 23:57:13 +0900 Subject: [PATCH 1/2] fix `onChanOpenInit` and `onChanOpenTry` to returns a module address Signed-off-by: Jun Kimura --- .gas-snapshot | 125 ++++---- contracts/apps/20-transfer/ICS20Transfer.sol | 8 +- contracts/apps/commons/IBCAppBase.sol | 25 +- contracts/apps/mock/IBCMockApp.sol | 8 +- contracts/apps/mock/IBCMockAppFactory.sol | 185 ++++++++++++ .../core/04-channel/IBCChannelHandshake.sol | 24 +- .../core/04-channel/IBCChannelUpgrade.sol | 12 +- .../core/24-host/IBCHostConfigurator.sol | 17 +- .../core/24-host/IIBCHostConfigurator.sol | 6 +- contracts/core/24-host/IIBCHostErrors.sol | 7 +- contracts/core/25-handler/IBCQuerier.sol | 4 +- contracts/core/25-handler/IIBCHandler.sol | 2 + contracts/core/25-handler/IIBCQuerier.sol | 4 +- .../core/25-handler/OwnableIBCHandler.sol | 4 +- .../OwnableUpgradeableIBCHandler.sol | 4 +- contracts/core/26-router/IBCModuleManager.sol | 63 +++- contracts/core/26-router/IIBCModule.sol | 67 +++-- .../core/26-router/IIBCModuleManager.sol | 14 + pkg/contract/ibchandler/ibchandler.go | 273 +++++++++++++++++- pkg/contract/ibcmockapp/ibcmockapp.go | 66 ++--- .../ics20transferbank/ics20transferbank.go | 66 ++--- tests/foundry/src/IBCMockAppFactory.t.sol | 151 ++++++++++ tests/foundry/src/ICS04Handshake.t.sol | 2 +- 23 files changed, 918 insertions(+), 219 deletions(-) create mode 100644 contracts/apps/mock/IBCMockAppFactory.sol create mode 100644 contracts/core/26-router/IIBCModuleManager.sol create mode 100644 tests/foundry/src/IBCMockAppFactory.t.sol diff --git a/.gas-snapshot b/.gas-snapshot index 4156b303..a9312b63 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -5,74 +5,77 @@ IBCBenchmarks:testRecvPacket() (gas: 154889) IBCBenchmarks:testSendPacket() (gas: 94843) IBCBenchmarks:testUpdateMockClientDirectly() (gas: 64879) IBCBenchmarks:testUpdateMockClientViaHandler() (gas: 148239) -IBCMockAppTest:testHandshake() (gas: 4162455) -IBCMockAppTest:testHandshakeBetweenDifferentPorts() (gas: 3104765) -IBCMockAppTest:testPacketRelay() (gas: 11461419) -IBCMockAppTest:testPacketTimeout() (gas: 4059968) +IBCMockAppFactoryTest:testHandshake() (gas: 8675737) +IBCMockAppFactoryTest:testPacketRelay() (gas: 15995797) +IBCMockAppTest:testHandshake() (gas: 4183963) +IBCMockAppTest:testHandshakeBetweenDifferentPorts() (gas: 3130978) +IBCMockAppTest:testPacketRelay() (gas: 11493798) +IBCMockAppTest:testPacketTimeout() (gas: 4089477) ICS24HostTest:testValidatePortIdentifier() (gas: 44476) -TestICS02:testCreateClient() (gas: 30594453) +TestICS02:testCreateClient() (gas: 30936959) TestICS02:testHeightToUint128((uint64,uint64)) (runs: 256, μ: 907, ~: 907) -TestICS02:testInvalidCreateClient() (gas: 30479715) -TestICS02:testInvalidUpdateClient() (gas: 30483432) -TestICS02:testRegisterClient() (gas: 30143677) -TestICS02:testRegisterClientDuplicatedClientType() (gas: 30129897) -TestICS02:testRegisterClientInvalidClientType() (gas: 30158859) -TestICS02:testUpdateClient() (gas: 30650006) -TestICS03Handshake:testConnOpenAck() (gas: 1811232) -TestICS03Handshake:testConnOpenConfirm() (gas: 1989361) -TestICS03Handshake:testConnOpenInit() (gas: 1423016) -TestICS03Handshake:testConnOpenTry() (gas: 2348031) -TestICS03Handshake:testInvalidConnOpenAck() (gas: 2323525) -TestICS03Handshake:testInvalidConnOpenConfirm() (gas: 2422540) +TestICS02:testInvalidCreateClient() (gas: 30822171) +TestICS02:testInvalidUpdateClient() (gas: 30825962) +TestICS02:testRegisterClient() (gas: 30486209) +TestICS02:testRegisterClientDuplicatedClientType() (gas: 30472391) +TestICS02:testRegisterClientInvalidClientType() (gas: 30501395) +TestICS02:testUpdateClient() (gas: 30992560) +TestICS03Handshake:testConnOpenAck() (gas: 1810871) +TestICS03Handshake:testConnOpenConfirm() (gas: 1988723) +TestICS03Handshake:testConnOpenInit() (gas: 1422940) +TestICS03Handshake:testConnOpenTry() (gas: 2347689) +TestICS03Handshake:testInvalidConnOpenAck() (gas: 2322689) +TestICS03Handshake:testInvalidConnOpenConfirm() (gas: 2421514) TestICS03Handshake:testInvalidConnOpenInit() (gas: 776893) -TestICS03Handshake:testInvalidConnOpenTry() (gas: 2283536) +TestICS03Handshake:testInvalidConnOpenTry() (gas: 2283346) TestICS03Version:testCopyVersions() (gas: 570207) TestICS03Version:testFindSupportedVersion() (gas: 34452) TestICS03Version:testIsSupportedVersion() (gas: 13568) TestICS03Version:testPickVersion() (gas: 37836) TestICS03Version:testVerifyProposedVersion() (gas: 21308) TestICS03Version:testVerifySupportedFeature() (gas: 10229) -TestICS04Handshake:testBindPort() (gas: 456448) -TestICS04Handshake:testChanClose() (gas: 12159177) -TestICS04Handshake:testChanOpenAck() (gas: 3242652) -TestICS04Handshake:testChanOpenConfirm() (gas: 3538460) -TestICS04Handshake:testChanOpenInit() (gas: 2395251) -TestICS04Handshake:testChanOpenTry() (gas: 2897730) -TestICS04Handshake:testInvalidChanOpenAck() (gas: 2317075) -TestICS04Handshake:testInvalidChanOpenConfirm() (gas: 2391732) -TestICS04Handshake:testInvalidChanOpenInit() (gas: 1677410) -TestICS04Handshake:testInvalidChanOpenTry() (gas: 1692299) -TestICS04Packet:testAcknowledgementPacket() (gas: 3111209) -TestICS04Packet:testInvalidSendPacket() (gas: 3294829) -TestICS04Packet:testRecvPacket() (gas: 9485892) -TestICS04Packet:testRecvPacketTimeoutHeight() (gas: 3053603) -TestICS04Packet:testRecvPacketTimeoutTimestamp() (gas: 3077652) -TestICS04Packet:testSendPacket() (gas: 4393801) -TestICS04Packet:testTimeoutOnClose() (gas: 3304846) -TestICS04Upgrade:testCrossingHelloInconsistentVersions() (gas: 9732925) -TestICS04Upgrade:testUpgradeAuthorityCancel() (gas: 44979235) -TestICS04Upgrade:testUpgradeCannotCancelWithOldErrorReceipt() (gas: 3297188) -TestICS04Upgrade:testUpgradeCannotRecvNextUpgradePacket() (gas: 5125194) -TestICS04Upgrade:testUpgradeCounterpartyAdvanceNextSequenceBeforeOpen() (gas: 5088264) -TestICS04Upgrade:testUpgradeCrossingHelloIncompatibleProposals() (gas: 4844529) -TestICS04Upgrade:testUpgradeFull() (gas: 55706062) -TestICS04Upgrade:testUpgradeInit() (gas: 2925623) -TestICS04Upgrade:testUpgradeNoChanges() (gas: 2342894) -TestICS04Upgrade:testUpgradeNotUpgradableModule() (gas: 3443205) -TestICS04Upgrade:testUpgradeOutOfSync() (gas: 3728418) -TestICS04Upgrade:testUpgradeRelaySuccessAtCounterpartyFlushComplete() (gas: 5097801) -TestICS04Upgrade:testUpgradeRelaySuccessAtFlushing() (gas: 5469958) -TestICS04Upgrade:testUpgradeSendPacketFailAtFlushingOrFlushComplete() (gas: 3907976) -TestICS04Upgrade:testUpgradeTimeoutAbortAck() (gas: 17324220) -TestICS04Upgrade:testUpgradeTimeoutAbortConfirm() (gas: 20921139) -TestICS04Upgrade:testUpgradeTimeoutUpgrade() (gas: 68900740) -TestICS04Upgrade:testUpgradeToOrdered() (gas: 52811190) -TestICS04Upgrade:testUpgradeToUnordered() (gas: 42156184) +TestICS04Handshake:testBindPort() (gas: 461372) +TestICS04Handshake:testChanClose() (gas: 12244889) +TestICS04Handshake:testChanOpenAck() (gas: 3264520) +TestICS04Handshake:testChanOpenConfirm() (gas: 3561004) +TestICS04Handshake:testChanOpenInit() (gas: 2411027) +TestICS04Handshake:testChanOpenTry() (gas: 2918880) +TestICS04Handshake:testInvalidChanOpenAck() (gas: 2327618) +TestICS04Handshake:testInvalidChanOpenConfirm() (gas: 2402634) +TestICS04Handshake:testInvalidChanOpenInit() (gas: 1677184) +TestICS04Handshake:testInvalidChanOpenTry() (gas: 1692266) +TestICS04Packet:testAcknowledgementPacket() (gas: 3133839) +TestICS04Packet:testInvalidSendPacket() (gas: 3317459) +TestICS04Packet:testRecvPacket() (gas: 9561916) +TestICS04Packet:testRecvPacketTimeoutHeight() (gas: 3083947) +TestICS04Packet:testRecvPacketTimeoutTimestamp() (gas: 3107997) +TestICS04Packet:testSendPacket() (gas: 4425319) +TestICS04Packet:testTimeoutOnClose() (gas: 3335905) +TestICS04Upgrade:testCrossingHelloInconsistentVersions() (gas: 9761065) +TestICS04Upgrade:testUpgradeAuthorityCancel() (gas: 45179910) +TestICS04Upgrade:testUpgradeCannotCancelWithOldErrorReceipt() (gas: 3309916) +TestICS04Upgrade:testUpgradeCannotRecvNextUpgradePacket() (gas: 5142540) +TestICS04Upgrade:testUpgradeCounterpartyAdvanceNextSequenceBeforeOpen() (gas: 5101912) +TestICS04Upgrade:testUpgradeCrossingHelloIncompatibleProposals() (gas: 4859793) +TestICS04Upgrade:testUpgradeFull() (gas: 55736704) +TestICS04Upgrade:testUpgradeInit() (gas: 2937759) +TestICS04Upgrade:testUpgradeNoChanges() (gas: 2354426) +TestICS04Upgrade:testUpgradeNotUpgradableModule() (gas: 3470809) +TestICS04Upgrade:testUpgradeOutOfSync() (gas: 3741133) +TestICS04Upgrade:testUpgradeRelaySuccessAtCounterpartyFlushComplete() (gas: 5115138) +TestICS04Upgrade:testUpgradeRelaySuccessAtFlushing() (gas: 5487371) +TestICS04Upgrade:testUpgradeSendPacketFailAtFlushingOrFlushComplete() (gas: 3920282) +TestICS04Upgrade:testUpgradeTimeoutAbortAck() (gas: 17345060) +TestICS04Upgrade:testUpgradeTimeoutAbortConfirm() (gas: 20945649) +TestICS04Upgrade:testUpgradeTimeoutUpgrade() (gas: 69105638) +TestICS04Upgrade:testUpgradeToOrdered() (gas: 53030999) +TestICS04Upgrade:testUpgradeToUnordered() (gas: 42323384) TestICS04UpgradeApp:testUpgradeAuthorizationChanneNotFound() (gas: 62062) -TestICS04UpgradeApp:testUpgradeAuthorizationRePropose() (gas: 2365672) -TestICS04UpgradeApp:testUpgradeAuthorizationRemove() (gas: 2346118) -TestICS20:testAddressToHex(address) (runs: 256, μ: 26869, ~: 27044) -TestICS20:testHexToAddress(string) (runs: 256, μ: 4636, ~: 4595) -TestICS20:testIsEscapedString() (gas: 62745) -TestICS20:testMarshaling() (gas: 180081) -TestICS20:testParseAmount(uint256) (runs: 256, μ: 31973, ~: 28039) \ No newline at end of file +TestICS04UpgradeApp:testUpgradeAuthorizationRePropose() (gas: 2376902) +TestICS04UpgradeApp:testUpgradeAuthorizationRemove() (gas: 2357348) +TestICS20:testAddressToHex(address) (runs: 256, μ: 26910, ~: 27088) +TestICS20:testHexToAddress(string) (runs: 256, μ: 4658, ~: 4617) +TestICS20:testIsEscapedString() (gas: 64753) +TestICS20:testMarshaling() (gas: 180017) +TestICS20:testParseAmount(uint256) (runs: 256, μ: 31599, ~: 27438) +TestICS20:testParseUint256String() (gas: 26745) \ No newline at end of file diff --git a/contracts/apps/20-transfer/ICS20Transfer.sol b/contracts/apps/20-transfer/ICS20Transfer.sol index b5169186..1ab048c2 100644 --- a/contracts/apps/20-transfer/ICS20Transfer.sol +++ b/contracts/apps/20-transfer/ICS20Transfer.sol @@ -76,7 +76,7 @@ abstract contract ICS20Transfer is IBCAppBase, IICS20Errors { virtual override onlyIBC - returns (string memory) + returns (address, string memory) { if (msg_.order != Channel.Order.ORDER_UNORDERED) { revert IBCModuleChannelOrderNotAllowed(msg_.portId, msg_.channelId, msg_.order); @@ -86,7 +86,7 @@ abstract contract ICS20Transfer is IBCAppBase, IICS20Errors { revert ICS20UnexpectedVersion(msg_.version); } channelEscrowAddresses[msg_.channelId] = address(this); - return ICS20_VERSION; + return (address(this), ICS20_VERSION); } function onChanOpenTry(IIBCModule.MsgOnChanOpenTry calldata msg_) @@ -94,7 +94,7 @@ abstract contract ICS20Transfer is IBCAppBase, IICS20Errors { virtual override onlyIBC - returns (string memory) + returns (address, string memory) { if (msg_.order != Channel.Order.ORDER_UNORDERED) { revert IBCModuleChannelOrderNotAllowed(msg_.portId, msg_.channelId, msg_.order); @@ -103,7 +103,7 @@ abstract contract ICS20Transfer is IBCAppBase, IICS20Errors { revert ICS20UnexpectedVersion(msg_.counterpartyVersion); } channelEscrowAddresses[msg_.channelId] = address(this); - return ICS20_VERSION; + return (address(this), ICS20_VERSION); } function onChanOpenAck(IIBCModule.MsgOnChanOpenAck calldata msg_) external virtual override onlyIBC { diff --git a/contracts/apps/commons/IBCAppBase.sol b/contracts/apps/commons/IBCAppBase.sol index 261e352a..6e8a4abe 100644 --- a/contracts/apps/commons/IBCAppBase.sol +++ b/contracts/apps/commons/IBCAppBase.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; import {Packet} from "../../core/04-channel/IIBCChannel.sol"; -import {IIBCModule} from "../../core/26-router/IIBCModule.sol"; +import {IIBCModule, IIBCModuleInitializer} from "../../core/26-router/IIBCModule.sol"; import {IIBCModuleErrors} from "../../core/26-router/IIBCModuleErrors.sol"; abstract contract AppBase is Context, IERC165, IIBCModuleErrors { @@ -41,6 +41,17 @@ abstract contract AppBase is Context, IERC165, IIBCModuleErrors { } } +abstract contract IBCAppInitializerBase is AppBase, IIBCModuleInitializer { + /** + * @dev See {IERC165-supportsInterface} + * + * NOTE: This must return true if the `interfaceId` is equal to the `IIBCModule` interface. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, AppBase) returns (bool) { + return interfaceId == type(IIBCModuleInitializer).interfaceId || super.supportsInterface(interfaceId); + } +} + /** * @dev Base contract of the IBC App protocol */ @@ -55,8 +66,10 @@ abstract contract IBCAppBase is AppBase, IIBCModule { virtual override onlyIBC - returns (string memory) - {} + returns (address, string memory) + { + return (address(this), ""); + } /** * @dev See {IIBCModule-onChanOpenTry} @@ -68,8 +81,10 @@ abstract contract IBCAppBase is AppBase, IIBCModule { virtual override onlyIBC - returns (string memory) - {} + returns (address, string memory) + { + return (address(this), ""); + } /** * @dev See {IIBCModule-onChanOpenAck} diff --git a/contracts/apps/mock/IBCMockApp.sol b/contracts/apps/mock/IBCMockApp.sol index b322342e..613733de 100644 --- a/contracts/apps/mock/IBCMockApp.sol +++ b/contracts/apps/mock/IBCMockApp.sol @@ -94,12 +94,12 @@ contract IBCMockApp is IBCAppBase, IIBCMockErrors, Ownable { virtual override onlyIBC - returns (string memory) + returns (address, string memory) { if (bytes(msg_.version).length != 0 && keccak256(bytes(msg_.version)) != keccak256(bytes(MOCKAPP_VERSION))) { revert IBCMockUnexpectedVersion(msg_.version, MOCKAPP_VERSION); } - return MOCKAPP_VERSION; + return (address(this), MOCKAPP_VERSION); } function onChanOpenTry(IIBCModule.MsgOnChanOpenTry calldata msg_) @@ -107,12 +107,12 @@ contract IBCMockApp is IBCAppBase, IIBCMockErrors, Ownable { virtual override onlyIBC - returns (string memory) + returns (address, string memory) { if (keccak256(bytes(msg_.counterpartyVersion)) != keccak256(bytes(MOCKAPP_VERSION))) { revert IBCMockUnexpectedVersion(msg_.counterpartyVersion, MOCKAPP_VERSION); } - return MOCKAPP_VERSION; + return (address(this), MOCKAPP_VERSION); } function onChanCloseInit(IIBCModule.MsgOnChanCloseInit calldata msg_) external virtual override onlyIBC { diff --git a/contracts/apps/mock/IBCMockAppFactory.sol b/contracts/apps/mock/IBCMockAppFactory.sol new file mode 100644 index 00000000..3f45bae3 --- /dev/null +++ b/contracts/apps/mock/IBCMockAppFactory.sol @@ -0,0 +1,185 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import {ShortString, ShortStrings} from "@openzeppelin/contracts/utils/ShortStrings.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; +import {Height} from "../../proto/Client.sol"; +import {IBCAppBase} from "../commons/IBCAppBase.sol"; +import {Packet} from "../../core/04-channel/IIBCChannel.sol"; +import {IIBCModule} from "../../core/26-router/IIBCModule.sol"; +import {IIBCHandler} from "../../core/25-handler/IIBCHandler.sol"; +import {IBCMockLib} from "./IBCMockLib.sol"; +import {IIBCMockErrors} from "./IIBCMockErrors.sol"; +import {IBCAppInitializerBase} from "../commons/IBCAppBase.sol"; + +contract IBCMockAppFactory is IIBCMockErrors, IBCAppInitializerBase { + string public constant MOCKAPP_VERSION = "mockapp-1"; + + IIBCHandler immutable ibcHandler; + + mapping(string channelId => IBCMockApp2) internal apps; + + constructor(IIBCHandler ibcHandler_) { + ibcHandler = ibcHandler_; + } + + function ibcAddress() public view virtual override returns (address) { + return address(ibcHandler); + } + + function onChanOpenInit(IIBCModule.MsgOnChanOpenInit calldata msg_) + external + virtual + override + onlyIBC + returns (address, string memory) + { + if (bytes(msg_.version).length != 0 && keccak256(bytes(msg_.version)) != keccak256(bytes(MOCKAPP_VERSION))) { + revert IBCMockUnexpectedVersion(msg_.version, MOCKAPP_VERSION); + } + apps[msg_.channelId] = new IBCMockApp2(ibcHandler, msg_.portId, msg_.channelId); + return (address(apps[msg_.channelId]), MOCKAPP_VERSION); + } + + function onChanOpenTry(IIBCModule.MsgOnChanOpenTry calldata msg_) + external + virtual + override + onlyIBC + returns (address, string memory) + { + if (keccak256(bytes(msg_.counterpartyVersion)) != keccak256(bytes(MOCKAPP_VERSION))) { + revert IBCMockUnexpectedVersion(msg_.counterpartyVersion, MOCKAPP_VERSION); + } + apps[msg_.channelId] = new IBCMockApp2(ibcHandler, msg_.portId, msg_.channelId); + return (address(apps[msg_.channelId]), MOCKAPP_VERSION); + } + + function lookupApp(string calldata channelId) external view returns (IBCMockApp2) { + return apps[channelId]; + } +} + +contract IBCMockApp2 is IBCAppBase, IIBCMockErrors, Ownable { + using ShortStrings for string; + using ShortStrings for ShortString; + + string public constant MOCKAPP_VERSION = "mockapp-1"; + + IIBCHandler immutable ibcHandler; + ShortString immutable port; + ShortString immutable channel; + + bool public closeChannelAllowed = true; + + constructor(IIBCHandler ibcHandler_, string memory port_, string memory channel_) Ownable(msg.sender) { + ibcHandler = ibcHandler_; + port = port_.toShortString(); + channel = channel_.toShortString(); + } + + function ibcAddress() public view virtual override returns (address) { + return address(ibcHandler); + } + + function sendPacket(bytes memory message, Height.Data calldata timeoutHeight, uint64 timeoutTimestamp) + external + returns (uint64) + { + return ibcHandler.sendPacket(port.toString(), channel.toString(), timeoutHeight, timeoutTimestamp, message); + } + + function writeAcknowledgement(uint64 sequence) external { + ibcHandler.writeAcknowledgement( + port.toString(), channel.toString(), sequence, IBCMockLib.SUCCESSFUL_ASYNC_ACKNOWLEDGEMENT_JSON + ); + } + + function allowCloseChannel(bool allow) public onlyOwner { + closeChannelAllowed = allow; + } + + function onRecvPacket(Packet calldata packet, address) + external + view + virtual + override + onlyIBC + returns (bytes memory acknowledgement) + { + if (equals(packet.data, IBCMockLib.MOCK_PACKET_DATA)) { + return IBCMockLib.SUCCESSFUL_ACKNOWLEDGEMENT_JSON; + } else if (equals(packet.data, IBCMockLib.MOCK_ASYNC_PACKET_DATA)) { + return bytes(""); + } else { + return IBCMockLib.FAILED_ACKNOWLEDGEMENT_JSON; + } + } + + function onAcknowledgementPacket(Packet calldata packet, bytes calldata acknowledgement, address) + external + virtual + override + onlyIBC + { + if (equals(packet.data, IBCMockLib.MOCK_PACKET_DATA)) { + if (!equals(acknowledgement, IBCMockLib.SUCCESSFUL_ACKNOWLEDGEMENT_JSON)) { + revert IBCMockUnexpectedAcknowledgement(acknowledgement, IBCMockLib.SUCCESSFUL_ACKNOWLEDGEMENT_JSON); + } + } else if (equals(packet.data, IBCMockLib.MOCK_ASYNC_PACKET_DATA)) { + if (!equals(acknowledgement, IBCMockLib.SUCCESSFUL_ASYNC_ACKNOWLEDGEMENT_JSON)) { + revert IBCMockUnexpectedAcknowledgement( + acknowledgement, IBCMockLib.SUCCESSFUL_ASYNC_ACKNOWLEDGEMENT_JSON + ); + } + } else if (equals(packet.data, IBCMockLib.MOCK_FAIL_PACKET_DATA)) { + if (!equals(acknowledgement, IBCMockLib.FAILED_ACKNOWLEDGEMENT_JSON)) { + revert IBCMockUnexpectedAcknowledgement(acknowledgement, IBCMockLib.FAILED_ACKNOWLEDGEMENT_JSON); + } + } else { + revert IBCMockUnexpectedPacket(packet.data); + } + } + + function onChanCloseInit(IIBCModule.MsgOnChanCloseInit calldata msg_) external virtual override onlyIBC { + if (!closeChannelAllowed) { + revert IBCModuleChannelCloseNotAllowed(msg_.portId, msg_.channelId); + } + } + + function onChanCloseConfirm(IIBCModule.MsgOnChanCloseConfirm calldata msg_) external virtual override onlyIBC { + if (!closeChannelAllowed) { + revert IBCModuleChannelCloseNotAllowed(msg_.portId, msg_.channelId); + } + } + + function onTimeoutPacket(Packet calldata packet, address) external view virtual override onlyIBC { + if (!closeChannelAllowed) { + revert IBCModuleChannelCloseNotAllowed(packet.sourcePort, packet.sourceChannel); + } + } + + function onChanOpenInit(IIBCModule.MsgOnChanOpenInit calldata) + external + virtual + override + onlyIBC + returns (address, string memory) + { + revert("not supported"); + } + + function onChanOpenTry(IIBCModule.MsgOnChanOpenTry calldata) + external + virtual + override + onlyIBC + returns (address, string memory) + { + revert("not supported"); + } + + function equals(bytes calldata a, bytes memory b) internal pure returns (bool) { + return keccak256(a) == keccak256(b); + } +} diff --git a/contracts/core/04-channel/IBCChannelHandshake.sol b/contracts/core/04-channel/IBCChannelHandshake.sol index 8ffb369f..99f6b55a 100644 --- a/contracts/core/04-channel/IBCChannelHandshake.sol +++ b/contracts/core/04-channel/IBCChannelHandshake.sol @@ -10,7 +10,7 @@ import {IBCConnectionLib} from "../03-connection/IBCConnectionLib.sol"; import {IIBCChannelHandshake} from "../04-channel/IIBCChannel.sol"; import {IIBCChannelErrors} from "../04-channel/IIBCChannelErrors.sol"; import {IBCCommitment} from "../24-host/IBCCommitment.sol"; -import {IIBCModule} from "../26-router/IIBCModule.sol"; +import {IIBCModuleInitializer, IIBCModule} from "../26-router/IIBCModule.sol"; import {IBCModuleManager} from "../26-router/IBCModuleManager.sol"; import {IBCChannelLib} from "./IBCChannelLib.sol"; @@ -57,9 +57,8 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan initializeSequences(msg_.portId, channelId); emit GeneratedChannelIdentifier(channelId); - IIBCModule module = lookupModuleByPort(msg_.portId); - string memory version = module.onChanOpenInit( - IIBCModule.MsgOnChanOpenInit({ + (address module, string memory version) = lookupModuleByPort(msg_.portId).onChanOpenInit( + IIBCModuleInitializer.MsgOnChanOpenInit({ order: msg_.channel.ordering, connectionHops: msg_.channel.connection_hops, portId: msg_.portId, @@ -68,7 +67,7 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan version: msg_.channel.version }) ); - claimChannelCapability(msg_.portId, channelId, address(module)); + claimChannelCapability(msg_.portId, channelId, module); writeChannel( msg_.portId, channelId, @@ -133,9 +132,8 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan initializeSequences(msg_.portId, channelId); emit GeneratedChannelIdentifier(channelId); - IIBCModule module = lookupModuleByPort(msg_.portId); - string memory version = module.onChanOpenTry( - IIBCModule.MsgOnChanOpenTry({ + (address module, string memory version) = lookupModuleByPort(msg_.portId).onChanOpenTry( + IIBCModuleInitializer.MsgOnChanOpenTry({ order: msg_.channel.ordering, connectionHops: msg_.channel.connection_hops, portId: msg_.portId, @@ -144,7 +142,7 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan counterpartyVersion: msg_.counterpartyVersion }) ); - claimChannelCapability(msg_.portId, channelId, address(module)); + claimChannelCapability(msg_.portId, channelId, module); writeChannel( msg_.portId, channelId, @@ -187,7 +185,7 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan channel.version = msg_.counterpartyVersion; channel.counterparty.channel_id = msg_.counterpartyChannelId; updateChannelCommitment(msg_.portId, msg_.channelId); - lookupModuleByPort(msg_.portId).onChanOpenAck( + lookupModuleByChannel(msg_.portId, msg_.channelId).onChanOpenAck( IIBCModule.MsgOnChanOpenAck({ portId: msg_.portId, channelId: msg_.channelId, @@ -223,7 +221,7 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan ); channel.state = Channel.State.STATE_OPEN; updateChannelCommitment(msg_.portId, msg_.channelId); - lookupModuleByPort(msg_.portId).onChanOpenConfirm( + lookupModuleByChannel(msg_.portId, msg_.channelId).onChanOpenConfirm( IIBCModule.MsgOnChanOpenConfirm({portId: msg_.portId, channelId: msg_.channelId}) ); } @@ -244,7 +242,7 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan } channel.state = Channel.State.STATE_CLOSED; updateChannelCommitment(msg_.portId, msg_.channelId); - lookupModuleByPort(msg_.portId).onChanCloseInit( + lookupModuleByChannel(msg_.portId, msg_.channelId).onChanCloseInit( IIBCModule.MsgOnChanCloseInit({portId: msg_.portId, channelId: msg_.channelId}) ); } @@ -284,7 +282,7 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan ); channel.state = Channel.State.STATE_CLOSED; updateChannelCommitment(msg_.portId, msg_.channelId); - lookupModuleByPort(msg_.portId).onChanCloseConfirm( + lookupModuleByChannel(msg_.portId, msg_.channelId).onChanCloseConfirm( IIBCModule.MsgOnChanCloseConfirm({portId: msg_.portId, channelId: msg_.channelId}) ); } diff --git a/contracts/core/04-channel/IBCChannelUpgrade.sol b/contracts/core/04-channel/IBCChannelUpgrade.sol index 796bd7ae..18d3cf90 100644 --- a/contracts/core/04-channel/IBCChannelUpgrade.sol +++ b/contracts/core/04-channel/IBCChannelUpgrade.sol @@ -352,7 +352,7 @@ contract IBCChannelUpgradeInitTryAck is IBCChannelUpgradeBase, IIBCChannelUpgrad * @dev See {IIBCChannelUpgrade-channelUpgradeInit} */ function channelUpgradeInit(MsgChannelUpgradeInit calldata msg_) public override returns (uint64) { - IIBCModuleUpgrade module = lookupUpgradableModuleByPort(msg_.portId); + IIBCModuleUpgrade module = lookupUpgradableModule(msg_.portId, msg_.channelId); if (!module.isAuthorizedUpgrader(msg_.portId, msg_.channelId, _msgSender())) { revert IBCChannelUpgradeUnauthorizedChannelUpgrader(_msgSender()); } @@ -387,7 +387,7 @@ contract IBCChannelUpgradeInitTryAck is IBCChannelUpgradeBase, IIBCChannelUpgrad * @dev See {IIBCChannelUpgrade-channelUpgradeTry} */ function channelUpgradeTry(MsgChannelUpgradeTry calldata msg_) public override returns (bool, uint64) { - IIBCModuleUpgrade module = lookupUpgradableModuleByPort(msg_.portId); + IIBCModuleUpgrade module = lookupUpgradableModule(msg_.portId, msg_.channelId); // current channel must be OPEN (i.e. not in FLUSHING) ChannelStorage storage channelStorage = getChannelStorage()[msg_.portId][msg_.channelId]; Channel.Data storage channel = channelStorage.channel; @@ -536,7 +536,7 @@ contract IBCChannelUpgradeInitTryAck is IBCChannelUpgradeBase, IIBCChannelUpgrad return false; } - IIBCModuleUpgrade module = lookupUpgradableModuleByPortUnchecked(msg_.portId); + IIBCModuleUpgrade module = lookupUpgradableModuleUnchecked(msg_.portId, msg_.channelId); if (channel.state == Channel.State.STATE_OPEN) { // prove counterparty and move our own state to flushing @@ -658,7 +658,7 @@ contract IBCChannelUpgradeConfirmOpenTimeoutCancel is && msg_.counterpartyChannelState == Channel.State.STATE_FLUSHCOMPLETE ) { openUpgradeHandshake(msg_.portId, msg_.channelId); - lookupUpgradableModuleByPortUnchecked(msg_.portId).onChanUpgradeOpen( + lookupUpgradableModuleUnchecked(msg_.portId, msg_.channelId).onChanUpgradeOpen( msg_.portId, msg_.channelId, channel.upgrade_sequence ); } @@ -728,7 +728,7 @@ contract IBCChannelUpgradeConfirmOpenTimeoutCancel is // open callback must not return error since counterparty successfully upgraded // make application state changes based on new channel parameters - lookupUpgradableModuleByPortUnchecked(msg_.portId).onChanUpgradeOpen( + lookupUpgradableModuleUnchecked(msg_.portId, msg_.channelId).onChanUpgradeOpen( msg_.portId, msg_.channelId, channel.upgrade_sequence ); } @@ -750,7 +750,7 @@ contract IBCChannelUpgradeConfirmOpenTimeoutCancel is // otherwise, we can only cancel if the counterparty wrote an // error receipt during the upgrade handshake if ( - lookupUpgradableModuleByPortUnchecked(msg_.portId).isAuthorizedUpgrader( + lookupUpgradableModuleUnchecked(msg_.portId, msg_.channelId).isAuthorizedUpgrader( msg_.portId, msg_.channelId, _msgSender() ) && channel.state != Channel.State.STATE_FLUSHCOMPLETE ) { diff --git a/contracts/core/24-host/IBCHostConfigurator.sol b/contracts/core/24-host/IBCHostConfigurator.sol index 211541ec..7c5ab986 100644 --- a/contracts/core/24-host/IBCHostConfigurator.sol +++ b/contracts/core/24-host/IBCHostConfigurator.sol @@ -6,7 +6,7 @@ import {IBCClientLib} from "../02-client/IBCClientLib.sol"; import {ILightClient} from "../02-client/ILightClient.sol"; import {IBCHostLib} from "./IBCHostLib.sol"; import {IBCModuleManager} from "../26-router/IBCModuleManager.sol"; -import {IIBCModule} from "../26-router/IIBCModule.sol"; +import {IIBCModule, IIBCModuleInitializer} from "../26-router/IIBCModule.sol"; import {IIBCHostConfigurator} from "./IIBCHostConfigurator.sol"; /** @@ -30,7 +30,7 @@ abstract contract IBCHostConfigurator is IIBCHostConfigurator, IBCModuleManager hostStorage.clientRegistry[clientType] = address(client); } - function _bindPort(string calldata portId, IIBCModule module) internal virtual { + function _bindPort(string calldata portId, IIBCModuleInitializer module) internal virtual { address moduleAddress = address(module); if (!IBCHostLib.validatePortIdentifier(bytes(portId))) { revert IBCHostInvalidPortIdentifier(portId); @@ -41,8 +41,17 @@ abstract contract IBCHostConfigurator is IIBCHostConfigurator, IBCModuleManager if (!ERC165Checker.supportsERC165(moduleAddress)) { revert IBCHostModuleDoesNotSupportERC165(); } - if (!ERC165Checker.supportsERC165InterfaceUnchecked(moduleAddress, type(IIBCModule).interfaceId)) { - revert IBCHostModuleDoesNotSupportIIBCModule(type(IIBCModule).interfaceId); + if ( + !( + ERC165Checker.supportsERC165InterfaceUnchecked(moduleAddress, type(IIBCModule).interfaceId) + || ERC165Checker.supportsERC165InterfaceUnchecked( + moduleAddress, type(IIBCModuleInitializer).interfaceId + ) + ) + ) { + revert IBCHostModuleDoesNotSupportIIBCModuleInitializer( + moduleAddress, type(IIBCModuleInitializer).interfaceId + ); } claimPortCapability(portId, moduleAddress); } diff --git a/contracts/core/24-host/IIBCHostConfigurator.sol b/contracts/core/24-host/IIBCHostConfigurator.sol index d8a6a369..27f117c6 100644 --- a/contracts/core/24-host/IIBCHostConfigurator.sol +++ b/contracts/core/24-host/IIBCHostConfigurator.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; import {ILightClient} from "../02-client/ILightClient.sol"; -import {IIBCModule} from "../26-router/IIBCModule.sol"; +import {IIBCModuleInitializer} from "../26-router/IIBCModule.sol"; interface IIBCHostConfigurator { /** @@ -24,7 +24,7 @@ interface IIBCHostConfigurator { * @dev bindPort binds to an unallocated port, failing if the port has already been allocated. * Typically this function should be called by an authority like an IBC contract owner or govenance. * The authority should verify the light client contract is a valid implementation as follows: - * - The contract implements IIBCModule + * - The contract implements IIBCModuleInitializer */ - function bindPort(string calldata portId, IIBCModule moduleAddress) external; + function bindPort(string calldata portId, IIBCModuleInitializer moduleAddress) external; } diff --git a/contracts/core/24-host/IIBCHostErrors.sol b/contracts/core/24-host/IIBCHostErrors.sol index 6c0f7cd9..a35d48bb 100644 --- a/contracts/core/24-host/IIBCHostErrors.sol +++ b/contracts/core/24-host/IIBCHostErrors.sol @@ -26,8 +26,13 @@ interface IIBCHostErrors { error IBCHostModuleDoesNotSupportERC165(); + /// @param module module contract address + /// @param interfaceId expected interface identifier + error IBCHostModuleDoesNotSupportIIBCModule(address module, bytes4 interfaceId); + + /// @param module module contract address /// @param interfaceId expected interface identifier - error IBCHostModuleDoesNotSupportIIBCModule(bytes4 interfaceId); + error IBCHostModuleDoesNotSupportIIBCModuleInitializer(address module, bytes4 interfaceId); /// @param module module contract address error IBCHostModuleDoesNotSupportIIBCModuleUpgrade(address module); diff --git a/contracts/core/25-handler/IBCQuerier.sol b/contracts/core/25-handler/IBCQuerier.sol index 6401f254..d9027740 100644 --- a/contracts/core/25-handler/IBCQuerier.sol +++ b/contracts/core/25-handler/IBCQuerier.sol @@ -6,7 +6,7 @@ import {ConnectionEnd} from "../../proto/Connection.sol"; import {Channel, Upgrade} from "../../proto/Channel.sol"; import {IBCChannelLib} from "../04-channel/IBCChannelLib.sol"; import {IBCCommitment} from "../24-host/IBCCommitment.sol"; -import {IIBCModule} from "../26-router/IIBCModule.sol"; +import {IIBCModule, IIBCModuleInitializer} from "../26-router/IIBCModule.sol"; import {IBCModuleManager} from "../26-router/IBCModuleManager.sol"; import {IIBCQuerier} from "./IIBCQuerier.sol"; @@ -27,7 +27,7 @@ contract IBCQuerier is IBCModuleManager, IIBCQuerier { return getHostStorage().expectedTimePerBlock; } - function getIBCModuleByPort(string calldata portId) public view override returns (IIBCModule) { + function getIBCModuleByPort(string calldata portId) public view override returns (IIBCModuleInitializer) { return lookupModuleByPort(portId); } diff --git a/contracts/core/25-handler/IIBCHandler.sol b/contracts/core/25-handler/IIBCHandler.sol index 01b4e39c..f676ca73 100644 --- a/contracts/core/25-handler/IIBCHandler.sol +++ b/contracts/core/25-handler/IIBCHandler.sol @@ -11,6 +11,7 @@ import {IIBCChannelUpgrade} from "../04-channel/IIBCChannelUpgrade.sol"; import {IIBCChannelUpgradeErrors} from "../04-channel/IIBCChannelUpgradeErrors.sol"; import {IIBCHostConfigurator} from "../24-host/IIBCHostConfigurator.sol"; import {IIBCHostErrors} from "../24-host/IIBCHostErrors.sol"; +import {IIBCModuleManager} from "../26-router/IIBCModuleManager.sol"; import {IIBCQuerier} from "./IIBCQuerier.sol"; /** @@ -28,5 +29,6 @@ interface IIBCHandler is IIBCChannelUpgradeErrors, IIBCHostConfigurator, IIBCHostErrors, + IIBCModuleManager, IIBCQuerier {} diff --git a/contracts/core/25-handler/IIBCQuerier.sol b/contracts/core/25-handler/IIBCQuerier.sol index 583cd3e9..95d22c1d 100644 --- a/contracts/core/25-handler/IIBCQuerier.sol +++ b/contracts/core/25-handler/IIBCQuerier.sol @@ -5,7 +5,7 @@ import {Height} from "../../proto/Client.sol"; import {ConnectionEnd} from "../../proto/Connection.sol"; import {Channel, Upgrade} from "../../proto/Channel.sol"; import {IBCChannelLib} from "../04-channel/IBCChannelLib.sol"; -import {IIBCModule} from "../26-router/IIBCModule.sol"; +import {IIBCModule, IIBCModuleInitializer} from "../26-router/IIBCModule.sol"; interface IIBCQuerier { function getCommitmentPrefix() external view returns (bytes memory); @@ -16,7 +16,7 @@ interface IIBCQuerier { function getExpectedTimePerBlock() external view returns (uint64); - function getIBCModuleByPort(string calldata portId) external view returns (IIBCModule); + function getIBCModuleByPort(string calldata portId) external view returns (IIBCModuleInitializer); function getIBCModuleByChannel(string calldata portId, string calldata channelId) external diff --git a/contracts/core/25-handler/OwnableIBCHandler.sol b/contracts/core/25-handler/OwnableIBCHandler.sol index 73cc9c55..aba1440d 100644 --- a/contracts/core/25-handler/OwnableIBCHandler.sol +++ b/contracts/core/25-handler/OwnableIBCHandler.sol @@ -12,7 +12,7 @@ import { IIBCChannelUpgradeConfirmOpenTimeoutCancel } from "../04-channel/IIBCChannelUpgrade.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; -import {IIBCModule} from "../26-router/IIBCModule.sol"; +import {IIBCModuleInitializer} from "../26-router/IIBCModule.sol"; import {IBCHandler} from "./IBCHandler.sol"; /** @@ -54,7 +54,7 @@ contract OwnableIBCHandler is IBCHandler, Ownable { super._registerClient(clientType, client); } - function bindPort(string calldata portId, IIBCModule moduleAddress) public onlyOwner { + function bindPort(string calldata portId, IIBCModuleInitializer moduleAddress) public onlyOwner { super._bindPort(portId, moduleAddress); } diff --git a/contracts/core/25-handler/OwnableUpgradeableIBCHandler.sol b/contracts/core/25-handler/OwnableUpgradeableIBCHandler.sol index 713cf2d2..d655b8f6 100644 --- a/contracts/core/25-handler/OwnableUpgradeableIBCHandler.sol +++ b/contracts/core/25-handler/OwnableUpgradeableIBCHandler.sol @@ -11,7 +11,7 @@ import { IIBCChannelUpgradeInitTryAck, IIBCChannelUpgradeConfirmOpenTimeoutCancel } from "../04-channel/IIBCChannelUpgrade.sol"; -import {IIBCModule} from "../26-router/IIBCModule.sol"; +import {IIBCModuleInitializer} from "../26-router/IIBCModule.sol"; import {IBCHandler} from "./IBCHandler.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; import {ContextUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; @@ -59,7 +59,7 @@ contract OwnableUpgradeableIBCHandler is IBCHandler, UUPSUpgradeable, OwnableUpg super._registerClient(clientType, client); } - function bindPort(string calldata portId, IIBCModule moduleAddress) public virtual onlyOwner { + function bindPort(string calldata portId, IIBCModuleInitializer moduleAddress) public virtual onlyOwner { super._bindPort(portId, moduleAddress); } diff --git a/contracts/core/26-router/IBCModuleManager.sol b/contracts/core/26-router/IBCModuleManager.sol index 3eb969db..4f19817c 100644 --- a/contracts/core/26-router/IBCModuleManager.sol +++ b/contracts/core/26-router/IBCModuleManager.sol @@ -1,36 +1,63 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; +import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; import {IBCHost} from "../24-host/IBCHost.sol"; import {Channel} from "../../proto/Channel.sol"; -import {IIBCModule} from "./IIBCModule.sol"; +import {IIBCModule, IIBCModuleInitializer} from "./IIBCModule.sol"; import {IIBCModuleUpgrade} from "./IIBCModuleUpgrade.sol"; +import {IIBCModuleManager} from "./IIBCModuleManager.sol"; /** * @dev IBCModuleManager is a contract that provides the functions defined in [ICS 5](https://github.com/cosmos/ibc/tree/main/spec/core/ics-005-port-allocation) and [ICS 26](https://github.com/cosmos/ibc/tree/main/spec/core/ics-026-routing-module). */ -contract IBCModuleManager is IBCHost, Context { +contract IBCModuleManager is Context, IBCHost, IIBCModuleManager { /** * @dev claimPortCapability allows the IBC app module to claim a capability that core IBC passes to it */ - function claimPortCapability(string calldata portId, address addr) internal { + function claimPortCapability(string calldata portId, address module) internal { HostStorage storage hostStorage = getHostStorage(); if (hostStorage.portCapabilities[portId] != address(0)) { revert IBCHostPortCapabilityAlreadyClaimed(portId); } - hostStorage.portCapabilities[portId] = addr; + if (module == address(0)) { + revert IBCHostInvalidModuleAddress(module); + } + if (!ERC165Checker.supportsERC165(module)) { + revert IBCHostModuleDoesNotSupportERC165(); + } + if ( + !( + ERC165Checker.supportsERC165InterfaceUnchecked(module, type(IIBCModule).interfaceId) + || ERC165Checker.supportsERC165InterfaceUnchecked(module, type(IIBCModuleInitializer).interfaceId) + ) + ) { + revert IBCHostModuleDoesNotSupportIIBCModuleInitializer(module, type(IIBCModuleInitializer).interfaceId); + } + hostStorage.portCapabilities[portId] = module; + emit IBCModuleManagerPortCapabilityClaimed(portId, module); } /** * @dev claimChannelCapability allows the IBC app module to claim a capability that core IBC passes to it */ - function claimChannelCapability(string calldata portId, string memory channelId, address addr) internal { + function claimChannelCapability(string calldata portId, string memory channelId, address module) internal { HostStorage storage hostStorage = getHostStorage(); if (hostStorage.channelCapabilities[portId][channelId] != address(0)) { revert IBCHostChannelCapabilityAlreadyClaimed(portId, channelId); } - hostStorage.channelCapabilities[portId][channelId] = addr; + if (module == address(0)) { + revert IBCHostInvalidModuleAddress(module); + } + if (!ERC165Checker.supportsERC165(module)) { + revert IBCHostModuleDoesNotSupportERC165(); + } + if (!ERC165Checker.supportsERC165InterfaceUnchecked(module, type(IIBCModule).interfaceId)) { + revert IBCHostModuleDoesNotSupportIIBCModule(module, type(IIBCModule).interfaceId); + } + hostStorage.channelCapabilities[portId][channelId] = module; + emit IBCModuleManagerChannelCapabilityClaimed(portId, channelId, module); } /** @@ -48,12 +75,12 @@ contract IBCModuleManager is IBCHost, Context { * @dev lookupModuleByPort will return the IBCModule along with the capability associated with a given portID * If the module is not found, it will revert */ - function lookupModuleByPort(string calldata portId) internal view virtual returns (IIBCModule) { + function lookupModuleByPort(string calldata portId) internal view virtual returns (IIBCModuleInitializer) { address module = getHostStorage().portCapabilities[portId]; if (module == address(0)) { revert IBCHostModulePortNotFound(portId); } - return IIBCModule(module); + return IIBCModuleInitializer(module); } /** @@ -79,16 +106,24 @@ contract IBCModuleManager is IBCHost, Context { * * Since the function does not check if the module supports the `IIBCModuleUpgrade` interface via ERC-165, it is unsafe but cheaper in gas cost than `lookupUpgradableModuleByPort` */ - function lookupUpgradableModuleByPortUnchecked(string calldata portId) internal view returns (IIBCModuleUpgrade) { - return IIBCModuleUpgrade(address(lookupModuleByPort(portId))); + function lookupUpgradableModuleUnchecked(string calldata portId, string calldata channelId) + internal + view + returns (IIBCModuleUpgrade) + { + return IIBCModuleUpgrade(address(lookupModuleByChannel(portId, channelId))); } /** - * @dev lookupUpgradableModuleByPort will return the IBCModule corresponding to the portID + * @dev lookupUpgradableModule will return the IBCModule corresponding to the portID and channelID * It will revert if the module does not support the `IIBCModuleUpgrade` interface or the module is not found */ - function lookupUpgradableModuleByPort(string calldata portId) internal view returns (IIBCModuleUpgrade) { - IIBCModule module = lookupModuleByPort(portId); + function lookupUpgradableModule(string calldata portId, string calldata channelId) + internal + view + returns (IIBCModuleUpgrade) + { + IIBCModule module = lookupModuleByChannel(portId, channelId); if (!module.supportsInterface(type(IIBCModuleUpgrade).interfaceId)) { revert IBCHostModuleDoesNotSupportIIBCModuleUpgrade(address(module)); } @@ -111,7 +146,7 @@ contract IBCModuleManager is IBCHost, Context { return true; } } - return lookupUpgradableModuleByPortUnchecked(portId).canTransitionToFlushComplete( + return lookupUpgradableModuleUnchecked(portId, channelId).canTransitionToFlushComplete( portId, channelId, upgradeSequence, _msgSender() ); } diff --git a/contracts/core/26-router/IIBCModule.sol b/contracts/core/26-router/IIBCModule.sol index 60605a59..9155a387 100644 --- a/contracts/core/26-router/IIBCModule.sol +++ b/contracts/core/26-router/IIBCModule.sol @@ -6,11 +6,11 @@ import {Packet} from "../04-channel/IIBCChannel.sol"; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** - * @notice IIBCModule is an interface that defines all the callbacks that modules must define as specified in ICS-26 - * @dev An IBC module must implement this interface and register itself with the IBCModuleManager - * IERC165's `supportsInterface` must return true for the interface ID of this interface, and the interface ID of IIBCModuleUpgrade if the module supports the channel upgrade + * @notice IIBCModuleInitializer is an interface that defines the callbacks that modules must define as specified in ICS-26 + * @dev IBCModules registered with IBCModuleManager via `bindPort` must implement this interface. + * IERC165's `supportsInterface` must return true for the interface ID of this interface */ -interface IIBCModule is IERC165 { +interface IIBCModuleInitializer is IERC165 { struct MsgOnChanOpenInit { Channel.Order order; string[] connectionHops; @@ -29,27 +29,6 @@ interface IIBCModule is IERC165 { string counterpartyVersion; } - struct MsgOnChanOpenAck { - string portId; - string channelId; - string counterpartyVersion; - } - - struct MsgOnChanOpenConfirm { - string portId; - string channelId; - } - - struct MsgOnChanCloseInit { - string portId; - string channelId; - } - - struct MsgOnChanCloseConfirm { - string portId; - string channelId; - } - /** * @dev onChanOpenInit will verify that the relayer-chosen parameters * are valid and perform any custom INIT logic. @@ -61,8 +40,10 @@ interface IIBCModule is IERC165 { * return a default version string representing the version(s) it supports. * If there is no default version string for the application, * it should return an error if provided version is empty string. + * onChanOpenInit can also create a new contract instance corresponding to the channel and return the address. + * Otherwise, it should return the address of this contract. */ - function onChanOpenInit(MsgOnChanOpenInit calldata msg_) external returns (string memory); + function onChanOpenInit(MsgOnChanOpenInit calldata msg_) external returns (address, string memory); /** * @dev onChanOpenTry will verify the relayer-chosen parameters along with the @@ -72,9 +53,39 @@ interface IIBCModule is IERC165 { * compatible with this modules supported versions, the callback must return * an error to abort the handshake. If the versions are compatible, the try callback * must select the final version string and return it to core IBC. - * OnChanOpenTry may also perform custom initialization logic + * onChanOpenTry may also perform custom initialization logic. + * onChanOpenTry can also create a new contract instance corresponding to the channel and return the address. + * Otherwise, it should return the address of this contract. */ - function onChanOpenTry(MsgOnChanOpenTry calldata msg_) external returns (string memory); + function onChanOpenTry(MsgOnChanOpenTry calldata msg_) external returns (address, string memory); +} + +/** + * @notice IIBCModule is an interface that defines all the callbacks that modules must define as specified in ICS-26 + * @dev IBC Modules returned by `onChanOpenInit` and `onChanOpenTry` must implement this interface. + * IERC165's `supportsInterface` must return true for the interface ID of this interface, and the interface ID of IIBCModuleUpgrade if the module supports the channel upgrade + */ +interface IIBCModule is IIBCModuleInitializer { + struct MsgOnChanOpenAck { + string portId; + string channelId; + string counterpartyVersion; + } + + struct MsgOnChanOpenConfirm { + string portId; + string channelId; + } + + struct MsgOnChanCloseInit { + string portId; + string channelId; + } + + struct MsgOnChanCloseConfirm { + string portId; + string channelId; + } /** * @dev OnChanOpenAck will error if the counterparty selected version string diff --git a/contracts/core/26-router/IIBCModuleManager.sol b/contracts/core/26-router/IIBCModuleManager.sol new file mode 100644 index 00000000..8efd0950 --- /dev/null +++ b/contracts/core/26-router/IIBCModuleManager.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +interface IIBCModuleManager { + /// @notice Claim a capability for a port + /// @param portId the port identifier + /// @param module the module claiming the capability + event IBCModuleManagerPortCapabilityClaimed(string portId, address module); + /// @notice Emitted when a module claims a capability for a channel + /// @param portId the port identifier + /// @param channelId the channel identifier + /// @param module the module claiming the capability + event IBCModuleManagerChannelCapabilityClaimed(string portId, string channelId, address module); +} diff --git a/pkg/contract/ibchandler/ibchandler.go b/pkg/contract/ibchandler/ibchandler.go index b6125ff6..04169712 100644 --- a/pkg/contract/ibchandler/ibchandler.go +++ b/pkg/contract/ibchandler/ibchandler.go @@ -324,7 +324,7 @@ type VersionData struct { // IbchandlerMetaData contains all meta data concerning the Ibchandler contract. var IbchandlerMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"acknowledgePacket\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelAcknowledgePacket.MsgPacketAcknowledgement\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bindPort\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"moduleAddress\",\"type\":\"address\",\"internalType\":\"contractIIBCModule\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cancelChannelUpgrade\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgCancelChannelUpgrade\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"errorReceipt\",\"type\":\"tuple\",\"internalType\":\"structErrorReceipt.Data\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"message\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"proofUpgradeError\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelCloseConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelCloseConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofInit\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelCloseInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelCloseInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofTry\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofAck\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenTry\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenTry\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofInit\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyUpgrade\",\"type\":\"tuple\",\"internalType\":\"structUpgrade.Data\",\"components\":[{\"name\":\"fields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"next_sequence_send\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofs\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.ChannelUpgradeProofs\",\"components\":[{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofUpgrade\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannelState\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"counterpartyUpgrade\",\"type\":\"tuple\",\"internalType\":\"structUpgrade.Data\",\"components\":[{\"name\":\"fields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"next_sequence_send\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofs\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.ChannelUpgradeProofs\",\"components\":[{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofUpgrade\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proposedUpgradeFields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeOpen\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeOpen\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannelState\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"counterpartyUpgradeSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeTry\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeTry\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyUpgradeSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"counterpartyUpgradeFields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"proposedConnectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"proofs\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.ChannelUpgradeProofs\",\"components\":[{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofUpgrade\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenAck\",\"components\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"clientStateBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"version\",\"type\":\"tuple\",\"internalType\":\"structVersion.Data\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"counterpartyConnectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofTry\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofClient\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofConsensus\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"consensusHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"hostConsensusStateProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenConfirm\",\"components\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofAck\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenInit\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structCounterparty.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"connection_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"prefix\",\"type\":\"tuple\",\"internalType\":\"structMerklePrefix.Data\",\"components\":[{\"name\":\"key_prefix\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"version\",\"type\":\"tuple\",\"internalType\":\"structVersion.Data\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"delayPeriod\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenTry\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenTry\",\"components\":[{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structCounterparty.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"connection_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"prefix\",\"type\":\"tuple\",\"internalType\":\"structMerklePrefix.Data\",\"components\":[{\"name\":\"key_prefix\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"delayPeriod\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"clientStateBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"counterpartyVersions\",\"type\":\"tuple[]\",\"internalType\":\"structVersion.Data[]\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"proofInit\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofClient\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofConsensus\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"consensusHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"hostConsensusStateProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createClient\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgCreateClient\",\"components\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientState\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"protoConsensusState\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCanTransitionToFlushComplete\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getChannel\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getChannelUpgrade\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structUpgrade.Data\",\"components\":[{\"name\":\"fields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"next_sequence_send\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClient\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClientByType\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClientState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClientType\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitment\",\"inputs\":[{\"name\":\"hashedPath\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitmentPrefix\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitmentsSlot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getConnection\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structConnectionEnd.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"versions\",\"type\":\"tuple[]\",\"internalType\":\"structVersion.Data[]\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumConnectionEnd.State\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structCounterparty.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"connection_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"prefix\",\"type\":\"tuple\",\"internalType\":\"structMerklePrefix.Data\",\"components\":[{\"name\":\"key_prefix\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"delay_period\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getConsensusState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[{\"name\":\"consensusStateBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getExpectedTimePerBlock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getIBCModuleByChannel\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIIBCModule\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getIBCModuleByPort\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIIBCModule\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getNextSequenceAck\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getNextSequenceRecv\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getNextSequenceSend\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPacketReceipt\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIBCChannelLib.PacketReceipt\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"recvPacket\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelRecvPacket.MsgPacketRecv\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerClient\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"client\",\"type\":\"address\",\"internalType\":\"contractILightClient\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"routeUpdateClient\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgUpdateClient\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sendPacket\",\"inputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExpectedTimePerBlock\",\"inputs\":[{\"name\":\"expectedTimePerBlock_\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"timeoutChannelUpgrade\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgTimeoutChannelUpgrade\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannel\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"timeoutOnClose\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelPacketTimeout.MsgTimeoutOnClose\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofUnreceived\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofClose\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"counterpartyUpgradeSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"timeoutPacket\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelPacketTimeout.MsgTimeoutPacket\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateClient\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgUpdateClient\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateClientCommitments\",\"inputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structHeight.Data[]\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"wrappedRouteUpdateClient\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgUpdateClient\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"writeAcknowledgement\",\"inputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AcknowledgePacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeAck\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"channelState\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumChannel.State\"},{\"name\":\"upgradeFields\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceSend\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeConfirm\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"channelState\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumChannel.State\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeInit\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"proposedUpgradeFields\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeOpen\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeTry\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"upgradeFields\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceSend\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GeneratedChannelIdentifier\",\"inputs\":[{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GeneratedClientIdentifier\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GeneratedConnectionIdentifier\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RecvPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SendPacket\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TimeoutPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WriteAcknowledgement\",\"inputs\":[{\"name\":\"destinationPortId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WriteErrorReceipt\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"message\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"IBCChannelAckAlreadyProcessedInPreviousUpgrade\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"ackStartSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelAcknowledgementAlreadyWritten\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelCannotRecvNextUpgradePacket\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"counterpartyNextSequenceSend\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelChannelNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelConnectionFeatureNotSupported\",\"inputs\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCChannelConnectionMultipleVersionsFound\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"IBCChannelConnectionNotOpened\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelCounterpartyChannelIdNotEmpty\",\"inputs\":[{\"name\":\"counterpartyChannelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelEmptyAcknowledgement\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyChannelState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyNextSequenceRecv\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyPacketAcknowledgement\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyPacketCommitment\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyPacketReceiptAbsence\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelInvalidConnectionHopsLength\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketAlreadyProcessInPreviousUpgrade\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"recvStartSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketCommitmentMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketCommitmentNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketMaybeAlreadyReceived\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketReceiptAlreadyExists\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPastPacketTimeoutHeight\",\"inputs\":[{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelPastPacketTimeoutTimestamp\",\"inputs\":[{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"latestTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelTimeoutNotReached\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelTimeoutPacketHeight\",\"inputs\":[{\"name\":\"currentBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"timeoutHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelTimeoutPacketTimestamp\",\"inputs\":[{\"name\":\"currentTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedChannelState\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedNextSequenceAck\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedNextSequenceRecv\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedPacketDestination\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedPacketSource\",\"inputs\":[{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnknownChannelOrder\",\"inputs\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnknownPacketReceiptCommitment\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyAlreadyFlushCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyAlreadyUpgraded\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyNotFlushingOrFlushcomplete\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyNotOpenOrFlushcomplete\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeErrorReceiptEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeFailedVerifyMembership\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeIncompatibleProposal\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeInvalidErrorReceiptSequence\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeInvalidTimeout\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeInvalidUpgradeFields\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNoChanges\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNoExistingUpgrade\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNotFlushcomplete\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNotFlushing\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNotOpenOrFlushing\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeOldCounterpartyUpgradeSequence\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeOldErrorReceiptSequence\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTimeoutHeightNotReached\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTimeoutTimestampNotReached\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTimeoutUnallowedState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTryProposedConnectionHopsEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTryProposedConnectionHopsMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeUnauthorizedChannelUpgrader\",\"inputs\":[{\"name\":\"upgrader\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeUnsupportedOrdering\",\"inputs\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeWriteOldErrorReceiptSequence\",\"inputs\":[{\"name\":\"latestSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelZeroPacketTimeout\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCClientClientNotFound\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCClientConsensusStateNotFound\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"consensusHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCClientFailedUpdateClient\",\"inputs\":[{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"args\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"IBCClientNotActiveClient\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCClientUnregisteredClientType\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCConnectionAlreadyConnectionExists\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionEmptyConnectionCounterpartyVersions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionFailedVerifyClientConsensusState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCConnectionFailedVerifyClientState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCConnectionFailedVerifyConnectionState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCConnectionIBCVersionNotSupported\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionInvalidCounterpartyConnectionIdentifier\",\"inputs\":[{\"name\":\"counterpartyConnectionId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCConnectionInvalidHostConsensusStateProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionInvalidSelfClientState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionNoMatchingVersionFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionUnexpectedConnectionState\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumConnectionEnd.State\"}]},{\"type\":\"error\",\"name\":\"IBCConnectionVersionsAlreadySet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCHostChannelCapabilityAlreadyClaimed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostClientTypeAlreadyExists\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostFailedAuthenticateChannelCapability\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidClientType\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidLightClientAddress\",\"inputs\":[{\"name\":\"lcAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidModuleAddress\",\"inputs\":[{\"name\":\"moduleAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidPortIdentifier\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostModuleChannelNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostModuleDoesNotSupportERC165\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCHostModuleDoesNotSupportIIBCModule\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"IBCHostModuleDoesNotSupportIIBCModuleUpgrade\",\"inputs\":[{\"name\":\"module\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostModulePortNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostPortCapabilityAlreadyClaimed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}]}]", + ABI: "[{\"type\":\"function\",\"name\":\"acknowledgePacket\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelAcknowledgePacket.MsgPacketAcknowledgement\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bindPort\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"moduleAddress\",\"type\":\"address\",\"internalType\":\"contractIIBCModuleInitializer\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cancelChannelUpgrade\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgCancelChannelUpgrade\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"errorReceipt\",\"type\":\"tuple\",\"internalType\":\"structErrorReceipt.Data\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"message\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"proofUpgradeError\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelCloseConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelCloseConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofInit\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelCloseInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelCloseInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofTry\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofAck\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelOpenTry\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelHandshake.MsgChannelOpenTry\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofInit\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyUpgrade\",\"type\":\"tuple\",\"internalType\":\"structUpgrade.Data\",\"components\":[{\"name\":\"fields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"next_sequence_send\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofs\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.ChannelUpgradeProofs\",\"components\":[{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofUpgrade\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannelState\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"counterpartyUpgrade\",\"type\":\"tuple\",\"internalType\":\"structUpgrade.Data\",\"components\":[{\"name\":\"fields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"next_sequence_send\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofs\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.ChannelUpgradeProofs\",\"components\":[{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofUpgrade\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proposedUpgradeFields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeOpen\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeOpen\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannelState\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"counterpartyUpgradeSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"channelUpgradeTry\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgChannelUpgradeTry\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyUpgradeSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"counterpartyUpgradeFields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"proposedConnectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"proofs\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.ChannelUpgradeProofs\",\"components\":[{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofUpgrade\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenAck\",\"components\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"clientStateBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"version\",\"type\":\"tuple\",\"internalType\":\"structVersion.Data\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"counterpartyConnectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofTry\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofClient\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofConsensus\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"consensusHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"hostConsensusStateProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenConfirm\",\"components\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proofAck\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenInit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenInit\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structCounterparty.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"connection_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"prefix\",\"type\":\"tuple\",\"internalType\":\"structMerklePrefix.Data\",\"components\":[{\"name\":\"key_prefix\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"version\",\"type\":\"tuple\",\"internalType\":\"structVersion.Data\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"delayPeriod\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"connectionOpenTry\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCConnection.MsgConnectionOpenTry\",\"components\":[{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structCounterparty.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"connection_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"prefix\",\"type\":\"tuple\",\"internalType\":\"structMerklePrefix.Data\",\"components\":[{\"name\":\"key_prefix\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"delayPeriod\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"clientStateBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"counterpartyVersions\",\"type\":\"tuple[]\",\"internalType\":\"structVersion.Data[]\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"proofInit\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofClient\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofConsensus\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"consensusHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"hostConsensusStateProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createClient\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgCreateClient\",\"components\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientState\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"protoConsensusState\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getCanTransitionToFlushComplete\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getChannel\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getChannelUpgrade\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structUpgrade.Data\",\"components\":[{\"name\":\"fields\",\"type\":\"tuple\",\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"next_sequence_send\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClient\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClientByType\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClientState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getClientType\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitment\",\"inputs\":[{\"name\":\"hashedPath\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitmentPrefix\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCommitmentsSlot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getConnection\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structConnectionEnd.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"versions\",\"type\":\"tuple[]\",\"internalType\":\"structVersion.Data[]\",\"components\":[{\"name\":\"identifier\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"features\",\"type\":\"string[]\",\"internalType\":\"string[]\"}]},{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumConnectionEnd.State\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structCounterparty.Data\",\"components\":[{\"name\":\"client_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"connection_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"prefix\",\"type\":\"tuple\",\"internalType\":\"structMerklePrefix.Data\",\"components\":[{\"name\":\"key_prefix\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"delay_period\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getConsensusState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[{\"name\":\"consensusStateBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getExpectedTimePerBlock\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getIBCModuleByChannel\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIIBCModule\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getIBCModuleByPort\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIIBCModuleInitializer\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getNextSequenceAck\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getNextSequenceRecv\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getNextSequenceSend\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPacketReceipt\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumIBCChannelLib.PacketReceipt\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"recvPacket\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelRecvPacket.MsgPacketRecv\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registerClient\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"client\",\"type\":\"address\",\"internalType\":\"contractILightClient\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"routeUpdateClient\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgUpdateClient\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sendPacket\",\"inputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExpectedTimePerBlock\",\"inputs\":[{\"name\":\"expectedTimePerBlock_\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"timeoutChannelUpgrade\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradeBase.MsgTimeoutChannelUpgrade\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyChannel\",\"type\":\"tuple\",\"internalType\":\"structChannel.Data\",\"components\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"},{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgrade_sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofChannel\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"timeoutOnClose\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelPacketTimeout.MsgTimeoutOnClose\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proofUnreceived\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofClose\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"counterpartyUpgradeSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"timeoutPacket\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelPacketTimeout.MsgTimeoutPacket\",\"components\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateClient\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgUpdateClient\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateClientCommitments\",\"inputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structHeight.Data[]\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"wrappedRouteUpdateClient\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCClient.MsgUpdateClient\",\"components\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"protoClientMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"writeAcknowledgement\",\"inputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"AcknowledgePacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeAck\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"channelState\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumChannel.State\"},{\"name\":\"upgradeFields\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceSend\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeConfirm\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"channelState\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumChannel.State\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeInit\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"proposedUpgradeFields\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeOpen\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ChannelUpgradeTry\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"upgradeFields\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structUpgradeFields.Data\",\"components\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connection_hops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"timeout\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structTimeout.Data\",\"components\":[{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"nextSequenceSend\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GeneratedChannelIdentifier\",\"inputs\":[{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GeneratedClientIdentifier\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GeneratedConnectionIdentifier\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"IBCModuleManagerChannelCapabilityClaimed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"module\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"IBCModuleManagerPortCapabilityClaimed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"module\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RecvPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SendPacket\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TimeoutPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WriteAcknowledgement\",\"inputs\":[{\"name\":\"destinationPortId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WriteErrorReceipt\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"message\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"IBCChannelAckAlreadyProcessedInPreviousUpgrade\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"ackStartSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelAcknowledgementAlreadyWritten\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelCannotRecvNextUpgradePacket\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"counterpartyNextSequenceSend\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelChannelNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelConnectionFeatureNotSupported\",\"inputs\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCChannelConnectionMultipleVersionsFound\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"IBCChannelConnectionNotOpened\",\"inputs\":[{\"name\":\"connectionId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelCounterpartyChannelIdNotEmpty\",\"inputs\":[{\"name\":\"counterpartyChannelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelEmptyAcknowledgement\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyChannelState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyNextSequenceRecv\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyPacketAcknowledgement\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyPacketCommitment\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelFailedVerifyPacketReceiptAbsence\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelInvalidConnectionHopsLength\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketAlreadyProcessInPreviousUpgrade\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"recvStartSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketCommitmentMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketCommitmentNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketMaybeAlreadyReceived\",\"inputs\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"nextSequenceRecv\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPacketReceiptAlreadyExists\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelPastPacketTimeoutHeight\",\"inputs\":[{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelPastPacketTimeoutTimestamp\",\"inputs\":[{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"latestTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelTimeoutNotReached\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelTimeoutPacketHeight\",\"inputs\":[{\"name\":\"currentBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"timeoutHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelTimeoutPacketTimestamp\",\"inputs\":[{\"name\":\"currentTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedChannelState\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedNextSequenceAck\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedNextSequenceRecv\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedPacketDestination\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnexpectedPacketSource\",\"inputs\":[{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnknownChannelOrder\",\"inputs\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUnknownPacketReceiptCommitment\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyAlreadyFlushCompleted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyAlreadyUpgraded\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyNotFlushingOrFlushcomplete\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeCounterpartyNotOpenOrFlushcomplete\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeErrorReceiptEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeFailedVerifyMembership\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeIncompatibleProposal\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeInvalidErrorReceiptSequence\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeInvalidTimeout\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeInvalidUpgradeFields\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNoChanges\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNoExistingUpgrade\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNotFlushcomplete\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNotFlushing\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeNotOpenOrFlushing\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumChannel.State\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeOldCounterpartyUpgradeSequence\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeOldErrorReceiptSequence\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTimeoutHeightNotReached\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTimeoutTimestampNotReached\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTimeoutUnallowedState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTryProposedConnectionHopsEmpty\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeTryProposedConnectionHopsMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeUnauthorizedChannelUpgrader\",\"inputs\":[{\"name\":\"upgrader\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeUnsupportedOrdering\",\"inputs\":[{\"name\":\"ordering\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCChannelUpgradeWriteOldErrorReceiptSequence\",\"inputs\":[{\"name\":\"latestSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"IBCChannelZeroPacketTimeout\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCClientClientNotFound\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCClientConsensusStateNotFound\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"consensusHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCClientFailedUpdateClient\",\"inputs\":[{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"args\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"IBCClientNotActiveClient\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCClientUnregisteredClientType\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCConnectionAlreadyConnectionExists\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionEmptyConnectionCounterpartyVersions\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionFailedVerifyClientConsensusState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCConnectionFailedVerifyClientState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCConnectionFailedVerifyConnectionState\",\"inputs\":[{\"name\":\"clientId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"path\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"height\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]}]},{\"type\":\"error\",\"name\":\"IBCConnectionIBCVersionNotSupported\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionInvalidCounterpartyConnectionIdentifier\",\"inputs\":[{\"name\":\"counterpartyConnectionId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCConnectionInvalidHostConsensusStateProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionInvalidSelfClientState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionNoMatchingVersionFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCConnectionUnexpectedConnectionState\",\"inputs\":[{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumConnectionEnd.State\"}]},{\"type\":\"error\",\"name\":\"IBCConnectionVersionsAlreadySet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCHostChannelCapabilityAlreadyClaimed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostClientTypeAlreadyExists\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostFailedAuthenticateChannelCapability\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidClientType\",\"inputs\":[{\"name\":\"clientType\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidLightClientAddress\",\"inputs\":[{\"name\":\"lcAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidModuleAddress\",\"inputs\":[{\"name\":\"moduleAddress\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostInvalidPortIdentifier\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostModuleChannelNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostModuleDoesNotSupportERC165\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IBCHostModuleDoesNotSupportIIBCModule\",\"inputs\":[{\"name\":\"module\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"IBCHostModuleDoesNotSupportIIBCModuleInitializer\",\"inputs\":[{\"name\":\"module\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]},{\"type\":\"error\",\"name\":\"IBCHostModuleDoesNotSupportIIBCModuleUpgrade\",\"inputs\":[{\"name\":\"module\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"IBCHostModulePortNotFound\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCHostPortCapabilityAlreadyClaimed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"}]}]", } // IbchandlerABI is the input ABI used to generate the binding from. @@ -2956,6 +2956,277 @@ func (_Ibchandler *IbchandlerFilterer) ParseGeneratedConnectionIdentifier(log ty return event, nil } +// IbchandlerIBCModuleManagerChannelCapabilityClaimedIterator is returned from FilterIBCModuleManagerChannelCapabilityClaimed and is used to iterate over the raw logs and unpacked data for IBCModuleManagerChannelCapabilityClaimed events raised by the Ibchandler contract. +type IbchandlerIBCModuleManagerChannelCapabilityClaimedIterator struct { + Event *IbchandlerIBCModuleManagerChannelCapabilityClaimed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IbchandlerIBCModuleManagerChannelCapabilityClaimedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IbchandlerIBCModuleManagerChannelCapabilityClaimed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IbchandlerIBCModuleManagerChannelCapabilityClaimed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IbchandlerIBCModuleManagerChannelCapabilityClaimedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IbchandlerIBCModuleManagerChannelCapabilityClaimedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IbchandlerIBCModuleManagerChannelCapabilityClaimed represents a IBCModuleManagerChannelCapabilityClaimed event raised by the Ibchandler contract. +type IbchandlerIBCModuleManagerChannelCapabilityClaimed struct { + PortId string + ChannelId string + Module common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterIBCModuleManagerChannelCapabilityClaimed is a free log retrieval operation binding the contract event 0x38263a2e7df1710554835905f687541ee2146f44ed1e80deae934cce1ffce451. +// +// Solidity: event IBCModuleManagerChannelCapabilityClaimed(string portId, string channelId, address module) +func (_Ibchandler *IbchandlerFilterer) FilterIBCModuleManagerChannelCapabilityClaimed(opts *bind.FilterOpts) (*IbchandlerIBCModuleManagerChannelCapabilityClaimedIterator, error) { + + logs, sub, err := _Ibchandler.contract.FilterLogs(opts, "IBCModuleManagerChannelCapabilityClaimed") + if err != nil { + return nil, err + } + return &IbchandlerIBCModuleManagerChannelCapabilityClaimedIterator{contract: _Ibchandler.contract, event: "IBCModuleManagerChannelCapabilityClaimed", logs: logs, sub: sub}, nil +} + +// WatchIBCModuleManagerChannelCapabilityClaimed is a free log subscription operation binding the contract event 0x38263a2e7df1710554835905f687541ee2146f44ed1e80deae934cce1ffce451. +// +// Solidity: event IBCModuleManagerChannelCapabilityClaimed(string portId, string channelId, address module) +func (_Ibchandler *IbchandlerFilterer) WatchIBCModuleManagerChannelCapabilityClaimed(opts *bind.WatchOpts, sink chan<- *IbchandlerIBCModuleManagerChannelCapabilityClaimed) (event.Subscription, error) { + + logs, sub, err := _Ibchandler.contract.WatchLogs(opts, "IBCModuleManagerChannelCapabilityClaimed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IbchandlerIBCModuleManagerChannelCapabilityClaimed) + if err := _Ibchandler.contract.UnpackLog(event, "IBCModuleManagerChannelCapabilityClaimed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseIBCModuleManagerChannelCapabilityClaimed is a log parse operation binding the contract event 0x38263a2e7df1710554835905f687541ee2146f44ed1e80deae934cce1ffce451. +// +// Solidity: event IBCModuleManagerChannelCapabilityClaimed(string portId, string channelId, address module) +func (_Ibchandler *IbchandlerFilterer) ParseIBCModuleManagerChannelCapabilityClaimed(log types.Log) (*IbchandlerIBCModuleManagerChannelCapabilityClaimed, error) { + event := new(IbchandlerIBCModuleManagerChannelCapabilityClaimed) + if err := _Ibchandler.contract.UnpackLog(event, "IBCModuleManagerChannelCapabilityClaimed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IbchandlerIBCModuleManagerPortCapabilityClaimedIterator is returned from FilterIBCModuleManagerPortCapabilityClaimed and is used to iterate over the raw logs and unpacked data for IBCModuleManagerPortCapabilityClaimed events raised by the Ibchandler contract. +type IbchandlerIBCModuleManagerPortCapabilityClaimedIterator struct { + Event *IbchandlerIBCModuleManagerPortCapabilityClaimed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IbchandlerIBCModuleManagerPortCapabilityClaimedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IbchandlerIBCModuleManagerPortCapabilityClaimed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IbchandlerIBCModuleManagerPortCapabilityClaimed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IbchandlerIBCModuleManagerPortCapabilityClaimedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IbchandlerIBCModuleManagerPortCapabilityClaimedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IbchandlerIBCModuleManagerPortCapabilityClaimed represents a IBCModuleManagerPortCapabilityClaimed event raised by the Ibchandler contract. +type IbchandlerIBCModuleManagerPortCapabilityClaimed struct { + PortId string + Module common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterIBCModuleManagerPortCapabilityClaimed is a free log retrieval operation binding the contract event 0x672bdc33c6ad9acab4df1040165b17a2fb6b392cfd491d6c3732285ff0f6a1dc. +// +// Solidity: event IBCModuleManagerPortCapabilityClaimed(string portId, address module) +func (_Ibchandler *IbchandlerFilterer) FilterIBCModuleManagerPortCapabilityClaimed(opts *bind.FilterOpts) (*IbchandlerIBCModuleManagerPortCapabilityClaimedIterator, error) { + + logs, sub, err := _Ibchandler.contract.FilterLogs(opts, "IBCModuleManagerPortCapabilityClaimed") + if err != nil { + return nil, err + } + return &IbchandlerIBCModuleManagerPortCapabilityClaimedIterator{contract: _Ibchandler.contract, event: "IBCModuleManagerPortCapabilityClaimed", logs: logs, sub: sub}, nil +} + +// WatchIBCModuleManagerPortCapabilityClaimed is a free log subscription operation binding the contract event 0x672bdc33c6ad9acab4df1040165b17a2fb6b392cfd491d6c3732285ff0f6a1dc. +// +// Solidity: event IBCModuleManagerPortCapabilityClaimed(string portId, address module) +func (_Ibchandler *IbchandlerFilterer) WatchIBCModuleManagerPortCapabilityClaimed(opts *bind.WatchOpts, sink chan<- *IbchandlerIBCModuleManagerPortCapabilityClaimed) (event.Subscription, error) { + + logs, sub, err := _Ibchandler.contract.WatchLogs(opts, "IBCModuleManagerPortCapabilityClaimed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IbchandlerIBCModuleManagerPortCapabilityClaimed) + if err := _Ibchandler.contract.UnpackLog(event, "IBCModuleManagerPortCapabilityClaimed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseIBCModuleManagerPortCapabilityClaimed is a log parse operation binding the contract event 0x672bdc33c6ad9acab4df1040165b17a2fb6b392cfd491d6c3732285ff0f6a1dc. +// +// Solidity: event IBCModuleManagerPortCapabilityClaimed(string portId, address module) +func (_Ibchandler *IbchandlerFilterer) ParseIBCModuleManagerPortCapabilityClaimed(log types.Log) (*IbchandlerIBCModuleManagerPortCapabilityClaimed, error) { + event := new(IbchandlerIBCModuleManagerPortCapabilityClaimed) + if err := _Ibchandler.contract.UnpackLog(event, "IBCModuleManagerPortCapabilityClaimed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // IbchandlerRecvPacketIterator is returned from FilterRecvPacket and is used to iterate over the raw logs and unpacked data for RecvPacket events raised by the Ibchandler contract. type IbchandlerRecvPacketIterator struct { Event *IbchandlerRecvPacket // Event containing the contract specifics and raw log diff --git a/pkg/contract/ibcmockapp/ibcmockapp.go b/pkg/contract/ibcmockapp/ibcmockapp.go index 09e4647c..16f6d062 100644 --- a/pkg/contract/ibcmockapp/ibcmockapp.go +++ b/pkg/contract/ibcmockapp/ibcmockapp.go @@ -41,6 +41,26 @@ type HeightData struct { RevisionHeight uint64 } +// IIBCModuleInitializerMsgOnChanOpenInit is an auto generated low-level Go binding around an user-defined struct. +type IIBCModuleInitializerMsgOnChanOpenInit struct { + Order uint8 + ConnectionHops []string + PortId string + ChannelId string + Counterparty ChannelCounterpartyData + Version string +} + +// IIBCModuleInitializerMsgOnChanOpenTry is an auto generated low-level Go binding around an user-defined struct. +type IIBCModuleInitializerMsgOnChanOpenTry struct { + Order uint8 + ConnectionHops []string + PortId string + ChannelId string + Counterparty ChannelCounterpartyData + CounterpartyVersion string +} + // IIBCModuleMsgOnChanCloseConfirm is an auto generated low-level Go binding around an user-defined struct. type IIBCModuleMsgOnChanCloseConfirm struct { PortId string @@ -66,26 +86,6 @@ type IIBCModuleMsgOnChanOpenConfirm struct { ChannelId string } -// IIBCModuleMsgOnChanOpenInit is an auto generated low-level Go binding around an user-defined struct. -type IIBCModuleMsgOnChanOpenInit struct { - Order uint8 - ConnectionHops []string - PortId string - ChannelId string - Counterparty ChannelCounterpartyData - Version string -} - -// IIBCModuleMsgOnChanOpenTry is an auto generated low-level Go binding around an user-defined struct. -type IIBCModuleMsgOnChanOpenTry struct { - Order uint8 - ConnectionHops []string - PortId string - ChannelId string - Counterparty ChannelCounterpartyData - CounterpartyVersion string -} - // Packet is an auto generated low-level Go binding around an user-defined struct. type Packet struct { Sequence uint64 @@ -100,7 +100,7 @@ type Packet struct { // IbcmockappMetaData contains all meta data concerning the Ibcmockapp contract. var IbcmockappMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"ibcHandler_\",\"type\":\"address\",\"internalType\":\"contractIIBCHandler\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MOCKAPP_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowCloseChannel\",\"inputs\":[{\"name\":\"allow\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"closeChannelAllowed\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ibcAddress\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onAcknowledgementPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseConfirm\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenInit\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenTry\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenTry\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onRecvPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onTimeoutPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sendPacket\",\"inputs\":[{\"name\":\"message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"writeAcknowledgement\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"IBCMockUnexpectedAcknowledgement\",\"inputs\":[{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expected\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"IBCMockUnexpectedPacket\",\"inputs\":[{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"IBCMockUnexpectedVersion\",\"inputs\":[{\"name\":\"actual\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"expected\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCModuleChannelCloseNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCModuleChannelOrderNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCModuleInvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"ibcHandler_\",\"type\":\"address\",\"internalType\":\"contractIIBCHandler\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"MOCKAPP_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"allowCloseChannel\",\"inputs\":[{\"name\":\"allow\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"closeChannelAllowed\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ibcAddress\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onAcknowledgementPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseConfirm\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenAck\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModuleInitializer.MsgOnChanOpenInit\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenTry\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModuleInitializer.MsgOnChanOpenTry\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onRecvPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onTimeoutPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sendPacket\",\"inputs\":[{\"name\":\"message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"writeAcknowledgement\",\"inputs\":[{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"IBCMockUnexpectedAcknowledgement\",\"inputs\":[{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expected\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"IBCMockUnexpectedPacket\",\"inputs\":[{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"IBCMockUnexpectedVersion\",\"inputs\":[{\"name\":\"actual\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"expected\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCModuleChannelCloseNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCModuleChannelOrderNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCModuleInvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]}]", } // IbcmockappABI is the input ABI used to generate the binding from. @@ -592,43 +592,43 @@ func (_Ibcmockapp *IbcmockappTransactorSession) OnChanOpenConfirm(arg0 IIBCModul // OnChanOpenInit is a paid mutator transaction binding the contract method 0x0b7b4ccb. // -// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ibcmockapp *IbcmockappTransactor) OnChanOpenInit(opts *bind.TransactOpts, msg_ IIBCModuleMsgOnChanOpenInit) (*types.Transaction, error) { +// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ibcmockapp *IbcmockappTransactor) OnChanOpenInit(opts *bind.TransactOpts, msg_ IIBCModuleInitializerMsgOnChanOpenInit) (*types.Transaction, error) { return _Ibcmockapp.contract.Transact(opts, "onChanOpenInit", msg_) } // OnChanOpenInit is a paid mutator transaction binding the contract method 0x0b7b4ccb. // -// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ibcmockapp *IbcmockappSession) OnChanOpenInit(msg_ IIBCModuleMsgOnChanOpenInit) (*types.Transaction, error) { +// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ibcmockapp *IbcmockappSession) OnChanOpenInit(msg_ IIBCModuleInitializerMsgOnChanOpenInit) (*types.Transaction, error) { return _Ibcmockapp.Contract.OnChanOpenInit(&_Ibcmockapp.TransactOpts, msg_) } // OnChanOpenInit is a paid mutator transaction binding the contract method 0x0b7b4ccb. // -// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ibcmockapp *IbcmockappTransactorSession) OnChanOpenInit(msg_ IIBCModuleMsgOnChanOpenInit) (*types.Transaction, error) { +// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ibcmockapp *IbcmockappTransactorSession) OnChanOpenInit(msg_ IIBCModuleInitializerMsgOnChanOpenInit) (*types.Transaction, error) { return _Ibcmockapp.Contract.OnChanOpenInit(&_Ibcmockapp.TransactOpts, msg_) } // OnChanOpenTry is a paid mutator transaction binding the contract method 0xa7a61e66. // -// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ibcmockapp *IbcmockappTransactor) OnChanOpenTry(opts *bind.TransactOpts, msg_ IIBCModuleMsgOnChanOpenTry) (*types.Transaction, error) { +// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ibcmockapp *IbcmockappTransactor) OnChanOpenTry(opts *bind.TransactOpts, msg_ IIBCModuleInitializerMsgOnChanOpenTry) (*types.Transaction, error) { return _Ibcmockapp.contract.Transact(opts, "onChanOpenTry", msg_) } // OnChanOpenTry is a paid mutator transaction binding the contract method 0xa7a61e66. // -// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ibcmockapp *IbcmockappSession) OnChanOpenTry(msg_ IIBCModuleMsgOnChanOpenTry) (*types.Transaction, error) { +// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ibcmockapp *IbcmockappSession) OnChanOpenTry(msg_ IIBCModuleInitializerMsgOnChanOpenTry) (*types.Transaction, error) { return _Ibcmockapp.Contract.OnChanOpenTry(&_Ibcmockapp.TransactOpts, msg_) } // OnChanOpenTry is a paid mutator transaction binding the contract method 0xa7a61e66. // -// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ibcmockapp *IbcmockappTransactorSession) OnChanOpenTry(msg_ IIBCModuleMsgOnChanOpenTry) (*types.Transaction, error) { +// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ibcmockapp *IbcmockappTransactorSession) OnChanOpenTry(msg_ IIBCModuleInitializerMsgOnChanOpenTry) (*types.Transaction, error) { return _Ibcmockapp.Contract.OnChanOpenTry(&_Ibcmockapp.TransactOpts, msg_) } diff --git a/pkg/contract/ics20transferbank/ics20transferbank.go b/pkg/contract/ics20transferbank/ics20transferbank.go index 3895a415..bb82cae4 100644 --- a/pkg/contract/ics20transferbank/ics20transferbank.go +++ b/pkg/contract/ics20transferbank/ics20transferbank.go @@ -41,6 +41,26 @@ type HeightData struct { RevisionHeight uint64 } +// IIBCModuleInitializerMsgOnChanOpenInit is an auto generated low-level Go binding around an user-defined struct. +type IIBCModuleInitializerMsgOnChanOpenInit struct { + Order uint8 + ConnectionHops []string + PortId string + ChannelId string + Counterparty ChannelCounterpartyData + Version string +} + +// IIBCModuleInitializerMsgOnChanOpenTry is an auto generated low-level Go binding around an user-defined struct. +type IIBCModuleInitializerMsgOnChanOpenTry struct { + Order uint8 + ConnectionHops []string + PortId string + ChannelId string + Counterparty ChannelCounterpartyData + CounterpartyVersion string +} + // IIBCModuleMsgOnChanCloseConfirm is an auto generated low-level Go binding around an user-defined struct. type IIBCModuleMsgOnChanCloseConfirm struct { PortId string @@ -66,26 +86,6 @@ type IIBCModuleMsgOnChanOpenConfirm struct { ChannelId string } -// IIBCModuleMsgOnChanOpenInit is an auto generated low-level Go binding around an user-defined struct. -type IIBCModuleMsgOnChanOpenInit struct { - Order uint8 - ConnectionHops []string - PortId string - ChannelId string - Counterparty ChannelCounterpartyData - Version string -} - -// IIBCModuleMsgOnChanOpenTry is an auto generated low-level Go binding around an user-defined struct. -type IIBCModuleMsgOnChanOpenTry struct { - Order uint8 - ConnectionHops []string - PortId string - ChannelId string - Counterparty ChannelCounterpartyData - CounterpartyVersion string -} - // Packet is an auto generated low-level Go binding around an user-defined struct. type Packet struct { Sequence uint64 @@ -100,7 +100,7 @@ type Packet struct { // Ics20transferbankMetaData contains all meta data concerning the Ics20transferbank contract. var Ics20transferbankMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"ibcHandler_\",\"type\":\"address\",\"internalType\":\"contractIIBCHandler\"},{\"name\":\"bank_\",\"type\":\"address\",\"internalType\":\"contractIICS20Bank\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ICS20_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ibcAddress\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onAcknowledgementPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenAck\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenInit\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenTry\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenTry\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onRecvPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onTimeoutPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sendTransfer\",\"inputs\":[{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"receiver\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"timeoutHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"error\",\"name\":\"IBCModuleChannelCloseNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCModuleChannelOrderNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCModuleInvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BankNotAdminRole\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BankNotBurnRole\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BankNotMintRole\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BytesSliceOutOfBounds\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"start\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"end\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20BytesSliceOverflow\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20EscrowAddressNotFound\",\"inputs\":[{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ICS20FailedERC20Transfer\",\"inputs\":[{\"name\":\"tokenContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20FailedERC20TransferFrom\",\"inputs\":[{\"name\":\"tokenContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20InsufficientBalance\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"needed\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidReceiver\",\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidReceiverAddress\",\"inputs\":[{\"name\":\"receiver\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidSenderAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidTokenContract\",\"inputs\":[{\"name\":\"tokenContract\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONClosingBraceNotFound\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONInvalidEscape\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONStringClosingDoubleQuoteNotFound\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONStringUnclosed\",\"inputs\":[{\"name\":\"bz\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONUnexpectedBytes\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ICS20UnexpectedVersion\",\"inputs\":[{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"ibcHandler_\",\"type\":\"address\",\"internalType\":\"contractIIBCHandler\"},{\"name\":\"bank_\",\"type\":\"address\",\"internalType\":\"contractIICS20Bank\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ICS20_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ibcAddress\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onAcknowledgementPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanCloseInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanCloseInit\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenAck\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenAck\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenConfirm\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCModule.MsgOnChanOpenConfirm\",\"components\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenInit\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModuleInitializer.MsgOnChanOpenInit\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onChanOpenTry\",\"inputs\":[{\"name\":\"msg_\",\"type\":\"tuple\",\"internalType\":\"structIIBCModuleInitializer.MsgOnChanOpenTry\",\"components\":[{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"},{\"name\":\"connectionHops\",\"type\":\"string[]\",\"internalType\":\"string[]\"},{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"counterparty\",\"type\":\"tuple\",\"internalType\":\"structChannelCounterparty.Data\",\"components\":[{\"name\":\"port_id\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channel_id\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"counterpartyVersion\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onRecvPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"acknowledgement\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onTimeoutPacket\",\"inputs\":[{\"name\":\"packet\",\"type\":\"tuple\",\"internalType\":\"structPacket\",\"components\":[{\"name\":\"sequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationPort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"destinationChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"timeoutHeight\",\"type\":\"tuple\",\"internalType\":\"structHeight.Data\",\"components\":[{\"name\":\"revision_number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revision_height\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"timeoutTimestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"sendTransfer\",\"inputs\":[{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"receiver\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourcePort\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"sourceChannel\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"timeoutHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"error\",\"name\":\"IBCModuleChannelCloseNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"IBCModuleChannelOrderNotAllowed\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"order\",\"type\":\"uint8\",\"internalType\":\"enumChannel.Order\"}]},{\"type\":\"error\",\"name\":\"IBCModuleInvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BankNotAdminRole\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BankNotBurnRole\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BankNotMintRole\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20BytesSliceOutOfBounds\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"start\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"end\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20BytesSliceOverflow\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20EscrowAddressNotFound\",\"inputs\":[{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ICS20FailedERC20Transfer\",\"inputs\":[{\"name\":\"tokenContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20FailedERC20TransferFrom\",\"inputs\":[{\"name\":\"tokenContract\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20InsufficientBalance\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"needed\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidReceiver\",\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidReceiverAddress\",\"inputs\":[{\"name\":\"receiver\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidSenderAddress\",\"inputs\":[{\"name\":\"sender\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ICS20InvalidTokenContract\",\"inputs\":[{\"name\":\"tokenContract\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONClosingBraceNotFound\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONInvalidEscape\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONStringClosingDoubleQuoteNotFound\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"bytes1\",\"internalType\":\"bytes1\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONStringUnclosed\",\"inputs\":[{\"name\":\"bz\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ICS20JSONUnexpectedBytes\",\"inputs\":[{\"name\":\"position\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ICS20UnexpectedVersion\",\"inputs\":[{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}]}]", } // Ics20transferbankABI is the input ABI used to generate the binding from. @@ -449,43 +449,43 @@ func (_Ics20transferbank *Ics20transferbankTransactorSession) OnChanOpenConfirm( // OnChanOpenInit is a paid mutator transaction binding the contract method 0x0b7b4ccb. // -// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ics20transferbank *Ics20transferbankTransactor) OnChanOpenInit(opts *bind.TransactOpts, msg_ IIBCModuleMsgOnChanOpenInit) (*types.Transaction, error) { +// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ics20transferbank *Ics20transferbankTransactor) OnChanOpenInit(opts *bind.TransactOpts, msg_ IIBCModuleInitializerMsgOnChanOpenInit) (*types.Transaction, error) { return _Ics20transferbank.contract.Transact(opts, "onChanOpenInit", msg_) } // OnChanOpenInit is a paid mutator transaction binding the contract method 0x0b7b4ccb. // -// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ics20transferbank *Ics20transferbankSession) OnChanOpenInit(msg_ IIBCModuleMsgOnChanOpenInit) (*types.Transaction, error) { +// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ics20transferbank *Ics20transferbankSession) OnChanOpenInit(msg_ IIBCModuleInitializerMsgOnChanOpenInit) (*types.Transaction, error) { return _Ics20transferbank.Contract.OnChanOpenInit(&_Ics20transferbank.TransactOpts, msg_) } // OnChanOpenInit is a paid mutator transaction binding the contract method 0x0b7b4ccb. // -// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ics20transferbank *Ics20transferbankTransactorSession) OnChanOpenInit(msg_ IIBCModuleMsgOnChanOpenInit) (*types.Transaction, error) { +// Solidity: function onChanOpenInit((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ics20transferbank *Ics20transferbankTransactorSession) OnChanOpenInit(msg_ IIBCModuleInitializerMsgOnChanOpenInit) (*types.Transaction, error) { return _Ics20transferbank.Contract.OnChanOpenInit(&_Ics20transferbank.TransactOpts, msg_) } // OnChanOpenTry is a paid mutator transaction binding the contract method 0xa7a61e66. // -// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ics20transferbank *Ics20transferbankTransactor) OnChanOpenTry(opts *bind.TransactOpts, msg_ IIBCModuleMsgOnChanOpenTry) (*types.Transaction, error) { +// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ics20transferbank *Ics20transferbankTransactor) OnChanOpenTry(opts *bind.TransactOpts, msg_ IIBCModuleInitializerMsgOnChanOpenTry) (*types.Transaction, error) { return _Ics20transferbank.contract.Transact(opts, "onChanOpenTry", msg_) } // OnChanOpenTry is a paid mutator transaction binding the contract method 0xa7a61e66. // -// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ics20transferbank *Ics20transferbankSession) OnChanOpenTry(msg_ IIBCModuleMsgOnChanOpenTry) (*types.Transaction, error) { +// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ics20transferbank *Ics20transferbankSession) OnChanOpenTry(msg_ IIBCModuleInitializerMsgOnChanOpenTry) (*types.Transaction, error) { return _Ics20transferbank.Contract.OnChanOpenTry(&_Ics20transferbank.TransactOpts, msg_) } // OnChanOpenTry is a paid mutator transaction binding the contract method 0xa7a61e66. // -// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(string) -func (_Ics20transferbank *Ics20transferbankTransactorSession) OnChanOpenTry(msg_ IIBCModuleMsgOnChanOpenTry) (*types.Transaction, error) { +// Solidity: function onChanOpenTry((uint8,string[],string,string,(string,string),string) msg_) returns(address, string) +func (_Ics20transferbank *Ics20transferbankTransactorSession) OnChanOpenTry(msg_ IIBCModuleInitializerMsgOnChanOpenTry) (*types.Transaction, error) { return _Ics20transferbank.Contract.OnChanOpenTry(&_Ics20transferbank.TransactOpts, msg_) } diff --git a/tests/foundry/src/IBCMockAppFactory.t.sol b/tests/foundry/src/IBCMockAppFactory.t.sol new file mode 100644 index 00000000..6e5882cb --- /dev/null +++ b/tests/foundry/src/IBCMockAppFactory.t.sol @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import "./helpers/IBCTestHelper.t.sol"; +import {Vm} from "forge-std/Test.sol"; +import {IBCMockLib} from "../../../contracts/apps/mock/IBCMockLib.sol"; +import {IIBCChannelRecvPacket, IIBCChannelAcknowledgePacket} from "../../../contracts/core/04-channel/IIBCChannel.sol"; +import {LocalhostClientLib} from "../../../contracts/clients/09-localhost/LocalhostClient.sol"; +import {LocalhostHelper} from "../../../contracts/clients/09-localhost/LocalhostHelper.sol"; +import {ICS04PacketEventTestHelper} from "./helpers/ICS04PacketTestHelper.t.sol"; +import {IBCMockAppFactory} from "../../../contracts/apps/mock/IBCMockAppFactory.sol"; + +contract IBCMockAppFactoryTest is IBCTestHelper, ICS04PacketEventTestHelper { + using LocalhostHelper for TestableIBCHandler; + + string internal constant MOCK_APP_PORT = "mockapp"; + string internal constant MOCK_APP_VERSION = "mockapp-1"; + + TestableIBCHandler ibcHandler; + IBCMockAppFactory mockAppFactory; + + struct ChannelInfo { + string connectionId; + string portId; + string channelId; + } + + function setUp() public { + ibcHandler = defaultIBCHandler(); + mockAppFactory = new IBCMockAppFactory(ibcHandler); + ibcHandler.bindPort(MOCK_APP_PORT, mockAppFactory); + ibcHandler.registerLocalhostClient(); + ibcHandler.createLocalhostClient(); + } + + function testHandshake() public { + Channel.Order[2] memory orders = [Channel.Order.ORDER_UNORDERED, Channel.Order.ORDER_ORDERED]; + for (uint256 i = 0; i < orders.length; i++) { + createMockAppChannel(orders[i]); + } + } + + function testPacketRelay() public { + vm.recordLogs(); + Channel.Order[2] memory orders = [Channel.Order.ORDER_UNORDERED, Channel.Order.ORDER_ORDERED]; + for (uint256 i = 0; i < orders.length; i++) { + (ChannelInfo memory channel0, ChannelInfo memory channel1) = createMockAppChannel(orders[i]); + mockPacketRelay(channel0, channel1, orders[i]); + mockPacketRelay(channel1, channel0, orders[i]); + mockPacketRelay(channel0, channel1, orders[i]); + } + } + + function mockPacketRelay(ChannelInfo memory ca, ChannelInfo memory cb, Channel.Order ordering) internal { + sendAndRelay( + ca, + cb, + ordering, + RelayCase({ + packetData: IBCMockLib.MOCK_PACKET_DATA, + async: false, + acknowledgement: IBCMockLib.SUCCESSFUL_ACKNOWLEDGEMENT_JSON + }) + ); + sendAndRelay( + ca, + cb, + ordering, + RelayCase({ + packetData: IBCMockLib.MOCK_FAIL_PACKET_DATA, + async: false, + acknowledgement: IBCMockLib.FAILED_ACKNOWLEDGEMENT_JSON + }) + ); + sendAndRelay( + ca, + cb, + ordering, + RelayCase({ + packetData: IBCMockLib.MOCK_ASYNC_PACKET_DATA, + async: true, + acknowledgement: IBCMockLib.SUCCESSFUL_ASYNC_ACKNOWLEDGEMENT_JSON + }) + ); + } + + struct RelayCase { + bytes packetData; + bool async; + bytes acknowledgement; + } + + function sendAndRelay(ChannelInfo memory ca, ChannelInfo memory cb, Channel.Order ordering, RelayCase memory rc) + private + { + uint64 sequence = mockAppFactory.lookupApp(ca.channelId).sendPacket(rc.packetData, H(uint64(getBlockNumber(1))), 0); + Packet memory packet = getLastSentPacket(ibcHandler, ca.portId, ca.channelId, vm.getRecordedLogs()); + assertEq(packet.data, rc.packetData); + ibcHandler.recvPacket( + IIBCChannelRecvPacket.MsgPacketRecv({ + packet: packet, + proof: LocalhostClientLib.sentinelProof(), + proofHeight: Height.nil() + }) + ); + if (ordering == Channel.Order.ORDER_UNORDERED) { + assertTrue(ibcHandler.hasPacketReceipt(cb.portId, cb.channelId, sequence)); + } else if (ordering == Channel.Order.ORDER_ORDERED) { + assertTrue(ibcHandler.getNextSequenceRecv(cb.portId, cb.channelId) == sequence + 1); + } else { + revert("unknown ordering"); + } + Vm.Log[] memory logs = vm.getRecordedLogs(); + assertEq(abi.encode(packet), abi.encode(getLastRecvPacket(ibcHandler, logs))); + if (rc.async) { + mockAppFactory.lookupApp(cb.channelId).writeAcknowledgement(sequence); + logs = vm.getRecordedLogs(); + } + WriteAcknolwedgement memory ack = getLastWrittenAcknowledgement(ibcHandler, logs); + assertEq(ack.sequence, sequence); + assertEq(ack.acknowledgement, rc.acknowledgement); + + ibcHandler.acknowledgePacket( + IIBCChannelAcknowledgePacket.MsgPacketAcknowledgement({ + packet: packet, + acknowledgement: ack.acknowledgement, + proof: LocalhostClientLib.sentinelProof(), + proofHeight: Height.nil() + }) + ); + assertTrue(ibcHandler.getPacketCommitment(ca.portId, ca.channelId, sequence) == bytes32(0)); + } + + function createMockAppChannel(Channel.Order ordering) internal returns (ChannelInfo memory, ChannelInfo memory) { + (string memory connectionId0, string memory connectionId1) = ibcHandler.createLocalhostConnection(); + (string memory channelId0, string memory channelId1) = ibcHandler.createLocalhostChannel( + LocalhostHelper.MsgCreateChannel({ + connectionId0: connectionId0, + connectionId1: connectionId1, + portId0: MOCK_APP_PORT, + portId1: MOCK_APP_PORT, + ordering: ordering, + version: MOCK_APP_VERSION + }) + ); + return ( + ChannelInfo({connectionId: connectionId0, portId: MOCK_APP_PORT, channelId: channelId0}), + ChannelInfo({connectionId: connectionId1, portId: MOCK_APP_PORT, channelId: channelId1}) + ); + } +} \ No newline at end of file diff --git a/tests/foundry/src/ICS04Handshake.t.sol b/tests/foundry/src/ICS04Handshake.t.sol index f09831b5..ddc13758 100644 --- a/tests/foundry/src/ICS04Handshake.t.sol +++ b/tests/foundry/src/ICS04Handshake.t.sol @@ -50,7 +50,7 @@ contract TestICS04Handshake is ICS03TestHelper, ICS04HandshakeMockClientTestHelp handler.bindPort("portidtwo", IIBCModule(address(0x01))); // must be failed the module does not support IIBCModule address dummyApp = address(new DummyApp(address(handler))); - vm.expectRevert(abi.encodeWithSelector(IIBCHostErrors.IBCHostModuleDoesNotSupportIIBCModule.selector, type(IIBCModule).interfaceId)); + vm.expectRevert(abi.encodeWithSelector(IIBCHostErrors.IBCHostModuleDoesNotSupportIIBCModuleInitializer.selector, dummyApp, type(IIBCModuleInitializer).interfaceId)); handler.bindPort("portidtwo", IIBCModule(dummyApp)); // must be failed if the port is empty vm.expectRevert(abi.encodeWithSelector(IIBCHostErrors.IBCHostInvalidPortIdentifier.selector, "")); From d551cd729b5543e04f57d42b833e1ec249147a89 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Mon, 30 Sep 2024 14:03:59 +0900 Subject: [PATCH 2/2] improve tests Signed-off-by: Jun Kimura --- .gas-snapshot | 24 +++++++++++------------ tests/foundry/src/IBCMockAppFactory.t.sol | 6 +++++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index a9312b63..465efd32 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -5,8 +5,8 @@ IBCBenchmarks:testRecvPacket() (gas: 154889) IBCBenchmarks:testSendPacket() (gas: 94843) IBCBenchmarks:testUpdateMockClientDirectly() (gas: 64879) IBCBenchmarks:testUpdateMockClientViaHandler() (gas: 148239) -IBCMockAppFactoryTest:testHandshake() (gas: 8675737) -IBCMockAppFactoryTest:testPacketRelay() (gas: 15995797) +IBCMockAppFactoryTest:testHandshake() (gas: 8710771) +IBCMockAppFactoryTest:testPacketRelay() (gas: 15995791) IBCMockAppTest:testHandshake() (gas: 4183963) IBCMockAppTest:testHandshakeBetweenDifferentPorts() (gas: 3130978) IBCMockAppTest:testPacketRelay() (gas: 11493798) @@ -52,24 +52,24 @@ TestICS04Packet:testRecvPacketTimeoutTimestamp() (gas: 3107997) TestICS04Packet:testSendPacket() (gas: 4425319) TestICS04Packet:testTimeoutOnClose() (gas: 3335905) TestICS04Upgrade:testCrossingHelloInconsistentVersions() (gas: 9761065) -TestICS04Upgrade:testUpgradeAuthorityCancel() (gas: 45179910) +TestICS04Upgrade:testUpgradeAuthorityCancel() (gas: 45179742) TestICS04Upgrade:testUpgradeCannotCancelWithOldErrorReceipt() (gas: 3309916) -TestICS04Upgrade:testUpgradeCannotRecvNextUpgradePacket() (gas: 5142540) -TestICS04Upgrade:testUpgradeCounterpartyAdvanceNextSequenceBeforeOpen() (gas: 5101912) +TestICS04Upgrade:testUpgradeCannotRecvNextUpgradePacket() (gas: 5142516) +TestICS04Upgrade:testUpgradeCounterpartyAdvanceNextSequenceBeforeOpen() (gas: 5101888) TestICS04Upgrade:testUpgradeCrossingHelloIncompatibleProposals() (gas: 4859793) -TestICS04Upgrade:testUpgradeFull() (gas: 55736704) +TestICS04Upgrade:testUpgradeFull() (gas: 55736320) TestICS04Upgrade:testUpgradeInit() (gas: 2937759) TestICS04Upgrade:testUpgradeNoChanges() (gas: 2354426) TestICS04Upgrade:testUpgradeNotUpgradableModule() (gas: 3470809) TestICS04Upgrade:testUpgradeOutOfSync() (gas: 3741133) -TestICS04Upgrade:testUpgradeRelaySuccessAtCounterpartyFlushComplete() (gas: 5115138) -TestICS04Upgrade:testUpgradeRelaySuccessAtFlushing() (gas: 5487371) -TestICS04Upgrade:testUpgradeSendPacketFailAtFlushingOrFlushComplete() (gas: 3920282) +TestICS04Upgrade:testUpgradeRelaySuccessAtCounterpartyFlushComplete() (gas: 5115114) +TestICS04Upgrade:testUpgradeRelaySuccessAtFlushing() (gas: 5487347) +TestICS04Upgrade:testUpgradeSendPacketFailAtFlushingOrFlushComplete() (gas: 3920258) TestICS04Upgrade:testUpgradeTimeoutAbortAck() (gas: 17345060) TestICS04Upgrade:testUpgradeTimeoutAbortConfirm() (gas: 20945649) -TestICS04Upgrade:testUpgradeTimeoutUpgrade() (gas: 69105638) -TestICS04Upgrade:testUpgradeToOrdered() (gas: 53030999) -TestICS04Upgrade:testUpgradeToUnordered() (gas: 42323384) +TestICS04Upgrade:testUpgradeTimeoutUpgrade() (gas: 69105350) +TestICS04Upgrade:testUpgradeToOrdered() (gas: 53030759) +TestICS04Upgrade:testUpgradeToUnordered() (gas: 42323192) TestICS04UpgradeApp:testUpgradeAuthorizationChanneNotFound() (gas: 62062) TestICS04UpgradeApp:testUpgradeAuthorizationRePropose() (gas: 2376902) TestICS04UpgradeApp:testUpgradeAuthorizationRemove() (gas: 2357348) diff --git a/tests/foundry/src/IBCMockAppFactory.t.sol b/tests/foundry/src/IBCMockAppFactory.t.sol index 6e5882cb..f6e5e0cd 100644 --- a/tests/foundry/src/IBCMockAppFactory.t.sol +++ b/tests/foundry/src/IBCMockAppFactory.t.sol @@ -36,7 +36,11 @@ contract IBCMockAppFactoryTest is IBCTestHelper, ICS04PacketEventTestHelper { function testHandshake() public { Channel.Order[2] memory orders = [Channel.Order.ORDER_UNORDERED, Channel.Order.ORDER_ORDERED]; for (uint256 i = 0; i < orders.length; i++) { - createMockAppChannel(orders[i]); + (ChannelInfo memory channel0, ChannelInfo memory channel1) = createMockAppChannel(orders[i]); + assertEq(address(ibcHandler.getIBCModuleByPort(channel0.portId)), address(mockAppFactory)); + assertEq(address(ibcHandler.getIBCModuleByChannel(channel0.portId, channel0.channelId)), address(mockAppFactory.lookupApp(channel0.channelId))); + assertEq(address(ibcHandler.getIBCModuleByPort(channel1.portId)), address(mockAppFactory)); + assertEq(address(ibcHandler.getIBCModuleByChannel(channel1.portId, channel1.channelId)), address(mockAppFactory.lookupApp(channel1.channelId))); } }