diff --git a/.gitignore b/.gitignore index 567609b..80e8980 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ build/ +cache/ +node_modules/ +out/ diff --git a/Makefile b/Makefile index f91b743..bc4419e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ FORGE ?= forge -ABIGEN ?= docker run -u $$(id -u):$$(id -g) -v .:/workspace -w /workspace -it ethereum/client-go:alltools-v1.14.0 abigen +ABIGEN ?= docker run -v .:/workspace -w /workspace -it ethereum/client-go:alltools-v1.14.0 abigen DOCKER := $(shell which docker) @@ -16,19 +16,31 @@ submodule: git submodule update --init cd ./yui-ibc-solidity && npm install +.PHONY: dep +dep: + $(DOCKER) run --rm -v $$PWD:$$PWD -w $$PWD node:20 npm i + cd ./yui-ibc-solidity && $(DOCKER) run --rm -v $$PWD:$$PWD -w $$PWD node:20 npm i + .PHONY: compile compile: - cp contract/*.sol ./yui-ibc-solidity/contracts/ + $(FORGE) build $(FORGE) build --config-path ./yui-ibc-solidity/foundry.toml .PHONY: abigen abigen: compile - @for a in IBCHandler Multicall3; do \ + @mkdir -p ./build/abi + @for a in IBCHandler IIBCChannelUpgradableModule; do \ b=$$(echo $$a | tr '[A-Z]' '[a-z]'); \ - mkdir -p ./build/abi ./pkg/contract/$$b; \ + mkdir -p ./pkg/contract/$$b; \ jq -r '.abi' ./yui-ibc-solidity/out/$$a.sol/$$a.json > ./build/abi/$$a.abi; \ $(ABIGEN) --abi ./build/abi/$$a.abi --pkg $$b --out ./pkg/contract/$$b/$$b.go; \ done + @for a in Multicall3 IIBCContractUpgradableModule; do \ + b=$$(echo $$a | tr '[A-Z]' '[a-z]'); \ + mkdir -p ./pkg/contract/$$b; \ + jq -r '.abi' ./out/$$a.sol/$$a.json > ./build/abi/$$a.abi; \ + $(ABIGEN) --abi ./build/abi/$$a.abi --pkg $$b --out ./pkg/contract/$$b/$$b.go; \ + done .PHONY: proto-gen proto-update-deps proto-gen: diff --git a/contracts/IBCContractUpgradableModule.sol b/contracts/IBCContractUpgradableModule.sol new file mode 100644 index 0000000..546f04a --- /dev/null +++ b/contracts/IBCContractUpgradableModule.sol @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import {IIBCContractUpgradableModule, IIBCContractUpgradableModuleErrors} from "./IIBCContractUpgradableModule.sol"; + +import {IBCChannelUpgradableModuleBase} from "@hyperledger-labs/yui-ibc-solidity/contracts/apps/commons/IBCChannelUpgradableModule.sol"; +import {Channel, UpgradeFields} from "@hyperledger-labs/yui-ibc-solidity/contracts/proto/Channel.sol"; +import {IIBCHandler} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/25-handler/IIBCHandler.sol"; + +abstract contract IBCContractUpgradableModuleBase is + IBCChannelUpgradableModuleBase, + IIBCContractUpgradableModule, + IIBCContractUpgradableModuleErrors +{ + // ------------------- Storage ------------------- // + + // NOTE: A module should set an initial appVersion struct in contract constructor or initializer + mapping(string appVersion => AppInfo) internal appInfos; + + // ------------------- Modifiers ------------------- // + + modifier onlyContractUpgrader() { + address msgSender = _msgSender(); + if (!_isContractUpgrader(msgSender)) { + revert IBCContractUpgradableModuleUnauthorizedUpgrader(msgSender); + } + _; + } + + // ------------------- Functions ------------------- // + + /** + * @dev See {IIBCContractUpgradableModule-getAppinfoproposal} + */ + function getAppInfoProposal(string calldata version) + external + view + override(IIBCContractUpgradableModule) + returns (AppInfo memory) + { + return appInfos[version]; + } + + /** + * @dev See {IIBCContractUpgradableModule-proposeAppVersion} + */ + function proposeAppVersion(string calldata version, AppInfo calldata appInfo_) + external + override(IIBCContractUpgradableModule) + onlyContractUpgrader + { + if (appInfo_.implementation == address(0)) { + revert IBCContractUpgradableModuleAppInfoProposedWithZeroImpl(); + } + + AppInfo storage appInfo = appInfos[version]; + if (appInfo.implementation != address(0)) { + revert IBCContractUpgradableModuleAppInfoIsAlreadySet(); + } + + appInfos[version] = appInfo_; + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) + public + view + virtual + override(IBCChannelUpgradableModuleBase) + returns (bool) + { + return super.supportsInterface(interfaceId) || + interfaceId == type(IIBCContractUpgradableModule).interfaceId; + } + + /** + * @dev See {IIBCModuleUpgrade-onChanUpgradeInit} + */ + function onChanUpgradeInit( + string calldata portId, + string calldata channelId, + uint64 upgradeSequence, + UpgradeFields.Data calldata proposedUpgradeFields + ) + public + view + virtual + override(IBCChannelUpgradableModuleBase) + onlyIBC + returns (string memory version) + { + version = super.onChanUpgradeInit(portId, channelId, upgradeSequence, proposedUpgradeFields); + + (Channel.Data memory channel, bool found) = IIBCHandler(ibcAddress()).getChannel(portId, channelId); + if (!found) { + revert IBCContractUpgradableModuleChannelNotFound(portId, channelId); + } + + _prepareContractUpgrade(channel.version, version); + } + + /** + * @dev See {IIBCModuleUpgrade-onChanUpgradeTry} + */ + function onChanUpgradeTry( + string calldata portId, + string calldata channelId, + uint64 upgradeSequence, + UpgradeFields.Data calldata proposedUpgradeFields + ) + public + view + virtual + override(IBCChannelUpgradableModuleBase) + onlyIBC + returns (string memory version) + { + version = super.onChanUpgradeTry(portId, channelId, upgradeSequence, proposedUpgradeFields); + + (Channel.Data memory channel, bool found) = IIBCHandler(ibcAddress()).getChannel(portId, channelId); + if (!found) { + revert IBCContractUpgradableModuleChannelNotFound(portId, channelId); + } + + _prepareContractUpgrade(channel.version, version); + } + + /** + * @dev See {IIBCModuleUpgrade-onChanUpgradeOpen} + */ + function onChanUpgradeOpen( + string calldata portId, + string calldata channelId, + uint64 upgradeSequence + ) + public + virtual + override(IBCChannelUpgradableModuleBase) + onlyIBC + { + super.onChanUpgradeOpen(portId, channelId, upgradeSequence); + + (Channel.Data memory channel, bool found) = IIBCHandler(ibcAddress()).getChannel(portId, channelId); + if (!found) { + revert IBCContractUpgradableModuleChannelNotFound(portId, channelId); + } + + _upgradeContract(channel.version); + } + + // ------------------- Internal Functions ------------------- // + + function _isContractUpgrader(address msgSender) internal view virtual returns (bool); + + function _doUpgradeContract(address implementation, bytes memory initialCalldata) internal virtual; + + // ------------------- Private Functions ------------------- // + + function _prepareContractUpgrade(string memory version, string memory newVersion) private view { + if (!_compareString(version, newVersion)) { + AppInfo storage appInfo = appInfos[newVersion]; + if (appInfo.implementation == address(0)) { + revert IBCContractUpgradableModuleAppInfoNotProposedYet(); + } + if (appInfo.consumed) { + revert IBCContractUpgradableModuleAlreadyConsumedAppInfo(); + } + } + } + + function _compareString(string memory a, string memory b) private pure returns (bool) { + if (bytes(a).length != bytes(b).length) { + return false; + } + return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); + } + + function _upgradeContract(string memory newVersion) private { + AppInfo storage appInfo = appInfos[newVersion]; + + if (appInfo.implementation != address(0) && !appInfo.consumed) { + appInfo.consumed = true; + _doUpgradeContract(appInfo.implementation, appInfo.initialCalldata); + delete appInfo.initialCalldata; + } + } +} diff --git a/contracts/IBCContractUpgradableUUPSMockApp.sol b/contracts/IBCContractUpgradableUUPSMockApp.sol new file mode 100644 index 0000000..4670734 --- /dev/null +++ b/contracts/IBCContractUpgradableUUPSMockApp.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; + +import {IBCContractUpgradableModuleBase} from "./IBCContractUpgradableModule.sol"; + +import {IBCMockApp} from "@hyperledger-labs/yui-ibc-solidity/contracts/apps/mock/IBCMockApp.sol"; +import {IBCAppBase} from "@hyperledger-labs/yui-ibc-solidity/contracts/apps/commons/IBCAppBase.sol"; +import {IBCChannelUpgradableModuleBase} from "@hyperledger-labs/yui-ibc-solidity/contracts/apps/commons/IBCChannelUpgradableModule.sol"; +import {IIBCHandler} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/25-handler/IIBCHandler.sol"; + +contract IBCContractUpgradableUUPSMockApp is + UUPSUpgradeable, + IBCMockApp, + IBCContractUpgradableModuleBase +{ + address immutable _self; // implementation's address, which is set by the constructor + address immutable _deployer; // contract deployer, which is set by the constructor + constructor(IIBCHandler ibcHandler_) IBCMockApp(ibcHandler_) { + _self = address(this); + _deployer = msg.sender; + } + + // ------------------- Functions ------------------- // + + function self() external view returns(address) { + return _self; + } + + /** + * @dev See {Ownable-owner}. + */ + function owner() public view virtual override(Ownable) returns (address) { + return _deployer; + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) + public + view + virtual + override(IBCAppBase, IBCContractUpgradableModuleBase) + returns (bool) + { + return super.supportsInterface(interfaceId) || + interfaceId == type(UUPSUpgradeable).interfaceId; + } + + // ------------------- Internal Functions ------------------- // + + function __IBCContractUpgradableUUPSMockApp_init(string memory initialVersion) internal initializer { + __UUPSUpgradeable_init(); + + AppInfo storage appInfo = appInfos[initialVersion]; + appInfo.implementation = _self; + appInfo.consumed = true; + } + + /** + * @dev See{IBCChannelUpgradableModuleBase-_isAuthorizedUpgrader} + */ + function _isAuthorizedUpgrader(string calldata, string calldata, address msgSender) + internal + view + virtual + override(IBCChannelUpgradableModuleBase) + returns (bool) + { + return _isContractUpgrader(msgSender); + } + + /** + * @dev See{IBCContractUpgradableModuleBase-_isContractUpgrader} + */ + function _isContractUpgrader(address msgSender) + internal + view + virtual + override(IBCContractUpgradableModuleBase) + returns (bool) + { + return msgSender == owner() || msgSender == address(this); + } + + /** + * @dev See{IBCContractUpgradableModuleBase-_upgradeContract} + */ + function _doUpgradeContract(address implementation, bytes memory initialCalldata) + internal + virtual + override(IBCContractUpgradableModuleBase) + { + // if there is no implementation update, nothing happens here + if (ERC1967Utils.getImplementation() != implementation) { + ERC1967Utils.upgradeToAndCall(implementation, initialCalldata); + } + } + + /** + * @dev See {UUPSupgradeable-_authorizeupgrade} + */ + function _authorizeUpgrade(address msgSender) internal view virtual override(UUPSUpgradeable) { + if (!_isContractUpgrader(msgSender)) { + revert IBCContractUpgradableModuleUnauthorizedUpgrader(msgSender); + } + } +} diff --git a/contracts/IIBCContractUpgradableModule.sol b/contracts/IIBCContractUpgradableModule.sol new file mode 100644 index 0000000..15e5639 --- /dev/null +++ b/contracts/IIBCContractUpgradableModule.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.20; + +interface IIBCContractUpgradableModuleErrors { + // ------------------- Errors ------------------- // + + error IBCContractUpgradableModuleUnauthorizedUpgrader(address msgSender); + error IBCContractUpgradableModuleAppInfoProposedWithZeroImpl(); + error IBCContractUpgradableModuleAppInfoNotProposedYet(); + error IBCContractUpgradableModuleAppInfoIsAlreadySet(); + error IBCContractUpgradableModuleChannelNotFound(string portId, string channelId); + error IBCContractUpgradableModuleAlreadyConsumedAppInfo(); +} + +interface IIBCContractUpgradableModule { + // ------------------- Data Structures ------------------- // + + /** + * @dev Proposed AppInfo data + * @param implemantation the new implementation address + * @param initialCalldata the first function call's calldata + * @param consumed the flag that specifies if this implementation is already deployed + */ + struct AppInfo { + address implementation; + bytes initialCalldata; + bool consumed; + } + + // ------------------- Functions ------------------- // + + /** + * @dev Returns the proposed AppInfo for the given version + */ + function getAppInfoProposal(string calldata version) external view returns (AppInfo memory); + + /** + * @dev Propose an Appinfo for the given version + * @notice This function is only callable by an authorized upgrader. + * To upgrade the IBC module contract along with a channel upgrade, the upgrader must + * call this function before calling `channelUpgradeInit` or `channelUpgradeTry` of the IBC handler. + */ + function proposeAppVersion(string calldata version, AppInfo calldata appInfo) external; + +} + diff --git a/contract/Multicall3.sol b/contracts/Multicall3.sol similarity index 100% rename from contract/Multicall3.sol rename to contracts/Multicall3.sol diff --git a/foundry.toml b/foundry.toml new file mode 100644 index 0000000..6ec1432 --- /dev/null +++ b/foundry.toml @@ -0,0 +1,3 @@ +[profile.default] +src = 'contracts' +out = 'out' \ No newline at end of file diff --git a/go.mod b/go.mod index f9e6dd8..b195105 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,9 @@ require ( github.com/cosmos/gogoproto v1.4.11 github.com/cosmos/ibc-go/v8 v8.2.0 github.com/ethereum/go-ethereum v1.13.15 - github.com/hyperledger-labs/yui-relayer v0.5.4 + github.com/hyperledger-labs/yui-relayer v0.5.8 github.com/spf13/cobra v1.8.0 + github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 ) @@ -165,7 +166,6 @@ require ( github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.18.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.11 // indirect diff --git a/go.sum b/go.sum index 50ecc08..11d3c13 100644 --- a/go.sum +++ b/go.sum @@ -749,8 +749,8 @@ github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXM github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/hyperledger-labs/yui-relayer v0.5.4 h1:yhvWI28Rcel55UsdmYWX0QE0W3P9aBSRetQh1k8VpZA= -github.com/hyperledger-labs/yui-relayer v0.5.4/go.mod h1:GeCb1dtZjtQdkBNw1L9+LAUHzNQQhQK+kkoOnZYffw0= +github.com/hyperledger-labs/yui-relayer v0.5.8 h1:rIgWXSyKIVg/xjbfYjQ2biQaoL7jAoGIjJFgqLWWanY= +github.com/hyperledger-labs/yui-relayer v0.5.8/go.mod h1:GeCb1dtZjtQdkBNw1L9+LAUHzNQQhQK+kkoOnZYffw0= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..1930cc7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,41 @@ +{ + "name": "ethereum-ibc-relay-chain", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "ethereum-ibc-relay-chain", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "@hyperledger-labs/yui-ibc-solidity": "git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#semver:v0.3.35", + "@openzeppelin/contracts-upgradeable": "^5.0.2" + } + }, + "node_modules/@hyperledger-labs/yui-ibc-solidity": { + "name": "ibc-solidity", + "version": "0.1.0", + "resolved": "git+ssh://git@github.com/hyperledger-labs/yui-ibc-solidity.git#cd49bc000d99b498026706ed028a89123a8e05a2", + "license": "Apache-2.0", + "dependencies": { + "@openzeppelin/contracts": "^5.0.1" + } + }, + "node_modules/@openzeppelin/contracts": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.2.tgz", + "integrity": "sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==", + "license": "MIT" + }, + "node_modules/@openzeppelin/contracts-upgradeable": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.0.2.tgz", + "integrity": "sha512-0MmkHSHiW2NRFiT9/r5Lu4eJq5UJ4/tzlOgYXNAIj/ONkQTVnz22pLxDvp4C4uZ9he7ZFvGn3Driptn1/iU7tQ==", + "license": "MIT", + "peerDependencies": { + "@openzeppelin/contracts": "5.0.2" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..7869297 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "ethereum-ibc-relay-chain", + "version": "1.0.0", + "author": "Datachain, Inc.", + "license": "Apache-2.0", + "dependencies": { + "@hyperledger-labs/yui-ibc-solidity": "git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#semver:v0.3.35", + "@openzeppelin/contracts-upgradeable": "^5.0.2" + } +} diff --git a/pkg/contract/ibchandler/ibchandler.go b/pkg/contract/ibchandler/ibchandler.go index 2bfee51..b6125ff 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\":\"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\":\"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\":\"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\":\"IBCChannelUpgradeTryProposalMustEmptyIfExist\",\"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\":\"IBCHostClientNotFound\",\"inputs\":[{\"name\":\"clientId\",\"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\":\"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\":\"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\"}]}]", } // IbchandlerABI is the input ABI used to generate the binding from. @@ -473,6 +473,37 @@ func (_Ibchandler *IbchandlerTransactorRaw) Transact(opts *bind.TransactOpts, me return _Ibchandler.Contract.contract.Transact(opts, method, params...) } +// GetCanTransitionToFlushComplete is a free data retrieval call binding the contract method 0x9401dac3. +// +// Solidity: function getCanTransitionToFlushComplete(string portId, string channelId) view returns(bool) +func (_Ibchandler *IbchandlerCaller) GetCanTransitionToFlushComplete(opts *bind.CallOpts, portId string, channelId string) (bool, error) { + var out []interface{} + err := _Ibchandler.contract.Call(opts, &out, "getCanTransitionToFlushComplete", portId, channelId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GetCanTransitionToFlushComplete is a free data retrieval call binding the contract method 0x9401dac3. +// +// Solidity: function getCanTransitionToFlushComplete(string portId, string channelId) view returns(bool) +func (_Ibchandler *IbchandlerSession) GetCanTransitionToFlushComplete(portId string, channelId string) (bool, error) { + return _Ibchandler.Contract.GetCanTransitionToFlushComplete(&_Ibchandler.CallOpts, portId, channelId) +} + +// GetCanTransitionToFlushComplete is a free data retrieval call binding the contract method 0x9401dac3. +// +// Solidity: function getCanTransitionToFlushComplete(string portId, string channelId) view returns(bool) +func (_Ibchandler *IbchandlerCallerSession) GetCanTransitionToFlushComplete(portId string, channelId string) (bool, error) { + return _Ibchandler.Contract.GetCanTransitionToFlushComplete(&_Ibchandler.CallOpts, portId, channelId) +} + // GetChannel is a free data retrieval call binding the contract method 0x3000217a. // // Solidity: function getChannel(string portId, string channelId) view returns((uint8,uint8,(string,string),string[],string,uint64), bool) @@ -724,6 +755,37 @@ func (_Ibchandler *IbchandlerCallerSession) GetCommitmentPrefix() ([]byte, error return _Ibchandler.Contract.GetCommitmentPrefix(&_Ibchandler.CallOpts) } +// GetCommitmentsSlot is a free data retrieval call binding the contract method 0x6ecd6d48. +// +// Solidity: function getCommitmentsSlot() pure returns(bytes32) +func (_Ibchandler *IbchandlerCaller) GetCommitmentsSlot(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Ibchandler.contract.Call(opts, &out, "getCommitmentsSlot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetCommitmentsSlot is a free data retrieval call binding the contract method 0x6ecd6d48. +// +// Solidity: function getCommitmentsSlot() pure returns(bytes32) +func (_Ibchandler *IbchandlerSession) GetCommitmentsSlot() ([32]byte, error) { + return _Ibchandler.Contract.GetCommitmentsSlot(&_Ibchandler.CallOpts) +} + +// GetCommitmentsSlot is a free data retrieval call binding the contract method 0x6ecd6d48. +// +// Solidity: function getCommitmentsSlot() pure returns(bytes32) +func (_Ibchandler *IbchandlerCallerSession) GetCommitmentsSlot() ([32]byte, error) { + return _Ibchandler.Contract.GetCommitmentsSlot(&_Ibchandler.CallOpts) +} + // GetConnection is a free data retrieval call binding the contract method 0x27711a69. // // Solidity: function getConnection(string connectionId) view returns((string,(string,string[])[],uint8,(string,string,(bytes)),uint64), bool) @@ -819,6 +881,68 @@ func (_Ibchandler *IbchandlerCallerSession) GetExpectedTimePerBlock() (uint64, e return _Ibchandler.Contract.GetExpectedTimePerBlock(&_Ibchandler.CallOpts) } +// GetIBCModuleByChannel is a free data retrieval call binding the contract method 0xee74d4da. +// +// Solidity: function getIBCModuleByChannel(string portId, string channelId) view returns(address) +func (_Ibchandler *IbchandlerCaller) GetIBCModuleByChannel(opts *bind.CallOpts, portId string, channelId string) (common.Address, error) { + var out []interface{} + err := _Ibchandler.contract.Call(opts, &out, "getIBCModuleByChannel", portId, channelId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetIBCModuleByChannel is a free data retrieval call binding the contract method 0xee74d4da. +// +// Solidity: function getIBCModuleByChannel(string portId, string channelId) view returns(address) +func (_Ibchandler *IbchandlerSession) GetIBCModuleByChannel(portId string, channelId string) (common.Address, error) { + return _Ibchandler.Contract.GetIBCModuleByChannel(&_Ibchandler.CallOpts, portId, channelId) +} + +// GetIBCModuleByChannel is a free data retrieval call binding the contract method 0xee74d4da. +// +// Solidity: function getIBCModuleByChannel(string portId, string channelId) view returns(address) +func (_Ibchandler *IbchandlerCallerSession) GetIBCModuleByChannel(portId string, channelId string) (common.Address, error) { + return _Ibchandler.Contract.GetIBCModuleByChannel(&_Ibchandler.CallOpts, portId, channelId) +} + +// GetIBCModuleByPort is a free data retrieval call binding the contract method 0x59ac54b8. +// +// Solidity: function getIBCModuleByPort(string portId) view returns(address) +func (_Ibchandler *IbchandlerCaller) GetIBCModuleByPort(opts *bind.CallOpts, portId string) (common.Address, error) { + var out []interface{} + err := _Ibchandler.contract.Call(opts, &out, "getIBCModuleByPort", portId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetIBCModuleByPort is a free data retrieval call binding the contract method 0x59ac54b8. +// +// Solidity: function getIBCModuleByPort(string portId) view returns(address) +func (_Ibchandler *IbchandlerSession) GetIBCModuleByPort(portId string) (common.Address, error) { + return _Ibchandler.Contract.GetIBCModuleByPort(&_Ibchandler.CallOpts, portId) +} + +// GetIBCModuleByPort is a free data retrieval call binding the contract method 0x59ac54b8. +// +// Solidity: function getIBCModuleByPort(string portId) view returns(address) +func (_Ibchandler *IbchandlerCallerSession) GetIBCModuleByPort(portId string) (common.Address, error) { + return _Ibchandler.Contract.GetIBCModuleByPort(&_Ibchandler.CallOpts, portId) +} + // GetNextSequenceAck is a free data retrieval call binding the contract method 0x4e08c6f3. // // Solidity: function getNextSequenceAck(string portId, string channelId) view returns(uint64) diff --git a/pkg/contract/iibcchannelupgradablemodule/iibcchannelupgradablemodule.go b/pkg/contract/iibcchannelupgradablemodule/iibcchannelupgradablemodule.go new file mode 100644 index 0000000..ca1c132 --- /dev/null +++ b/pkg/contract/iibcchannelupgradablemodule/iibcchannelupgradablemodule.go @@ -0,0 +1,300 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iibcchannelupgradablemodule + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// HeightData is an auto generated low-level Go binding around an user-defined struct. +type HeightData struct { + RevisionNumber uint64 + RevisionHeight uint64 +} + +// IIBCChannelUpgradableModuleUpgradeProposal is an auto generated low-level Go binding around an user-defined struct. +type IIBCChannelUpgradableModuleUpgradeProposal struct { + Fields UpgradeFieldsData + Timeout TimeoutData +} + +// TimeoutData is an auto generated low-level Go binding around an user-defined struct. +type TimeoutData struct { + Height HeightData + Timestamp uint64 +} + +// UpgradeFieldsData is an auto generated low-level Go binding around an user-defined struct. +type UpgradeFieldsData struct { + Ordering uint8 + ConnectionHops []string + Version string +} + +// IibcchannelupgradablemoduleMetaData contains all meta data concerning the Iibcchannelupgradablemodule contract. +var IibcchannelupgradablemoduleMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"allowTransitionToFlushComplete\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgradeSequence\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getUpgradeProposal\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCChannelUpgradableModule.UpgradeProposal\",\"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\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeUpgrade\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"upgradeFields\",\"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\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeUpgradeProposal\",\"inputs\":[{\"name\":\"portId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"channelId\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"}]", +} + +// IibcchannelupgradablemoduleABI is the input ABI used to generate the binding from. +// Deprecated: Use IibcchannelupgradablemoduleMetaData.ABI instead. +var IibcchannelupgradablemoduleABI = IibcchannelupgradablemoduleMetaData.ABI + +// Iibcchannelupgradablemodule is an auto generated Go binding around an Ethereum contract. +type Iibcchannelupgradablemodule struct { + IibcchannelupgradablemoduleCaller // Read-only binding to the contract + IibcchannelupgradablemoduleTransactor // Write-only binding to the contract + IibcchannelupgradablemoduleFilterer // Log filterer for contract events +} + +// IibcchannelupgradablemoduleCaller is an auto generated read-only Go binding around an Ethereum contract. +type IibcchannelupgradablemoduleCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IibcchannelupgradablemoduleTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IibcchannelupgradablemoduleTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IibcchannelupgradablemoduleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IibcchannelupgradablemoduleFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IibcchannelupgradablemoduleSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IibcchannelupgradablemoduleSession struct { + Contract *Iibcchannelupgradablemodule // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IibcchannelupgradablemoduleCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IibcchannelupgradablemoduleCallerSession struct { + Contract *IibcchannelupgradablemoduleCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IibcchannelupgradablemoduleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IibcchannelupgradablemoduleTransactorSession struct { + Contract *IibcchannelupgradablemoduleTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IibcchannelupgradablemoduleRaw is an auto generated low-level Go binding around an Ethereum contract. +type IibcchannelupgradablemoduleRaw struct { + Contract *Iibcchannelupgradablemodule // Generic contract binding to access the raw methods on +} + +// IibcchannelupgradablemoduleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IibcchannelupgradablemoduleCallerRaw struct { + Contract *IibcchannelupgradablemoduleCaller // Generic read-only contract binding to access the raw methods on +} + +// IibcchannelupgradablemoduleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IibcchannelupgradablemoduleTransactorRaw struct { + Contract *IibcchannelupgradablemoduleTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIibcchannelupgradablemodule creates a new instance of Iibcchannelupgradablemodule, bound to a specific deployed contract. +func NewIibcchannelupgradablemodule(address common.Address, backend bind.ContractBackend) (*Iibcchannelupgradablemodule, error) { + contract, err := bindIibcchannelupgradablemodule(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Iibcchannelupgradablemodule{IibcchannelupgradablemoduleCaller: IibcchannelupgradablemoduleCaller{contract: contract}, IibcchannelupgradablemoduleTransactor: IibcchannelupgradablemoduleTransactor{contract: contract}, IibcchannelupgradablemoduleFilterer: IibcchannelupgradablemoduleFilterer{contract: contract}}, nil +} + +// NewIibcchannelupgradablemoduleCaller creates a new read-only instance of Iibcchannelupgradablemodule, bound to a specific deployed contract. +func NewIibcchannelupgradablemoduleCaller(address common.Address, caller bind.ContractCaller) (*IibcchannelupgradablemoduleCaller, error) { + contract, err := bindIibcchannelupgradablemodule(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IibcchannelupgradablemoduleCaller{contract: contract}, nil +} + +// NewIibcchannelupgradablemoduleTransactor creates a new write-only instance of Iibcchannelupgradablemodule, bound to a specific deployed contract. +func NewIibcchannelupgradablemoduleTransactor(address common.Address, transactor bind.ContractTransactor) (*IibcchannelupgradablemoduleTransactor, error) { + contract, err := bindIibcchannelupgradablemodule(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IibcchannelupgradablemoduleTransactor{contract: contract}, nil +} + +// NewIibcchannelupgradablemoduleFilterer creates a new log filterer instance of Iibcchannelupgradablemodule, bound to a specific deployed contract. +func NewIibcchannelupgradablemoduleFilterer(address common.Address, filterer bind.ContractFilterer) (*IibcchannelupgradablemoduleFilterer, error) { + contract, err := bindIibcchannelupgradablemodule(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IibcchannelupgradablemoduleFilterer{contract: contract}, nil +} + +// bindIibcchannelupgradablemodule binds a generic wrapper to an already deployed contract. +func bindIibcchannelupgradablemodule(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IibcchannelupgradablemoduleMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Iibcchannelupgradablemodule.Contract.IibcchannelupgradablemoduleCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.IibcchannelupgradablemoduleTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.IibcchannelupgradablemoduleTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Iibcchannelupgradablemodule.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.contract.Transact(opts, method, params...) +} + +// GetUpgradeProposal is a free data retrieval call binding the contract method 0x6df5433b. +// +// Solidity: function getUpgradeProposal(string portId, string channelId) view returns(((uint8,string[],string),((uint64,uint64),uint64))) +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleCaller) GetUpgradeProposal(opts *bind.CallOpts, portId string, channelId string) (IIBCChannelUpgradableModuleUpgradeProposal, error) { + var out []interface{} + err := _Iibcchannelupgradablemodule.contract.Call(opts, &out, "getUpgradeProposal", portId, channelId) + + if err != nil { + return *new(IIBCChannelUpgradableModuleUpgradeProposal), err + } + + out0 := *abi.ConvertType(out[0], new(IIBCChannelUpgradableModuleUpgradeProposal)).(*IIBCChannelUpgradableModuleUpgradeProposal) + + return out0, err + +} + +// GetUpgradeProposal is a free data retrieval call binding the contract method 0x6df5433b. +// +// Solidity: function getUpgradeProposal(string portId, string channelId) view returns(((uint8,string[],string),((uint64,uint64),uint64))) +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleSession) GetUpgradeProposal(portId string, channelId string) (IIBCChannelUpgradableModuleUpgradeProposal, error) { + return _Iibcchannelupgradablemodule.Contract.GetUpgradeProposal(&_Iibcchannelupgradablemodule.CallOpts, portId, channelId) +} + +// GetUpgradeProposal is a free data retrieval call binding the contract method 0x6df5433b. +// +// Solidity: function getUpgradeProposal(string portId, string channelId) view returns(((uint8,string[],string),((uint64,uint64),uint64))) +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleCallerSession) GetUpgradeProposal(portId string, channelId string) (IIBCChannelUpgradableModuleUpgradeProposal, error) { + return _Iibcchannelupgradablemodule.Contract.GetUpgradeProposal(&_Iibcchannelupgradablemodule.CallOpts, portId, channelId) +} + +// AllowTransitionToFlushComplete is a paid mutator transaction binding the contract method 0x8680841e. +// +// Solidity: function allowTransitionToFlushComplete(string portId, string channelId, uint64 upgradeSequence) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactor) AllowTransitionToFlushComplete(opts *bind.TransactOpts, portId string, channelId string, upgradeSequence uint64) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.contract.Transact(opts, "allowTransitionToFlushComplete", portId, channelId, upgradeSequence) +} + +// AllowTransitionToFlushComplete is a paid mutator transaction binding the contract method 0x8680841e. +// +// Solidity: function allowTransitionToFlushComplete(string portId, string channelId, uint64 upgradeSequence) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleSession) AllowTransitionToFlushComplete(portId string, channelId string, upgradeSequence uint64) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.AllowTransitionToFlushComplete(&_Iibcchannelupgradablemodule.TransactOpts, portId, channelId, upgradeSequence) +} + +// AllowTransitionToFlushComplete is a paid mutator transaction binding the contract method 0x8680841e. +// +// Solidity: function allowTransitionToFlushComplete(string portId, string channelId, uint64 upgradeSequence) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactorSession) AllowTransitionToFlushComplete(portId string, channelId string, upgradeSequence uint64) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.AllowTransitionToFlushComplete(&_Iibcchannelupgradablemodule.TransactOpts, portId, channelId, upgradeSequence) +} + +// ProposeUpgrade is a paid mutator transaction binding the contract method 0xd6438586. +// +// Solidity: function proposeUpgrade(string portId, string channelId, (uint8,string[],string) upgradeFields, ((uint64,uint64),uint64) timeout) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactor) ProposeUpgrade(opts *bind.TransactOpts, portId string, channelId string, upgradeFields UpgradeFieldsData, timeout TimeoutData) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.contract.Transact(opts, "proposeUpgrade", portId, channelId, upgradeFields, timeout) +} + +// ProposeUpgrade is a paid mutator transaction binding the contract method 0xd6438586. +// +// Solidity: function proposeUpgrade(string portId, string channelId, (uint8,string[],string) upgradeFields, ((uint64,uint64),uint64) timeout) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleSession) ProposeUpgrade(portId string, channelId string, upgradeFields UpgradeFieldsData, timeout TimeoutData) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.ProposeUpgrade(&_Iibcchannelupgradablemodule.TransactOpts, portId, channelId, upgradeFields, timeout) +} + +// ProposeUpgrade is a paid mutator transaction binding the contract method 0xd6438586. +// +// Solidity: function proposeUpgrade(string portId, string channelId, (uint8,string[],string) upgradeFields, ((uint64,uint64),uint64) timeout) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactorSession) ProposeUpgrade(portId string, channelId string, upgradeFields UpgradeFieldsData, timeout TimeoutData) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.ProposeUpgrade(&_Iibcchannelupgradablemodule.TransactOpts, portId, channelId, upgradeFields, timeout) +} + +// RemoveUpgradeProposal is a paid mutator transaction binding the contract method 0x0cc5a7af. +// +// Solidity: function removeUpgradeProposal(string portId, string channelId) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactor) RemoveUpgradeProposal(opts *bind.TransactOpts, portId string, channelId string) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.contract.Transact(opts, "removeUpgradeProposal", portId, channelId) +} + +// RemoveUpgradeProposal is a paid mutator transaction binding the contract method 0x0cc5a7af. +// +// Solidity: function removeUpgradeProposal(string portId, string channelId) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleSession) RemoveUpgradeProposal(portId string, channelId string) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.RemoveUpgradeProposal(&_Iibcchannelupgradablemodule.TransactOpts, portId, channelId) +} + +// RemoveUpgradeProposal is a paid mutator transaction binding the contract method 0x0cc5a7af. +// +// Solidity: function removeUpgradeProposal(string portId, string channelId) returns() +func (_Iibcchannelupgradablemodule *IibcchannelupgradablemoduleTransactorSession) RemoveUpgradeProposal(portId string, channelId string) (*types.Transaction, error) { + return _Iibcchannelupgradablemodule.Contract.RemoveUpgradeProposal(&_Iibcchannelupgradablemodule.TransactOpts, portId, channelId) +} diff --git a/pkg/contract/iibccontractupgradablemodule/iibccontractupgradablemodule.go b/pkg/contract/iibccontractupgradablemodule/iibccontractupgradablemodule.go new file mode 100644 index 0000000..7fb3aef --- /dev/null +++ b/pkg/contract/iibccontractupgradablemodule/iibccontractupgradablemodule.go @@ -0,0 +1,240 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package iibccontractupgradablemodule + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IIBCContractUpgradableModuleAppInfo is an auto generated low-level Go binding around an user-defined struct. +type IIBCContractUpgradableModuleAppInfo struct { + Implementation common.Address + InitialCalldata []byte + Consumed bool +} + +// IibccontractupgradablemoduleMetaData contains all meta data concerning the Iibccontractupgradablemodule contract. +var IibccontractupgradablemoduleMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"getAppInfoProposal\",\"inputs\":[{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIIBCContractUpgradableModule.AppInfo\",\"components\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialCalldata\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"consumed\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeAppVersion\",\"inputs\":[{\"name\":\"version\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"appInfo\",\"type\":\"tuple\",\"internalType\":\"structIIBCContractUpgradableModule.AppInfo\",\"components\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"initialCalldata\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"consumed\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"}]", +} + +// IibccontractupgradablemoduleABI is the input ABI used to generate the binding from. +// Deprecated: Use IibccontractupgradablemoduleMetaData.ABI instead. +var IibccontractupgradablemoduleABI = IibccontractupgradablemoduleMetaData.ABI + +// Iibccontractupgradablemodule is an auto generated Go binding around an Ethereum contract. +type Iibccontractupgradablemodule struct { + IibccontractupgradablemoduleCaller // Read-only binding to the contract + IibccontractupgradablemoduleTransactor // Write-only binding to the contract + IibccontractupgradablemoduleFilterer // Log filterer for contract events +} + +// IibccontractupgradablemoduleCaller is an auto generated read-only Go binding around an Ethereum contract. +type IibccontractupgradablemoduleCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IibccontractupgradablemoduleTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IibccontractupgradablemoduleTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IibccontractupgradablemoduleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IibccontractupgradablemoduleFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IibccontractupgradablemoduleSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IibccontractupgradablemoduleSession struct { + Contract *Iibccontractupgradablemodule // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IibccontractupgradablemoduleCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IibccontractupgradablemoduleCallerSession struct { + Contract *IibccontractupgradablemoduleCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IibccontractupgradablemoduleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IibccontractupgradablemoduleTransactorSession struct { + Contract *IibccontractupgradablemoduleTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IibccontractupgradablemoduleRaw is an auto generated low-level Go binding around an Ethereum contract. +type IibccontractupgradablemoduleRaw struct { + Contract *Iibccontractupgradablemodule // Generic contract binding to access the raw methods on +} + +// IibccontractupgradablemoduleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IibccontractupgradablemoduleCallerRaw struct { + Contract *IibccontractupgradablemoduleCaller // Generic read-only contract binding to access the raw methods on +} + +// IibccontractupgradablemoduleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IibccontractupgradablemoduleTransactorRaw struct { + Contract *IibccontractupgradablemoduleTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIibccontractupgradablemodule creates a new instance of Iibccontractupgradablemodule, bound to a specific deployed contract. +func NewIibccontractupgradablemodule(address common.Address, backend bind.ContractBackend) (*Iibccontractupgradablemodule, error) { + contract, err := bindIibccontractupgradablemodule(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Iibccontractupgradablemodule{IibccontractupgradablemoduleCaller: IibccontractupgradablemoduleCaller{contract: contract}, IibccontractupgradablemoduleTransactor: IibccontractupgradablemoduleTransactor{contract: contract}, IibccontractupgradablemoduleFilterer: IibccontractupgradablemoduleFilterer{contract: contract}}, nil +} + +// NewIibccontractupgradablemoduleCaller creates a new read-only instance of Iibccontractupgradablemodule, bound to a specific deployed contract. +func NewIibccontractupgradablemoduleCaller(address common.Address, caller bind.ContractCaller) (*IibccontractupgradablemoduleCaller, error) { + contract, err := bindIibccontractupgradablemodule(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IibccontractupgradablemoduleCaller{contract: contract}, nil +} + +// NewIibccontractupgradablemoduleTransactor creates a new write-only instance of Iibccontractupgradablemodule, bound to a specific deployed contract. +func NewIibccontractupgradablemoduleTransactor(address common.Address, transactor bind.ContractTransactor) (*IibccontractupgradablemoduleTransactor, error) { + contract, err := bindIibccontractupgradablemodule(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IibccontractupgradablemoduleTransactor{contract: contract}, nil +} + +// NewIibccontractupgradablemoduleFilterer creates a new log filterer instance of Iibccontractupgradablemodule, bound to a specific deployed contract. +func NewIibccontractupgradablemoduleFilterer(address common.Address, filterer bind.ContractFilterer) (*IibccontractupgradablemoduleFilterer, error) { + contract, err := bindIibccontractupgradablemodule(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IibccontractupgradablemoduleFilterer{contract: contract}, nil +} + +// bindIibccontractupgradablemodule binds a generic wrapper to an already deployed contract. +func bindIibccontractupgradablemodule(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := IibccontractupgradablemoduleMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Iibccontractupgradablemodule.Contract.IibccontractupgradablemoduleCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Iibccontractupgradablemodule.Contract.IibccontractupgradablemoduleTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Iibccontractupgradablemodule.Contract.IibccontractupgradablemoduleTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Iibccontractupgradablemodule.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Iibccontractupgradablemodule.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Iibccontractupgradablemodule.Contract.contract.Transact(opts, method, params...) +} + +// GetAppInfoProposal is a free data retrieval call binding the contract method 0xff6bb285. +// +// Solidity: function getAppInfoProposal(string version) view returns((address,bytes,bool)) +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleCaller) GetAppInfoProposal(opts *bind.CallOpts, version string) (IIBCContractUpgradableModuleAppInfo, error) { + var out []interface{} + err := _Iibccontractupgradablemodule.contract.Call(opts, &out, "getAppInfoProposal", version) + + if err != nil { + return *new(IIBCContractUpgradableModuleAppInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IIBCContractUpgradableModuleAppInfo)).(*IIBCContractUpgradableModuleAppInfo) + + return out0, err + +} + +// GetAppInfoProposal is a free data retrieval call binding the contract method 0xff6bb285. +// +// Solidity: function getAppInfoProposal(string version) view returns((address,bytes,bool)) +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleSession) GetAppInfoProposal(version string) (IIBCContractUpgradableModuleAppInfo, error) { + return _Iibccontractupgradablemodule.Contract.GetAppInfoProposal(&_Iibccontractupgradablemodule.CallOpts, version) +} + +// GetAppInfoProposal is a free data retrieval call binding the contract method 0xff6bb285. +// +// Solidity: function getAppInfoProposal(string version) view returns((address,bytes,bool)) +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleCallerSession) GetAppInfoProposal(version string) (IIBCContractUpgradableModuleAppInfo, error) { + return _Iibccontractupgradablemodule.Contract.GetAppInfoProposal(&_Iibccontractupgradablemodule.CallOpts, version) +} + +// ProposeAppVersion is a paid mutator transaction binding the contract method 0x347501f8. +// +// Solidity: function proposeAppVersion(string version, (address,bytes,bool) appInfo) returns() +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleTransactor) ProposeAppVersion(opts *bind.TransactOpts, version string, appInfo IIBCContractUpgradableModuleAppInfo) (*types.Transaction, error) { + return _Iibccontractupgradablemodule.contract.Transact(opts, "proposeAppVersion", version, appInfo) +} + +// ProposeAppVersion is a paid mutator transaction binding the contract method 0x347501f8. +// +// Solidity: function proposeAppVersion(string version, (address,bytes,bool) appInfo) returns() +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleSession) ProposeAppVersion(version string, appInfo IIBCContractUpgradableModuleAppInfo) (*types.Transaction, error) { + return _Iibccontractupgradablemodule.Contract.ProposeAppVersion(&_Iibccontractupgradablemodule.TransactOpts, version, appInfo) +} + +// ProposeAppVersion is a paid mutator transaction binding the contract method 0x347501f8. +// +// Solidity: function proposeAppVersion(string version, (address,bytes,bool) appInfo) returns() +func (_Iibccontractupgradablemodule *IibccontractupgradablemoduleTransactorSession) ProposeAppVersion(version string, appInfo IIBCContractUpgradableModuleAppInfo) (*types.Transaction, error) { + return _Iibccontractupgradablemodule.Contract.ProposeAppVersion(&_Iibccontractupgradablemodule.TransactOpts, version, appInfo) +} diff --git a/pkg/relay/ethereum/chain.go b/pkg/relay/ethereum/chain.go index dfc3de6..ae12b04 100644 --- a/pkg/relay/ethereum/chain.go +++ b/pkg/relay/ethereum/chain.go @@ -18,11 +18,11 @@ import ( host "github.com/cosmos/ibc-go/v8/modules/core/24-host" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" "github.com/hyperledger-labs/yui-relayer/core" - "github.com/hyperledger-labs/yui-relayer/signer" "github.com/hyperledger-labs/yui-relayer/log" + "github.com/hyperledger-labs/yui-relayer/signer" "github.com/datachainlab/ethereum-ibc-relay-chain/pkg/client" "github.com/datachainlab/ethereum-ibc-relay-chain/pkg/contract/ibchandler" @@ -274,10 +274,10 @@ var emptyConnRes = conntypes.NewQueryConnectionResponse( ) // QueryConnection returns the remote end of a given connection -func (c *Chain) QueryConnection(ctx core.QueryContext) (*conntypes.QueryConnectionResponse, error) { +func (c *Chain) QueryConnection(ctx core.QueryContext, connectionID string) (*conntypes.QueryConnectionResponse, error) { logger := c.GetChainLogger() defer logger.TimeTrack(time.Now(), "QueryConnection") - conn, found, err := c.ibcHandler.GetConnection(c.callOptsFromQueryContext(ctx), c.pathEnd.ConnectionID) + conn, found, err := c.ibcHandler.GetConnection(c.callOptsFromQueryContext(ctx), connectionID) if err != nil { revertReason, data := c.parseRpcError(err) logger.Error("failed to get connection", err, logAttrRevertReason, revertReason, logAttrRawErrorData, data) @@ -474,6 +474,41 @@ func (c *Chain) QueryUnfinalizedRelayAcknowledgements(ctx core.QueryContext, cou return packets, nil } +// QueryChannelUpgrade returns the channel upgrade associated with a channelID +func (c *Chain) QueryChannelUpgrade(ctx core.QueryContext) (*chantypes.QueryUpgradeResponse, error) { + if upg, found, err := c.ibcHandler.GetChannelUpgrade(c.callOptsFromQueryContext(ctx), c.pathEnd.PortID, c.pathEnd.ChannelID); err != nil { + return nil, err + } else if !found { + return nil, nil + } else { + return chantypes.NewQueryUpgradeResponse(upgradeToPB(upg), nil, ctx.Height().(clienttypes.Height)), nil + } +} + +// QueryChannelUpgradeError returns the channel upgrade error receipt associated with a channelID at the height of `ctx`. +// WARN: This error receipt may not be used to cancel upgrade in FLUSHCOMPLETE state because of upgrade sequence mismatch. +func (c *Chain) QueryChannelUpgradeError(ctx core.QueryContext) (*chantypes.QueryUpgradeErrorResponse, error) { + if ev, err := c.findWriteErrorReceipt(ctx); err != nil { + return nil, err + } else if ev == nil { + return nil, nil + } else { + return &chantypes.QueryUpgradeErrorResponse{ + ErrorReceipt: chantypes.ErrorReceipt{ + Sequence: ev.UpgradeSequence, + Message: ev.Message, + }, + }, nil + } +} + +// QueryCanTransitionToFlushComplete returns the channel can transition to FLUSHCOMPLETE state. +// Basically it requires that there remains no inflight packets. +// Maybe additional condition for transition is required by the IBC/APP module. +func (c *Chain) QueryCanTransitionToFlushComplete(ctx core.QueryContext) (bool, error) { + return c.ibcHandler.GetCanTransitionToFlushComplete(c.callOptsFromQueryContext(ctx), c.pathEnd.PortID, c.pathEnd.ChannelID) +} + // QueryBalance returns the amount of coins in the relayer account func (c *Chain) QueryBalance(ctx core.QueryContext, address sdk.AccAddress) (sdk.Coins, error) { panic("not supported") @@ -511,6 +546,7 @@ func (c *Chain) confirmConnectionOpened(ctx context.Context) (bool, error) { // NOTE: err is nil if the connection not found connRes, err := c.QueryConnection( core.NewQueryContext(ctx, latestHeight), + c.pathEnd.ConnectionID, ) if err != nil { return false, err diff --git a/pkg/relay/ethereum/cmd.go b/pkg/relay/ethereum/cmd.go new file mode 100644 index 0000000..ba5141d --- /dev/null +++ b/pkg/relay/ethereum/cmd.go @@ -0,0 +1,246 @@ +package ethereum + +import ( + "errors" + "fmt" + "strings" + + clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + chantypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + "github.com/datachainlab/ethereum-ibc-relay-chain/pkg/contract/iibcchannelupgradablemodule" + "github.com/ethereum/go-ethereum/common" + "github.com/hyperledger-labs/yui-relayer/config" + "github.com/spf13/cobra" + "github.com/spf13/pflag" +) + +func ethereumCmd(ctx *config.Context) *cobra.Command { + cmd := cobra.Command{ + Use: "ethereum", + Aliases: []string{"eth"}, + } + + cmd.AddCommand( + channelUpgradeCmd(ctx), + ) + + return &cmd +} + +func channelUpgradeCmd(ctx *config.Context) *cobra.Command { + cmd := cobra.Command{ + Use: "channel-upgrade", + Aliases: []string{"upgrade"}, + } + + cmd.AddCommand( + proposeUpgradeCmd(ctx), + allowTransitionToFlushCompleteCmd(ctx), + proposeAppVersionCmd(ctx), + ) + + return &cmd +} + +func proposeUpgradeCmd(ctx *config.Context) *cobra.Command { + const ( + flagOrdering = "ordering" + flagConnectionHops = "connection-hops" + flagVersion = "version" + flagTimeoutHeight = "timeout-height" + flagTimeoutTimestamp = "timeout-timestamp" + ) + + cmd := cobra.Command{ + Use: "propose-upgrade", + Aliases: []string{"propose"}, + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + pathName := args[0] + chainID := args[1] + + // get ordering from flags + ordering, err := getOrderFromFlags(cmd.Flags(), flagOrdering) + if err != nil { + return err + } else if ordering == chantypes.NONE { + return errors.New("NONE is unacceptable channel ordering") + } + + // get connection hops from flags + connHops, err := cmd.Flags().GetStringSlice(flagConnectionHops) + if err != nil { + return err + } + + // get version from flags + version, err := cmd.Flags().GetString(flagVersion) + if err != nil { + return err + } + + // get timeout height + var timeoutHeight clienttypes.Height + if s, err := cmd.Flags().GetString(flagTimeoutHeight); err != nil { + return err + } else if timeoutHeight, err = clienttypes.ParseHeight(s); err != nil { + return err + } + + // get timeout timestamp + timeoutTimestamp, err := cmd.Flags().GetUint64(flagTimeoutTimestamp) + if err != nil { + return err + } + + var ethChain *Chain + if chains, _, _, err := ctx.Config.ChainsFromPath(pathName); err != nil { + return err + } else if chain, ok := chains[chainID]; !ok { + return fmt.Errorf("chain not found: %s", chainID) + } else if ethChain, ok = chain.Chain.(*Chain); !ok { + return fmt.Errorf("chain is not ethereum: %T", chain.Chain) + } + + return ethChain.ProposeUpgrade( + cmd.Context(), + ethChain.pathEnd.PortID, + ethChain.pathEnd.ChannelID, + iibcchannelupgradablemodule.UpgradeFieldsData{ + Ordering: uint8(ordering), + ConnectionHops: connHops, + Version: version, + }, + iibcchannelupgradablemodule.TimeoutData{ + Height: iibcchannelupgradablemodule.HeightData(timeoutHeight), + Timestamp: timeoutTimestamp, + }, + ) + }, + } + + cmd.Flags().String(flagOrdering, "", "channel ordering applied for the new channel") + cmd.Flags().StringSlice(flagConnectionHops, []string{}, "connection hops applied for the new channel") + cmd.Flags().String(flagVersion, "", "channel version applied for the new channel") + cmd.Flags().String(flagTimeoutHeight, "", "timeout height") + cmd.Flags().Uint64(flagTimeoutTimestamp, 0, "timeout timestamp") + + return &cmd +} + +func allowTransitionToFlushCompleteCmd(ctx *config.Context) *cobra.Command { + const ( + flagUpgradeSequence = "upgrade-sequence" + ) + + cmd := cobra.Command{ + Use: "allow-transition-to-flush-complete", + Aliases: []string{"allow"}, + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + pathName := args[0] + chainID := args[1] + + // get upgrade sequence from flags + upgradeSequence, err := cmd.Flags().GetUint64(flagUpgradeSequence) + if err != nil { + return err + } + + var ethChain *Chain + if chains, _, _, err := ctx.Config.ChainsFromPath(pathName); err != nil { + return err + } else if chain, ok := chains[chainID]; !ok { + return fmt.Errorf("chain not found: %s", chainID) + } else if ethChain, ok = chain.Chain.(*Chain); !ok { + return fmt.Errorf("chain is not ethereum: %T", chain.Chain) + } + + return ethChain.AllowTransitionToFlushComplete( + cmd.Context(), + ethChain.pathEnd.PortID, + ethChain.pathEnd.ChannelID, + upgradeSequence, + ) + }, + } + + cmd.Flags().Uint64(flagUpgradeSequence, 0, "upgrade sequence") + + return &cmd +} + +func proposeAppVersionCmd(ctx *config.Context) *cobra.Command { + const ( + flagVersion = "version" + flagImplementation = "implementation" + flagInitialCalldata = "initial-calldata" + ) + + cmd := cobra.Command{ + Use: "propose-app-version", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + pathName := args[0] + chainID := args[1] + + // get app version from flags + version, err := cmd.Flags().GetString(flagVersion) + if err != nil { + return err + } + + // get the new implementation address from flags + var implementation common.Address + if bz, err := cmd.Flags().GetBytesHex(flagImplementation); err != nil { + return err + } else { + implementation = common.BytesToAddress(bz) + } + + // get the initial calldata from flags + initialCalldata, err := cmd.Flags().GetBytesHex(flagInitialCalldata) + if err != nil { + return err + } + + var ethChain *Chain + if chains, _, _, err := ctx.Config.ChainsFromPath(pathName); err != nil { + return err + } else if chain, ok := chains[chainID]; !ok { + return fmt.Errorf("chain not found: %s", chainID) + } else if ethChain, ok = chain.Chain.(*Chain); !ok { + return fmt.Errorf("chain is not ethereum: %T", chain.Chain) + } + + return ethChain.ProposeAppVersion( + cmd.Context(), + ethChain.pathEnd.PortID, + version, + implementation, + initialCalldata, + ) + }, + } + + cmd.Flags().String(flagVersion, "", "app version") + cmd.Flags().BytesHex(flagImplementation, nil, "new implementation") + cmd.Flags().BytesHex(flagInitialCalldata, nil, "initial calldata") + + return &cmd +} + +func getOrderFromFlags(flags *pflag.FlagSet, flagName string) (chantypes.Order, error) { + s, err := flags.GetString(flagName) + if err != nil { + return 0, err + } + + s = "ORDER_" + strings.ToUpper(s) + value, ok := chantypes.Order_value[s] + if !ok { + return 0, fmt.Errorf("invalid channel order specified: %s", s) + } + + return chantypes.Order(value), nil +} diff --git a/pkg/relay/ethereum/events.go b/pkg/relay/ethereum/events.go index f6883a9..2d2eeb5 100644 --- a/pkg/relay/ethereum/events.go +++ b/pkg/relay/ethereum/events.go @@ -9,6 +9,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/hyperledger-labs/yui-relayer/core" @@ -28,7 +29,8 @@ var ( abiSendPacket, abiRecvPacket, abiWriteAcknowledgement, - abiAcknowledgePacket abi.Event + abiAcknowledgePacket, + abiChannelUpgradeOpen abi.Event ) func init() { @@ -43,7 +45,7 @@ func init() { abiRecvPacket = abiIBCHandler.Events["RecvPacket"] abiWriteAcknowledgement = abiIBCHandler.Events["WriteAcknowledgement"] abiAcknowledgePacket = abiIBCHandler.Events["AcknowledgePacket"] - + abiChannelUpgradeOpen = abiIBCHandler.Events["ChannelUpgradeOpen"] } func (chain *Chain) findSentPackets(ctx core.QueryContext, fromHeight uint64) (core.PacketInfoList, error) { @@ -246,3 +248,44 @@ func (chain *Chain) filterLogs(ctx core.QueryContext, fromHeight uint64, event a } return logs, nil } + +// findWriteErrorReceipt traverses WriteErrorReceipt events in reverse chronological order and returns the latest one. +// The start point of the traverse is the height of `ctx`. +func (chain *Chain) findWriteErrorReceipt(ctx core.QueryContext) (*ibchandler.IbchandlerWriteErrorReceipt, error) { + blocks := int64(chain.config.BlocksPerEventQuery) + if blocks == 0 { + blocks = BlocksPerEventQueryDefault + } + + for toBlock := int64(ctx.Height().GetRevisionHeight()); toBlock > 0; toBlock -= blocks { + end := uint64(toBlock) + start := uint64(1) + if toBlock > blocks { + start = uint64(toBlock - blocks + 1) + } + iterator, err := chain.ibcHandler.FilterWriteErrorReceipt(&bind.FilterOpts{ + Start: start, + End: &end, + }) + if err != nil { + return nil, err + } + var errReceipt *ibchandler.IbchandlerWriteErrorReceipt + for iterator.Next() { + if iterator.Event.PortId == chain.pathEnd.PortID && iterator.Event.ChannelId == chain.pathEnd.ChannelID { + errReceipt = iterator.Event + } + } + if err := iterator.Error(); err != nil { + return nil, err + } + if err := iterator.Close(); err != nil { + return nil, err + } + if errReceipt != nil { + return errReceipt, nil + } + } + + return nil, nil +} diff --git a/pkg/relay/ethereum/log.go b/pkg/relay/ethereum/log.go index 506bfc2..11310fc 100644 --- a/pkg/relay/ethereum/log.go +++ b/pkg/relay/ethereum/log.go @@ -1,16 +1,24 @@ package ethereum const ( - logAttrMsgIndexFrom = "msg_index_from" - logAttrMsgCount = "msg_count" - logAttrMsgType = "msg_type" - logAttrRevertReason = "revert_reason" - logAttrRawErrorData = "raw_error_data" - logAttrRawTxData = "raw_tx_data" - logAttrTxHash = "tx_hash" - logAttrBlockHash = "block_hash" - logAttrBlockNumber = "block_number" - logAttrTxIndex = "tx_index" - logAttrEstimatedGas = "estimated_gas" - logAttrMaxGasLimit = "max_gas_limit" + logAttrMsgIndexFrom = "msg_index_from" + logAttrMsgCount = "msg_count" + logAttrMsgType = "msg_type" + logAttrRevertReason = "revert_reason" + logAttrRawErrorData = "raw_error_data" + logAttrRawTxData = "raw_tx_data" + logAttrTxHash = "tx_hash" + logAttrBlockHash = "block_hash" + logAttrBlockNumber = "block_number" + logAttrTxIndex = "tx_index" + logAttrEstimatedGas = "estimated_gas" + logAttrMaxGasLimit = "max_gas_limit" + logAttrPortID = "port_id" + logAttrChannelID = "channel_id" + logAttrUpgradeFields = "upgrade_fields" + logAttrTimeout = "timeout" + logAttrUpgradeSequence = "upgrade_sequence" + logAttrVersion = "version" + logAttrImplementation = "implementation" + logAttrInitialCalldata = "initial_calldata" ) diff --git a/pkg/relay/ethereum/module.go b/pkg/relay/ethereum/module.go index 6f193b4..e0d8dc7 100644 --- a/pkg/relay/ethereum/module.go +++ b/pkg/relay/ethereum/module.go @@ -25,7 +25,7 @@ func (Module) RegisterInterfaces(registry codectypes.InterfaceRegistry) { // GetCmd returns the command func (Module) GetCmd(ctx *config.Context) *cobra.Command { - return nil + return ethereumCmd(ctx) } func GetModuleLogger() *log.RelayLogger { diff --git a/pkg/relay/ethereum/msg.go b/pkg/relay/ethereum/msg.go index 54b98d8..ab33dad 100644 --- a/pkg/relay/ethereum/msg.go +++ b/pkg/relay/ethereum/msg.go @@ -134,6 +134,16 @@ func (c *Chain) parseMsgEventLogs(logs []*types.Log) ([]core.MsgEventLog, error) TimeoutHeight: clienttypes.Height(ev.Packet.TimeoutHeight), TimeoutTimestamp: time.Unix(0, int64(ev.Packet.TimeoutTimestamp)), } + case abiChannelUpgradeOpen.ID: + ev, err := c.ibcHandler.ParseChannelUpgradeOpen(*log) + if err != nil { + return nil, fmt.Errorf("failed to parse ChannelUpgradeOpen event: logIndex=%d, log=%v", i, log) + } + event = &core.EventUpgradeChannel{ + PortID: ev.PortId, + ChannelID: ev.ChannelId, + UpgradeSequence: ev.UpgradeSequence, + } default: event = &core.EventUnknown{Value: log} } diff --git a/pkg/relay/ethereum/tx.go b/pkg/relay/ethereum/tx.go index 6c14672..2f3aad7 100644 --- a/pkg/relay/ethereum/tx.go +++ b/pkg/relay/ethereum/tx.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" math "math" + "slices" "sort" "strings" @@ -58,14 +59,14 @@ func (c *Chain) SendMsgs(msgs []sdk.Msg) ([]core.MsgID, error) { } else if built == nil { break } else { - iter.updateLoggerMessageInfo(logger, from, built.count) - logger.Logger = logger.With(logAttrTxHash, built.tx.Hash()) + logger = iter.updateLoggerMessageInfo(logger, from, built.count) + logger = &log.RelayLogger{Logger: logger.With(logAttrTxHash, built.tx.Hash())} } if rawTxData, err := built.tx.MarshalBinary(); err != nil { logger.Error("failed to encode tx", err) } else { - logger.Logger = logger.With(logAttrRawTxData, hex.EncodeToString(rawTxData)) + logger = &log.RelayLogger{Logger: logger.With(logAttrRawTxData, hex.EncodeToString(rawTxData))} } err = c.client.SendTransaction(ctx, built.tx) @@ -79,23 +80,25 @@ func (c *Chain) SendMsgs(msgs []sdk.Msg) ([]core.MsgID, error) { logger.Error("failed to get receipt", err) return nil, err } else { - logger.Logger = logger.With( + logger = &log.RelayLogger{Logger: logger.With( logAttrBlockHash, receipt.BlockHash, logAttrBlockNumber, receipt.BlockNumber.Uint64(), logAttrTxIndex, receipt.TransactionIndex, - ) + )} } if receipt.Status == gethtypes.ReceiptStatusFailed { if revertReason, rawErrorData, err := c.getRevertReasonFromReceipt(ctx, receipt); err != nil { // Raw error data may be available even if revert reason isn't available. - logger.Logger = logger.With(logAttrRawErrorData, hex.EncodeToString(rawErrorData)) + logger = &log.RelayLogger{Logger: logger.With( + logAttrRawErrorData, hex.EncodeToString(rawErrorData), + )} logger.Error("failed to get revert reason", err) } else { - logger.Logger = logger.With( + logger = &log.RelayLogger{Logger: logger.With( logAttrRawErrorData, hex.EncodeToString(rawErrorData), logAttrRevertReason, revertReason, - ) + )} } err := errors.New("tx execution reverted") @@ -350,6 +353,87 @@ func (c *Chain) TxAcknowledgement(opts *bind.TransactOpts, msg *chantypes.MsgAck }) } +func (c *Chain) TxChannelUpgradeInit(opts *bind.TransactOpts, msg *chantypes.MsgChannelUpgradeInit) (*gethtypes.Transaction, error) { + return c.ibcHandler.ChannelUpgradeInit(opts, ibchandler.IIBCChannelUpgradeBaseMsgChannelUpgradeInit{ + PortId: c.pathEnd.PortID, + ChannelId: c.pathEnd.ChannelID, + ProposedUpgradeFields: pbToUpgradeFields(msg.Fields), + }) +} + +func (c *Chain) TxChannelUpgradeTry(opts *bind.TransactOpts, msg *chantypes.MsgChannelUpgradeTry) (*gethtypes.Transaction, error) { + return c.ibcHandler.ChannelUpgradeTry(opts, ibchandler.IIBCChannelUpgradeBaseMsgChannelUpgradeTry{ + PortId: c.pathEnd.PortID, + ChannelId: c.pathEnd.ChannelID, + CounterpartyUpgradeSequence: msg.CounterpartyUpgradeSequence, + CounterpartyUpgradeFields: pbToUpgradeFields(msg.CounterpartyUpgradeFields), + ProposedConnectionHops: slices.Clone(msg.ProposedUpgradeConnectionHops), + Proofs: ibchandler.IIBCChannelUpgradeBaseChannelUpgradeProofs{ + ProofChannel: msg.ProofChannel, + ProofUpgrade: msg.ProofUpgrade, + ProofHeight: pbToHandlerHeight(msg.ProofHeight), + }, + }) +} + +func (c *Chain) TxChannelUpgradeAck(opts *bind.TransactOpts, msg *chantypes.MsgChannelUpgradeAck) (*gethtypes.Transaction, error) { + return c.ibcHandler.ChannelUpgradeAck(opts, ibchandler.IIBCChannelUpgradeBaseMsgChannelUpgradeAck{ + PortId: c.pathEnd.PortID, + ChannelId: c.pathEnd.ChannelID, + CounterpartyUpgrade: pbToUpgrade(msg.CounterpartyUpgrade), + Proofs: ibchandler.IIBCChannelUpgradeBaseChannelUpgradeProofs{ + ProofChannel: msg.ProofChannel, + ProofUpgrade: msg.ProofUpgrade, + ProofHeight: pbToHandlerHeight(msg.ProofHeight), + }, + }) +} + +func (c *Chain) TxChannelUpgradeConfirm(opts *bind.TransactOpts, msg *chantypes.MsgChannelUpgradeConfirm) (*gethtypes.Transaction, error) { + return c.ibcHandler.ChannelUpgradeConfirm(opts, ibchandler.IIBCChannelUpgradeBaseMsgChannelUpgradeConfirm{ + PortId: c.pathEnd.PortID, + ChannelId: c.pathEnd.ChannelID, + CounterpartyChannelState: uint8(msg.CounterpartyChannelState), + CounterpartyUpgrade: pbToUpgrade(msg.CounterpartyUpgrade), + Proofs: ibchandler.IIBCChannelUpgradeBaseChannelUpgradeProofs{ + ProofChannel: msg.ProofChannel, + ProofUpgrade: msg.ProofUpgrade, + ProofHeight: pbToHandlerHeight(msg.ProofHeight), + }, + }) +} + +func (c *Chain) TxChannelUpgradeOpen(opts *bind.TransactOpts, msg *chantypes.MsgChannelUpgradeOpen) (*gethtypes.Transaction, error) { + return c.ibcHandler.ChannelUpgradeOpen(opts, ibchandler.IIBCChannelUpgradeBaseMsgChannelUpgradeOpen{ + PortId: c.pathEnd.PortID, + ChannelId: c.pathEnd.ChannelID, + CounterpartyChannelState: uint8(msg.CounterpartyChannelState), + CounterpartyUpgradeSequence: msg.CounterpartyUpgradeSequence, + ProofChannel: msg.ProofChannel, + ProofHeight: pbToHandlerHeight(msg.ProofHeight), + }) +} + +func (c *Chain) TxChannelUpgradeCancel(opts *bind.TransactOpts, msg *chantypes.MsgChannelUpgradeCancel) (*gethtypes.Transaction, error) { + return c.ibcHandler.CancelChannelUpgrade(opts, ibchandler.IIBCChannelUpgradeBaseMsgCancelChannelUpgrade{ + PortId: c.pathEnd.PortID, + ChannelId: c.pathEnd.ChannelID, + ErrorReceipt: ibchandler.ErrorReceiptData(msg.ErrorReceipt), + ProofUpgradeError: msg.ProofErrorReceipt, + ProofHeight: pbToHandlerHeight(msg.ProofHeight), + }) +} + +func (c *Chain) TxChannelUpgradeTimeout(opts *bind.TransactOpts, msg *chantypes.MsgChannelUpgradeTimeout) (*gethtypes.Transaction, error) { + return c.ibcHandler.TimeoutChannelUpgrade(opts, ibchandler.IIBCChannelUpgradeBaseMsgTimeoutChannelUpgrade{ + PortId: c.pathEnd.PortID, + ChannelId: c.pathEnd.ChannelID, + CounterpartyChannel: pbToChannel(msg.CounterpartyChannel), + ProofChannel: msg.ProofChannel, + ProofHeight: pbToHandlerHeight(msg.ProofHeight), + }) +} + func (c *Chain) BuildMessageTx(opts *bind.TransactOpts, msg sdk.Msg, skipUpdateClientCommitment bool) (*gethtypes.Transaction, error) { logger := c.GetChainLogger() var ( @@ -381,6 +465,20 @@ func (c *Chain) BuildMessageTx(opts *bind.TransactOpts, msg sdk.Msg, skipUpdateC tx, err = c.TxRecvPacket(opts, msg) case *chantypes.MsgAcknowledgement: tx, err = c.TxAcknowledgement(opts, msg) + case *chantypes.MsgChannelUpgradeInit: + tx, err = c.TxChannelUpgradeInit(opts, msg) + case *chantypes.MsgChannelUpgradeTry: + tx, err = c.TxChannelUpgradeTry(opts, msg) + case *chantypes.MsgChannelUpgradeAck: + tx, err = c.TxChannelUpgradeAck(opts, msg) + case *chantypes.MsgChannelUpgradeConfirm: + tx, err = c.TxChannelUpgradeConfirm(opts, msg) + case *chantypes.MsgChannelUpgradeOpen: + tx, err = c.TxChannelUpgradeOpen(opts, msg) + case *chantypes.MsgChannelUpgradeCancel: + tx, err = c.TxChannelUpgradeCancel(opts, msg) + case *chantypes.MsgChannelUpgradeTimeout: + tx, err = c.TxChannelUpgradeTimeout(opts, msg) // case *transfertypes.MsgTransfer: // err = c.client.transfer(msg) default: @@ -444,27 +542,25 @@ func estimateGas( c *Chain, tx *gethtypes.Transaction, doRound bool, // return rounded gas limit when gas limit is over - base_logger *log.RelayLogger, + logger *log.RelayLogger, ) (uint64, error) { - logger := &log.RelayLogger{Logger: base_logger.Logger} - if rawTxData, err := tx.MarshalBinary(); err != nil { logger.Error("failed to encode tx", err) } else { - logger.Logger = logger.With(logAttrRawTxData, hex.EncodeToString(rawTxData)) + logger = &log.RelayLogger{Logger: logger.With(logAttrRawTxData, hex.EncodeToString(rawTxData))} } estimatedGas, err := c.client.EstimateGasFromTx(ctx, tx) if err != nil { if revertReason, rawErrorData, err := c.getRevertReasonFromRpcError(err); err != nil { // Raw error data may be available even if revert reason isn't available. - logger.Logger = logger.With(logAttrRawErrorData, hex.EncodeToString(rawErrorData)) + logger = &log.RelayLogger{Logger: logger.With(logAttrRawErrorData, hex.EncodeToString(rawErrorData))} logger.Error("failed to get revert reason", err) } else { - logger.Logger = logger.With( + logger = &log.RelayLogger{Logger: logger.With( logAttrRawErrorData, hex.EncodeToString(rawErrorData), logAttrRevertReason, revertReason, - ) + )} } logger.Error("failed to estimate gas", err) @@ -523,17 +619,18 @@ func (iter *CallIter) Next(n int) { iter.cursor = min(len(iter.msgs), iter.cursor+n) } -func (iter *CallIter) updateLoggerMessageInfo(logger *log.RelayLogger, from int, count int) { +func (iter *CallIter) updateLoggerMessageInfo(logger *log.RelayLogger, from int, count int) *log.RelayLogger { if from < 0 || count < 0 || len(iter.msgs) <= from || len(iter.msgs) < from+count { - logger.Error("invalid parameter", fmt.Errorf("out of index: len(msgs)=%d, from=%d, count=%d", len(iter.msgs), from, count)) - return + panic(fmt.Errorf("out of index: len(msgs)=%d, from=%d, count=%d", len(iter.msgs), from, count)) } - logger.Logger = logger.With( - logAttrMsgIndexFrom, from, - logAttrMsgCount, count, - logAttrMsgType, strings.Join(iter.msgTypeNames[from:from+count], ","), - ) + return &log.RelayLogger{ + Logger: logger.With( + logAttrMsgIndexFrom, from, + logAttrMsgCount, count, + logAttrMsgType, strings.Join(iter.msgTypeNames[from:from+count], ","), + ), + } } type CallIterBuildResult struct { @@ -555,7 +652,7 @@ func (iter *CallIter) buildSingleTx(ctx context.Context, c *Chain) (*CallIterBui } logger := c.GetChainLogger() - iter.updateLoggerMessageInfo(logger, iter.Cursor(), 1) + logger = iter.updateLoggerMessageInfo(logger, iter.Cursor(), 1) opts, err := c.TxOpts(ctx, true) if err != nil { @@ -607,8 +704,7 @@ func (iter *CallIter) buildMultiTx(ctx context.Context, c *Chain) (*CallIterBuil txs := make([]gethtypes.Transaction, 0, len(iter.msgs)) for i := 0; i < len(iter.msgs); i++ { - logger := &log.RelayLogger{Logger: logger.Logger} - iter.updateLoggerMessageInfo(logger, i, 1) + logger := iter.updateLoggerMessageInfo(logger, i, 1) // note that its nonce is not checked tx, err := c.BuildMessageTx(opts, iter.msgs[i], iter.skipUpdateClientCommitment) @@ -636,8 +732,7 @@ func (iter *CallIter) buildMultiTx(ctx context.Context, c *Chain) (*CallIterBuil from := iter.Cursor() to := from + count - logger := &log.RelayLogger{Logger: logger.Logger} - iter.updateLoggerMessageInfo(logger, from, count) + logger := iter.updateLoggerMessageInfo(logger, from, count) calls := make([]multicall3.Multicall3Call, 0, count) for i := from; i < to; i++ { @@ -662,7 +757,7 @@ func (iter *CallIter) buildMultiTx(ctx context.Context, c *Chain) (*CallIterBuil return nil }) - iter.updateLoggerMessageInfo(logger, iter.Cursor(), count) + logger = iter.updateLoggerMessageInfo(logger, iter.Cursor(), count) if err != nil { logger.Error("failed to prepare multicall tx", err) diff --git a/pkg/relay/ethereum/types.go b/pkg/relay/ethereum/types.go index da581c6..a64c1b4 100644 --- a/pkg/relay/ethereum/types.go +++ b/pkg/relay/ethereum/types.go @@ -1,6 +1,9 @@ package ethereum import ( + "slices" + + clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" commitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" @@ -29,14 +32,30 @@ func connectionEndToPB(conn ibchandler.ConnectionEndData) connectiontypes.Connec func channelToPB(chann ibchandler.ChannelData) channeltypes.Channel { return channeltypes.Channel{ - State: channeltypes.State(chann.State), - Ordering: channeltypes.Order(chann.Ordering), - Counterparty: channeltypes.Counterparty(chann.Counterparty), - ConnectionHops: chann.ConnectionHops, - Version: chann.Version, + State: channeltypes.State(chann.State), + Ordering: channeltypes.Order(chann.Ordering), + Counterparty: channeltypes.Counterparty(chann.Counterparty), + ConnectionHops: chann.ConnectionHops, + Version: chann.Version, + UpgradeSequence: chann.UpgradeSequence, } } +func upgradeToPB(upg ibchandler.UpgradeData) channeltypes.Upgrade { + return channeltypes.NewUpgrade( + channeltypes.NewUpgradeFields( + channeltypes.Order(upg.Fields.Ordering), + upg.Fields.ConnectionHops, + upg.Fields.Version, + ), + channeltypes.NewTimeout( + clienttypes.Height(upg.Timeout.Height), + upg.Timeout.Timestamp, + ), + upg.NextSequenceSend, + ) +} + func pbToHandlerHeight(height exported.Height) ibchandler.HeightData { return ibchandler.HeightData{ RevisionNumber: height.GetRevisionNumber(), @@ -50,3 +69,37 @@ func pbToHostHeight(height exported.Height) ibchandler.HeightData { RevisionHeight: height.GetRevisionHeight(), } } + +func pbToUpgradeFields(f channeltypes.UpgradeFields) ibchandler.UpgradeFieldsData { + return ibchandler.UpgradeFieldsData{ + Ordering: uint8(f.Ordering), + ConnectionHops: slices.Clone(f.ConnectionHops), + Version: f.Version, + } +} + +func pbToTimeout(t channeltypes.Timeout) ibchandler.TimeoutData { + return ibchandler.TimeoutData{ + Height: pbToHandlerHeight(t.Height), + Timestamp: t.Timestamp, + } +} + +func pbToUpgrade(u channeltypes.Upgrade) ibchandler.UpgradeData { + return ibchandler.UpgradeData{ + Fields: pbToUpgradeFields(u.Fields), + Timeout: pbToTimeout(u.Timeout), + NextSequenceSend: u.NextSequenceSend, + } +} + +func pbToChannel(c channeltypes.Channel) ibchandler.ChannelData { + return ibchandler.ChannelData{ + State: uint8(c.State), + Ordering: uint8(c.Ordering), + Counterparty: ibchandler.ChannelCounterpartyData(c.Counterparty), + ConnectionHops: slices.Clone(c.ConnectionHops), + Version: c.Version, + UpgradeSequence: c.UpgradeSequence, + } +} diff --git a/pkg/relay/ethereum/upgrade.go b/pkg/relay/ethereum/upgrade.go new file mode 100644 index 0000000..417ff7e --- /dev/null +++ b/pkg/relay/ethereum/upgrade.go @@ -0,0 +1,192 @@ +package ethereum + +import ( + "context" + "encoding/hex" + "fmt" + + "github.com/datachainlab/ethereum-ibc-relay-chain/pkg/contract/iibcchannelupgradablemodule" + "github.com/datachainlab/ethereum-ibc-relay-chain/pkg/contract/iibccontractupgradablemodule" + "github.com/ethereum/go-ethereum/common" + gethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/hyperledger-labs/yui-relayer/log" +) + +func (c *Chain) ProposeUpgrade( + ctx context.Context, + portID string, + channelID string, + upgradeFields iibcchannelupgradablemodule.UpgradeFieldsData, + timeout iibcchannelupgradablemodule.TimeoutData, +) error { + logger := c.GetChainLogger() + logger = &log.RelayLogger{Logger: logger.With( + logAttrPortID, portID, + logAttrChannelID, channelID, + logAttrUpgradeFields, upgradeFields, + logAttrTimeout, timeout, + )} + + appAddr, err := c.ibcHandler.GetIBCModuleByChannel(c.CallOpts(ctx, 0), portID, channelID) + if err != nil { + return err + } + + mockApp, err := iibcchannelupgradablemodule.NewIibcchannelupgradablemodule( + appAddr, + c.client.Client, + ) + if err != nil { + return nil + } + + txOpts, err := c.TxOpts(ctx, true) + if err != nil { + return err + } + + tx, err := mockApp.ProposeUpgrade( + txOpts, + portID, + channelID, + upgradeFields, + timeout, + ) + + return processSendTxResult(ctx, logger, c, tx, err) +} + +func (c *Chain) AllowTransitionToFlushComplete( + ctx context.Context, + portID string, + channelID string, + upgradeSequence uint64, +) error { + logger := c.GetChainLogger() + logger = &log.RelayLogger{Logger: logger.With( + logAttrPortID, portID, + logAttrChannelID, channelID, + logAttrUpgradeSequence, upgradeSequence, + )} + + appAddr, err := c.ibcHandler.GetIBCModuleByChannel(c.CallOpts(ctx, 0), portID, channelID) + if err != nil { + return err + } + + mockApp, err := iibcchannelupgradablemodule.NewIibcchannelupgradablemodule( + appAddr, + c.client.Client, + ) + if err != nil { + return nil + } + + txOpts, err := c.TxOpts(ctx, true) + if err != nil { + return err + } + + tx, err := mockApp.AllowTransitionToFlushComplete( + txOpts, + portID, + channelID, + upgradeSequence, + ) + if err != nil { + return err + } + + return processSendTxResult(ctx, logger, c, tx, err) +} + +func (c *Chain) ProposeAppVersion( + ctx context.Context, + portID string, + version string, + implementation common.Address, + initialCalldata []byte, +) error { + logger := c.GetChainLogger() + logger = &log.RelayLogger{Logger: logger.With( + logAttrPortID, portID, + logAttrVersion, version, + logAttrImplementation, implementation.Hex(), + logAttrInitialCalldata, hex.EncodeToString(initialCalldata), + )} + + appAddr, err := c.ibcHandler.GetIBCModuleByPort(c.CallOpts(ctx, 0), portID) + if err != nil { + return err + } + + mockApp, err := iibccontractupgradablemodule.NewIibccontractupgradablemodule( + appAddr, + c.client.Client, + ) + if err != nil { + return nil + } + + txOpts, err := c.TxOpts(ctx, true) + if err != nil { + return err + } + + tx, err := mockApp.ProposeAppVersion( + txOpts, + version, + iibccontractupgradablemodule.IIBCContractUpgradableModuleAppInfo{ + Implementation: implementation, + InitialCalldata: initialCalldata, + }, + ) + + return processSendTxResult(ctx, logger, c, tx, err) +} + +func processSendTxResult(ctx context.Context, logger *log.RelayLogger, c *Chain, tx *gethtypes.Transaction, err error) error { + if err != nil { + if revertReason, returnData, err := c.getRevertReasonFromRpcError(err); err != nil { + logger = &log.RelayLogger{Logger: logger.With( + logAttrRawErrorData, hex.EncodeToString(returnData), + )} + logger.Error("failed to get revert reason from RPC error", err) + } else { + logger = &log.RelayLogger{Logger: logger.With( + logAttrRevertReason, revertReason, + logAttrRawErrorData, hex.EncodeToString(returnData), + )} + } + logger.Error("failed to send tx", err) + return err + } + + if rawTxData, err := tx.MarshalBinary(); err != nil { + logger.Error("failed to encode tx", err) + } else { + logger = &log.RelayLogger{Logger: logger.With( + logAttrRawTxData, hex.EncodeToString(rawTxData), + )} + } + + if receipt, err := c.client.WaitForReceiptAndGet(ctx, tx.Hash()); err != nil { + logger.Error("failed to wait for tx receipt", err) + return err + } else if receipt.Status == gethtypes.ReceiptStatusFailed { + if revertReason, returnData, err := c.getRevertReasonFromReceipt(ctx, receipt); err != nil { + logger = &log.RelayLogger{Logger: logger.With( + logAttrRawErrorData, hex.EncodeToString(returnData), + )} + logger.Error("failed to get revert reason from receipt", err) + } else { + logger = &log.RelayLogger{Logger: logger.With( + logAttrRevertReason, revertReason, + logAttrRawErrorData, hex.EncodeToString(returnData), + )} + } + return fmt.Errorf("tx execution reverted") + } + + return nil +} diff --git a/yui-ibc-solidity b/yui-ibc-solidity index 3ccaf71..cd49bc0 160000 --- a/yui-ibc-solidity +++ b/yui-ibc-solidity @@ -1 +1 @@ -Subproject commit 3ccaf71d63dc9fd54bd629a3800d74c0fcea1237 +Subproject commit cd49bc000d99b498026706ed028a89123a8e05a2