From 4389cb2cc3230c6635e00bd6917b8eb59fa23d2b Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 11 Aug 2024 03:42:48 -0700 Subject: [PATCH] chore: update ts sdk examples --- typescript-sdk/.env.example | 2 +- typescript-sdk/bun.lockb | Bin 117444 -> 117716 bytes typescript-sdk/package.json | 15 +- typescript-sdk/playground/all.sh | 2 +- .../playground/arbitrum-to-union.ts | 100 + .../playground/stride-to-berachain.ts | 8 +- .../playground/union-to-arbitrum.ts | 100 + .../playground/union-to-berachain.ts | 24 +- typescript-sdk/playground/union-to-union.ts | 2 +- typescript-sdk/scripts/chains.ts | 1 + .../src/abi/berachain/ibc-handler.ts | 2439 -------- typescript-sdk/src/abi/berachain/ucs-01.ts | 810 --- typescript-sdk/src/abi/ibc-handler.ts | 5272 ----------------- typescript-sdk/src/mod.ts | 2 +- typescript-sdk/src/query/offchain/tenderly.ts | 4 +- typescript-sdk/src/query/on-chain.ts | 32 +- typescript-sdk/src/transfer/cosmos.ts | 7 +- typescript-sdk/src/transfer/evm.ts | 3 - typescript-sdk/src/utilities/address.ts | 6 +- typescript-sdk/src/v0/mod.ts | 391 -- 20 files changed, 244 insertions(+), 8976 deletions(-) mode change 100644 => 100755 typescript-sdk/playground/all.sh create mode 100644 typescript-sdk/playground/arbitrum-to-union.ts create mode 100644 typescript-sdk/playground/union-to-arbitrum.ts delete mode 100644 typescript-sdk/src/abi/berachain/ibc-handler.ts delete mode 100644 typescript-sdk/src/abi/berachain/ucs-01.ts delete mode 100644 typescript-sdk/src/abi/ibc-handler.ts delete mode 100644 typescript-sdk/src/v0/mod.ts diff --git a/typescript-sdk/.env.example b/typescript-sdk/.env.example index 7c4b7d254d..8b3d7d4fe3 100644 --- a/typescript-sdk/.env.example +++ b/typescript-sdk/.env.example @@ -1,3 +1,3 @@ NODE_ENV="development" DRY_RUN=0 # for ./scripts/publish.ts -HUBBLE_URL="https://noble-pika-27.hasura.app" +HUBBLE_URL="" diff --git a/typescript-sdk/bun.lockb b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&s+%}=(pgAXs5l=lcFAI${q*0M*-v}& zKGx;*as|5|Fa51w{O6rm!TfN3!#LrHc{+>Pn`F=*EJzvI<`fNgi^el&zk8hEg8Zh%kPY2eVQnxbEp{p9lIlzEMQh*TP>?Ex~*bg z7~n`N7O!HLaQ@!6khzF6S2NdYd2_MXY-aPBV9{)5TTP%6ug^xzKUG(Wr6tViGePDY zOmA7Ec+IBg zsJ#xozp{>5=mqGnO6<2DJG9gKPgV3%7rolj^{ipFyoKmAA2V0(lIMm`4IpnRZk+!q zB9h>b`JZerj*UBC2n5ITt$ab%(1-QPS%5AQ^?!J3Nb!D<&So;S1RPZ z#aYXlYk7~OtfRuJp!<*>1rgz?6OZYp;M8OEuBbsB+Y50|b9$w9&(nnG@0H8W91}Mj TXWk~lah config.destination_chain.chain_id === "union-testnet-8") + .at(0) + if (!ucsConfiguration) raise("UCS configuration not found") + + const { channel_id, contract_address, source_chain, destination_chain } = ucsConfiguration + + const client = createCosmosSdkClient({ + evm: { + account: evmAccount, + chain: arbitrumSepolia, + transport: fallback([http(arbitrumSepolia?.rpcUrls.default.http.at(0))]) + }, + cosmos: { + account: cosmosAccount, + gasPrice: { amount: "0.0025", denom: "muno" }, + transport: cosmosHttp("https://rpc.testnet-8.union.build") + } + }) + + const transactionPayload = { + amount: 1n, + approve: true, + sourceChannel: channel_id, + network: arbitrumInfo.rpc_type, + denomAddress: LINK_CONTRACT_ADDRESS, + relayContractAddress: contract_address, + // or `client.cosmos.account.address` if you want to send to yourself + recipient: "union14qemq0vw6y3gc3u3e0aty2e764u4gs5lnxk4rv", + path: [source_chain.chain_id, destination_chain.chain_id] + } satisfies TransferAssetsParameters + + const gasEstimationResponse = await client.simulateTransaction(transactionPayload) + + consola.info(`Gas cost: ${gasEstimationResponse.data}`) + + if (ONLY_ESTIMATE_GAS) process.exit(0) + + if (!gasEstimationResponse.success) { + console.info("Transaction simulation failed") + process.exit(1) + } + + const transfer = await client.transferAsset(transactionPayload) + + consola.info(transfer) +} catch (error) { + const errorMessage = error instanceof Error ? error.message : error + console.error(errorMessage) +} finally { + process.exit(0) +} diff --git a/typescript-sdk/playground/stride-to-berachain.ts b/typescript-sdk/playground/stride-to-berachain.ts index 4e6bc9f61f..5c1256ea6e 100644 --- a/typescript-sdk/playground/stride-to-berachain.ts +++ b/typescript-sdk/playground/stride-to-berachain.ts @@ -31,6 +31,8 @@ const cosmosAccount = await DirectSecp256k1Wallet.fromKey( "stride" ) +const [account] = await cosmosAccount.getAccounts() + try { /** * Calls Hubble, Union's indexer, to grab desired data that's always up-to-date. @@ -58,11 +60,7 @@ try { cosmos: { account: cosmosAccount, gasPrice: { amount: "0.0025", denom: "ustrd" }, - transport: cosmosHttp( - // - // "https://stride.testnet-1.stridenet.co/" - "https://stride-testnet-rpc.polkachu.com/" - ) + transport: cosmosHttp("https://stride-testnet-rpc.polkachu.com") }, evm: { account: berachainAccount, diff --git a/typescript-sdk/playground/union-to-arbitrum.ts b/typescript-sdk/playground/union-to-arbitrum.ts new file mode 100644 index 0000000000..a1fa12cb4d --- /dev/null +++ b/typescript-sdk/playground/union-to-arbitrum.ts @@ -0,0 +1,100 @@ +#!/usr/bin/env bun +import { parseArgs } from "node:util" +import { fallback, http } from "viem" +import { consola } from "scripts/logger" +import { cosmosHttp } from "#transport.ts" +import { raise } from "#utilities/index.ts" +import { arbitrumSepolia } from "viem/chains" +import { privateKeyToAccount } from "viem/accounts" +import { hexStringToUint8Array } from "#convert.ts" +import { DirectSecp256k1Wallet } from "@cosmjs/proto-signing" +import { createCosmosSdkClient, offchainQuery, type TransferAssetsParameters } from "#mod.ts" + +/* `bun playground/union-to-arbitrum.ts --private-key "..."` --estimate-gas */ + +const { values } = parseArgs({ + args: process.argv.slice(2), + options: { + "private-key": { type: "string" }, + "estimate-gas": { type: "boolean", default: false } + } +}) + +const PRIVATE_KEY = values["private-key"] +if (!PRIVATE_KEY) raise("Private key not found") +const ONLY_ESTIMATE_GAS = values["estimate-gas"] ?? false + +const evmAccount = privateKeyToAccount(`0x${PRIVATE_KEY}`) + +const cosmosAccount = await DirectSecp256k1Wallet.fromKey( + Uint8Array.from(hexStringToUint8Array(PRIVATE_KEY)), + "union" +) + +const [account] = await cosmosAccount.getAccounts() + +try { + /** + * Calls Hubble, Union's indexer, to grab desired data that's always up-to-date. + */ + const { + data: [unionTestnetInfo] + } = await offchainQuery.chain({ + chainId: "union-testnet-8", + includeEndpoints: true, + includeContracts: true + }) + + if (!unionTestnetInfo) raise("Union testnet info not found") + + const ucsConfiguration = unionTestnetInfo.ucs1_configurations + ?.filter(config => config.destination_chain.chain_id === `${arbitrumSepolia.id}`) + .at(0) + if (!ucsConfiguration) raise("UCS configuration not found") + + const { channel_id, contract_address, source_chain, destination_chain } = ucsConfiguration + + const client = createCosmosSdkClient({ + evm: { + account: evmAccount, + chain: arbitrumSepolia, + transport: fallback([http(arbitrumSepolia?.rpcUrls.default.http.at(0))]) + }, + cosmos: { + account: cosmosAccount, + gasPrice: { amount: "0.0025", denom: "muno" }, + transport: cosmosHttp("https://rpc.testnet-8.union.build") + } + }) + + const transactionPayload = { + amount: 1n, + denomAddress: "muno", + sourceChannel: channel_id, + // or `client.evm.account.address` if you want to send to yourself + recipient: evmAccount.address, + network: unionTestnetInfo.rpc_type, + relayContractAddress: contract_address, + path: [source_chain.chain_id, destination_chain.chain_id] + } satisfies TransferAssetsParameters + + const gasEstimationResponse = await client.simulateTransaction(transactionPayload) + + consola.info(`Gas cost: ${gasEstimationResponse.data}`) + + if (ONLY_ESTIMATE_GAS) process.exit(0) + + if (!gasEstimationResponse.success) { + console.info("Transaction simulation failed") + process.exit(1) + } + + const transfer = await client.transferAsset(transactionPayload) + + console.info(transfer) +} catch (error) { + const errorMessage = error instanceof Error ? error.message : error + console.error(errorMessage) +} finally { + process.exit(0) +} diff --git a/typescript-sdk/playground/union-to-berachain.ts b/typescript-sdk/playground/union-to-berachain.ts index 85368ea8ac..60effe6011 100644 --- a/typescript-sdk/playground/union-to-berachain.ts +++ b/typescript-sdk/playground/union-to-berachain.ts @@ -8,7 +8,7 @@ import { privateKeyToAccount } from "viem/accounts" import { hexStringToUint8Array } from "#convert.ts" import { berachainTestnetbArtio } from "viem/chains" import { DirectSecp256k1Wallet } from "@cosmjs/proto-signing" -import { createCosmosSdkClient, offchainQuery } from "#mod.ts" +import { createCosmosSdkClient, offchainQuery, type TransferAssetsParameters } from "#mod.ts" /* `bun playground/union-to-berachain.ts --private-key "..."` --estimate-gas */ @@ -69,14 +69,11 @@ try { cosmos: { account: cosmosAccount, gasPrice: { amount: "0.0025", denom: "muno" }, - transport: cosmosHttp( - // "https://rpc.testnet.bonlulu.uno" - "https://rpc.testnet.seed.poisonphang.com:443" - ) + transport: cosmosHttp("https://rpc.testnet-8.union.build") } }) - const gasEstimationResponse = await client.simulateTransaction({ + const transactionPayload = { amount: 1n, denomAddress: "muno", sourceChannel: channel_id, @@ -85,7 +82,9 @@ try { recipient: berachainAccount.address, relayContractAddress: contract_address, path: [source_chain.chain_id, destination_chain.chain_id] - }) + } satisfies TransferAssetsParameters + + const gasEstimationResponse = await client.simulateTransaction(transactionPayload) consola.box("Union to Berachain gas cost:", gasEstimationResponse) @@ -96,16 +95,7 @@ try { process.exit(1) } - const transfer = await client.transferAsset({ - amount: 1n, - denomAddress: "muno", - sourceChannel: channel_id, - network: unionTestnetInfo.rpc_type, - // or `client.evm.account.address` if you want to send to yourself - recipient: berachainAccount.address, - relayContractAddress: contract_address, - path: [source_chain.chain_id, destination_chain.chain_id] - }) + const transfer = await client.transferAsset(transactionPayload) console.info(transfer) } catch (error) { diff --git a/typescript-sdk/playground/union-to-union.ts b/typescript-sdk/playground/union-to-union.ts index 17af0b1a99..200e336e9b 100644 --- a/typescript-sdk/playground/union-to-union.ts +++ b/typescript-sdk/playground/union-to-union.ts @@ -41,7 +41,7 @@ try { cosmos: { account: cosmosAccount, gasPrice: { amount: "0.025", denom: "muno" }, - transport: cosmosHttp("https://rpc.testnet.bonlulu.uno") + transport: cosmosHttp("https://rpc.testnet-8.union.build") } }) diff --git a/typescript-sdk/scripts/chains.ts b/typescript-sdk/scripts/chains.ts index 3514144aec..7436c1bcf1 100644 --- a/typescript-sdk/scripts/chains.ts +++ b/typescript-sdk/scripts/chains.ts @@ -17,6 +17,7 @@ if (chainId) { } consola.info(JSON.stringify(data, undefined, 2)) + process.exit(0) } const data = await offchainQuery.chains({ diff --git a/typescript-sdk/src/abi/berachain/ibc-handler.ts b/typescript-sdk/src/abi/berachain/ibc-handler.ts deleted file mode 100644 index 189fc467f1..0000000000 --- a/typescript-sdk/src/abi/berachain/ibc-handler.ts +++ /dev/null @@ -1,2439 +0,0 @@ -export const ibcHandlerAbi = [ - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "capabilities", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "channels", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [ - { name: "state", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.State" }, - { name: "ordering", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "connections", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "state", type: "uint8", internalType: "enum IbcCoreConnectionV1GlobalEnums.State" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delay_period", type: "uint64", internalType: "uint64" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "createClient", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgCreateClient", - components: [ - { name: "clientType", type: "string", internalType: "string" }, - { name: "clientStateBytes", type: "bytes", internalType: "bytes" }, - { name: "consensusStateBytes", type: "bytes", internalType: "bytes" } - ] - } - ], - outputs: [{ name: "clientId", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "getClient", - inputs: [{ name: "clientId", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "contract ILightClient" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "registerClient", - inputs: [ - { name: "clientType", type: "string", internalType: "string" }, - { name: "client", type: "address", internalType: "contract ILightClient" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "updateClient", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgUpdateClient", - components: [ - { name: "clientId", type: "string", internalType: "string" }, - { name: "clientMessage", type: "bytes", internalType: "bytes" } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "ClientCreated", - inputs: [{ name: "clientId", type: "string", indexed: false, internalType: "string" }], - anonymous: false - }, - { - type: "event", - name: "ClientRegistered", - inputs: [ - { name: "clientType", type: "string", indexed: false, internalType: "string" }, - { name: "clientAddress", type: "address", indexed: false, internalType: "address" } - ], - anonymous: false - }, - { - type: "event", - name: "ClientUpdated", - inputs: [ - { name: "clientId", type: "string", indexed: false, internalType: "string" }, - { - name: "height", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ], - anonymous: false - }, - { type: "error", name: "ErrClientMustNotBeSelf", inputs: [] }, - { type: "error", name: "ErrClientNotFound", inputs: [] }, - { type: "error", name: "ErrClientTypeAlreadyExists", inputs: [] }, - { type: "error", name: "ErrClientTypeNotFound", inputs: [] }, - { type: "error", name: "ErrFailedToCreateClient", inputs: [] }, - { type: "error", name: "ErrFailedToUpdateClient", inputs: [] }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "acknowledgePacket", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketAcknowledgement", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "acknowledgement", type: "bytes", internalType: "bytes" }, - { name: "proof", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "capabilities", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "channelCapabilityPath", - inputs: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "pure" - }, - { - type: "function", - name: "channels", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [ - { name: "state", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.State" }, - { name: "ordering", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "connections", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "state", type: "uint8", internalType: "enum IbcCoreConnectionV1GlobalEnums.State" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delay_period", type: "uint64", internalType: "uint64" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [{ name: "clientId", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "contract ILightClient" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "recvPacket", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketRecv", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "proof", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "sendPacket", - inputs: [ - { name: "sourceChannel", type: "string", internalType: "string" }, - { - name: "timeoutHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" }, - { name: "data", type: "bytes", internalType: "bytes" } - ], - outputs: [{ name: "", type: "uint64", internalType: "uint64" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "timeoutPacket", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketTimeout", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "proof", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "writeAcknowledgement", - inputs: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "acknowledgement", type: "bytes", internalType: "bytes" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "AcknowledgePacket", - inputs: [ - { - name: "packet", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "acknowledgement", type: "bytes", indexed: false, internalType: "bytes" } - ], - anonymous: false - }, - { - type: "event", - name: "RecvPacket", - inputs: [ - { - name: "packet", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", 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: "struct IbcCoreClientV1Height.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: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - } - ], - anonymous: false - }, - { - type: "event", - name: "WriteAcknowledgement", - inputs: [ - { - name: "packet", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "acknowledgement", type: "bytes", indexed: false, internalType: "bytes" } - ], - anonymous: false - }, - { type: "error", name: "ErrAcknowledgementAlreadyExists", inputs: [] }, - { type: "error", name: "ErrAcknowledgementIsEmpty", inputs: [] }, - { type: "error", name: "ErrClientNotFound", inputs: [] }, - { type: "error", name: "ErrDestinationAndCounterpartyChannelMismatch", inputs: [] }, - { type: "error", name: "ErrDestinationAndCounterpartyPortMismatch", inputs: [] }, - { type: "error", name: "ErrHeightTimeout", inputs: [] }, - { type: "error", name: "ErrInvalidChannelState", inputs: [] }, - { type: "error", name: "ErrInvalidConnectionState", inputs: [] }, - { type: "error", name: "ErrInvalidPacketCommitment", inputs: [] }, - { type: "error", name: "ErrInvalidProof", inputs: [] }, - { type: "error", name: "ErrInvalidTimeoutHeight", inputs: [] }, - { type: "error", name: "ErrInvalidTimeoutTimestamp", inputs: [] }, - { type: "error", name: "ErrLatestHeightNotFound", inputs: [] }, - { type: "error", name: "ErrLatestTimestampNotFound", inputs: [] }, - { type: "error", name: "ErrModuleNotFound", inputs: [] }, - { type: "error", name: "ErrNextSequenceMustBeGreaterThanTimeoutSequence", inputs: [] }, - { type: "error", name: "ErrPacketAlreadyReceived", inputs: [] }, - { type: "error", name: "ErrPacketCommitmentNotFound", inputs: [] }, - { type: "error", name: "ErrPacketSequenceNextSequenceMismatch", inputs: [] }, - { type: "error", name: "ErrPacketWithoutTimeout", inputs: [] }, - { type: "error", name: "ErrSourceAndCounterpartyChannelMismatch", inputs: [] }, - { type: "error", name: "ErrSourceAndCounterpartyPortMismatch", inputs: [] }, - { type: "error", name: "ErrTimeoutHeightNotReached", inputs: [] }, - { type: "error", name: "ErrTimeoutTimestampNotReached", inputs: [] }, - { type: "error", name: "ErrTimestampTimeout", inputs: [] }, - { type: "error", name: "ErrUnauthorized", inputs: [] }, - { type: "error", name: "ErrUnknownChannelOrdering", inputs: [] }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "capabilities", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "channels", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [ - { name: "state", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.State" }, - { name: "ordering", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "connectionOpenAck", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenAck", - components: [ - { name: "connectionId", type: "string", internalType: "string" }, - { name: "clientStateBytes", type: "bytes", internalType: "bytes" }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenConfirm", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenConfirm", - components: [ - { name: "connectionId", type: "string", internalType: "string" }, - { name: "proofAck", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenInit", - components: [ - { name: "clientId", type: "string", internalType: "string" }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.Data", - components: [ - { name: "identifier", type: "string", internalType: "string" }, - { name: "features", type: "string[]", internalType: "string[]" } - ] - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delayPeriod", type: "uint64", internalType: "uint64" } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenTry", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenTry", - components: [ - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.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: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connections", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "state", type: "uint8", internalType: "enum IbcCoreConnectionV1GlobalEnums.State" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delay_period", type: "uint64", internalType: "uint64" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [{ name: "clientId", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "contract ILightClient" }], - stateMutability: "view" - }, - { - type: "function", - name: "getCompatibleVersions", - inputs: [], - outputs: [ - { - name: "", - type: "tuple[]", - internalType: "struct IbcCoreConnectionV1Version.Data[]", - components: [ - { name: "identifier", type: "string", internalType: "string" }, - { name: "features", type: "string[]", internalType: "string[]" } - ] - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "event", - name: "ConnectionOpenAck", - inputs: [ - { name: "connectionId", type: "string", indexed: false, internalType: "string" }, - { name: "clientId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyClientId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyConnectionId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ConnectionOpenConfirm", - inputs: [ - { name: "connectionId", type: "string", indexed: false, internalType: "string" }, - { name: "clientId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyClientId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyConnectionId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ConnectionOpenInit", - inputs: [ - { name: "connectionId", type: "string", indexed: false, internalType: "string" }, - { name: "clientId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyClientId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ConnectionOpenTry", - inputs: [ - { name: "connectionId", type: "string", indexed: false, internalType: "string" }, - { name: "clientId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyClientId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyConnectionId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { type: "error", name: "ErrClientNotFound", inputs: [] }, - { type: "error", name: "ErrConnectionAlreadyExists", inputs: [] }, - { type: "error", name: "ErrInvalidConnectionState", inputs: [] }, - { type: "error", name: "ErrInvalidProof", inputs: [] }, - { type: "error", name: "ErrNoCounterpartyVersion", inputs: [] }, - { type: "error", name: "ErrUnsupportedVersion", inputs: [] }, - { type: "error", name: "ErrValidateSelfClient", inputs: [] }, - { type: "error", name: "ErrVersionMustBeUnset", inputs: [] }, - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "UPGRADE_INTERFACE_VERSION", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "acknowledgePacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketAcknowledgement", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "acknowledgement", type: "bytes", internalType: "bytes" }, - { name: "proof", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "capabilities", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "channelCapabilityPath", - inputs: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "pure" - }, - { - type: "function", - name: "channelCloseConfirm", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.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: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.MsgChannelOpenInit", - components: [ - { name: "portId", type: "string", internalType: "string" }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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" } - ] - } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channelOpenTry", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelOpenTry", - components: [ - { name: "portId", type: "string", internalType: "string" }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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: "counterpartyVersion", type: "string", internalType: "string" }, - { name: "proofInit", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channels", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [ - { name: "state", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.State" }, - { name: "ordering", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "connectionOpenAck", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenAck", - components: [ - { name: "connectionId", type: "string", internalType: "string" }, - { name: "clientStateBytes", type: "bytes", internalType: "bytes" }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenConfirm", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenConfirm", - components: [ - { name: "connectionId", type: "string", internalType: "string" }, - { name: "proofAck", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.MsgConnectionOpenInit", - components: [ - { name: "clientId", type: "string", internalType: "string" }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.Data", - components: [ - { name: "identifier", type: "string", internalType: "string" }, - { name: "features", type: "string[]", internalType: "string[]" } - ] - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delayPeriod", type: "uint64", internalType: "uint64" } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenTry", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenTry", - components: [ - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.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: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connections", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "state", type: "uint8", internalType: "enum IbcCoreConnectionV1GlobalEnums.State" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delay_period", type: "uint64", internalType: "uint64" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "createClient", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgCreateClient", - components: [ - { name: "clientType", type: "string", internalType: "string" }, - { name: "clientStateBytes", type: "bytes", internalType: "bytes" }, - { name: "consensusStateBytes", 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: "struct IbcCoreChannelV1Channel.Data", - components: [ - { name: "state", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.State" }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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" } - ] - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [{ name: "clientId", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "contract ILightClient" }], - stateMutability: "view" - }, - { - type: "function", - name: "getConnection", - inputs: [{ name: "connectionId", type: "string", internalType: "string" }], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct IbcCoreConnectionV1ConnectionEnd.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { - name: "versions", - type: "tuple[]", - internalType: "struct IbcCoreConnectionV1Version.Data[]", - components: [ - { name: "identifier", type: "string", internalType: "string" }, - { name: "features", type: "string[]", internalType: "string[]" } - ] - }, - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreConnectionV1GlobalEnums.State" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delay_period", type: "uint64", internalType: "uint64" } - ] - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "initialize", - inputs: [ - { name: "ibcClient", type: "address", internalType: "address" }, - { name: "ibcConnection", type: "address", internalType: "address" }, - { name: "ibcChannel", type: "address", internalType: "address" }, - { name: "ibcPacket", type: "address", internalType: "address" }, - { name: "admin", type: "address", internalType: "address" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "paused", - inputs: [], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view" - }, - { - type: "function", - name: "proxiableUUID", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "recvPacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketRecv", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "proof", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "contract ILightClient" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "sendPacket", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { - name: "", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "timeoutPacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketTimeout", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "proof", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "transferOwnership", - inputs: [{ name: "newOwner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "updateClient", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgUpdateClient", - components: [ - { name: "clientId", type: "string", internalType: "string" }, - { name: "clientMessage", type: "bytes", internalType: "bytes" } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "upgradeToAndCall", - inputs: [ - { name: "newImplementation", type: "address", internalType: "address" }, - { name: "data", type: "bytes", internalType: "bytes" } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "writeAcknowledgement", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "", type: "bytes", internalType: "bytes" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "Initialized", - inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }], - anonymous: false - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { name: "previousOwner", type: "address", indexed: true, internalType: "address" }, - { name: "newOwner", type: "address", indexed: true, internalType: "address" } - ], - anonymous: false - }, - { - type: "event", - name: "Paused", - inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], - anonymous: false - }, - { - type: "event", - name: "Unpaused", - inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], - anonymous: false - }, - { - type: "event", - name: "Upgraded", - inputs: [{ name: "implementation", type: "address", indexed: true, internalType: "address" }], - anonymous: false - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [{ name: "target", type: "address", internalType: "address" }] - }, - { - type: "error", - name: "ERC1967InvalidImplementation", - inputs: [{ name: "implementation", type: "address", internalType: "address" }] - }, - { type: "error", name: "ERC1967NonPayable", inputs: [] }, - { type: "error", name: "EnforcedPause", inputs: [] }, - { type: "error", name: "ErrClientNotFound", inputs: [] }, - { type: "error", name: "ExpectedPause", inputs: [] }, - { type: "error", name: "FailedInnerCall", inputs: [] }, - { type: "error", name: "InvalidInitialization", inputs: [] }, - { type: "error", name: "NotInitializing", inputs: [] }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [{ name: "owner", type: "address", internalType: "address" }] - }, - { - type: "error", - name: "OwnableUnauthorizedAccount", - inputs: [{ name: "account", type: "address", internalType: "address" }] - }, - { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, - { - type: "error", - name: "UUPSUnsupportedProxiableUUID", - inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }] - }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "capabilities", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "channelCapabilityPath", - inputs: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "pure" - }, - { - type: "function", - name: "channelCloseConfirm", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelCloseInit", - components: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channelOpenAck", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelOpenInit", - components: [ - { name: "portId", type: "string", internalType: "string" }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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" } - ] - } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channelOpenTry", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelOpenTry", - components: [ - { name: "portId", type: "string", internalType: "string" }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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: "counterpartyVersion", type: "string", internalType: "string" }, - { name: "proofInit", type: "bytes", internalType: "bytes" }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - } - ] - } - ], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channels", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [ - { name: "state", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.State" }, - { name: "ordering", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "connections", - inputs: [{ name: "", type: "string", internalType: "string" }], - outputs: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "state", type: "uint8", internalType: "enum IbcCoreConnectionV1GlobalEnums.State" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { name: "client_id", type: "string", internalType: "string" }, - { name: "connection_id", type: "string", internalType: "string" }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [{ name: "key_prefix", type: "bytes", internalType: "bytes" }] - } - ] - }, - { name: "delay_period", type: "uint64", internalType: "uint64" } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [{ name: "clientId", type: "string", internalType: "string" }], - outputs: [{ name: "", type: "address", internalType: "contract ILightClient" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "event", - name: "ChannelCloseConfirm", - inputs: [ - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "portId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelCloseInit", - inputs: [ - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "portId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenAck", - inputs: [ - { name: "portId", type: "string", indexed: false, internalType: "string" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyPortId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyChannelId", type: "string", indexed: false, internalType: "string" }, - { name: "connectionId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenConfirm", - inputs: [ - { name: "portId", type: "string", indexed: false, internalType: "string" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyPortId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyChannelId", type: "string", indexed: false, internalType: "string" }, - { name: "connectionId", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenInit", - inputs: [ - { name: "portId", type: "string", indexed: false, internalType: "string" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyPortId", type: "string", indexed: false, internalType: "string" }, - { name: "connectionId", type: "string", indexed: false, internalType: "string" }, - { name: "version", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenTry", - inputs: [ - { name: "portId", type: "string", indexed: false, internalType: "string" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyPortId", type: "string", indexed: false, internalType: "string" }, - { name: "counterpartyChannelId", type: "string", indexed: false, internalType: "string" }, - { name: "connectionId", type: "string", indexed: false, internalType: "string" }, - { name: "version", type: "string", indexed: false, internalType: "string" } - ], - anonymous: false - }, - { type: "error", name: "ErrCapabilityAlreadyClaimed", inputs: [] }, - { type: "error", name: "ErrClientNotFound", inputs: [] }, - { type: "error", name: "ErrConnNotSingleHop", inputs: [] }, - { type: "error", name: "ErrConnNotSingleVersion", inputs: [] }, - { type: "error", name: "ErrCounterpartyChannelNotEmpty", inputs: [] }, - { type: "error", name: "ErrInvalidChannelState", inputs: [] }, - { type: "error", name: "ErrInvalidConnectionState", inputs: [] }, - { type: "error", name: "ErrInvalidHexAddress", inputs: [] }, - { type: "error", name: "ErrInvalidProof", inputs: [] }, - { type: "error", name: "ErrUnsupportedFeature", inputs: [] } -] as const diff --git a/typescript-sdk/src/abi/berachain/ucs-01.ts b/typescript-sdk/src/abi/berachain/ucs-01.ts deleted file mode 100644 index 2f693a5d0b..0000000000 --- a/typescript-sdk/src/abi/berachain/ucs-01.ts +++ /dev/null @@ -1,810 +0,0 @@ -export const ucs01Abi = [ - { - type: "function", - name: "getDenomAddress", - inputs: [ - { name: "sourceChannel", type: "string", internalType: "string" }, - { name: "denom", type: "string", internalType: "string" } - ], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "getOutstanding", - inputs: [ - { name: "sourceChannel", type: "string", internalType: "string" }, - { name: "token", type: "address", internalType: "address" } - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view" - }, - { - type: "function", - name: "onAcknowledgementPacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "acknowledgement", type: "bytes", internalType: "bytes" }, - { name: "relayer", type: "address", internalType: "address" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanCloseConfirm", - inputs: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanCloseInit", - inputs: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanOpenAck", - inputs: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" }, - { name: "counterpartyChannelId", type: "string", internalType: "string" }, - { name: "counterpartyVersion", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanOpenConfirm", - inputs: [ - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanOpenInit", - inputs: [ - { name: "", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { name: "connectionHops", type: "string[]", internalType: "string[]" }, - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanOpenTry", - inputs: [ - { name: "", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { name: "connectionHops", type: "string[]", internalType: "string[]" }, - { name: "portId", type: "string", internalType: "string" }, - { name: "channelId", type: "string", internalType: "string" }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" }, - { name: "counterpartyVersion", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onRecvPacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "relayer", type: "address", internalType: "address" } - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onTimeoutPacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "relayer", type: "address", internalType: "address" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "send", - inputs: [ - { name: "sourceChannel", type: "string", internalType: "string" }, - { name: "receiver", type: "bytes", internalType: "bytes" }, - { - name: "tokens", - type: "tuple[]", - internalType: "struct LocalToken[]", - components: [ - { name: "denom", type: "address", internalType: "address" }, - { name: "amount", type: "uint128", internalType: "uint128" } - ] - }, - { name: "extension", type: "string", internalType: "string" }, - { - name: "timeoutHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "function", - name: "UPGRADE_INTERFACE_VERSION", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "function", - name: "getDenomAddress", - inputs: [ - { name: "sourceChannel", type: "string", internalType: "string" }, - { name: "denom", type: "string", internalType: "string" } - ], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "getOutstanding", - inputs: [ - { name: "sourceChannel", type: "string", internalType: "string" }, - { name: "token", type: "address", internalType: "address" } - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view" - }, - { - type: "function", - name: "ibcAddress", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "initialize", - inputs: [ - { name: "_ibcHandler", type: "address", internalType: "contract IIBCPacket" }, - { name: "admin", type: "address", internalType: "address" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onAcknowledgementPacket", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "acknowledgement", type: "bytes", internalType: "bytes" }, - { name: "", type: "address", internalType: "address" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanCloseConfirm", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanCloseInit", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanOpenAck", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" }, - { name: "counterpartyVersion", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanOpenConfirm", - inputs: [ - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanOpenInit", - inputs: [ - { name: "order", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { name: "", type: "string[]", internalType: "string[]" }, - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" }, - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanOpenTry", - inputs: [ - { name: "order", type: "uint8", internalType: "enum IbcCoreChannelV1GlobalEnums.Order" }, - { name: "", type: "string[]", internalType: "string[]" }, - { name: "", type: "string", internalType: "string" }, - { name: "", type: "string", internalType: "string" }, - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { name: "port_id", type: "string", internalType: "string" }, - { name: "channel_id", type: "string", internalType: "string" } - ] - }, - { name: "version", type: "string", internalType: "string" }, - { name: "counterpartyVersion", type: "string", internalType: "string" } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onRecvPacket", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "relayer", type: "address", internalType: "address" } - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onRecvPacketProcessing", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "", type: "address", internalType: "address" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onTimeoutPacket", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { name: "sequence", type: "uint64", internalType: "uint64" }, - { name: "source_port", type: "string", internalType: "string" }, - { name: "source_channel", type: "string", internalType: "string" }, - { name: "destination_port", type: "string", internalType: "string" }, - { name: "destination_channel", type: "string", internalType: "string" }, - { name: "data", type: "bytes", internalType: "bytes" }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeout_timestamp", type: "uint64", internalType: "uint64" } - ] - }, - { name: "", type: "address", internalType: "address" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view" - }, - { - type: "function", - name: "paused", - inputs: [], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view" - }, - { - type: "function", - name: "proxiableUUID", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view" - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "send", - inputs: [ - { name: "sourceChannel", type: "string", internalType: "string" }, - { name: "receiver", type: "bytes", internalType: "bytes" }, - { - name: "tokens", - type: "tuple[]", - internalType: "struct LocalToken[]", - components: [ - { name: "denom", type: "address", internalType: "address" }, - { name: "amount", type: "uint128", internalType: "uint128" } - ] - }, - { name: "extension", type: "string", internalType: "string" }, - { - name: "timeoutHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { name: "revision_number", type: "uint64", internalType: "uint64" }, - { name: "revision_height", type: "uint64", internalType: "uint64" } - ] - }, - { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "transferOwnership", - inputs: [{ name: "newOwner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "upgradeToAndCall", - inputs: [ - { name: "newImplementation", type: "address", internalType: "address" }, - { name: "data", type: "bytes", internalType: "bytes" } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "event", - name: "DenomCreated", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: true, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: false, internalType: "address" } - ], - anonymous: false - }, - { - type: "event", - name: "Initialized", - inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }], - anonymous: false - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { name: "previousOwner", type: "address", indexed: true, internalType: "address" }, - { name: "newOwner", type: "address", indexed: true, internalType: "address" } - ], - anonymous: false - }, - { - type: "event", - name: "Paused", - inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], - anonymous: false - }, - { - type: "event", - name: "Received", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: false, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "sender", type: "string", indexed: false, internalType: "string" }, - { name: "receiver", type: "address", indexed: true, internalType: "address" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: true, internalType: "address" }, - { name: "amount", type: "uint256", indexed: false, internalType: "uint256" } - ], - anonymous: false - }, - { - type: "event", - name: "Refunded", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: false, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "sender", type: "address", indexed: true, internalType: "address" }, - { name: "receiver", type: "string", indexed: false, internalType: "string" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: true, internalType: "address" }, - { name: "amount", type: "uint256", indexed: false, internalType: "uint256" } - ], - anonymous: false - }, - { - type: "event", - name: "Sent", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: false, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "sender", type: "address", indexed: true, internalType: "address" }, - { name: "receiver", type: "string", indexed: false, internalType: "string" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: true, internalType: "address" }, - { name: "amount", type: "uint256", indexed: false, internalType: "uint256" } - ], - anonymous: false - }, - { - type: "event", - name: "Unpaused", - inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], - anonymous: false - }, - { - type: "event", - name: "Upgraded", - inputs: [{ name: "implementation", type: "address", indexed: true, internalType: "address" }], - anonymous: false - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [{ name: "target", type: "address", internalType: "address" }] - }, - { - type: "error", - name: "AddressInsufficientBalance", - inputs: [{ name: "account", type: "address", internalType: "address" }] - }, - { - type: "error", - name: "ERC1967InvalidImplementation", - inputs: [{ name: "implementation", type: "address", internalType: "address" }] - }, - { type: "error", name: "ERC1967NonPayable", inputs: [] }, - { type: "error", name: "EnforcedPause", inputs: [] }, - { type: "error", name: "ErrInvalidAcknowledgement", inputs: [] }, - { type: "error", name: "ErrInvalidBytesAddress", inputs: [] }, - { type: "error", name: "ErrInvalidCounterpartyProtocolVersion", inputs: [] }, - { type: "error", name: "ErrInvalidHexAddress", inputs: [] }, - { type: "error", name: "ErrInvalidProtocolOrdering", inputs: [] }, - { type: "error", name: "ErrInvalidProtocolVersion", inputs: [] }, - { type: "error", name: "ErrNotIBC", inputs: [] }, - { type: "error", name: "ErrUnauthorized", inputs: [] }, - { type: "error", name: "ErrUnstoppable", inputs: [] }, - { type: "error", name: "ExpectedPause", inputs: [] }, - { type: "error", name: "FailedInnerCall", inputs: [] }, - { type: "error", name: "InvalidInitialization", inputs: [] }, - { type: "error", name: "NotInitializing", inputs: [] }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [{ name: "owner", type: "address", internalType: "address" }] - }, - { - type: "error", - name: "OwnableUnauthorizedAccount", - inputs: [{ name: "account", type: "address", internalType: "address" }] - }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [{ name: "token", type: "address", internalType: "address" }] - }, - { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, - { - type: "error", - name: "UUPSUnsupportedProxiableUUID", - inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }] - }, - { - type: "function", - name: "ACK_FAILURE", - inputs: [], - outputs: [{ name: "", type: "bytes1", internalType: "bytes1" }], - stateMutability: "view" - }, - { - type: "function", - name: "ACK_LENGTH", - inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view" - }, - { - type: "function", - name: "ACK_SUCCESS", - inputs: [], - outputs: [{ name: "", type: "bytes1", internalType: "bytes1" }], - stateMutability: "view" - }, - { - type: "function", - name: "ORDER", - inputs: [], - outputs: [ - { - name: "", - type: "IbcCoreChannelV1GlobalEnums.Order", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "VERSION", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view" - }, - { - type: "event", - name: "DenomCreated", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: true, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: false, internalType: "address" } - ], - anonymous: false - }, - { - type: "event", - name: "Received", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: false, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "sender", type: "string", indexed: false, internalType: "string" }, - { name: "receiver", type: "address", indexed: true, internalType: "address" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: true, internalType: "address" }, - { name: "amount", type: "uint256", indexed: false, internalType: "uint256" } - ], - anonymous: false - }, - { - type: "event", - name: "Refunded", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: false, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "sender", type: "address", indexed: true, internalType: "address" }, - { name: "receiver", type: "string", indexed: false, internalType: "string" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: true, internalType: "address" }, - { name: "amount", type: "uint256", indexed: false, internalType: "uint256" } - ], - anonymous: false - }, - { - type: "event", - name: "Sent", - inputs: [ - { name: "packetSequence", type: "uint64", indexed: false, internalType: "uint64" }, - { name: "channelId", type: "string", indexed: false, internalType: "string" }, - { name: "sender", type: "address", indexed: true, internalType: "address" }, - { name: "receiver", type: "string", indexed: false, internalType: "string" }, - { name: "denom", type: "string", indexed: false, internalType: "string" }, - { name: "token", type: "address", indexed: true, internalType: "address" }, - { name: "amount", type: "uint256", indexed: false, internalType: "uint256" } - ], - anonymous: false - }, - { type: "error", name: "ErrInvalidAcknowledgement", inputs: [] }, - { type: "error", name: "ErrInvalidBytesAddress", inputs: [] }, - { type: "error", name: "ErrInvalidCounterpartyProtocolVersion", inputs: [] }, - { type: "error", name: "ErrInvalidProtocolOrdering", inputs: [] }, - { type: "error", name: "ErrInvalidProtocolVersion", inputs: [] }, - { type: "error", name: "ErrUnauthorized", inputs: [] }, - { type: "error", name: "ErrUnstoppable", inputs: [] } -] as const diff --git a/typescript-sdk/src/abi/ibc-handler.ts b/typescript-sdk/src/abi/ibc-handler.ts deleted file mode 100644 index c1891c5deb..0000000000 --- a/typescript-sdk/src/abi/ibc-handler.ts +++ /dev/null @@ -1,5272 +0,0 @@ -export const ibcHandlerAbi = [ - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "capabilities", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "channels", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { - name: "port_id", - type: "string", - internalType: "string" - }, - { - name: "channel_id", - type: "string", - internalType: "string" - } - ] - }, - { - name: "version", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "connections", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreConnectionV1GlobalEnums.State" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delay_period", - type: "uint64", - internalType: "uint64" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "createClient", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgCreateClient", - components: [ - { - name: "clientType", - type: "string", - internalType: "string" - }, - { - name: "clientStateBytes", - type: "bytes", - internalType: "bytes" - }, - { - name: "consensusStateBytes", - type: "bytes", - internalType: "bytes" - } - ] - } - ], - outputs: [ - { - name: "clientId", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "getClient", - inputs: [ - { - name: "clientId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ILightClient" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "registerClient", - inputs: [ - { - name: "clientType", - type: "string", - internalType: "string" - }, - { - name: "client", - type: "address", - internalType: "contract ILightClient" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "updateClient", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgUpdateClient", - components: [ - { - name: "clientId", - type: "string", - internalType: "string" - }, - { - name: "clientMessage", - type: "bytes", - internalType: "bytes" - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "ClientCreated", - inputs: [ - { - name: "clientId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ClientRegistered", - inputs: [ - { - name: "clientType", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "clientAddress", - type: "address", - indexed: false, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "ClientUpdated", - inputs: [ - { - name: "clientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "height", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ], - anonymous: false - }, - { - type: "error", - name: "ErrClientMustNotBeSelf", - inputs: [] - }, - { - type: "error", - name: "ErrClientNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrClientTypeAlreadyExists", - inputs: [] - }, - { - type: "error", - name: "ErrClientTypeNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrFailedToCreateClient", - inputs: [] - }, - { - type: "error", - name: "ErrFailedToUpdateClient", - inputs: [] - }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "acknowledgePacket", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketAcknowledgement", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "acknowledgement", - type: "bytes", - internalType: "bytes" - }, - { - name: "proof", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "capabilities", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "channelCapabilityPath", - inputs: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channelId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "channels", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { - name: "port_id", - type: "string", - internalType: "string" - }, - { - name: "channel_id", - type: "string", - internalType: "string" - } - ] - }, - { - name: "version", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "connections", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreConnectionV1GlobalEnums.State" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delay_period", - type: "uint64", - internalType: "uint64" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [ - { - name: "clientId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ILightClient" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "recvPacket", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketRecv", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "proof", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "sendPacket", - inputs: [ - { - name: "sourceChannel", - type: "string", - internalType: "string" - }, - { - name: "timeoutHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeoutTimestamp", - type: "uint64", - internalType: "uint64" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "", - type: "uint64", - internalType: "uint64" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "timeoutPacket", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketTimeout", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "proof", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "writeAcknowledgement", - inputs: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "acknowledgement", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "AcknowledgePacket", - inputs: [ - { - name: "packet", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "acknowledgement", - type: "bytes", - indexed: false, - internalType: "bytes" - } - ], - anonymous: false - }, - { - type: "event", - name: "RecvPacket", - inputs: [ - { - name: "packet", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - 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: "struct IbcCoreClientV1Height.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: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - } - ], - anonymous: false - }, - { - type: "event", - name: "WriteAcknowledgement", - inputs: [ - { - name: "packet", - type: "tuple", - indexed: false, - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "acknowledgement", - type: "bytes", - indexed: false, - internalType: "bytes" - } - ], - anonymous: false - }, - { - type: "error", - name: "ErrAcknowledgementAlreadyExists", - inputs: [] - }, - { - type: "error", - name: "ErrAcknowledgementIsEmpty", - inputs: [] - }, - { - type: "error", - name: "ErrClientNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrDestinationAndCounterpartyChannelMismatch", - inputs: [] - }, - { - type: "error", - name: "ErrDestinationAndCounterpartyPortMismatch", - inputs: [] - }, - { - type: "error", - name: "ErrHeightTimeout", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidChannelState", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidConnectionState", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidPacketCommitment", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidProof", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidTimeoutHeight", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidTimeoutTimestamp", - inputs: [] - }, - { - type: "error", - name: "ErrLatestHeightNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrLatestTimestampNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrModuleNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrNextSequenceMustBeGreaterThanTimeoutSequence", - inputs: [] - }, - { - type: "error", - name: "ErrPacketAlreadyReceived", - inputs: [] - }, - { - type: "error", - name: "ErrPacketCommitmentNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrPacketSequenceNextSequenceMismatch", - inputs: [] - }, - { - type: "error", - name: "ErrPacketWithoutTimeout", - inputs: [] - }, - { - type: "error", - name: "ErrSourceAndCounterpartyChannelMismatch", - inputs: [] - }, - { - type: "error", - name: "ErrSourceAndCounterpartyPortMismatch", - inputs: [] - }, - { - type: "error", - name: "ErrTimeoutHeightNotReached", - inputs: [] - }, - { - type: "error", - name: "ErrTimeoutTimestampNotReached", - inputs: [] - }, - { - type: "error", - name: "ErrTimestampTimeout", - inputs: [] - }, - { - type: "error", - name: "ErrUnauthorized", - inputs: [] - }, - { - type: "error", - name: "ErrUnknownChannelOrdering", - inputs: [] - }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "capabilities", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "channels", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { - name: "port_id", - type: "string", - internalType: "string" - }, - { - name: "channel_id", - type: "string", - internalType: "string" - } - ] - }, - { - name: "version", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "connectionOpenAck", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenAck", - components: [ - { - name: "connectionId", - type: "string", - internalType: "string" - }, - { - name: "clientStateBytes", - type: "bytes", - internalType: "bytes" - }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenConfirm", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenConfirm", - components: [ - { - name: "connectionId", - type: "string", - internalType: "string" - }, - { - name: "proofAck", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenInit", - components: [ - { - name: "clientId", - type: "string", - internalType: "string" - }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.Data", - components: [ - { - name: "identifier", - type: "string", - internalType: "string" - }, - { - name: "features", - type: "string[]", - internalType: "string[]" - } - ] - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delayPeriod", - type: "uint64", - internalType: "uint64" - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenTry", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenTry", - components: [ - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.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: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connections", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreConnectionV1GlobalEnums.State" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delay_period", - type: "uint64", - internalType: "uint64" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [ - { - name: "clientId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ILightClient" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getCompatibleVersions", - inputs: [], - outputs: [ - { - name: "", - type: "tuple[]", - internalType: "struct IbcCoreConnectionV1Version.Data[]", - components: [ - { - name: "identifier", - type: "string", - internalType: "string" - }, - { - name: "features", - type: "string[]", - internalType: "string[]" - } - ] - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "event", - name: "ConnectionOpenAck", - inputs: [ - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "clientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyClientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyConnectionId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ConnectionOpenConfirm", - inputs: [ - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "clientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyClientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyConnectionId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ConnectionOpenInit", - inputs: [ - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "clientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyClientId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ConnectionOpenTry", - inputs: [ - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "clientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyClientId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyConnectionId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "error", - name: "ErrClientNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrConnectionAlreadyExists", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidConnectionState", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidProof", - inputs: [] - }, - { - type: "error", - name: "ErrNoCounterpartyVersion", - inputs: [] - }, - { - type: "error", - name: "ErrUnsupportedVersion", - inputs: [] - }, - { - type: "error", - name: "ErrValidateSelfClient", - inputs: [] - }, - { - type: "error", - name: "ErrVersionMustBeUnset", - inputs: [] - }, - { - type: "constructor", - inputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "UPGRADE_INTERFACE_VERSION", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "acknowledgePacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketAcknowledgement", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "acknowledgement", - type: "bytes", - internalType: "bytes" - }, - { - name: "proof", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "capabilities", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "channelCapabilityPath", - inputs: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channelId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "channelCloseConfirm", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.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: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.MsgChannelOpenInit", - components: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channelOpenTry", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelOpenTry", - components: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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: "counterpartyVersion", - type: "string", - internalType: "string" - }, - { - name: "proofInit", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channels", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { - name: "port_id", - type: "string", - internalType: "string" - }, - { - name: "channel_id", - type: "string", - internalType: "string" - } - ] - }, - { - name: "version", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "connectionOpenAck", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenAck", - components: [ - { - name: "connectionId", - type: "string", - internalType: "string" - }, - { - name: "clientStateBytes", - type: "bytes", - internalType: "bytes" - }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenConfirm", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenConfirm", - components: [ - { - name: "connectionId", - type: "string", - internalType: "string" - }, - { - name: "proofAck", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "struct IBCMsgs.MsgConnectionOpenInit", - components: [ - { - name: "clientId", - type: "string", - internalType: "string" - }, - { - name: "version", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Version.Data", - components: [ - { - name: "identifier", - type: "string", - internalType: "string" - }, - { - name: "features", - type: "string[]", - internalType: "string[]" - } - ] - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delayPeriod", - type: "uint64", - internalType: "uint64" - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connectionOpenTry", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgConnectionOpenTry", - components: [ - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.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: "struct IbcCoreConnectionV1Version.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: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "consensusHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "connections", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreConnectionV1GlobalEnums.State" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delay_period", - type: "uint64", - internalType: "uint64" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "createClient", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgCreateClient", - components: [ - { - name: "clientType", - type: "string", - internalType: "string" - }, - { - name: "clientStateBytes", - type: "bytes", - internalType: "bytes" - }, - { - name: "consensusStateBytes", - 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: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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" - } - ] - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [ - { - name: "clientId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ILightClient" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getConnection", - inputs: [ - { - name: "connectionId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct IbcCoreConnectionV1ConnectionEnd.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "versions", - type: "tuple[]", - internalType: "struct IbcCoreConnectionV1Version.Data[]", - components: [ - { - name: "identifier", - type: "string", - internalType: "string" - }, - { - name: "features", - type: "string[]", - internalType: "string[]" - } - ] - }, - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreConnectionV1GlobalEnums.State" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delay_period", - type: "uint64", - internalType: "uint64" - } - ] - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "initialize", - inputs: [ - { - name: "ibcClient", - type: "address", - internalType: "address" - }, - { - name: "ibcConnection", - type: "address", - internalType: "address" - }, - { - name: "ibcChannel", - type: "address", - internalType: "address" - }, - { - name: "ibcPacket", - type: "address", - internalType: "address" - }, - { - name: "admin", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "paused", - inputs: [], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "proxiableUUID", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "recvPacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketRecv", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "proof", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "contract ILightClient" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "sendPacket", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "timeoutPacket", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgPacketTimeout", - components: [ - { - name: "packet", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "proof", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.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: "transferOwnership", - inputs: [ - { - name: "newOwner", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "updateClient", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBCMsgs.MsgUpdateClient", - components: [ - { - name: "clientId", - type: "string", - internalType: "string" - }, - { - name: "clientMessage", - type: "bytes", - internalType: "bytes" - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "upgradeImpls", - inputs: [ - { - name: "_ibcClient", - type: "address", - internalType: "address" - }, - { - name: "_ibcConnection", - type: "address", - internalType: "address" - }, - { - name: "_ibcChannel", - type: "address", - internalType: "address" - }, - { - name: "_ibcPacket", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "upgradeToAndCall", - inputs: [ - { - name: "newImplementation", - type: "address", - internalType: "address" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "function", - name: "writeAcknowledgement", - inputs: [ - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "event", - name: "Initialized", - inputs: [ - { - name: "version", - type: "uint64", - indexed: false, - internalType: "uint64" - } - ], - anonymous: false - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Paused", - inputs: [ - { - name: "account", - type: "address", - indexed: false, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Unpaused", - inputs: [ - { - name: "account", - type: "address", - indexed: false, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Upgraded", - inputs: [ - { - name: "implementation", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [ - { - name: "target", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "ERC1967InvalidImplementation", - inputs: [ - { - name: "implementation", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "ERC1967NonPayable", - inputs: [] - }, - { - type: "error", - name: "EnforcedPause", - inputs: [] - }, - { - type: "error", - name: "ErrClientNotFound", - inputs: [] - }, - { - type: "error", - name: "ExpectedPause", - inputs: [] - }, - { - type: "error", - name: "FailedInnerCall", - inputs: [] - }, - { - type: "error", - name: "InvalidInitialization", - inputs: [] - }, - { - type: "error", - name: "NotInitializing", - inputs: [] - }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "OwnableUnauthorizedAccount", - inputs: [ - { - name: "account", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "UUPSUnauthorizedCallContext", - inputs: [] - }, - { - type: "error", - name: "UUPSUnsupportedProxiableUUID", - inputs: [ - { - name: "slot", - type: "bytes32", - internalType: "bytes32" - } - ] - }, - { - type: "function", - name: "COMMITMENT_PREFIX", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "capabilities", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "channelCapabilityPath", - inputs: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channelId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "channelCloseConfirm", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelCloseInit", - components: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channelId", - type: "string", - internalType: "string" - } - ] - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channelOpenAck", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.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: "struct IbcCoreClientV1Height.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: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelOpenInit", - components: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channelOpenTry", - inputs: [ - { - name: "msg_", - type: "tuple", - internalType: "struct IBCMsgs.MsgChannelOpenTry", - components: [ - { - name: "portId", - type: "string", - internalType: "string" - }, - { - name: "channel", - type: "tuple", - internalType: "struct IbcCoreChannelV1Channel.Data", - components: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.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: "counterpartyVersion", - type: "string", - internalType: "string" - }, - { - name: "proofInit", - type: "bytes", - internalType: "bytes" - }, - { - name: "proofHeight", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - } - ] - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "channels", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.State" - }, - { - name: "ordering", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { - name: "port_id", - type: "string", - internalType: "string" - }, - { - name: "channel_id", - type: "string", - internalType: "string" - } - ] - }, - { - name: "version", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientImpls", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientRegistry", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "clientTypes", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "commitments", - inputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "connections", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "state", - type: "uint8", - internalType: "enum IbcCoreConnectionV1GlobalEnums.State" - }, - { - name: "counterparty", - type: "tuple", - internalType: "struct IbcCoreConnectionV1Counterparty.Data", - components: [ - { - name: "client_id", - type: "string", - internalType: "string" - }, - { - name: "connection_id", - type: "string", - internalType: "string" - }, - { - name: "prefix", - type: "tuple", - internalType: "struct IbcCoreCommitmentV1MerklePrefix.Data", - components: [ - { - name: "key_prefix", - type: "bytes", - internalType: "bytes" - } - ] - } - ] - }, - { - name: "delay_period", - type: "uint64", - internalType: "uint64" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getClient", - inputs: [ - { - name: "clientId", - type: "string", - internalType: "string" - } - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ILightClient" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextChannelSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextClientSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "nextConnectionSequencePath", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "event", - name: "ChannelCloseConfirm", - inputs: [ - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "portId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelCloseInit", - inputs: [ - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "portId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenAck", - inputs: [ - { - name: "portId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyPortId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyChannelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenConfirm", - inputs: [ - { - name: "portId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyPortId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyChannelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenInit", - inputs: [ - { - name: "portId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyPortId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "version", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "event", - name: "ChannelOpenTry", - inputs: [ - { - name: "portId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyPortId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "counterpartyChannelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "connectionId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "version", - type: "string", - indexed: false, - internalType: "string" - } - ], - anonymous: false - }, - { - type: "error", - name: "ErrCapabilityAlreadyClaimed", - inputs: [] - }, - { - type: "error", - name: "ErrClientNotFound", - inputs: [] - }, - { - type: "error", - name: "ErrConnNotSingleHop", - inputs: [] - }, - { - type: "error", - name: "ErrConnNotSingleVersion", - inputs: [] - }, - { - type: "error", - name: "ErrCounterpartyChannelNotEmpty", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidChannelState", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidConnectionState", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidHexAddress", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidProof", - inputs: [] - }, - { - type: "error", - name: "ErrUnsupportedFeature", - inputs: [] - } -] as const diff --git a/typescript-sdk/src/mod.ts b/typescript-sdk/src/mod.ts index 0375f04275..32867e9e3b 100644 --- a/typescript-sdk/src/mod.ts +++ b/typescript-sdk/src/mod.ts @@ -1,4 +1,4 @@ -export * from "./v0/mod.ts" +import "./patch.ts" import { http, fallback, diff --git a/typescript-sdk/src/query/offchain/tenderly.ts b/typescript-sdk/src/query/offchain/tenderly.ts index 3a9a6fc9f2..f50b1107e3 100644 --- a/typescript-sdk/src/query/offchain/tenderly.ts +++ b/typescript-sdk/src/query/offchain/tenderly.ts @@ -1,6 +1,6 @@ import { ofetch } from "ofetch" +import { ucs01RelayAbi } from "../../abi/ucs-01.ts" import { bech32AddressToHex } from "../../convert.ts" -import { ucs01Abi } from "../../abi/berachain/ucs-01.ts" import { encodeFunctionData, getAddress, type Address } from "viem" const TENDERLY_URL = @@ -39,7 +39,7 @@ export async function simulateTransaction({ relayContractAddress: Address }) { const encodedFunctionData = encodeFunctionData({ - abi: ucs01Abi, + abi: ucs01RelayAbi, functionName: "send", args: [ sourceChannel, diff --git a/typescript-sdk/src/query/on-chain.ts b/typescript-sdk/src/query/on-chain.ts index d3b60799ad..96c59763dc 100644 --- a/typescript-sdk/src/query/on-chain.ts +++ b/typescript-sdk/src/query/on-chain.ts @@ -1,12 +1,10 @@ -import { Comet38Client } from "@cosmjs/tendermint-rpc" - type rpcUrlArgument = { rpcUrl: string } export type RpcQueryPath = "height" | "block" | "transaction" | "net_info" | "health" const queryHeaders = new Headers({ Accept: "application/json", - "Content-Type": "application/json", - "User-Agent": "typescript-sdk" + "User-Agent": "typescript-sdk", + "Content-Type": "application/json" }) export async function getCosmosHeight({ rpcUrl }: { rpcUrl: string }) { @@ -19,28 +17,30 @@ export async function getCosmosTransactionReceipt(params: { hash: string rpcUrl: string }) { - const client = await Comet38Client.connect(params.rpcUrl) - return await client.txSearch({ - query: `tx.hash='${params.hash}'` - }) + const url = `${params.rpcUrl}/tx_search?query="tx.hash='${params.hash}'"` + const response = await fetch(url, { headers: queryHeaders }) + return await response.json() } export async function getCosmosAccountTransactions({ address, rpcUrl }: { address: string } & rpcUrlArgument) { - const client = await Comet38Client.connect(rpcUrl) + const senderUrl = `${rpcUrl}/tx_search?query="transfer.sender='${address}'"` + const recipientUrl = `${rpcUrl}/tx_search?query="transfer.recipient='${address}'"` const [sent, received] = await Promise.all([ - client.txSearch({ - query: `transfer.sender='${address}'` - }), - client.txSearch({ - query: `transfer.recipient='${address}'` - }) + fetch(senderUrl, { headers: queryHeaders }) + .then(_ => _.json()) + .catch(), + fetch(recipientUrl, { headers: queryHeaders }) + .then(_ => _.json()) + .catch() ]) + return { sent, received, - total: sent.totalCount + received.totalCount + // @ts-expect-error + total: Number.parseInt(sent.result.total_count) + Number.parseInt(received.result.total_count) } } diff --git a/typescript-sdk/src/transfer/cosmos.ts b/typescript-sdk/src/transfer/cosmos.ts index 233c0b7714..0e705724f3 100644 --- a/typescript-sdk/src/transfer/cosmos.ts +++ b/typescript-sdk/src/transfer/cosmos.ts @@ -6,11 +6,11 @@ import { } from "@cosmjs/stargate" import type { Coin, + TransactionResponse, MessageTransferWithOptionals, OfflineSigner as CosmosOfflineSigner } from "../types.ts" import { timestamp } from "../utilities/index.ts" -import type { TransactionResponse } from "../types.ts" import { SigningCosmWasmClient, type ExecuteInstruction } from "@cosmjs/cosmwasm-stargate" /** @@ -60,7 +60,6 @@ export async function ibcTransfer({ signingClient.disconnect() return { success: true, data: response.transactionHash } } catch (error) { - console.error(error) return { success: false, data: error instanceof Error ? error.message : "An unknown error occurred" @@ -104,7 +103,6 @@ export async function ibcTransferSimulate({ signingClient.disconnect() return { success: true, data: gas.toString() } } catch (error) { - console.error(error) return { success: false, data: error instanceof Error ? error.message : "An unknown error occurred" @@ -140,7 +138,6 @@ export async function cosmwasmTransfer({ signingClient.disconnect() return { success: true, data: response.transactionHash } } catch (error) { - console.error(error) return { success: false, data: error instanceof Error ? error.message : "An unknown error occurred" @@ -189,7 +186,6 @@ export async function cosmwasmTransferSimulate({ signingClient.disconnect() return { success: true, data: gas.toString() } } catch (error) { - console.error(error) return { success: false, data: error instanceof Error ? error.message : "An unknown error occurred" @@ -244,7 +240,6 @@ export async function cosmosSameChainTransfer({ signingClient.disconnect() return { success: true, data: response.transactionHash } } catch (error) { - console.error(error) return { success: false, data: error instanceof Error ? error.message : "An unknown error occurred" diff --git a/typescript-sdk/src/transfer/evm.ts b/typescript-sdk/src/transfer/evm.ts index 6e87bc89c4..d532246da3 100644 --- a/typescript-sdk/src/transfer/evm.ts +++ b/typescript-sdk/src/transfer/evm.ts @@ -103,7 +103,6 @@ export async function transferAssetFromEvm( return { success: true, data: hash } } catch (error) { - console.error(JSON.stringify(error, undefined, 2)) return { success: false, data: error instanceof Error ? error.message : "Unknown error" @@ -158,7 +157,6 @@ export async function approveTransferAssetFromEvm( return { success: true, data: approveHash } } catch (error) { - console.error(JSON.stringify(error, undefined, 2)) return { success: false, data: error instanceof Error ? error.message : "Unknown error" @@ -206,7 +204,6 @@ export async function transferAssetFromEvmSimulate( }) return { success: true, data: gasEstimation.toString() } } catch (error) { - console.error(error) return { success: false, data: error instanceof Error ? error.message : "Unknown error" diff --git a/typescript-sdk/src/utilities/address.ts b/typescript-sdk/src/utilities/address.ts index 6bbcb4e023..34f35e3ba9 100644 --- a/typescript-sdk/src/utilities/address.ts +++ b/typescript-sdk/src/utilities/address.ts @@ -1,4 +1,4 @@ -import { fromBech32 } from "@cosmjs/encoding" +import { bech32 } from "@scure/base" import type { HexAddress, Bech32Address } from "../types.ts" export function isValidCosmosTxHash(hash: unknown): hash is string { @@ -18,8 +18,8 @@ export function isValidBech32Address(address: unknown): address is Bech32Address if (typeof address !== "string") return false try { - const { prefix: _, data } = fromBech32(address) - const size = data.length + const { prefix: _, words } = bech32.decode(address) + const size = words.length if ([20, 32].indexOf(size) === -1) return false return true diff --git a/typescript-sdk/src/v0/mod.ts b/typescript-sdk/src/v0/mod.ts deleted file mode 100644 index e47c11aba2..0000000000 --- a/typescript-sdk/src/v0/mod.ts +++ /dev/null @@ -1,391 +0,0 @@ -import "../patch.ts" -import { - erc20Abi, - type Hash, - type Address, - type Account, - publicActions, - type WalletClient, - type TransactionReceipt -} from "viem" -import type { - Coin, - AccountData, - Bech32Address, - ExtractParameters, - MessageTransferWithOptionals, - OfflineSigner as CosmosOfflineSigner, - Pretty -} from "../types.ts" -import { - GasPrice, - StargateClient, - type DeliverTxResponse, - type MsgTransferEncodeObject -} from "@cosmjs/stargate" -import { - type ExecuteResult, - SigningCosmWasmClient, - type ExecuteInstruction -} from "@cosmjs/cosmwasm-stargate" -import { raise } from "../utilities/index.ts" -import { ucs01RelayAbi } from "../abi/ucs-01.ts" -import { Comet38Client } from "@cosmjs/tendermint-rpc" -import { hexStringToUint8Array, bech32AddressToHex } from "../convert.ts" - -export interface IUnionClient { - rpcClient(): Promise - getCosmosSdkAccount(): Promise - simulateIbcMessageTransfers( - messageTransfers: Array - ): Promise - ibcMessageTransfers( - messageTransfers: Array - ): Promise - cosmwasmMessageExecuteContract(instructions: Array): Promise - approveEvmAssetTransfer(parameters: { - denomAddress: Address - amount: bigint - }): Promise - transferEvmAsset(parameters: { - receiver: string - denomAddress: Address - sourceChannel: string - amount: bigint - account: Account - relayContractAddress: Address - simulate?: boolean - waitForReceipt?: false - }): Promise<{ hash: Hash; receipt?: TransactionReceipt }> - transferAssets({ - kind - }: { kind: Kind } & (Kind extends "ibc" - ? { messageTransfers: Array } - : { instructions: Array })): Promise -} - -/** - * A client for interacting with Cosmos SDK-based chains, - * sending IBC messages and executing CosmWasm contracts. - * - * @example - * ```ts - * // Passing a private key or mnemonic directly - * const unionClient = await UnionClient.connectWithSecret({ - * bech32Prefix: "osmo", - * chainId: "osmo-test-5", - * gas: { denom: "uosmo", amount: "0.0025" }, - * rpcUrl: "https://rpc.testnet.osmosis.zone:443", - * secretType: "key", // can be "mnemonic" or "key" - * privateKeyOrMnemonic: "" - * }) - * - * const ibcMessageTransfer = await unionClient.ibcMessageTransfers([ - * { - * receiver: "union14qemq0vw6y3gc3u3e0aty2e764u4gs5lnxk4rv", - * sourcePort: "transfer", - * sourceChannel: "channel-7775", - * token: { denom: "uosmo", amount: "2" }, - * memo: "sending wrapped OSMO from Osmosis to Union", - * timeoutHeight: { revisionHeight: 88888888n, revisionNumber: 8n } - * } - * ]) - * - * console.info(ibcMessageTransfer.transactionHash) - * ``` - * @example - - * ```ts - * // Using browser wallet signer - * // Leap Wallet works too `window.leap?.` - * const offlineSigner = window.keplr?.getOfflineSigner('osmo-test-5', {}) - - * const unionClient = new UnionClient({ - * offlineSigner, - * bech32Prefix: "osmo", - * chainId: "osmo-test-5", - * gas: { denom: "uosmo", amount: "0.0025" }, - * rpcUrl: "https://rpc.testnet.osmosis.zone:443", - * }) - - * const ibcMessageTransfer = await unionClient.ibcMessageTransfers([ - * // ... - * ]) - - * console.info(ibcMessageTransfer.transactionHash) - * ``` - */ -export class UnionClient implements IUnionClient { - /** Cosmos */ - #rpcUrl: string - public chainId: string - public bech32Prefix: string - #cosmosOfflineSigner: CosmosOfflineSigner | undefined - #gas?: Coin - /** EVM */ - #evmSigner?: WalletClient - static #UCS01_ADDRESS: Address = "0xD0081080Ae8493cf7340458Eaf4412030df5FEEb" satisfies Address - static #UCS02_ADDRESS: Address = "0x9153952f174A1BcD7A9B3818Ff21Ecf918d4Dca9" satisfies Address - static #COMETBLS_ADDRESS: Address = "0x96979Ed96aE00d724109B5Ad859568e1239C0837" satisfies Address - static #IBC_HANDLER_ADDRESS: Address = - "0xa390514F803a3B318b93Bf6cd4beEB9f8299a0EB" satisfies Address - static #UNION_UCS01_ADDRESS = - "union1eumfw2ppz8cwl8xdh3upttzp5rdyms48kqhm30f8g9u4zwj0pprqg2vmu3" satisfies Bech32Address<"union"> - - constructor(arguments_: { - rpcUrl: string - chainId: string - bech32Prefix: string - cosmosOfflineSigner: CosmosOfflineSigner | undefined - privateKeyOrMnemonic?: string - gas?: Coin - evmSigner?: WalletClient - }) { - this.#rpcUrl = arguments_.rpcUrl - this.chainId = arguments_.chainId - this.bech32Prefix = arguments_.bech32Prefix - this.#cosmosOfflineSigner = arguments_.cosmosOfflineSigner - this.#gas = arguments_.gas - this.#evmSigner = arguments_.evmSigner - } - - #gasPrice = (gas = this.#gas) => GasPrice.fromString(`${gas?.amount}${gas?.denom}`) - - static getContractAddresses = () => ({ - sepolia: { - UCS01: this.#UCS01_ADDRESS, - UCS02: this.#UCS02_ADDRESS, - IBCHandler: this.#IBC_HANDLER_ADDRESS, - CometblsClient: this.#COMETBLS_ADDRESS - }, - union: { UCS01: this.#UNION_UCS01_ADDRESS } - }) - - /** - * Connect to the RPC client of the chain. - */ - public rpcClient = async (): Promise => await Comet38Client.connect(this.#rpcUrl) - - public getCosmosSdkOfflineSigner = () => - this.#cosmosOfflineSigner ?? raise("Cosmos signer not found") - - public stargateClient = async (): Promise => - await StargateClient.connect(this.#rpcUrl) - - static async connectWithSecret( - params: Required< - Omit, "cosmosOfflineSigner" | "evmSigner"> - > & { - secretType: "mnemonic" | "key" - evmSigner?: WalletClient - } - ): Promise { - if (!params.privateKeyOrMnemonic) throw new Error("privateKeyOrMnemonic is required") - let cosmosOfflineSigner: CosmosOfflineSigner - if (params.secretType === "key") { - const { DirectSecp256k1Wallet } = await import("@cosmjs/proto-signing") - cosmosOfflineSigner = await DirectSecp256k1Wallet.fromKey( - Uint8Array.from(hexStringToUint8Array(params.privateKeyOrMnemonic)), - params.bech32Prefix - ) - } else { - const { DirectSecp256k1HdWallet } = await import("@cosmjs/proto-signing") - cosmosOfflineSigner = await DirectSecp256k1HdWallet.fromMnemonic( - params.privateKeyOrMnemonic, - { prefix: params.bech32Prefix } - ) - } - return new UnionClient({ ...params, cosmosOfflineSigner }) - } - - async getCosmosSdkAccount(): Promise { - const [account] = await this.getCosmosSdkOfflineSigner().getAccounts() - if (!account) throw new Error("Account not found") - return account - } - - public async getCosmosSdkBalances(): Promise> { - const { address } = await this.getCosmosSdkAccount() - const stargateClient = await this.stargateClient() - const balances = await stargateClient.getAllBalances(address) - return balances - } - - protected getEvmAccount = (): Account => - this.#evmSigner?.account ?? raise("EVM account not found") - - public signingCosmWasmClient = async () => - await SigningCosmWasmClient.connectWithSigner(this.#rpcUrl, this.getCosmosSdkOfflineSigner(), { - gasPrice: this.#gasPrice() - }) - - public async simulateIbcMessageTransfers( - messageTransfers: Array - ): Promise { - const { address: signerAddress } = await this.getCosmosSdkAccount() - const cosmwasmClient = await this.signingCosmWasmClient() - const response = await cosmwasmClient.simulate( - signerAddress, - messageTransfers.map( - ({ sender = signerAddress, timeoutTimestamp = 0n, ...messageTransfer }) => ({ - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value: { sender, timeoutTimestamp, ...messageTransfer } - }) - ) satisfies Array, - "auto" - ) - return response - } - - /** - * Executes `/ibc.applications.transfer.v1.MsgTransfer`, accepts an array of `MessageTransfer`. - */ - public async ibcMessageTransfers( - messageTransfers: Array - ): Promise { - const { address: signerAddress } = await this.getCosmosSdkAccount() - const cosmwasmClient = await this.signingCosmWasmClient() - const response = await cosmwasmClient.signAndBroadcast( - signerAddress, - messageTransfers.map( - ({ sender = signerAddress, timeoutTimestamp = 0n, ...messageTransfer }) => ({ - typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", - value: { sender, timeoutTimestamp, ...messageTransfer } - }) - ) satisfies Array, - "auto" - ) - return response - } - - /** - * Executes `/cosmwasm.wasm.v1.MsgExecuteContract`, accepts an array of `ExecuteInstruction`. - */ - public async cosmwasmMessageExecuteContract( - instructions: Array - ): Promise { - const { address: signerAddress } = await this.getCosmosSdkAccount() - const cosmwasmClient = await this.signingCosmWasmClient() - const response = await cosmwasmClient.executeMultiple(signerAddress, instructions, "auto") - return response - } - - public async transferAssets( - params: { kind: Kind } & (Kind extends "ibc" - ? { - messageTransfers: Array> - } - : { instructions: Array }) - ): Promise { - if (params.kind === "ibc") { - return await this.ibcMessageTransfers( - ( - params as { - messageTransfers: Array - } - ).messageTransfers - ) - } - return await this.cosmwasmMessageExecuteContract( - (params as { instructions: Array }).instructions - ) - } - - async #getCurrentHeight() { - const client = await this.stargateClient() - return client.getHeight() - } - - public async approveEvmAssetTransfer({ - account, - denomAddress, - amount, - relayContractAddress - }: { - account?: Account - amount: bigint - denomAddress: Address - relayContractAddress: Address - }): Promise { - const signer = this.#evmSigner ?? raise("EVM signer not found") - return await signer.writeContract({ - abi: erc20Abi, - account: (account || signer.account) ?? raise("EVM account not found"), - chain: signer.chain, - address: denomAddress, - functionName: "approve", - args: [relayContractAddress, amount] - }) - } - - public async getEvmDenomAddress({ - denom, - relayContractAddress, - sourceChannel - }: { denom: string; relayContractAddress: Address; sourceChannel: string }) { - const signer = this.#evmSigner?.extend(publicActions) ?? raise("EVM signer not found") - - return await signer.readContract({ - abi: ucs01RelayAbi, - address: relayContractAddress, - functionName: "getDenomAddress", - args: [sourceChannel, `${relayContractAddress}/${sourceChannel}/${denom}`] - }) - } - - /** - * TODO: Add description - */ - public async transferEvmAsset({ - account, - receiver, - sourceChannel, - amount, - denomAddress, - relayContractAddress, - simulate = true, - waitForReceipt = false - }: Parameters[0]): Promise<{ - hash: Hash - receipt?: TransactionReceipt - }> { - const signer = this.#evmSigner ?? raise("EVM signer not found") - const currentUnionHeight = await this.#getCurrentHeight() - const writeContractParameters = { - account: (account || signer.account) ?? raise("EVM account not found"), - abi: ucs01RelayAbi, - chain: signer.chain, - /** - * @dev `send` function of UCS01 contract: https://github.com/unionlabs/union/blob/1b9e4a6551163e552d85405eb70917fdfdc14b55/evm/contracts/apps/ucs/01-relay/Relay.sol#L50-L56 - */ - functionName: "send", - address: relayContractAddress, - /** - * string calldata sourceChannel, - * bytes calldata receiver, - * LocalToken[] calldata tokens, - * IbcCoreClientV1Height.Data calldata timeoutHeight, - * uint64 timeoutTimestamp - */ - args: [ - sourceChannel, - bech32AddressToHex({ address: receiver }), - [{ denom: denomAddress, amount }], - "", - { revision_number: 9n, revision_height: BigInt(currentUnionHeight) + 100n }, - 0n - ] - } as const - if (!simulate) { - const hash = await signer.writeContract(writeContractParameters) - if (!waitForReceipt) return { hash } - const receipt = await signer.extend(publicActions).waitForTransactionReceipt({ hash }) - return { hash, receipt } - } - const { request } = await signer.extend(publicActions).simulateContract(writeContractParameters) - const hash = await signer.writeContract(request) - if (!waitForReceipt) return { hash } - const receipt = await signer.extend(publicActions).waitForTransactionReceipt({ hash }) - return { hash, receipt } - } -}