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/typescript-sdk/bun.lockb index e949ee787c..136e427cd1 100755 Binary files a/typescript-sdk/bun.lockb and b/typescript-sdk/bun.lockb differ diff --git a/typescript-sdk/package.json b/typescript-sdk/package.json index dd0bd76765..c0748f8dfa 100644 --- a/typescript-sdk/package.json +++ b/typescript-sdk/package.json @@ -23,27 +23,26 @@ }, "dependencies": { "@cosmjs/cosmwasm-stargate": "0.32.4", - "@cosmjs/encoding": "^0.32.4", - "@cosmjs/proto-signing": "^0.32.4", "@cosmjs/stargate": "0.32.4", - "@cosmjs/tendermint-rpc": "0.32.4", "ofetch": "^1.3.4", - "viem": "^2.18.8" + "viem": "^2.19.3" }, "devDependencies": { - "@arethetypeswrong/cli": "^0.15.3", + "@cosmjs/tendermint-rpc": "^0.32.4", + "@cosmjs/proto-signing": "^0.32.4", + "@arethetypeswrong/cli": "^0.15.4", "@cosmjs/amino": "0.32.4", "@scure/base": "^1.1.7", "@total-typescript/ts-reset": "^0.5.1", "@types/bun": "^1.1.6", - "@types/node": "^22.1.0", + "@types/node": "^22.2.0", "consola": "^3.2.3", "cosmjs-types": "^0.9.0", "jsr": "^0.13.1", "patch-package": "^8.0.0", - "tsx": "^4.16.5", + "tsx": "^4.17.0", "typescript": "^5.5.4", - "vite-tsconfig-paths": "^4.3.2", + "vite-tsconfig-paths": "^5.0.1", "vitest": "^2.0.5" }, "overrides": { diff --git a/typescript-sdk/playground/all.sh b/typescript-sdk/playground/all.sh old mode 100644 new mode 100755 index cff27232ea..2a4c3eb5e6 --- a/typescript-sdk/playground/all.sh +++ b/typescript-sdk/playground/all.sh @@ -6,5 +6,5 @@ # list all the files in the playground directory for file in playground/*.ts; do echo "$file" - # bun "$file" --private-key "1bdd5c2105f62c51d72c90d9e5ca6854a94337bcbcbb0b959846b85813d69380" || true + bun "$file" --private-key "1bdd5c2105f62c51d72c90d9e5ca6854a94337bcbcbb0b959846b85813d69380" || true done diff --git a/typescript-sdk/playground/arbitrum-to-union.ts b/typescript-sdk/playground/arbitrum-to-union.ts new file mode 100644 index 0000000000..639074b3a8 --- /dev/null +++ b/typescript-sdk/playground/arbitrum-to-union.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/arbitrum-to-union.ts --private-key "..."` */ + +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 LINK_CONTRACT_ADDRESS = "0xb1d4538b4571d411f07960ef2838ce337fe1e80e" + +try { + /** + * Calls Hubble, Union's indexer, to grab desired data that's always up-to-date. + */ + const { + data: [arbitrumInfo] + } = await offchainQuery.chain({ + chainId: `${arbitrumSepolia.id}`, + includeEndpoints: true, + includeContracts: true + }) + if (!arbitrumInfo) raise("Berachain info not found") + + const ucsConfiguration = arbitrumInfo.ucs1_configurations + ?.filter(config => 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 } - } -}