From 9e1f68e1545ceb5b5b3ac99817251111e092fde4 Mon Sep 17 00:00:00 2001 From: Eric Hegnes Date: Tue, 2 Sep 2025 12:21:16 -0400 Subject: [PATCH 001/111] feat(app,ts-sdk): add staking ui Signed-off-by: Eric Hegnes --- app2/examples/bond.ts | 85 +- .../components/layout/Sidebar/navigation.ts | 1 + app2/src/lib/components/ui/Label.svelte | 11 +- app2/src/lib/layers/live.ts | 8 + app2/src/lib/utils/snippets.svelte | 14 +- .../routes/explorer/transfers/+page.svelte | 2 +- app2/src/routes/stake/+page.svelte | 555 ++ ts-sdk-cosmos/src/Cosmos.ts | 6 +- ts-sdk-evm/src/internal/zkgmClient.ts | 2 + ts-sdk/src/Constants.ts | 12 +- ts-sdk/src/Indexer.ts | 37 - ts-sdk/src/Staking.ts | 332 + ts-sdk/src/Utils.ts | 25 +- ts-sdk/src/generated/graphql-env.d.ts | 5924 ++++++++++++++++- ts-sdk/src/generated/schema.graphql | 4507 ++----------- ts-sdk/src/graphql/fragments/ChainFragment.ts | 38 + ts-sdk/src/graphql/fragments/TokenFragment.ts | 36 + .../src/graphql/fragments/TracesFragment.ts | 14 + ts-sdk/src/index.ts | 7 + ts-sdk/src/schema/chain.ts | 7 + ts-sdk/src/schema/stake.ts | 186 + ts-sdk/src/schema/staking.ts | 38 - ts-sdk/src/schema/token.ts | 23 +- 23 files changed, 7607 insertions(+), 4263 deletions(-) create mode 100644 app2/src/routes/stake/+page.svelte create mode 100644 ts-sdk/src/Staking.ts create mode 100644 ts-sdk/src/graphql/fragments/ChainFragment.ts create mode 100644 ts-sdk/src/graphql/fragments/TokenFragment.ts create mode 100644 ts-sdk/src/graphql/fragments/TracesFragment.ts create mode 100644 ts-sdk/src/schema/stake.ts delete mode 100644 ts-sdk/src/schema/staking.ts diff --git a/app2/examples/bond.ts b/app2/examples/bond.ts index 15c32916af..9660c38106 100644 --- a/app2/examples/bond.ts +++ b/app2/examples/bond.ts @@ -22,12 +22,14 @@ import { ZkgmClientRequest, ZkgmIncomingMessage, } from "@unionlabs/sdk" +import { Cosmos } from "@unionlabs/sdk-cosmos" import { Evm, EvmZkgmClient } from "@unionlabs/sdk-evm" import { ChainRegistry } from "@unionlabs/sdk/ChainRegistry" import { EU_ERC20, EU_FROM_UNION_SOLVER_METADATA, EU_LST, + EU_STAKING_HUB, ON_ZKGM_CALL_PROXY, U_BANK, U_ERC20, @@ -48,42 +50,57 @@ const JsonFromBase64 = Schema.compose( const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") -const SOURCE_CHANNEL_ID = ChannelId.make(1) // FIXME -const UCS03_MINTER = Ucs05.EvmDisplay.make({ +const SOURCE_CHANNEL_ID = ChannelId.make(6) +const UCS03_EVM = Ucs05.EvmDisplay.make({ address: "0x5fbe74a283f7954f10aa04c2edf55578811aeb03", }) -const MIN_MINT_AMOUNT = 1n +const UCS03_MINTER_ON_UNION = Ucs05.CosmosDisplay.make({ + address: "union1t5awl707x54k6yyx7qfkuqp890dss2pqgwxh07cu44x5lrlvt4rs8hqmk0", +}) +const UCS03_ZKGM = Ucs05.CosmosDisplay.make({ + address: "union1336jj8ertl8h7rdvnz4dh5rqahd09cy0x43guhsxx6xyrztx292qpe64fh", +}) +const MIN_MINT_AMOUNT = (10n ** 18n) * 1_000n const VIEM_CHAIN = holesky const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const SENDER = Ucs05.EvmDisplay.make({ address: "0x06627714f3F17a701f7074a12C02847a5D2Ca487", }) -const EU_STAKING_HUB = Ucs05.CosmosDisplay.make({ - address: "union1eueueueu9var4yhdruyzkjcsh74xzeug6ckyy60hs0vcqnzql2hq0lxc2f", // FIXME -}) const VIEM_ACCOUNT = privateKeyToAccount( process.env.KEY as any, ) +const querySlippage = pipe( + Cosmos.queryContract( + EU_STAKING_HUB, + { + accounting_state: {}, + }, + ), + Effect.flatMap(Schema.decodeUnknown(Schema.Struct({ + total_bonded_native_tokens: Schema.BigInt, + total_issued_lst: Schema.BigInt, + total_reward_amount: Schema.BigInt, + redemption_rate: Schema.BigDecimal, + purchase_rate: Schema.BigDecimal, + }))), + Effect.provide(Cosmos.Client.Live("https://rpc.union-testnet-10.union.chain.kitchen")), +) + const sendBond = Effect.gen(function*() { const ethereumChain = yield* ChainRegistry.byUniversalId(ETHEREUM_CHAIN_ID) const unionChain = yield* ChainRegistry.byUniversalId(UNION_CHAIN_ID) - const eu_staking_hub = yield* Ucs05.anyDisplayToZkgm(EU_STAKING_HUB) - const on_zkgm_call_proxy = yield* Ucs05.anyDisplayToZkgm(ON_ZKGM_CALL_PROXY) - const ucs03_minter = yield* Ucs05.anyDisplayToZkgm(UCS03_MINTER) - const eu_lst = yield* Ucs05.anyDisplayToZkgm(EU_LST) - const tokenOrder = yield* TokenOrder.make({ source: ethereumChain, destination: unionChain, sender: SENDER, receiver: ON_ZKGM_CALL_PROXY, baseToken: U_ERC20, - baseAmount: 1n, + baseAmount: MIN_MINT_AMOUNT, quoteToken: U_BANK, - quoteAmount: 1n, + quoteAmount: MIN_MINT_AMOUNT, kind: "solve", metadata: U_TO_UNION_SOLVER_METADATA, version: 2, @@ -91,18 +108,20 @@ const sendBond = Effect.gen(function*() { const bondCall = yield* pipe( { - mint_to: on_zkgm_call_proxy, - min_mint_amount: MIN_MINT_AMOUNT, + bond: { + mint_to_address: ON_ZKGM_CALL_PROXY.address, + min_mint_amount: MIN_MINT_AMOUNT, + }, } as const, Schema.encode(JsonFromBase64), Effect.map((msg) => ({ - contract: eu_staking_hub, + contract: EU_STAKING_HUB.address, msg, funds: [{ denom: tokenOrder.quoteToken.address, amount: tokenOrder.quoteAmount, }], - call_action: "call_proxy", + call_action: "call_on_proxy_call", } as const)), Effect.flatMap(Schema.decode(HexFromJson)), Effect.map((contractCalldata) => @@ -117,12 +136,14 @@ const sendBond = Effect.gen(function*() { const increaseAllowanceCall = yield* pipe( { - spender: ucs03_minter, - amount: MIN_MINT_AMOUNT, + increase_allowance: { + spender: UCS03_MINTER_ON_UNION.address, + amount: MIN_MINT_AMOUNT, + }, } as const, Schema.encode(JsonFromBase64), Effect.map((msg) => ({ - contract: eu_lst, + contract: EU_LST.address, msg, funds: [], call_action: "direct", @@ -139,12 +160,15 @@ const sendBond = Effect.gen(function*() { ) const salt = yield* Utils.generateSalt("cosmos") + const timeout_timestamp = Utils.getTimeoutInNanoseconds24HoursFromNow() const sendCall = yield* pipe( TokenOrder.make({ source: unionChain, destination: ethereumChain, - sender: ON_ZKGM_CALL_PROXY, // FIXME: foundation multisig + sender: Ucs05.CosmosDisplay.make({ + address: "union1ylfrhs2y5zdj2394m6fxgpzrjav7le3z07jffq", + }), receiver: SENDER, baseToken: Token.Cw20.make({ address: EU_LST.address }), baseAmount: MIN_MINT_AMOUNT, @@ -156,16 +180,19 @@ const sendBond = Effect.gen(function*() { }), Effect.flatMap(TokenOrder.encodeV2), Effect.flatMap(Schema.encode(Ucs03.Ucs03WithInstructionFromHex)), - Effect.tap((instr) => Effect.log("instr:", instr)), + Effect.tap((instr) => Effect.log("instruction:", instr)), Effect.map((instruction) => ({ - path: 0n, - channel_id: 19, - salt, - instruction, + send: { + channel_id: 20, + timeout_height: 0n, + timeout_timestamp, + salt, + instruction, + }, } as const)), Effect.flatMap(Schema.encode(JsonFromBase64)), Effect.map((msg) => ({ - contract: ucs03_minter, + contract: UCS03_ZKGM.address, msg, funds: [], call_action: "direct", @@ -188,11 +215,13 @@ const sendBond = Effect.gen(function*() { sendCall, ]) + console.log("batch", JSON.stringify(batch, null, 2)) + const request = ZkgmClientRequest.make({ source: ethereumChain, destination: unionChain, channelId: SOURCE_CHANNEL_ID, - ucs03Address: UCS03_MINTER.address, + ucs03Address: UCS03_EVM.address, instruction: batch, }) diff --git a/app2/src/lib/components/layout/Sidebar/navigation.ts b/app2/src/lib/components/layout/Sidebar/navigation.ts index 1cc13e23b4..2b9d2cfbba 100644 --- a/app2/src/lib/components/layout/Sidebar/navigation.ts +++ b/app2/src/lib/components/layout/Sidebar/navigation.ts @@ -5,6 +5,7 @@ import GithubIcon from "$lib/components/icons/GithubIcon.svelte" import OutlineControlPointDuplicate from "$lib/components/icons/OutlineControlPointDuplicate.svelte" import SharpChannelsIcon from "$lib/components/icons/SharpChannelsIcon.svelte" import SharpDashboardIcon from "$lib/components/icons/SharpDashboardIcon.svelte" +import StakeIcon from "$lib/components/icons/SharpStakeIcon.svelte" import SharpTransferIcon from "$lib/components/icons/SharpTransferIcon.svelte" import TwitterIcon from "$lib/components/icons/TwitterIcon.svelte" import type { Component } from "svelte" diff --git a/app2/src/lib/components/ui/Label.svelte b/app2/src/lib/components/ui/Label.svelte index ac0d8cff98..cabc9697d5 100644 --- a/app2/src/lib/components/ui/Label.svelte +++ b/app2/src/lib/components/ui/Label.svelte @@ -4,13 +4,20 @@ import type { HTMLLabelAttributes } from "svelte/elements" interface Props extends HTMLLabelAttributes { children: Snippet + caseSensitive?: boolean | undefined class?: string } -const { children, class: className = "", ...rest }: Props = $props() +const { + children, + caseSensitive = false, + class: className = "", + ...rest +}: Props = $props() diff --git a/app2/src/lib/layers/live.ts b/app2/src/lib/layers/live.ts index 8d94333087..d50d4c121c 100644 --- a/app2/src/lib/layers/live.ts +++ b/app2/src/lib/layers/live.ts @@ -4,6 +4,8 @@ import { GasPriceMap } from "$lib/gasprice" import { GraphQL } from "$lib/graphql/service" import * as Datadog from "$lib/logging/datadog" import { PriceOracle } from "@unionlabs/sdk" +import * as SvelteConfigProvider from "$lib/services/SvelteConfigProvider.js" +import { Indexer } from "@unionlabs/sdk/Indexer" import { Layer, Logger, LogLevel, Match } from "effect" const minimumLogLevel = Logger.minimumLogLevel( @@ -15,11 +17,17 @@ const minimumLogLevel = Logger.minimumLogLevel( ), ) +const IndexerLive = Layer.mergeAll( + Indexer.Default, + SvelteConfigProvider.StaticPublic, +) + export default Layer.mergeAll( GraphQL.Default, GasPriceMap.Default, PriceOracle.layerExecutor, SupabaseClient.Default({ auth: { autoRefreshToken: true } }), + IndexerLive, Logger.replace( Logger.defaultLogger, Logger.zip( diff --git a/app2/src/lib/utils/snippets.svelte b/app2/src/lib/utils/snippets.svelte index 49ac6ae912..32e336f1d0 100644 --- a/app2/src/lib/utils/snippets.svelte +++ b/app2/src/lib/utils/snippets.svelte @@ -35,17 +35,19 @@ export { empty, getOptionOrNull, mapOption, matchOption, matchRuntimeResult } {#snippet matchRuntimeResult( self: Option.Option>, - onSuccess: Snippet<[A]>, - onFailure: Snippet<[Cause.Cause]>, - onNone: Snippet<[]>, + options: { + onSuccess: Snippet<[A]> + onFailure: Snippet<[Cause.Cause]> + onNone: Snippet<[]> + }, )} {#if self._tag === "Some"} {#if self.value._tag === "Success"} - {@render onSuccess(self.value.value)} + {@render options.onSuccess(self.value.value)} {:else} - {@render onFailure(self.value.cause)} + {@render options.onFailure(self.value.cause)} {/if} {:else} - {@render onNone()} + {@render options.onNone()} {/if} {/snippet} diff --git a/app2/src/routes/explorer/transfers/+page.svelte b/app2/src/routes/explorer/transfers/+page.svelte index d4a65b589a..c79fc816f6 100644 --- a/app2/src/routes/explorer/transfers/+page.svelte +++ b/app2/src/routes/explorer/transfers/+page.svelte @@ -19,7 +19,7 @@ import { settingsStore } from "$lib/stores/settings.svelte" import TransferListItemComponent from "$lib/components/model/TransferListItemComponent.svelte" import TransferListItemComponentSkeleton from "$lib/components/model/TransferListItemComponentSkeleton.svelte" import Switch from "$lib/components/ui/Switch.svelte" - import type { AppContext } from "$lib/runtime"; +import type { AppContext } from "$lib/runtime"; const initializeQuery = async () => { const pageParam = page.url.searchParams.get("page") diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte new file mode 100644 index 0000000000..68050b9364 --- /dev/null +++ b/app2/src/routes/stake/+page.svelte @@ -0,0 +1,555 @@ + + +{#snippet renderChain(chain: Chain, denom: TokenRawDenom)} + +{/snippet} + +{#snippet renderStatus(bond: Bond | Unbond)} + {#if bond.status === "success"} + + success + + {/if} + {#if bond.status === "failure"} + + failure + + {/if} + {#if bond.status === "pending"} + + pending + + {/if} +{/snippet} + +{#snippet renderBond(bond: Bond | Unbond)} + {@const k = keyForBond(bond)} + toggle(k)} + onkeydown={(e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault() + toggle(k) + } + if (e.key === "Escape") { + close(k) + } + }} + > + + + + + {bond.sendTimestampFormatted} + + + {#if Schema.is(Bond)(bond)} + {@render renderChain(bond.source_chain, bond.base_token)} + + {@render renderChain(bond.destination_chain, bond.quote_token)} + {/if} + {#if Schema.is(Unbond)(bond)} + {@render renderChain(bond.destination_chain, bond.base_token)} + {/if} + + + {bond.amountFormatted} + + + {@render renderStatus(bond)} + + + {#if isOpen(k)} + + +
+
+
{JSON.stringify(bond, null, 2)}
+
+
+ + Raw bond payload + (for debugging) + +
{JSON.stringify(bond, null, 2)}
+
+
+ + + {/if} +{/snippet} + +{#snippet maybeRenderBonds(maybeBonds: O.Option>)} + {#snippet noBonds()} +
+ No bonds yet +
+ {/snippet} + {#snippet hasBonds(bonds: A.NonEmptyReadonlyArray)} +
+ + + + + + + + + + + + {#each bonds as bond} + {@render renderBond(bond)} + {/each} + +
+ Timestamp + + Chain + + Amount + + Status +
+
+ {/snippet} + + {@render matchOption(maybeBonds, hasBonds, noBonds)} +{/snippet} + +{#snippet renderSkeleton()} +
+ + + + + + + + + + + + {#each Array(5) as _} + + + + + + + {/each} + +
arrowChain + Timestamp + AmountStatus
+
+
+
+{/snippet} + +{#snippet renderError(error: any)} +
+ ERROR: {JSON.stringify(error, null, 2)} +
+{/snippet} + +{#snippet whenWallet()} +
+ +
+
+
+ +
+ {@render matchRuntimeResult(data.current, { + onSuccess: maybeRenderBonds, + onFailure: renderError, + onNone: renderSkeleton, + })} +
+
+
+{/snippet} + +{#snippet noWallet()} + +{/snippet} + +{#snippet renderBalanceSkeleton()} + +{/snippet} + +{#snippet renderBalance(amount: bigint)} +
+ { + pipe( + BigDecimal.fromBigInt(amount), + // XXX: check decimals + BigDecimal.unsafeDivide(BigDecimal.make(1n, -18)), + BigDecimal.format, + ) + } +
+{/snippet} + + + + {#if O.isSome(WalletStore.evmAddress)} + +
+
+
+ + {@render matchOption(uOnEvmBalance, renderBalance, renderBalanceSkeleton)} +
+ +
+ { + const { inputType, data, currentTarget } = event + const { value } = currentTarget + const proposed = value + (data ?? "") + + const maxDecimals = pipe( + uOnEvmToken, + O.map(Struct.get("representations")), + O.flatMap(A.head), + O.map(Struct.get("decimals")), + O.getOrThrow, + ) + + const validShape = /^\d*[.,]?\d*$/.test(proposed) + const validDecimalsDot = !proposed.includes(".") + || proposed.split(".")[1].length <= maxDecimals + const validDecimalsComma = !proposed.includes(",") + || proposed.split(",")[1].length <= maxDecimals + const isDelete = inputType.startsWith("delete") + const validDecimals = validDecimalsComma && validDecimalsDot + const noDuplicateLeadingZeroes = !proposed.startsWith("00") + + const allow = isDelete + || (validDecimals && validShape && noDuplicateLeadingZeroes) + + if (!allow) { + event.preventDefault() + } + }} + autocapitalize="none" + pattern="^[0-9]*[.,]?[0-9]*$" + value={bondInput} + class="h-14 text-center text-lg" + oninput={(event) => { + bondInput = event.currentTarget.value + }} + /> + {O.map(bondAmount, BigDecimal.format)} +
+
+ +
+
+ + +
+
+ + {@render matchOption(eUOnEvmBalance, renderBalance, renderBalanceSkeleton)} +
+ +
+ { + const { inputType, data, currentTarget } = event + const { value } = currentTarget + const proposed = value + (data ?? "") + + const maxDecimals = pipe( + uOnEvmToken, + O.map(Struct.get("representations")), + O.flatMap(A.head), + O.map(Struct.get("decimals")), + O.getOrThrow, + ) + + const validShape = /^\d*[.,]?\d*$/.test(proposed) + const validDecimalsDot = !proposed.includes(".") + || proposed.split(".")[1].length <= maxDecimals + const validDecimalsComma = !proposed.includes(",") + || proposed.split(",")[1].length <= maxDecimals + const isDelete = inputType.startsWith("delete") + const validDecimals = validDecimalsComma && validDecimalsDot + const noDuplicateLeadingZeroes = !proposed.startsWith("00") + + const allow = isDelete + || (validDecimals && validShape && noDuplicateLeadingZeroes) + + if (!allow) { + event.preventDefault() + } + }} + autocapitalize="none" + pattern="^[0-9]*[.,]?[0-9]*$" + value={unbondInput} + class="h-14 text-center text-lg" + oninput={(event) => { + unbondInput = event.currentTarget.value + }} + /> + {O.map(unbondAmount, BigDecimal.format)} +
+
+ +
+
+
+ + {@render whenWallet()} + {:else} + {@render noWallet()} + {/if} +
+
diff --git a/ts-sdk-cosmos/src/Cosmos.ts b/ts-sdk-cosmos/src/Cosmos.ts index 82488c6445..d26c320060 100644 --- a/ts-sdk-cosmos/src/Cosmos.ts +++ b/ts-sdk-cosmos/src/Cosmos.ts @@ -249,7 +249,7 @@ export class GetBalanceError extends Data.TaggedError("@unionlabs/sdk/Cosmos/Get * @since 2.0.0 */ export const queryContract = ( - contractAddress: string, + contractAddress: Ucs05.CosmosDisplay, queryMsg: Record, ) => pipe( @@ -257,12 +257,12 @@ export const queryContract = ( Effect.andThen(({ client }) => Effect.tryPromise({ try: async () => { - const result = await client.queryContractSmart(contractAddress, queryMsg) + const result = await client.queryContractSmart(contractAddress.address, queryMsg) return result as T }, catch: error => new QueryContractError({ - address: contractAddress, + address: contractAddress.address, cause: Utils.extractErrorDetails(error as Error), }), }) diff --git a/ts-sdk-evm/src/internal/zkgmClient.ts b/ts-sdk-evm/src/internal/zkgmClient.ts index 6bbac3b3ab..c958a09f8a 100644 --- a/ts-sdk-evm/src/internal/zkgmClient.ts +++ b/ts-sdk-evm/src/internal/zkgmClient.ts @@ -105,6 +105,8 @@ export const fromWallet = ( ), ) + console.log("[@unionlabs/sdk-evm/internal/zkgmClient] operand", operand) + const funds = ClientRequest.requiredFunds(request).pipe( O.map(A.filter(([x]) => Token.isNative(x))), O.flatMap(O.liftPredicate(A.isNonEmptyReadonlyArray)), diff --git a/ts-sdk/src/Constants.ts b/ts-sdk/src/Constants.ts index c15a475c05..51e33b2db4 100644 --- a/ts-sdk/src/Constants.ts +++ b/ts-sdk/src/Constants.ts @@ -207,12 +207,11 @@ export const tokenMetaOverride = Match.type().pipe( ) /** - * FIXME * @category constants * @since 2.0.0 */ export const ON_ZKGM_CALL_PROXY = Ucs05.CosmosDisplay.make({ - address: "union122ny3mep2l7nhtafpwav2y9e5jrslhek76hsjl", + address: "union1mtxk8tjz85ry2a8a6k58uwrztmwslaxzsurh5l0dlxh7wrnvmxkshqkuwd", }) /** @@ -240,6 +239,15 @@ export const EU_ERC20 = Token.Erc20.make({ address: "0xe5Cf13C84c0fEa3236C101Bd7 export const EU_LST = Ucs05.CosmosDisplay.make({ address: "union1eueueueu9var4yhdruyzkjcsh74xzeug6ckyy60hs0vcqnzql2hq0lxc2f", }) + +/** + * @category constants + * @since 2.0.0 + */ +export const EU_STAKING_HUB = Ucs05.CosmosDisplay.make({ + address: "union1d2r4ecsuap4pujrlf3nz09vz8eha8y0z25knq0lfxz4yzn83v6kq0jxsmk", +}) + /** * @category constants * @since 2.0.0 diff --git a/ts-sdk/src/Indexer.ts b/ts-sdk/src/Indexer.ts index f4ca07896d..7eb87a040f 100644 --- a/ts-sdk/src/Indexer.ts +++ b/ts-sdk/src/Indexer.ts @@ -170,43 +170,6 @@ export class IndexerRequest } } -// export const transferPacketHashQuery = ({ submission_tx_hash }: { submission_tx_hash: string }) => -// createQueryGraphql({ -// schema: Schema.Struct({ -// v2_transfers: Schema.Array( -// Schema.Struct({ -// packet_hash: PacketHash, -// }), -// ), -// }), -// document: graphql(/* GraphQL */ ` -// query GetPacketHashBySubmissionTxHash($submission_tx_hash: String!) { -// v2_transfers(args: { -// p_transaction_hash: $submission_tx_hash -// }) { -// packet_hash -// } -// } -// `), -// variables: { -// submission_tx_hash, -// }, -// refetchInterval: "1 seconds", -// writeData: data => { -// transferHashStore.data = data.pipe( -// Option.flatMap(result => -// result.v2_transfers.length > 0 -// ? Option.some(result.v2_transfers[0].packet_hash) -// : Option.none() -// ), -// ) -// }, - -// writeError: error => { -// transferHashStore.error = error -// }, -// }) - /** * @category requests * @since 2.0.0 diff --git a/ts-sdk/src/Staking.ts b/ts-sdk/src/Staking.ts new file mode 100644 index 0000000000..1d28f9b646 --- /dev/null +++ b/ts-sdk/src/Staking.ts @@ -0,0 +1,332 @@ +/** + * This module handles liquid staking. + * + * @since 2.0.0 + */ + +import { Effect, Hash, Layer, pipe, PrimaryKey, Request, Struct } from "effect" +import * as A from "effect/Array" +import * as O from "effect/Option" +import * as S from "effect/Schema" +import { graphql } from "gql.tada" +import { ChainFragment } from "./graphql/fragments/ChainFragment.js" +import { TokenFragment } from "./graphql/fragments/TokenFragment.js" +import { Indexer } from "./Indexer.js" +import { Bond, Unbond } from "./schema/stake.js" +import * as Ucs05 from "./Ucs05.js" + +/** + * @category errors + * @since 2.0.0 + */ +export class StakingError + extends S.TaggedError("@unionlabs/sdk/Staking/StakingError")("StakingError", { + message: S.String, + cause: S.Any, + }) +{} + +/** + * @category requests + * @since 2.0.0 + */ +export class GetBonds + extends S.TaggedRequest()("@unionlabs/sdk/Staking/GetBondsRequest", { + failure: StakingError, + success: S.Option(S.NonEmptyArray(Bond)), + payload: { + addresses: S.ArrayEnsure(S.Union(Ucs05.AnyDisplay, Ucs05.AnyDisplayFromString)), + }, + }) +{ + /** + * @since 2.0.0 + */ + [PrimaryKey.symbol]() { + return pipe( + this.addresses, + A.map(Struct.get("address")), + Hash.array, + ) + } +} + +/** + * @category requests + * @since 2.0.0 + */ +export class GetUnbonds + extends S.TaggedRequest()("@unionlabs/sdk/Staking/GetUnbondsRequest", { + failure: StakingError, + success: S.Option(S.NonEmptyArray(Unbond)), + payload: { + addresses: S.ArrayEnsure(S.Union(Ucs05.AnyDisplay, Ucs05.AnyDisplayFromString)), + }, + }) +{ + /** + * @since 2.0.0 + */ + [PrimaryKey.symbol]() { + return pipe( + this.addresses, + A.map(Struct.get("address")), + Hash.array, + ) + } +} + +export class Staking extends Effect.Service()("@unionlabs/sdk/Staking", { + effect: Effect.gen(function*() { + const client = yield* Indexer + + const getBonds: (request: GetBonds) => Effect.Effect< + Request.Request.Success, + Request.Request.Error + > = Effect.fn((request) => + pipe( + client.fetch({ + document: graphql( + ` +query GetBondsByAddress($addresses: jsonb!) @cached(ttl: 10) { + v2_bonds(args: { p_addresses_canonical: $addresses }) { + packet_hash + delivery_packet_hash + bond_success + delivery_success + packet_shape + source_universal_chain_id + remote_universal_chain_id + destination_universal_chain_id + sender_canonical + sender_display + sender_zkgm + receiver_canonical + receiver_display + receiver_zkgm + base_token + base_amount + quote_token + quote_amount + remote_base_token + remote_base_amount + remote_quote_token + remote_quote_amount + bond_send_timestamp + bond_send_transaction_hash + bond_recv_timestamp + bond_recv_transaction_hash + bond_timeout_timestamp + bond_timeout_transaction_hash + delivery_send_timestamp + delivery_send_transaction_hash + delivery_recv_timestamp + delivery_recv_transaction_hash + delivery_timeout_timestamp + delivery_timeout_transaction_hash + sort_order + source_chain { + ...ChainFragment + } + destination_chain { + ...ChainFragment + } + base_token_meta { + ...TokenFragment + } + quote_token_meta { + ...TokenFragment + } + remote_base_token_meta { + ...TokenFragment + } + remote_quote_token_meta { + ...TokenFragment + } + } +}`, + [ChainFragment, TokenFragment], + ), + variables: { + addresses: pipe( + request.addresses, + A.map(Ucs05.anyDisplayToCanonical), + ), + }, + }), + Effect.map(Struct.get("v2_bonds")), + Effect.flatMap(O.liftPredicate(A.isNonEmptyArray)), + Effect.map(A.map(x => + ({ + _tag: "Bond" as const, + ...x, + }) as const + )), + Effect.flatMap(S.decodeUnknown(S.NonEmptyArray(Bond))), + Effect.optionFromOptional, + Effect.catchTags({ + IndexerError: (cause) => + new StakingError({ + message: cause.message, + cause, + }), + ParseError: (cause) => + new StakingError({ + message: "failed to decode", + cause, + }), + }), + ) + ) + + const getUnbonds: (request: GetUnbonds) => Effect.Effect< + Request.Request.Success, + Request.Request.Error + > = Effect.fn((request) => + pipe( + client.fetch({ + document: graphql( + ` +query GetUnbondsByAddress($addresses: jsonb!) @cached(ttl: 10) { + v2_unbonds(args: { p_addresses_canonical: $addresses }) { + packet_hash + success + packet_shape + source_universal_chain_id + destination_universal_chain_id + sender_canonical + sender_display + sender_zkgm + base_token + base_amount + unbond_amount + unbond_send_timestamp + unbond_send_transaction_hash + unbond_recv_timestamp + unbond_recv_transaction_hash + unbond_timeout_timestamp + unbond_timeout_transaction_hash + sort_order + source_chain { + ...ChainFragment + } + destination_chain { + ...ChainFragment + } + base_token_meta { + ...TokenFragment + } + } +}`, + [ChainFragment, TokenFragment], + ), + variables: { + addresses: pipe( + request.addresses, + A.map(Ucs05.anyDisplayToCanonical), + ), + }, + }), + Effect.map(Struct.get("v2_unbonds")), + Effect.flatMap(O.liftPredicate(A.isNonEmptyArray)), + Effect.map(A.map(x => + ({ + _tag: "Unbond" as const, + ...x, + }) as const + )), + Effect.flatMap(S.decodeUnknown(S.NonEmptyArray(Unbond))), + Effect.optionFromOptional, + Effect.catchTags({ + IndexerError: (cause) => + new StakingError({ + message: cause.message, + cause, + }), + ParseError: (cause) => + new StakingError({ + message: "failed to decode", + cause, + }), + }), + ) + ) + + return { + getBonds, + getUnbonds, + } as const + }), + dependencies: [Indexer.Default], +}) { + static Test = Layer.effect( + Staking, + Effect.gen(function*() { + const fc = yield* Effect.tryPromise({ + try: () => import("effect/FastCheck"), + catch: (cause) => + new StakingError({ + message: `Could not import "effect/FastCheck"`, + cause, + }), + }) + + const Arbitrary = yield* Effect.tryPromise({ + try: () => import("effect/Arbitrary"), + catch: (cause) => + new StakingError({ + message: `Could not import "effect/Arbitrary"`, + cause, + }), + }) + + const ArbitraryBonds = fc.array( + Arbitrary.make(Bond), + { + minLength: 2, + }, + ) + const ArbitraryUnbonds = fc.array( + Arbitrary.make(Unbond), + { + minLength: 2, + }, + ) + + return Staking.make( + { + getBonds: (request: GetBonds): Effect.Effect< + Request.Request.Success, + Request.Request.Error + > => + pipe( + Hash.hash(request), + (seed) => + fc.sample(ArbitraryBonds, { + numRuns: 1, + seed, + })[0], + O.liftPredicate(A.isNonEmptyArray), + Effect.optionFromOptional, + Effect.delay("200 millis"), + ), + getUnbonds: (request: GetUnbonds): Effect.Effect< + Request.Request.Success, + Request.Request.Error + > => + pipe( + Hash.hash(request), + (seed) => + fc.sample(ArbitraryUnbonds, { + numRuns: 1, + seed, + })[0], + O.liftPredicate(A.isNonEmptyArray), + Effect.optionFromOptional, + Effect.delay("200 millis"), + ), + }, + ) + }), + ) +} diff --git a/ts-sdk/src/Utils.ts b/ts-sdk/src/Utils.ts index dae1a42879..04ba0c7e77 100644 --- a/ts-sdk/src/Utils.ts +++ b/ts-sdk/src/Utils.ts @@ -4,7 +4,7 @@ * @since 2.0.0 */ import crc32 from "crc/crc32" -import { Data, Effect, String as Str } from "effect" +import { Data, Effect, Schema, SchemaAST, String as Str } from "effect" import { dual, LazyArg, pipe } from "effect/Function" import * as M from "effect/Match" import * as O from "effect/Option" @@ -169,3 +169,26 @@ export const matchOptionBool: { }), ), ) + +/** + * @see https://effect.website/docs/schema/basic-usage/#simplifying-tagged-structs-with-taggedstruct + * @category utils + * @since 2.0.0 + */ +export const TaggedStruct = < + Tag extends SchemaAST.LiteralValue, + Fields extends Schema.Struct.Fields, +>( + tag: Tag, + fields: Fields, +) => + Schema.Struct({ + _tag: Schema.Literal(tag).pipe( + Schema.optional, + Schema.withDefaults({ + constructor: () => tag, // Apply _tag during instance construction + decoding: () => tag, // Apply _tag during decoding + }), + ), + ...fields, + }) diff --git a/ts-sdk/src/generated/graphql-env.d.ts b/ts-sdk/src/generated/graphql-env.d.ts index e9fe7e5886..7cf233abcb 100644 --- a/ts-sdk/src/generated/graphql-env.d.ts +++ b/ts-sdk/src/generated/graphql-env.d.ts @@ -1,222 +1,6 @@ /* eslint-disable */ /* prettier-ignore */ -export type introspection_types = { - 'Boolean': unknown; - 'Boolean_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; isOneOf: false; inputFields: [{ name: '_eq'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_gt'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_gte'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lte'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_neq'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; }; defaultValue: null }]; }; - 'Int': unknown; - 'Int_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; isOneOf: false; inputFields: [{ name: '_eq'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: '_gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: '_gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: '_lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: '_neq'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }]; }; - 'Request': { kind: 'OBJECT'; name: 'Request'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'txHash': { name: 'txHash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'String': unknown; - 'String_array_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'String_array_comparison_exp'; isOneOf: false; inputFields: [{ name: '_contained_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_contains'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_eq'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_gt'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_gte'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; }; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_lte'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_neq'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; }; }; defaultValue: null }]; }; - 'String_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; isOneOf: false; inputFields: [{ name: '_eq'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_ilike'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_iregex'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_like'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_neq'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_nilike'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_niregex'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_nlike'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_nregex'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_nsimilar'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_regex'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_similar'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'cursor_ordering': { name: 'cursor_ordering'; enumValues: 'ASC' | 'DESC'; }; - 'dashboard_count_by_chain_type': { kind: 'OBJECT'; name: 'dashboard_count_by_chain_type'; fields: { 'count': { name: 'count'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'phase': { name: 'phase'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'dashboard_count_by_chain_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'dashboard_count_by_chain_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'dashboard_count_by_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'dashboard_count_by_chain_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'dashboard_count_by_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'count'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'phase'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'dashboard_count_by_chain_type_order_by': { kind: 'INPUT_OBJECT'; name: 'dashboard_count_by_chain_type_order_by'; isOneOf: false; inputFields: [{ name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'phase'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'dashboard_count_by_chain_type_select_column': { name: 'dashboard_count_by_chain_type_select_column'; enumValues: 'count' | 'phase' | 'universal_chain_id'; }; - 'dashboard_days_by_chain_type': { kind: 'OBJECT'; name: 'dashboard_days_by_chain_type'; fields: { 'day_count': { name: 'day_count'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'dashboard_days_by_chain_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'dashboard_days_by_chain_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'dashboard_days_by_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'dashboard_days_by_chain_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'dashboard_days_by_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'day_count'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'dashboard_days_by_chain_type_order_by': { kind: 'INPUT_OBJECT'; name: 'dashboard_days_by_chain_type_order_by'; isOneOf: false; inputFields: [{ name: 'day_count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'dashboard_days_by_chain_type_select_column': { name: 'dashboard_days_by_chain_type_select_column'; enumValues: 'day_count' | 'universal_chain_id'; }; - 'dashboard_transfer_count_by_chain_args': { kind: 'INPUT_OBJECT'; name: 'dashboard_transfer_count_by_chain_args'; isOneOf: false; inputFields: [{ name: 'p_addresses_dashboard'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: 'p_phase'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'dashboard_transfer_days_count_by_chain_args': { kind: 'INPUT_OBJECT'; name: 'dashboard_transfer_days_count_by_chain_args'; isOneOf: false; inputFields: [{ name: 'p_addresses_dashboard'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }]; }; - 'date': unknown; - 'date_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'date_comparison_exp'; isOneOf: false; inputFields: [{ name: '_eq'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; }; defaultValue: null }, { name: '_gt'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; }; defaultValue: null }, { name: '_gte'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'date'; ofType: null; }; }; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; }; defaultValue: null }, { name: '_lte'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; }; defaultValue: null }, { name: '_neq'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'date'; ofType: null; }; }; }; defaultValue: null }]; }; - 'drip_dropMutation': { kind: 'OBJECT'; name: 'drip_dropMutation'; fields: { 'send': { name: 'send'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; - 'drip_dropQuery': { kind: 'OBJECT'; name: 'drip_dropQuery'; fields: { 'handledTransfers': { name: 'handledTransfers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Request'; ofType: null; }; }; }; } }; 'transfersForAddress': { name: 'transfersForAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Request'; ofType: null; }; }; }; } }; 'unhandledTransfers': { name: 'unhandledTransfers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Request'; ofType: null; }; }; }; } }; }; }; - 'jsonb': unknown; - 'jsonb_cast_exp': { kind: 'INPUT_OBJECT'; name: 'jsonb_cast_exp'; isOneOf: false; inputFields: [{ name: 'String'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'jsonb_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'jsonb_comparison_exp'; isOneOf: false; inputFields: [{ name: '_cast'; type: { kind: 'INPUT_OBJECT'; name: 'jsonb_cast_exp'; ofType: null; }; defaultValue: null }, { name: '_contained_in'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_contains'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_eq'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_gt'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_gte'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_has_key'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: '_has_keys_all'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_has_keys_any'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; }; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_lte'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_neq'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; }; }; defaultValue: null }]; }; - 'latency_percentiles_scalar': unknown; - 'latency_percentiles_scalar_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'latency_percentiles_scalar_comparison_exp'; isOneOf: false; inputFields: [{ name: '_eq'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; defaultValue: null }, { name: '_gt'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; defaultValue: null }, { name: '_gte'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; }; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; defaultValue: null }, { name: '_lte'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; defaultValue: null }, { name: '_neq'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; }; }; }; defaultValue: null }]; }; - 'mutation_root': { kind: 'OBJECT'; name: 'mutation_root'; fields: { 'drip_drop': { name: 'drip_drop'; type: { kind: 'OBJECT'; name: 'drip_dropMutation'; ofType: null; } }; }; }; - 'order_by': { name: 'order_by'; enumValues: 'asc' | 'asc_nulls_first' | 'asc_nulls_last' | 'desc' | 'desc_nulls_first' | 'desc_nulls_last'; }; - 'query_root': { kind: 'OBJECT'; name: 'query_root'; fields: { 'dashboard_transfer_count_by_chain': { name: 'dashboard_transfer_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_count_by_chain_type'; ofType: null; }; }; }; } }; 'dashboard_transfer_days_count_by_chain': { name: 'dashboard_transfer_days_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_days_by_chain_type'; ofType: null; }; }; }; } }; 'drip_drop': { name: 'drip_drop'; type: { kind: 'OBJECT'; name: 'drip_dropQuery'; ofType: null; } }; 'v2_chains': { name: 'v2_chains'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; }; }; } }; 'v2_channels': { name: 'v2_channels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_channel_type'; ofType: null; }; }; }; } }; 'v2_clients': { name: 'v2_clients'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_client_type'; ofType: null; }; }; }; } }; 'v2_connections': { name: 'v2_connections'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_connection_type'; ofType: null; }; }; }; } }; 'v2_error_type': { name: 'v2_error_type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_error_type'; ofType: null; }; }; }; } }; 'v2_errors': { name: 'v2_errors'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_error_type'; ofType: null; }; }; }; } }; 'v2_health_check': { name: 'v2_health_check'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_health_check_type'; ofType: null; }; }; }; } }; 'v2_packets': { name: 'v2_packets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_packet_type'; ofType: null; }; }; }; } }; 'v2_stats_count': { name: 'v2_stats_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_type'; ofType: null; }; }; }; } }; 'v2_stats_latency': { name: 'v2_stats_latency'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_latency_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_chain': { name: 'v2_stats_packets_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_packets_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_daily_count': { name: 'v2_stats_packets_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_address': { name: 'v2_stats_transfers_address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_transfers_address_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_chain': { name: 'v2_stats_transfers_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_transfers_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_daily_count': { name: 'v2_stats_transfers_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_tokens': { name: 'v2_tokens'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; }; }; }; } }; 'v2_transfers': { name: 'v2_transfers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_transfer_type'; ofType: null; }; }; }; } }; 'v2_util_get_address_types_for_display_address': { name: 'v2_util_get_address_types_for_display_address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_address_types_for_display_address_type'; ofType: null; }; }; }; } }; 'v2_util_get_transfer_request_details': { name: 'v2_util_get_transfer_request_details'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_transfer_request_details_type'; ofType: null; }; }; }; } }; }; }; - 'subscription_root': { kind: 'OBJECT'; name: 'subscription_root'; fields: { 'dashboard_transfer_count_by_chain': { name: 'dashboard_transfer_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_count_by_chain_type'; ofType: null; }; }; }; } }; 'dashboard_transfer_days_count_by_chain': { name: 'dashboard_transfer_days_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_days_by_chain_type'; ofType: null; }; }; }; } }; 'v2_chains': { name: 'v2_chains'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; }; }; } }; 'v2_channels': { name: 'v2_channels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_channel_type'; ofType: null; }; }; }; } }; 'v2_clients': { name: 'v2_clients'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_client_type'; ofType: null; }; }; }; } }; 'v2_connections': { name: 'v2_connections'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_connection_type'; ofType: null; }; }; }; } }; 'v2_error_type': { name: 'v2_error_type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_error_type'; ofType: null; }; }; }; } }; 'v2_error_type_stream': { name: 'v2_error_type_stream'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_error_type'; ofType: null; }; }; }; } }; 'v2_errors': { name: 'v2_errors'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_error_type'; ofType: null; }; }; }; } }; 'v2_health_check': { name: 'v2_health_check'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_health_check_type'; ofType: null; }; }; }; } }; 'v2_packets': { name: 'v2_packets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_packet_type'; ofType: null; }; }; }; } }; 'v2_stats_count': { name: 'v2_stats_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_type'; ofType: null; }; }; }; } }; 'v2_stats_latency': { name: 'v2_stats_latency'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_latency_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_chain': { name: 'v2_stats_packets_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_packets_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_daily_count': { name: 'v2_stats_packets_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_address': { name: 'v2_stats_transfers_address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_transfers_address_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_chain': { name: 'v2_stats_transfers_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_transfers_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_daily_count': { name: 'v2_stats_transfers_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_tokens': { name: 'v2_tokens'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; }; }; }; } }; 'v2_transfers': { name: 'v2_transfers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_transfer_type'; ofType: null; }; }; }; } }; 'v2_util_get_address_types_for_display_address': { name: 'v2_util_get_address_types_for_display_address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_address_types_for_display_address_type'; ofType: null; }; }; }; } }; 'v2_util_get_transfer_request_details': { name: 'v2_util_get_transfer_request_details'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_transfer_request_details_type'; ofType: null; }; }; }; } }; }; }; - 'timestamptz': unknown; - 'timestamptz_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; isOneOf: false; inputFields: [{ name: '_eq'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; defaultValue: null }, { name: '_gt'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; defaultValue: null }, { name: '_gte'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; defaultValue: null }, { name: '_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; }; }; defaultValue: null }, { name: '_is_null'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: '_lt'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; defaultValue: null }, { name: '_lte'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; defaultValue: null }, { name: '_neq'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; defaultValue: null }, { name: '_nin'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; }; }; defaultValue: null }]; }; - 'v2_chain_features': { kind: 'OBJECT'; name: 'v2_chain_features'; fields: { 'channel_list': { name: 'channel_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'connection_list': { name: 'connection_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'environment': { name: 'environment'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'index_status': { name: 'index_status'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'packet_list': { name: 'packet_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'transfer_list': { name: 'transfer_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'transfer_submission': { name: 'transfer_submission'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; }; }; - 'v2_chain_features_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_min_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_features_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'channel_list'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'connection_list'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'environment'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'index_status'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_list'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_list'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_submission'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_features_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_max_order_by'; isOneOf: false; inputFields: [{ name: 'environment'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_features_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_min_order_by'; isOneOf: false; inputFields: [{ name: 'environment'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_features_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_order_by'; isOneOf: false; inputFields: [{ name: 'channel_list'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'connection_list'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'environment'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'index_status'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_list'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_list'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_submission'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_features_select_column': { name: 'v2_chain_features_select_column'; enumValues: 'channel_list' | 'connection_list' | 'environment' | 'index_status' | 'packet_list' | 'transfer_list' | 'transfer_submission'; }; - 'v2_chain_status_type': { kind: 'OBJECT'; name: 'v2_chain_status_type'; fields: { 'height': { name: 'height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'status': { name: 'status'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'tip_age_seconds': { name: 'tip_age_seconds'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; - 'v2_chain_status_type_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'avg'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_avg_order_by'; ofType: null; }; defaultValue: null }, { name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_min_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_stddev_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_stddev_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_stddev_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'sum'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_sum_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_var_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_var_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'variance'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_variance_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_avg_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_avg_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'tip_age_seconds'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_max_order_by'; isOneOf: false; inputFields: [{ name: 'height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_min_order_by'; isOneOf: false; inputFields: [{ name: 'height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_order_by'; isOneOf: false; inputFields: [{ name: 'height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_select_column': { name: 'v2_chain_status_type_select_column'; enumValues: 'height' | 'status' | 'timestamp' | 'tip_age_seconds'; }; - 'v2_chain_status_type_stddev_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_stddev_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_stddev_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_stddev_pop_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_stddev_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_stddev_samp_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_sum_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_sum_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_var_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_var_pop_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_var_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_var_samp_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_status_type_variance_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_variance_order_by'; isOneOf: false; inputFields: [{ name: 'tip_age_seconds'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_type': { kind: 'OBJECT'; name: 'v2_chain_type'; fields: { 'addr_prefix': { name: 'addr_prefix'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'chain_id': { name: 'chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'display_name': { name: 'display_name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'explorers': { name: 'explorers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_explorers'; ofType: null; }; }; }; } }; 'features': { name: 'features'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_features'; ofType: null; }; }; }; } }; 'logo_uri': { name: 'logo_uri'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'rpc_type': { name: 'rpc_type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'rpcs': { name: 'rpcs'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_rpcs'; ofType: null; }; }; }; } }; 'status': { name: 'status'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_status_type'; ofType: null; }; }; } }; 'testnet': { name: 'testnet'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_chain_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_chain_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'addr_prefix'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'explorers'; type: { kind: 'INPUT_OBJECT'; name: 'v2_explorers_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'features'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'rpc_type'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'rpcs'; type: { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'testnet'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chain_type_order_by'; isOneOf: false; inputFields: [{ name: 'addr_prefix'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'explorers_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_explorers_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'features_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'rpc_type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'rpcs_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'status_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chain_status_type_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'testnet'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_chain_type_select_column': { name: 'v2_chain_type_select_column'; enumValues: 'addr_prefix' | 'chain_id' | 'display_name' | 'logo_uri' | 'rpc_type' | 'testnet' | 'universal_chain_id'; }; - 'v2_chains_args': { kind: 'INPUT_OBJECT'; name: 'v2_chains_args'; isOneOf: false; inputFields: [{ name: 'p_comparison'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_chains_view': { kind: 'OBJECT'; name: 'v2_chains_view'; fields: { 'addr_prefix': { name: 'addr_prefix'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'chain_id': { name: 'chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'display_name': { name: 'display_name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'logo_uri': { name: 'logo_uri'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'rpc_type': { name: 'rpc_type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'testnet': { name: 'testnet'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_chains_view_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'addr_prefix'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'rpc_type'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'testnet'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_chains_view_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; isOneOf: false; inputFields: [{ name: 'addr_prefix'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'rpc_type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'testnet'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_channel_type': { kind: 'OBJECT'; name: 'v2_channel_type'; fields: { 'destination_chain': { name: 'destination_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'destination_channel_id': { name: 'destination_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_client_id': { name: 'destination_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_connection_id': { name: 'destination_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_port_id': { name: 'destination_port_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_chain': { name: 'source_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'source_channel_id': { name: 'source_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_client_id': { name: 'source_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_connection_id': { name: 'source_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_port_id': { name: 'source_port_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'tags': { name: 'tags'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; } }; 'version': { name: 'version'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_channel_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_channel_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_channel_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_channel_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_channel_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_channel_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_client_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_connection_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_port_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'source_channel_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_client_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_connection_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_port_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'tags'; type: { kind: 'INPUT_OBJECT'; name: 'String_array_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'version'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_channel_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_channel_type_order_by'; isOneOf: false; inputFields: [{ name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_client_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_connection_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_port_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'source_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_client_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_connection_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_port_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'tags'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'version'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_channel_type_select_column': { name: 'v2_channel_type_select_column'; enumValues: 'destination_channel_id' | 'destination_client_id' | 'destination_connection_id' | 'destination_port_id' | 'destination_universal_chain_id' | 'sort_order' | 'source_channel_id' | 'source_client_id' | 'source_connection_id' | 'source_port_id' | 'source_universal_chain_id' | 'tags' | 'version'; }; - 'v2_channels_args': { kind: 'INPUT_OBJECT'; name: 'v2_channels_args'; isOneOf: false; inputFields: [{ name: 'p_comparison'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_destination_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_port_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_recommended'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_source_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_source_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_source_port_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_tags'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: 'p_version'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_client_type': { kind: 'OBJECT'; name: 'v2_client_type'; fields: { 'client_id': { name: 'client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'counterparty_universal_chain_id': { name: 'counterparty_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_client_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_client_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_client_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_client_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_client_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'client_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'counterparty_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_client_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_client_type_order_by'; isOneOf: false; inputFields: [{ name: 'client_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'counterparty_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_client_type_select_column': { name: 'v2_client_type_select_column'; enumValues: 'client_id' | 'counterparty_universal_chain_id' | 'sort_order' | 'universal_chain_id'; }; - 'v2_clients_args': { kind: 'INPUT_OBJECT'; name: 'v2_clients_args'; isOneOf: false; inputFields: [{ name: 'p_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_comparison'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_counterparty_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_connection_type': { kind: 'OBJECT'; name: 'v2_connection_type'; fields: { 'destination_chain': { name: 'destination_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'destination_client_id': { name: 'destination_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_connection_id': { name: 'destination_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_chain': { name: 'source_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'source_client_id': { name: 'source_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_connection_id': { name: 'source_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_connection_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_connection_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_connection_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_connection_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_connection_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_client_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_connection_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'source_client_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_connection_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_connection_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_connection_type_order_by'; isOneOf: false; inputFields: [{ name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_client_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_connection_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'source_client_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_connection_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_connection_type_select_column': { name: 'v2_connection_type_select_column'; enumValues: 'destination_client_id' | 'destination_connection_id' | 'destination_universal_chain_id' | 'sort_order' | 'source_client_id' | 'source_connection_id' | 'source_universal_chain_id'; }; - 'v2_connections_args': { kind: 'INPUT_OBJECT'; name: 'v2_connections_args'; isOneOf: false; inputFields: [{ name: 'p_comparison'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_destination_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_source_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_error_type': { kind: 'OBJECT'; name: 'v2_error_type'; fields: { 'detail': { name: 'detail'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'hint': { name: 'hint'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'message': { name: 'message'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'union_error_code': { name: 'union_error_code'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_error_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_error_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_error_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_error_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_error_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'detail'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'hint'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'message'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'union_error_code'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_error_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_error_type_order_by'; isOneOf: false; inputFields: [{ name: 'detail'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'hint'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'message'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'union_error_code'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_error_type_select_column': { name: 'v2_error_type_select_column'; enumValues: 'detail' | 'hint' | 'message' | 'union_error_code'; }; - 'v2_error_type_stream_cursor_input': { kind: 'INPUT_OBJECT'; name: 'v2_error_type_stream_cursor_input'; isOneOf: false; inputFields: [{ name: 'initial_value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_error_type_stream_cursor_value_input'; ofType: null; }; }; defaultValue: null }, { name: 'ordering'; type: { kind: 'ENUM'; name: 'cursor_ordering'; ofType: null; }; defaultValue: null }]; }; - 'v2_error_type_stream_cursor_value_input': { kind: 'INPUT_OBJECT'; name: 'v2_error_type_stream_cursor_value_input'; isOneOf: false; inputFields: [{ name: 'detail'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'hint'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'message'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'union_error_code'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_explorers': { kind: 'OBJECT'; name: 'v2_explorers'; fields: { 'address_url': { name: 'address_url'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'block_url': { name: 'block_url'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'display_name': { name: 'display_name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'home_url': { name: 'home_url'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'logo_uri': { name: 'logo_uri'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'tx_url': { name: 'tx_url'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_explorers_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_explorers_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_explorers_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_explorers_min_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_explorers_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_explorers_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_explorers_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_explorers_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_explorers_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'address_url'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'block_url'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'home_url'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'tx_url'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_explorers_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_explorers_max_order_by'; isOneOf: false; inputFields: [{ name: 'address_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'block_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'home_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'tx_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_explorers_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_explorers_min_order_by'; isOneOf: false; inputFields: [{ name: 'address_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'block_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'home_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'tx_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_explorers_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_explorers_order_by'; isOneOf: false; inputFields: [{ name: 'address_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'block_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'display_name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'home_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'tx_url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_explorers_select_column': { name: 'v2_explorers_select_column'; enumValues: 'address_url' | 'block_url' | 'description' | 'display_name' | 'home_url' | 'logo_uri' | 'name' | 'tx_url'; }; - 'v2_health_check_type': { kind: 'OBJECT'; name: 'v2_health_check_type'; fields: { 'environment': { name: 'environment'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'last_update': { name: 'last_update'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'status': { name: 'status'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_health_check_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_health_check_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_health_check_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_health_check_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_health_check_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'environment'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'last_update'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_health_check_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_health_check_type_order_by'; isOneOf: false; inputFields: [{ name: 'environment'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'last_update'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_health_check_type_select_column': { name: 'v2_health_check_type_select_column'; enumValues: 'environment' | 'last_update' | 'status'; }; - 'v2_packet_type': { kind: 'OBJECT'; name: 'v2_packet_type'; fields: { 'acknowledgement': { name: 'acknowledgement'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'channel_version': { name: 'channel_version'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'data': { name: 'data'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'decoded': { name: 'decoded'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; } }; 'decoded_flattened': { name: 'decoded_flattened'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; } }; 'destination_chain': { name: 'destination_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'destination_chain_id': { name: 'destination_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'destination_channel_id': { name: 'destination_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_client_id': { name: 'destination_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_connection_id': { name: 'destination_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'destination_port_id': { name: 'destination_port_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_ack_block_hash': { name: 'packet_ack_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_ack_height': { name: 'packet_ack_height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_ack_maker': { name: 'packet_ack_maker'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_ack_timestamp': { name: 'packet_ack_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'packet_ack_transaction_hash': { name: 'packet_ack_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_hash': { name: 'packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_recv_block_hash': { name: 'packet_recv_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_recv_height': { name: 'packet_recv_height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_recv_maker': { name: 'packet_recv_maker'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_recv_maker_msg': { name: 'packet_recv_maker_msg'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_recv_timestamp': { name: 'packet_recv_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'packet_recv_transaction_hash': { name: 'packet_recv_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_send_block_hash': { name: 'packet_send_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_send_height': { name: 'packet_send_height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_send_timestamp': { name: 'packet_send_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'packet_send_transaction_hash': { name: 'packet_send_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_timeout_block_hash': { name: 'packet_timeout_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_timeout_height': { name: 'packet_timeout_height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_timeout_maker': { name: 'packet_timeout_maker'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_timeout_timestamp': { name: 'packet_timeout_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'packet_timeout_transaction_hash': { name: 'packet_timeout_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_chain': { name: 'source_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'source_channel_id': { name: 'source_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_client_id': { name: 'source_client_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_connection_id': { name: 'source_connection_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'source_port_id': { name: 'source_port_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'status': { name: 'status'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'success': { name: 'success'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'timeout_height': { name: 'timeout_height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timeout_timestamp': { name: 'timeout_timestamp'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'traces': { name: 'traces'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_traces_type'; ofType: null; }; }; } }; 'write_ack_block_hash': { name: 'write_ack_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'write_ack_height': { name: 'write_ack_height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'write_ack_timestamp': { name: 'write_ack_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'write_ack_transaction_hash': { name: 'write_ack_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_packet_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_packet_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_packet_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_packet_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_packet_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'acknowledgement'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'channel_version'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'decoded'; type: { kind: 'INPUT_OBJECT'; name: 'jsonb_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'decoded_flattened'; type: { kind: 'INPUT_OBJECT'; name: 'jsonb_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_channel_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_client_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_connection_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_port_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_block_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_maker'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_block_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_maker'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_maker_msg'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_send_block_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_send_height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_send_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_send_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_block_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_maker'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'source_channel_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_client_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_connection_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_port_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'success'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'timeout_height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'timeout_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'traces'; type: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'write_ack_block_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'write_ack_height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'write_ack_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'write_ack_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_packet_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_packet_type_order_by'; isOneOf: false; inputFields: [{ name: 'acknowledgement'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'channel_version'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'decoded'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'decoded_flattened'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_client_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_connection_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_port_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_maker'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_ack_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_maker'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_maker_msg'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_recv_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_send_block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_send_height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_send_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_send_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_maker'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_timeout_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'source_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_client_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_connection_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_port_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'status'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'success'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timeout_height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timeout_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'traces_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'write_ack_block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'write_ack_height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'write_ack_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'write_ack_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_packet_type_select_column': { name: 'v2_packet_type_select_column'; enumValues: 'acknowledgement' | 'channel_version' | 'data' | 'decoded' | 'decoded_flattened' | 'destination_chain_id' | 'destination_channel_id' | 'destination_client_id' | 'destination_connection_id' | 'destination_port_id' | 'destination_universal_chain_id' | 'packet_ack_block_hash' | 'packet_ack_height' | 'packet_ack_maker' | 'packet_ack_timestamp' | 'packet_ack_transaction_hash' | 'packet_hash' | 'packet_recv_block_hash' | 'packet_recv_height' | 'packet_recv_maker' | 'packet_recv_maker_msg' | 'packet_recv_timestamp' | 'packet_recv_transaction_hash' | 'packet_send_block_hash' | 'packet_send_height' | 'packet_send_timestamp' | 'packet_send_transaction_hash' | 'packet_timeout_block_hash' | 'packet_timeout_height' | 'packet_timeout_maker' | 'packet_timeout_timestamp' | 'packet_timeout_transaction_hash' | 'sort_order' | 'source_channel_id' | 'source_client_id' | 'source_connection_id' | 'source_port_id' | 'source_universal_chain_id' | 'status' | 'success' | 'timeout_height' | 'timeout_timestamp' | 'write_ack_block_hash' | 'write_ack_height' | 'write_ack_timestamp' | 'write_ack_transaction_hash'; }; - 'v2_packets_args': { kind: 'INPUT_OBJECT'; name: 'v2_packets_args'; isOneOf: false; inputFields: [{ name: 'p_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_comparison'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_packet_send_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_rpcs': { kind: 'OBJECT'; name: 'v2_rpcs'; fields: { 'type': { name: 'type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'url': { name: 'url'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_rpcs_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_min_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_rpcs_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'url'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_rpcs_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_max_order_by'; isOneOf: false; inputFields: [{ name: 'type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_rpcs_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_min_order_by'; isOneOf: false; inputFields: [{ name: 'type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_rpcs_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_rpcs_order_by'; isOneOf: false; inputFields: [{ name: 'type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'url'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_rpcs_select_column': { name: 'v2_rpcs_select_column'; enumValues: 'type' | 'url'; }; - 'v2_stats_daily_count_type': { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; fields: { 'count': { name: 'count'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'day_date': { name: 'day_date'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; } }; }; }; - 'v2_stats_daily_count_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_stats_daily_count_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_daily_count_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_stats_daily_count_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_daily_count_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'count'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'day_date'; type: { kind: 'INPUT_OBJECT'; name: 'date_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_daily_count_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_stats_daily_count_type_order_by'; isOneOf: false; inputFields: [{ name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'day_date'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_daily_count_type_select_column': { name: 'v2_stats_daily_count_type_select_column'; enumValues: 'count' | 'day_date'; }; - 'v2_stats_latency_args': { kind: 'INPUT_OBJECT'; name: 'v2_stats_latency_args'; isOneOf: false; inputFields: [{ name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_phase'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_latency_type': { kind: 'OBJECT'; name: 'v2_stats_latency_type'; fields: { 'secs_until_packet_ack': { name: 'secs_until_packet_ack'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; } }; 'secs_until_packet_recv': { name: 'secs_until_packet_recv'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; } }; 'secs_until_write_ack': { name: 'secs_until_write_ack'; type: { kind: 'SCALAR'; name: 'latency_percentiles_scalar'; ofType: null; } }; }; }; - 'v2_stats_latency_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_stats_latency_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_latency_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_stats_latency_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_latency_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'secs_until_packet_ack'; type: { kind: 'INPUT_OBJECT'; name: 'latency_percentiles_scalar_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'secs_until_packet_recv'; type: { kind: 'INPUT_OBJECT'; name: 'latency_percentiles_scalar_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'secs_until_write_ack'; type: { kind: 'INPUT_OBJECT'; name: 'latency_percentiles_scalar_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_latency_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_stats_latency_type_order_by'; isOneOf: false; inputFields: [{ name: 'secs_until_packet_ack'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'secs_until_packet_recv'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'secs_until_write_ack'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_latency_type_select_column': { name: 'v2_stats_latency_type_select_column'; enumValues: 'secs_until_packet_ack' | 'secs_until_packet_recv' | 'secs_until_write_ack'; }; - 'v2_stats_packets_chain_args': { kind: 'INPUT_OBJECT'; name: 'v2_stats_packets_chain_args'; isOneOf: false; inputFields: [{ name: 'p_days_back'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_packets_chain_type': { kind: 'OBJECT'; name: 'v2_stats_packets_chain_type'; fields: { 'day_date': { name: 'day_date'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'total_packets': { name: 'total_packets'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_stats_packets_chain_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_stats_packets_chain_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_packets_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_stats_packets_chain_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_packets_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'day_date'; type: { kind: 'INPUT_OBJECT'; name: 'date_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'total_packets'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_packets_chain_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_stats_packets_chain_type_order_by'; isOneOf: false; inputFields: [{ name: 'day_date'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'total_packets'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_packets_chain_type_select_column': { name: 'v2_stats_packets_chain_type_select_column'; enumValues: 'day_date' | 'destination_universal_chain_id' | 'source_universal_chain_id' | 'total_packets'; }; - 'v2_stats_packets_daily_count_args': { kind: 'INPUT_OBJECT'; name: 'v2_stats_packets_daily_count_args'; isOneOf: false; inputFields: [{ name: 'p_days_back'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_transfers_address_args': { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_address_args'; isOneOf: false; inputFields: [{ name: 'p_addresses_canonical'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: 'p_days_back'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_transfers_address_type': { kind: 'OBJECT'; name: 'v2_stats_transfers_address_type'; fields: { 'canonical_address': { name: 'canonical_address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'day_date': { name: 'day_date'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'transfer_count': { name: 'transfer_count'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_stats_transfers_address_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_address_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_address_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_address_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_address_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'canonical_address'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'day_date'; type: { kind: 'INPUT_OBJECT'; name: 'date_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_count'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_transfers_address_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_address_type_order_by'; isOneOf: false; inputFields: [{ name: 'canonical_address'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'day_date'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_transfers_address_type_select_column': { name: 'v2_stats_transfers_address_type_select_column'; enumValues: 'canonical_address' | 'day_date' | 'destination_universal_chain_id' | 'source_universal_chain_id' | 'transfer_count'; }; - 'v2_stats_transfers_chain_args': { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_chain_args'; isOneOf: false; inputFields: [{ name: 'p_days_back'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_transfers_chain_type': { kind: 'OBJECT'; name: 'v2_stats_transfers_chain_type'; fields: { 'day_date': { name: 'day_date'; type: { kind: 'SCALAR'; name: 'date'; ofType: null; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'total_transfers': { name: 'total_transfers'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_stats_transfers_chain_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_chain_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_chain_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_chain_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'day_date'; type: { kind: 'INPUT_OBJECT'; name: 'date_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'total_transfers'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_transfers_chain_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_chain_type_order_by'; isOneOf: false; inputFields: [{ name: 'day_date'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'total_transfers'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_transfers_chain_type_select_column': { name: 'v2_stats_transfers_chain_type_select_column'; enumValues: 'day_date' | 'destination_universal_chain_id' | 'source_universal_chain_id' | 'total_transfers'; }; - 'v2_stats_transfers_daily_count_args': { kind: 'INPUT_OBJECT'; name: 'v2_stats_transfers_daily_count_args'; isOneOf: false; inputFields: [{ name: 'p_days_back'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_type': { kind: 'OBJECT'; name: 'v2_stats_type'; fields: { 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'value': { name: 'value'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_stats_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_stats_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_stats_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_stats_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_stats_type_order_by'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_stats_type_select_column': { name: 'v2_stats_type_select_column'; enumValues: 'name' | 'value'; }; - 'v2_token_meta': { kind: 'OBJECT'; name: 'v2_token_meta'; fields: { 'chain': { name: 'chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'denom': { name: 'denom'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'rank': { name: 'rank'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'representations': { name: 'representations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta_representations'; ofType: null; }; }; }; } }; 'wrapping': { name: 'wrapping'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta_wrapping'; ofType: null; }; }; }; } }; }; }; - 'v2_token_meta_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'denom'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'rank'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'representations'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'wrapping'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_bool_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_order_by'; isOneOf: false; inputFields: [{ name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'denom'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'rank'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'representations_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'wrapping_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_aggregate_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources': { kind: 'OBJECT'; name: 'v2_token_meta_representation_sources'; fields: { 'chain': { name: 'chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'decimals': { name: 'decimals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'denom': { name: 'denom'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source': { name: 'source'; type: { kind: 'OBJECT'; name: 'v2_token_meta_sources'; ofType: null; } }; 'symbol': { name: 'symbol'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'update_timestamp': { name: 'update_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'wrapping': { name: 'wrapping'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta_representation_sources'; ofType: null; }; }; }; } }; }; }; - 'v2_token_meta_representation_sources_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'avg'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_avg_order_by'; ofType: null; }; defaultValue: null }, { name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_min_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_stddev_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_stddev_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_stddev_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'sum'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_sum_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_var_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_var_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'variance'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_variance_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_avg_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_avg_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'decimals'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'denom'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_sources_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'update_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'wrapping'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_bool_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_max_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'denom'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'update_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_min_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'denom'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'update_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_order_by'; isOneOf: false; inputFields: [{ name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'denom'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_sources_order_by'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'update_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'wrapping_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_aggregate_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_select_column': { name: 'v2_token_meta_representation_sources_select_column'; enumValues: 'decimals' | 'denom' | 'name' | 'symbol' | 'update_timestamp'; }; - 'v2_token_meta_representation_sources_stddev_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_stddev_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_stddev_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_stddev_pop_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_stddev_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_stddev_samp_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_sum_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_sum_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_var_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_var_pop_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_var_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_var_samp_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representation_sources_variance_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_variance_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations': { kind: 'OBJECT'; name: 'v2_token_meta_representations'; fields: { 'chain': { name: 'chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'decimals': { name: 'decimals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'logo_uri': { name: 'logo_uri'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sources': { name: 'sources'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta_representation_sources'; ofType: null; }; }; }; } }; 'symbol': { name: 'symbol'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_token_meta_representations_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'avg'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_avg_order_by'; ofType: null; }; defaultValue: null }, { name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_min_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_stddev_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_stddev_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_stddev_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'sum'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_sum_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_var_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_var_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'variance'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_variance_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_avg_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_avg_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'decimals'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sources'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_max_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_min_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_order_by'; isOneOf: false; inputFields: [{ name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sources_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representation_sources_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_select_column': { name: 'v2_token_meta_representations_select_column'; enumValues: 'decimals' | 'logo_uri' | 'name' | 'symbol'; }; - 'v2_token_meta_representations_stddev_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_stddev_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_stddev_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_stddev_pop_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_stddev_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_stddev_samp_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_sum_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_sum_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_var_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_var_pop_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_var_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_var_samp_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_representations_variance_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_representations_variance_order_by'; isOneOf: false; inputFields: [{ name: 'decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_select_column': { name: 'v2_token_meta_select_column'; enumValues: 'denom' | 'rank'; }; - 'v2_token_meta_sources': { kind: 'OBJECT'; name: 'v2_token_meta_sources'; fields: { 'logo_uri': { name: 'logo_uri'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_uri': { name: 'source_uri'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_token_meta_sources_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_sources_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_sources_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_sources_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_sources_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'logo_uri'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_uri'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_sources_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_sources_order_by'; isOneOf: false; inputFields: [{ name: 'logo_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_uri'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping': { kind: 'OBJECT'; name: 'v2_token_meta_wrapping'; fields: { 'destination_channel_id': { name: 'destination_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'unwrapped_chain': { name: 'unwrapped_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'unwrapped_denom': { name: 'unwrapped_denom'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'wrapped_chain': { name: 'wrapped_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'wrapper': { name: 'wrapper'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_token_meta_wrapping_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'avg'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_avg_order_by'; ofType: null; }; defaultValue: null }, { name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_min_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_stddev_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_stddev_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'stddev_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_stddev_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'sum'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_sum_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_pop'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_var_pop_order_by'; ofType: null; }; defaultValue: null }, { name: 'var_samp'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_var_samp_order_by'; ofType: null; }; defaultValue: null }, { name: 'variance'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_variance_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_avg_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_avg_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'destination_channel_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'unwrapped_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'unwrapped_denom'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'wrapped_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'wrapper'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_max_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'unwrapped_denom'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'wrapper'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_min_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'unwrapped_denom'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'wrapper'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'unwrapped_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'unwrapped_denom'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'wrapped_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'wrapper'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_select_column': { name: 'v2_token_meta_wrapping_select_column'; enumValues: 'destination_channel_id' | 'unwrapped_denom' | 'wrapper'; }; - 'v2_token_meta_wrapping_stddev_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_stddev_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_stddev_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_stddev_pop_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_stddev_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_stddev_samp_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_sum_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_sum_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_var_pop_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_var_pop_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_var_samp_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_var_samp_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_token_meta_wrapping_variance_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_wrapping_variance_order_by'; isOneOf: false; inputFields: [{ name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_tokens_args': { kind: 'INPUT_OBJECT'; name: 'v2_tokens_args'; isOneOf: false; inputFields: [{ name: 'p_denom'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_traces_type': { kind: 'OBJECT'; name: 'v2_traces_type'; fields: { 'block_hash': { name: 'block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'chain': { name: 'chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'event_index': { name: 'event_index'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'height': { name: 'height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'transaction_hash': { name: 'transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'type': { name: 'type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_traces_type_aggregate_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_aggregate_order_by'; isOneOf: false; inputFields: [{ name: 'count'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'max'; type: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_max_order_by'; ofType: null; }; defaultValue: null }, { name: 'min'; type: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_min_order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_traces_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'block_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'event_index'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'height'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'type'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_traces_type_max_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_max_order_by'; isOneOf: false; inputFields: [{ name: 'block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'event_index'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_traces_type_min_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_min_order_by'; isOneOf: false; inputFields: [{ name: 'block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'event_index'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_traces_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_order_by'; isOneOf: false; inputFields: [{ name: 'block_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'event_index'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'height'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_traces_type_select_column': { name: 'v2_traces_type_select_column'; enumValues: 'block_hash' | 'event_index' | 'height' | 'timestamp' | 'transaction_hash' | 'type' | 'universal_chain_id'; }; - 'v2_transfer_type': { kind: 'OBJECT'; name: 'v2_transfer_type'; fields: { 'base_amount': { name: 'base_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token': { name: 'base_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_decimals': { name: 'base_token_decimals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'base_token_meta': { name: 'base_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'base_token_name': { name: 'base_token_name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_path': { name: 'base_token_path'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_symbol': { name: 'base_token_symbol'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'destination_chain': { name: 'destination_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'fee_amount': { name: 'fee_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'fee_token': { name: 'fee_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'fee_token_meta': { name: 'fee_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'fee_type': { name: 'fee_type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_hash': { name: 'packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_shape': { name: 'packet_shape'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_amount': { name: 'quote_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_token': { name: 'quote_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_token_meta': { name: 'quote_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'receiver_canonical': { name: 'receiver_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'receiver_display': { name: 'receiver_display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'receiver_zkgm': { name: 'receiver_zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_canonical': { name: 'sender_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_display': { name: 'sender_display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_zkgm': { name: 'sender_zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_chain': { name: 'source_chain'; type: { kind: 'OBJECT'; name: 'v2_chains_view'; ofType: null; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'success': { name: 'success'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'traces': { name: 'traces'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_traces_type'; ofType: null; }; }; } }; 'transfer_index': { name: 'transfer_index'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'transfer_recv_timestamp': { name: 'transfer_recv_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'transfer_recv_transaction_hash': { name: 'transfer_recv_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'transfer_send_timestamp': { name: 'transfer_send_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'transfer_send_transaction_hash': { name: 'transfer_send_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'transfer_timeout_timestamp': { name: 'transfer_timeout_timestamp'; type: { kind: 'SCALAR'; name: 'timestamptz'; ofType: null; } }; 'transfer_timeout_transaction_hash': { name: 'transfer_timeout_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'wrap_direction': { name: 'wrap_direction'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_transfer_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_transfer_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_transfer_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_transfer_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_transfer_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'base_amount'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'base_token'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'base_token_decimals'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'base_token_meta'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'base_token_name'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'base_token_path'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'base_token_symbol'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'fee_amount'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'fee_token'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'fee_token_meta'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'fee_type'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'packet_shape'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'quote_amount'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'quote_token'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'quote_token_meta'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'receiver_canonical'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'receiver_display'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'receiver_zkgm'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sender_canonical'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sender_display'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sender_zkgm'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'success'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'traces'; type: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_index'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_recv_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_recv_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_send_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_send_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_timeout_timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'timestamptz_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'transfer_timeout_transaction_hash'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'wrap_direction'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_transfer_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_transfer_type_order_by'; isOneOf: false; inputFields: [{ name: 'base_amount'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'base_token'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'base_token_decimals'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'base_token_meta'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_order_by'; ofType: null; }; defaultValue: null }, { name: 'base_token_name'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'base_token_path'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'base_token_symbol'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'fee_amount'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'fee_token'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'fee_token_meta'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_order_by'; ofType: null; }; defaultValue: null }, { name: 'fee_type'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'packet_shape'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'quote_amount'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'quote_token'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'quote_token_meta'; type: { kind: 'INPUT_OBJECT'; name: 'v2_token_meta_order_by'; ofType: null; }; defaultValue: null }, { name: 'receiver_canonical'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'receiver_display'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'receiver_zkgm'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sender_canonical'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sender_display'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sender_zkgm'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'sort_order'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_chain'; type: { kind: 'INPUT_OBJECT'; name: 'v2_chains_view_order_by'; ofType: null; }; defaultValue: null }, { name: 'source_universal_chain_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'success'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'traces_aggregate'; type: { kind: 'INPUT_OBJECT'; name: 'v2_traces_type_aggregate_order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_index'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_recv_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_recv_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_send_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_send_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_timeout_timestamp'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'transfer_timeout_transaction_hash'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'wrap_direction'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_transfer_type_select_column': { name: 'v2_transfer_type_select_column'; enumValues: 'base_amount' | 'base_token' | 'base_token_decimals' | 'base_token_name' | 'base_token_path' | 'base_token_symbol' | 'destination_universal_chain_id' | 'fee_amount' | 'fee_token' | 'fee_type' | 'packet_hash' | 'packet_shape' | 'quote_amount' | 'quote_token' | 'receiver_canonical' | 'receiver_display' | 'receiver_zkgm' | 'sender_canonical' | 'sender_display' | 'sender_zkgm' | 'sort_order' | 'source_universal_chain_id' | 'success' | 'transfer_index' | 'transfer_recv_timestamp' | 'transfer_recv_transaction_hash' | 'transfer_send_timestamp' | 'transfer_send_transaction_hash' | 'transfer_timeout_timestamp' | 'transfer_timeout_transaction_hash' | 'wrap_direction'; }; - 'v2_transfers_args': { kind: 'INPUT_OBJECT'; name: 'v2_transfers_args'; isOneOf: false; inputFields: [{ name: 'p_addresses_canonical'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: 'p_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_comparison'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_transfer_index'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; - 'v2_util_get_address_types_for_display_address_args': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_address_types_for_display_address_args'; isOneOf: false; inputFields: [{ name: 'p_chain_type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_display_address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_util_get_address_types_for_display_address_type': { kind: 'OBJECT'; name: 'v2_util_get_address_types_for_display_address_type'; fields: { 'canonical': { name: 'canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'display': { name: 'display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'zkgm': { name: 'zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_util_get_address_types_for_display_address_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_address_types_for_display_address_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_util_get_address_types_for_display_address_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_util_get_address_types_for_display_address_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_util_get_address_types_for_display_address_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'canonical'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'display'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'zkgm'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_util_get_address_types_for_display_address_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_address_types_for_display_address_type_order_by'; isOneOf: false; inputFields: [{ name: 'canonical'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'display'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'zkgm'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_util_get_address_types_for_display_address_type_select_column': { name: 'v2_util_get_address_types_for_display_address_type_select_column'; enumValues: 'canonical' | 'display' | 'zkgm'; }; - 'v2_util_get_transfer_request_details_args': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_transfer_request_details_args'; isOneOf: false; inputFields: [{ name: 'p_base_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'v2_util_get_transfer_request_details_type': { kind: 'OBJECT'; name: 'v2_util_get_transfer_request_details_type'; fields: { 'already_exists': { name: 'already_exists'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'destination_channel_id': { name: 'destination_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'quote_token': { name: 'quote_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_channel_id': { name: 'source_channel_id'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'wrap_direction': { name: 'wrap_direction'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'v2_util_get_transfer_request_details_type_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_transfer_request_details_type_bool_exp'; isOneOf: false; inputFields: [{ name: '_and'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_util_get_transfer_request_details_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: '_not'; type: { kind: 'INPUT_OBJECT'; name: 'v2_util_get_transfer_request_details_type_bool_exp'; ofType: null; }; defaultValue: null }, { name: '_or'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'v2_util_get_transfer_request_details_type_bool_exp'; ofType: null; }; }; }; defaultValue: null }, { name: 'already_exists'; type: { kind: 'INPUT_OBJECT'; name: 'Boolean_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'destination_channel_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'quote_token'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'source_channel_id'; type: { kind: 'INPUT_OBJECT'; name: 'Int_comparison_exp'; ofType: null; }; defaultValue: null }, { name: 'wrap_direction'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: null }]; }; - 'v2_util_get_transfer_request_details_type_order_by': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_transfer_request_details_type_order_by'; isOneOf: false; inputFields: [{ name: 'already_exists'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'destination_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'quote_token'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'source_channel_id'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }, { name: 'wrap_direction'; type: { kind: 'ENUM'; name: 'order_by'; ofType: null; }; defaultValue: null }]; }; - 'v2_util_get_transfer_request_details_type_select_column': { name: 'v2_util_get_transfer_request_details_type_select_column'; enumValues: 'already_exists' | 'destination_channel_id' | 'quote_token' | 'source_channel_id' | 'wrap_direction'; }; -}; - /** An IntrospectionQuery representation of your schema. * * @remarks @@ -226,11 +10,5709 @@ export type introspection_types = { * instead save to a .ts instead of a .d.ts file. */ export type introspection = { - name: never; - query: 'query_root'; - mutation: 'mutation_root'; - subscription: 'subscription_root'; - types: introspection_types; + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": null, + "subscriptionType": null, + "types": [ + { + "kind": "SCALAR", + "name": "Boolean" + }, + { + "kind": "ENUM", + "name": "ComparisonOp", + "enumValues": [ + { + "name": "lt", + "isDeprecated": false + }, + { + "name": "gt", + "isDeprecated": false + } + ] + }, + { + "kind": "SCALAR", + "name": "DateTime" + }, + { + "kind": "SCALAR", + "name": "Float" + }, + { + "kind": "SCALAR", + "name": "Int" + }, + { + "kind": "INPUT_OBJECT", + "name": "Int_comparison_exp", + "inputFields": [ + { + "name": "_eq", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "JSON" + }, + { + "kind": "OBJECT", + "name": "LatencyPercentiles", + "fields": [ + { + "name": "median", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "p5", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "p95", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "NaiveDate" + }, + { + "kind": "ENUM", + "name": "OrderBy", + "enumValues": [ + { + "name": "asc", + "isDeprecated": false + }, + { + "name": "asc_nulls_first", + "isDeprecated": false + }, + { + "name": "asc_nulls_last", + "isDeprecated": false + }, + { + "name": "desc", + "isDeprecated": false + }, + { + "name": "desc_nulls_first", + "isDeprecated": false + }, + { + "name": "desc_nulls_last", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "Query", + "fields": [ + { + "name": "dashboard_balance_current", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "dashboard_balance_current_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "dashboard_balance_current_args" + } + }, + "defaultValue": "{p_contract_address_canonical: null, p_phase: null, p_universal_chain_id: null, p_wallet_addresses_canonical: null}" + } + ], + "isDeprecated": false + }, + { + "name": "dashboard_transfer_count_by_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "dashboard_count_by_chain_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "dashboard_count_by_chain_args" + } + }, + "defaultValue": "{p_addresses_dashboard: null, p_phase: null}" + }, + { + "name": "order_by", + "type": { + "kind": "INPUT_OBJECT", + "name": "dashboard_count_by_chain_type_order_by" + }, + "defaultValue": "null" + } + ], + "isDeprecated": false + }, + { + "name": "dashboard_transfer_days_count_by_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "dashboard_days_by_chain_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "dashboard_days_by_chain_args" + } + }, + "defaultValue": "{p_addresses_dashboard: null}" + }, + { + "name": "order_by", + "type": { + "kind": "INPUT_OBJECT", + "name": "dashboard_days_by_chain_type_order_by" + }, + "defaultValue": "null" + } + ], + "isDeprecated": false + }, + { + "name": "v2_bonds", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_bond_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_bonds_args" + } + }, + "defaultValue": "{p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_chains", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_chains_args" + } + }, + "defaultValue": "{p_comparison: lt, p_limit: null, p_sort_order: null, p_universal_chain_id: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_channels", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_channel_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_channels_args" + } + }, + "defaultValue": "{p_comparison: lt, p_destination_channel_id: null, p_destination_client_id: null, p_destination_connection_id: null, p_destination_port_id: null, p_destination_universal_chain_id: null, p_limit: null, p_recommended: null, p_sort_order: null, p_source_channel_id: null, p_source_client_id: null, p_source_connection_id: null, p_source_port_id: null, p_source_universal_chain_id: null, p_tags: null, p_version: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_clients", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_client_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_clients_args" + } + }, + "defaultValue": "{p_client_id: null, p_comparison: lt, p_counterparty_universal_chain_id: null, p_limit: null, p_sort_order: null, p_universal_chain_id: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_connections", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_connection_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_connections_args" + } + }, + "defaultValue": "{p_comparison: lt, p_destination_client_id: null, p_destination_connection_id: null, p_destination_universal_chain_id: null, p_limit: null, p_sort_order: null, p_source_client_id: null, p_source_connection_id: null, p_source_universal_chain_id: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_errors", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_error_type" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "v2_health_check", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_health_check_type" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "v2_instructions", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_instruction_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_instructions_args" + } + }, + "defaultValue": "{p_block_hash: null, p_comparison: lt, p_limit: null, p_multiplex_contract_address: null, p_multiplex_sender: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_transaction_hash: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_packets", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_packet_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_packets_args" + } + }, + "defaultValue": "{p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_exceeding_sla: null, p_limit: null, p_network: null, p_packet_hash: null, p_packet_send_timestamp: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_stats_count", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_stats_type" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "v2_stats_latency", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_stats_latency_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_stats_latency_args" + } + }, + "defaultValue": "{p_destination_universal_chain_id: null, p_phase: null, p_source_universal_chain_id: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_stats_packets_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_stats_packets_chain_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_stats_packets_chain_args" + } + }, + "defaultValue": "{p_days_back: null, p_destination_universal_chain_id: null, p_source_universal_chain_id: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_stats_packets_daily_count", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_stats_daily_count_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_stats_packets_daily_count_args" + } + }, + "defaultValue": "{p_days_back: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_stats_transfers_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_stats_transfers_chain_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_stats_transfers_chain_args" + } + }, + "defaultValue": "{p_days_back: null, p_destination_universal_chain_id: null, p_source_universal_chain_id: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_stats_transfers_daily_count", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_stats_daily_count_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_stats_transfers_daily_count_args" + } + }, + "defaultValue": "{p_days_back: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_tokens", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_token_meta" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_tokens_args" + } + }, + "defaultValue": "{p_denom: null, p_universal_chain_id: null, p_whitelist: null}" + }, + { + "name": "order_by", + "type": { + "kind": "INPUT_OBJECT", + "name": "v2_token_meta_order_by" + }, + "defaultValue": "null" + } + ], + "isDeprecated": false + }, + { + "name": "v2_transfers", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_transfer_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_transfers_args" + } + }, + "defaultValue": "{p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null, p_transfer_index: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_unbonds", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_unbond_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_unbonds_args" + } + }, + "defaultValue": "{p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_util_get_address_types_for_display_address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_util_get_address_types_for_display_address_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_util_get_address_types_for_display_address_args" + } + }, + "defaultValue": "{p_display_address: null, p_chain_type: null}" + } + ], + "isDeprecated": false + }, + { + "name": "v2_util_get_transfer_request_details", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_util_get_transfer_request_details_type" + } + } + } + }, + "args": [ + { + "name": "args", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_util_get_transfer_request_details_args" + } + }, + "defaultValue": "{p_source_universal_chain_id: null, p_destination_universal_chain_id: null, p_base_token: null}" + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "String" + }, + { + "kind": "INPUT_OBJECT", + "name": "String_comparison_exp", + "inputFields": [ + { + "name": "_eq", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "dashboard_balance_current_args", + "inputFields": [ + { + "name": "p_contract_address_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_phase", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_wallet_addresses_canonical", + "type": { + "kind": "SCALAR", + "name": "jsonb" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "dashboard_balance_current_type", + "fields": [ + { + "name": "balance", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "balance_usd", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "contract_address_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wallet_address_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "weighted_balance", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "weighted_balance_usd", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "dashboard_count_by_chain_args", + "inputFields": [ + { + "name": "p_addresses_dashboard", + "type": { + "kind": "SCALAR", + "name": "jsonb" + } + }, + { + "name": "p_phase", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "dashboard_count_by_chain_type", + "fields": [ + { + "name": "count", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "phase", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "dashboard_count_by_chain_type_order_by", + "inputFields": [ + { + "name": "phase", + "type": { + "kind": "ENUM", + "name": "OrderBy" + }, + "defaultValue": "null" + }, + { + "name": "universal_chain_id", + "type": { + "kind": "ENUM", + "name": "OrderBy" + }, + "defaultValue": "null" + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "dashboard_days_by_chain_args", + "inputFields": [ + { + "name": "p_addresses_dashboard", + "type": { + "kind": "SCALAR", + "name": "jsonb" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "dashboard_days_by_chain_type", + "fields": [ + { + "name": "day_count", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "dashboard_days_by_chain_type_order_by", + "inputFields": [ + { + "name": "universal_chain_id", + "type": { + "kind": "ENUM", + "name": "OrderBy" + }, + "defaultValue": "null" + } + ], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "jsonb" + }, + { + "kind": "OBJECT", + "name": "v2_bond_type", + "fields": [ + { + "name": "base_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "bond_recv_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "bond_recv_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "bond_send_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "bond_send_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "bond_timeout_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "bond_timeout_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_shape", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "quote_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "quote_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "quote_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_zkgm", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "remote_base_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "remote_base_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "remote_base_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "remote_quote_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "remote_quote_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "remote_quote_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "remote_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_zkgm", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "success", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "traces", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_traces_type" + } + } + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_bonds_args", + "inputFields": [ + { + "name": "p_addresses_canonical", + "type": { + "kind": "SCALAR", + "name": "jsonb" + } + }, + { + "name": "p_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_network", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_chain_edition", + "fields": [ + { + "name": "environment", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_chain_features", + "fields": [ + { + "name": "channel_list", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "connection_list", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "environment", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "index_status", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_list", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_list", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_submission", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_chain_features_bool_exp", + "inputFields": [ + { + "name": "environment", + "type": { + "kind": "INPUT_OBJECT", + "name": "String_comparison_exp" + }, + "defaultValue": "null" + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_chain_status_type", + "fields": [ + { + "name": "height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "tip_age_seconds", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_chain_type", + "fields": [ + { + "name": "addr_prefix", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "display_name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "editions", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_edition" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "explorers", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_explorers" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "features", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_features" + } + } + } + }, + "args": [ + { + "name": "where", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_chain_features_bool_exp" + } + }, + "defaultValue": "{environment: null}" + } + ], + "isDeprecated": false + }, + { + "name": "logo_uri", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "minter_address_display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "rpc_type", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "rpcs", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_rpcs" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "status", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_status_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "testnet", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_chains_args", + "inputFields": [ + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_channel_fee", + "fields": [ + { + "name": "action", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fee", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_channel_type", + "fields": [ + { + "name": "destination_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fees", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_channel_fee" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sla", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "version", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_channels_args", + "inputFields": [ + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_destination_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_destination_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_destination_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_destination_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_recommended", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_source_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_source_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_source_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_tags", + "type": { + "kind": "SCALAR", + "name": "jsonb" + } + }, + { + "name": "p_version", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_client_status_type", + "fields": [ + { + "name": "block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "counterparty_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_client_type", + "fields": [ + { + "name": "chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "counterparty_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "counterparty_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "status", + "type": { + "kind": "OBJECT", + "name": "v2_client_status_type" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_clients_args", + "inputFields": [ + { + "name": "p_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_counterparty_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_connection_type", + "fields": [ + { + "name": "destination_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_connections_args", + "inputFields": [ + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_destination_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_destination_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_source_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_error_type", + "fields": [ + { + "name": "detail", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hint", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "message", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "union_error_code", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_explorers", + "fields": [ + { + "name": "address_url", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "block_url", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "display_name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "home_url", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "logo_uri", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "tx_url", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_health_check_type", + "fields": [ + { + "name": "environment", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "last_update", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_instruction_type", + "fields": [ + { + "name": "acknowledgement", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "channel_version", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "data", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "decoded", + "type": { + "kind": "SCALAR", + "name": "JSON" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "decoded_flattened", + "type": { + "kind": "SCALAR", + "name": "JSON" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "instruction", + "type": { + "kind": "SCALAR", + "name": "JSON" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "instruction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "instruction_index", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "instruction_path", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "instruction_type", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "internal_destination_chain_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "internal_source_chain_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "opcode", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "operand", + "type": { + "kind": "SCALAR", + "name": "JSON" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_maker", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_maker", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_maker_msg", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_maker", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "path", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "salt", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "structure", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "success", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timeout_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timeout_timestamp", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "version", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_instructions_args", + "inputFields": [ + { + "name": "p_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_multiplex_contract_address", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_multiplex_sender", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_network", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_packet_type", + "fields": [ + { + "name": "acknowledgement", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "channel_version", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "data", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "decoded", + "type": { + "kind": "SCALAR", + "name": "JSON" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "decoded_flattened", + "type": { + "kind": "SCALAR", + "name": "JSON" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "internal_destination_chain_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "internal_source_chain_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_maker", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_ack_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_maker", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_maker_msg", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_recv_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_send_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_maker", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_timeout_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_client_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_connection_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_port_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "structure", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "success", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timeout_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timeout_timestamp", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "traces", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_traces_type" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "write_ack_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_packets_args", + "inputFields": [ + { + "name": "p_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_exceeding_sla", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_network", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_packet_send_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_rpcs", + "fields": [ + { + "name": "contact", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "url", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_stats_daily_count_type", + "fields": [ + { + "name": "count", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "day_date", + "type": { + "kind": "SCALAR", + "name": "NaiveDate" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_stats_latency_args", + "inputFields": [ + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_phase", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_stats_latency_type", + "fields": [ + { + "name": "secs_until_packet_ack", + "type": { + "kind": "OBJECT", + "name": "LatencyPercentiles" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secs_until_packet_recv", + "type": { + "kind": "OBJECT", + "name": "LatencyPercentiles" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secs_until_write_ack", + "type": { + "kind": "OBJECT", + "name": "LatencyPercentiles" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_stats_packets_chain_args", + "inputFields": [ + { + "name": "p_days_back", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_stats_packets_chain_type", + "fields": [ + { + "name": "day_date", + "type": { + "kind": "SCALAR", + "name": "NaiveDate" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "total_packets", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_stats_packets_daily_count_args", + "inputFields": [ + { + "name": "p_days_back", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_stats_transfers_chain_args", + "inputFields": [ + { + "name": "p_days_back", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_stats_transfers_chain_type", + "fields": [ + { + "name": "day_date", + "type": { + "kind": "SCALAR", + "name": "NaiveDate" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "total_transfers", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_stats_transfers_daily_count_args", + "inputFields": [ + { + "name": "p_days_back", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_stats_type", + "fields": [ + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "value", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_token_meta", + "fields": [ + { + "name": "bucket", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta_bucket" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "denom", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "rank", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "representations", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_token_meta_representations" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrapping", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_token_meta_wrapping" + } + } + } + }, + "args": [ + { + "name": "where", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "v2_token_meta_wrapping_bool_exp" + } + }, + "defaultValue": "{destination_channel_id: null}" + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_token_meta_bucket", + "fields": [ + { + "name": "capacity", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "denom", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "refill_rate", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_token_meta_order_by", + "inputFields": [ + { + "name": "rank", + "type": { + "kind": "ENUM", + "name": "OrderBy" + }, + "defaultValue": "null" + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_token_meta_representation_sources", + "fields": [ + { + "name": "chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "decimals", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "denom", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_token_meta_sources" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "symbol", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "update_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_token_meta_representations", + "fields": [ + { + "name": "chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "decimals", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "denom", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "logo_uri", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sources", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_token_meta_representation_sources" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "symbol", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_token_meta_sources", + "fields": [ + { + "name": "logo_uri", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_uri", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_token_meta_wrapping", + "fields": [ + { + "name": "destination_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "index", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unwrapped_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unwrapped_denom", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrapped_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrapped_denom", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrapper", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_token_meta_wrapping_bool_exp", + "inputFields": [ + { + "name": "destination_channel_id", + "type": { + "kind": "INPUT_OBJECT", + "name": "Int_comparison_exp" + }, + "defaultValue": "null" + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_tokens_args", + "inputFields": [ + { + "name": "p_denom", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_whitelist", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_traces_type", + "fields": [ + { + "name": "block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event_index", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "height", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "v2_transfer_type", + "fields": [ + { + "name": "base_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token_decimals", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token_name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token_path", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token_symbol", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fee_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fee_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fee_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fee_type", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_shape", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "quote_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "quote_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "quote_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_zkgm", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_zkgm", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "success", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "traces", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_traces_type" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_index", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_recv_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_recv_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_send_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_send_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_timeout_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transfer_timeout_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrap_direction", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_transfers_args", + "inputFields": [ + { + "name": "p_addresses_canonical", + "type": { + "kind": "SCALAR", + "name": "jsonb" + } + }, + { + "name": "p_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_network", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_transfer_index", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_unbond_type", + "fields": [ + { + "name": "base_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "base_token_meta", + "type": { + "kind": "OBJECT", + "name": "v2_token_meta" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "packet_shape", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "receiver_zkgm", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sender_zkgm", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_chain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_chain_type" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "success", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "traces", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "v2_traces_type" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unbond_amount", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unbond_recv_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unbond_recv_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unbond_send_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unbond_send_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unbond_timeout_timestamp", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unbond_timeout_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_unbonds_args", + "inputFields": [ + { + "name": "p_addresses_canonical", + "type": { + "kind": "SCALAR", + "name": "jsonb" + } + }, + { + "name": "p_block_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_comparison", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "ComparisonOp" + } + }, + "defaultValue": "lt" + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_limit", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "p_network", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_packet_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_sort_order", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_transaction_hash", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_util_get_address_types_for_display_address_args", + "inputFields": [ + { + "name": "p_display_address", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_chain_type", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_util_get_address_types_for_display_address_type", + "fields": [ + { + "name": "canonical", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "display", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "zkgm", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "v2_util_get_transfer_request_details_args", + "inputFields": [ + { + "name": "p_source_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_destination_universal_chain_id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "p_base_token", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "v2_util_get_transfer_request_details_type", + "fields": [ + { + "name": "already_exists", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destination_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "quote_token", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "source_channel_id", + "type": { + "kind": "SCALAR", + "name": "Int" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrap_direction", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + } + ], + "directives": [] + } }; import * as gqlTada from 'gql.tada'; diff --git a/ts-sdk/src/generated/schema.graphql b/ts-sdk/src/generated/schema.graphql index c21221f21f..cdeac2275b 100644 --- a/ts-sdk/src/generated/schema.graphql +++ b/ts-sdk/src/generated/schema.graphql @@ -1,10 +1,4 @@ -schema { - query: query_root - mutation: mutation_root - subscription: subscription_root -} - -"""whether this query should be cached (Hasura Cloud only)""" +"""Cache directive for queries""" directive @cached( """measured in seconds""" ttl: Int! = 60 @@ -13,4085 +7,754 @@ directive @cached( refresh: Boolean! = false ) on QUERY -""" -Boolean expression to compare columns of type "Boolean". All fields are combined with logical 'AND'. -""" -input Boolean_comparison_exp { - _eq: Boolean - _gt: Boolean - _gte: Boolean - _in: [Boolean!] - _is_null: Boolean - _lt: Boolean - _lte: Boolean - _neq: Boolean - _nin: [Boolean!] +enum ComparisonOp { + """Less than: `a < b`""" + lt + + """Greater than: `a > b`""" + gt } """ -Boolean expression to compare columns of type "Int". All fields are combined with logical 'AND'. +Implement the DateTime scalar + +The input/output is a string in RFC3339 format. """ -input Int_comparison_exp { - _eq: Int - _gt: Int - _gte: Int - _in: [Int!] - _is_null: Boolean - _lt: Int - _lte: Int - _neq: Int - _nin: [Int!] -} +scalar DateTime @specifiedBy(url: "https://datatracker.ietf.org/doc/html/rfc3339") -type Request { - address: String! - id: Int! - time: String! - txHash: String +input Int_comparison_exp { + _eq: Int! } -""" -Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. -""" -input String_array_comparison_exp { - """is the array contained in the given array value""" - _contained_in: [String!] +"""A scalar that can represent any JSON value.""" +scalar JSON - """does the array contain the given value""" - _contains: [String!] - _eq: [String!] - _gt: [String!] - _gte: [String!] - _in: [[String!]!] - _is_null: Boolean - _lt: [String!] - _lte: [String!] - _neq: [String!] - _nin: [[String!]!] +type LatencyPercentiles { + p5: Float! + median: Float! + p95: Float! } """ -Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. -""" -input String_comparison_exp { - _eq: String - _gt: String - _gte: String - - """does the column match the given case-insensitive pattern""" - _ilike: String - _in: [String!] - - """ - does the column match the given POSIX regular expression, case insensitive - """ - _iregex: String - _is_null: Boolean +ISO 8601 calendar date without timezone. +Format: %Y-%m-%d - """does the column match the given pattern""" - _like: String - _lt: String - _lte: String - _neq: String +# Examples - """does the column NOT match the given case-insensitive pattern""" - _nilike: String - _nin: [String!] - - """ - does the column NOT match the given POSIX regular expression, case insensitive - """ - _niregex: String - - """does the column NOT match the given pattern""" - _nlike: String +* `1994-11-13` +* `2000-02-24` +""" +scalar NaiveDate - """ - does the column NOT match the given POSIX regular expression, case sensitive - """ - _nregex: String +enum OrderBy { + asc + asc_nulls_first + asc_nulls_last + desc + desc_nulls_first + desc_nulls_last +} - """does the column NOT match the given SQL regular expression""" - _nsimilar: String +type Query { + v2_bonds(args: v2_bonds_args! = {p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}): [v2_bond_type!]! + v2_chains(args: v2_chains_args! = {p_comparison: lt, p_limit: null, p_sort_order: null, p_universal_chain_id: null}): [v2_chain_type!]! + v2_channels(args: v2_channels_args! = {p_comparison: lt, p_destination_channel_id: null, p_destination_client_id: null, p_destination_connection_id: null, p_destination_port_id: null, p_destination_universal_chain_id: null, p_limit: null, p_recommended: null, p_sort_order: null, p_source_channel_id: null, p_source_client_id: null, p_source_connection_id: null, p_source_port_id: null, p_source_universal_chain_id: null, p_tags: null, p_version: null}): [v2_channel_type!]! + v2_clients(args: v2_clients_args! = {p_client_id: null, p_comparison: lt, p_counterparty_universal_chain_id: null, p_limit: null, p_sort_order: null, p_universal_chain_id: null}): [v2_client_type!]! + v2_connections(args: v2_connections_args! = {p_comparison: lt, p_destination_client_id: null, p_destination_connection_id: null, p_destination_universal_chain_id: null, p_limit: null, p_sort_order: null, p_source_client_id: null, p_source_connection_id: null, p_source_universal_chain_id: null}): [v2_connection_type!]! + v2_errors: [v2_error_type!]! + v2_health_check: [v2_health_check_type!]! + v2_instructions(args: v2_instructions_args! = {p_block_hash: null, p_comparison: lt, p_limit: null, p_multiplex_contract_address: null, p_multiplex_sender: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_transaction_hash: null}): [v2_instruction_type!]! + v2_packets(args: v2_packets_args! = {p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_exceeding_sla: null, p_limit: null, p_network: null, p_packet_hash: null, p_packet_send_timestamp: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}): [v2_packet_type!]! + v2_transfers(args: v2_transfers_args! = {p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null, p_transfer_index: null}): [v2_transfer_type!]! + v2_tokens(args: v2_tokens_args! = {p_denom: null, p_universal_chain_id: null, p_whitelist: null}, order_by: v2_token_meta_order_by = null): [v2_token_meta!]! + v2_unbonds(args: v2_unbonds_args! = {p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}): [v2_unbond_type!]! + v2_util_get_transfer_request_details(args: v2_util_get_transfer_request_details_args! = {p_source_universal_chain_id: null, p_destination_universal_chain_id: null, p_base_token: null}): [v2_util_get_transfer_request_details_type!]! + v2_util_get_address_types_for_display_address(args: v2_util_get_address_types_for_display_address_args! = {p_display_address: null, p_chain_type: null}): [v2_util_get_address_types_for_display_address_type!]! + v2_stats_count: [v2_stats_type!]! + v2_stats_latency(args: v2_stats_latency_args! = {p_destination_universal_chain_id: null, p_phase: null, p_source_universal_chain_id: null}): [v2_stats_latency_type!]! + v2_stats_packets_chain(args: v2_stats_packets_chain_args! = {p_days_back: null, p_destination_universal_chain_id: null, p_source_universal_chain_id: null}): [v2_stats_packets_chain_type!]! + v2_stats_packets_daily_count(args: v2_stats_packets_daily_count_args! = {p_days_back: null}): [v2_stats_daily_count_type!]! + v2_stats_transfers_chain(args: v2_stats_transfers_chain_args! = {p_days_back: null, p_destination_universal_chain_id: null, p_source_universal_chain_id: null}): [v2_stats_transfers_chain_type!]! + v2_stats_transfers_daily_count(args: v2_stats_transfers_daily_count_args! = {p_days_back: null}): [v2_stats_daily_count_type!]! + dashboard_balance_current(args: dashboard_balance_current_args! = {p_contract_address_canonical: null, p_phase: null, p_universal_chain_id: null, p_wallet_addresses_canonical: null}): [dashboard_balance_current_type!]! + dashboard_transfer_count_by_chain(args: dashboard_count_by_chain_args! = {p_addresses_dashboard: null, p_phase: null}, order_by: dashboard_count_by_chain_type_order_by = null): [dashboard_count_by_chain_type!]! + dashboard_transfer_days_count_by_chain(args: dashboard_days_by_chain_args! = {p_addresses_dashboard: null}, order_by: dashboard_days_by_chain_type_order_by = null): [dashboard_days_by_chain_type!]! +} - """ - does the column match the given POSIX regular expression, case sensitive - """ - _regex: String +input String_comparison_exp { + _eq: String +} - """does the column match the given SQL regular expression""" - _similar: String +input dashboard_balance_current_args { + p_contract_address_canonical: String + p_phase: String + p_universal_chain_id: String + p_wallet_addresses_canonical: jsonb } -"""ordering argument of a cursor""" -enum cursor_ordering { - """ascending ordering of the cursor""" - ASC +type dashboard_balance_current_type { + universal_chain_id: String + contract_address_canonical: String + wallet_address_canonical: String + balance: String + weighted_balance: String + token: String + balance_usd: String + weighted_balance_usd: String +} - """descending ordering of the cursor""" - DESC +input dashboard_count_by_chain_args { + p_addresses_dashboard: jsonb + p_phase: String } -""" -columns and relationships of "dashboard.count_by_chain_type" -""" type dashboard_count_by_chain_type { - count: String - phase: String universal_chain_id: String + phase: String + count: String } -""" -Boolean expression to filter rows from the table "dashboard.count_by_chain_type". All fields are combined with a logical 'AND'. -""" -input dashboard_count_by_chain_type_bool_exp { - _and: [dashboard_count_by_chain_type_bool_exp!] - _not: dashboard_count_by_chain_type_bool_exp - _or: [dashboard_count_by_chain_type_bool_exp!] - count: String_comparison_exp - phase: String_comparison_exp - universal_chain_id: String_comparison_exp -} - -""" -Ordering options when selecting data from "dashboard.count_by_chain_type". -""" input dashboard_count_by_chain_type_order_by { - count: order_by - phase: order_by - universal_chain_id: order_by + phase: OrderBy = null + universal_chain_id: OrderBy = null } -""" -select columns of table "dashboard.count_by_chain_type" -""" -enum dashboard_count_by_chain_type_select_column { - """column name""" - count - - """column name""" - phase - - """column name""" - universal_chain_id +input dashboard_days_by_chain_args { + p_addresses_dashboard: jsonb } -""" -columns and relationships of "dashboard.days_by_chain_type" -""" type dashboard_days_by_chain_type { - day_count: String universal_chain_id: String + day_count: String } -""" -Boolean expression to filter rows from the table "dashboard.days_by_chain_type". All fields are combined with a logical 'AND'. -""" -input dashboard_days_by_chain_type_bool_exp { - _and: [dashboard_days_by_chain_type_bool_exp!] - _not: dashboard_days_by_chain_type_bool_exp - _or: [dashboard_days_by_chain_type_bool_exp!] - day_count: String_comparison_exp - universal_chain_id: String_comparison_exp -} - -""" -Ordering options when selecting data from "dashboard.days_by_chain_type". -""" input dashboard_days_by_chain_type_order_by { - day_count: order_by - universal_chain_id: order_by + universal_chain_id: OrderBy = null } -""" -select columns of table "dashboard.days_by_chain_type" -""" -enum dashboard_days_by_chain_type_select_column { - """column name""" - day_count +"""Scalar implementation for GraphQL""" +scalar jsonb - """column name""" - universal_chain_id +type v2_bond_type { + packet_hash: String + success: Boolean + packet_shape: String + source_universal_chain_id: String + remote_universal_chain_id: String + destination_universal_chain_id: String + sender_canonical: String + sender_display: String + sender_zkgm: String + receiver_canonical: String + receiver_display: String + receiver_zkgm: String + base_token: String + base_amount: String + quote_token: String + quote_amount: String + remote_base_token: String + remote_base_amount: String + remote_quote_token: String + remote_quote_amount: String + bond_send_timestamp: DateTime + bond_send_transaction_hash: String + bond_recv_timestamp: DateTime + bond_recv_transaction_hash: String + bond_timeout_timestamp: DateTime + bond_timeout_transaction_hash: String + sort_order: String + source_chain: v2_chain_type! + destination_chain: v2_chain_type! + traces: [v2_traces_type!]! + base_token_meta: v2_token_meta + quote_token_meta: v2_token_meta + remote_base_token_meta: v2_token_meta + remote_quote_token_meta: v2_token_meta } -input dashboard_transfer_count_by_chain_args { - p_addresses_dashboard: jsonb - p_phase: String +input v2_bonds_args { + p_addresses_canonical: jsonb + p_block_hash: String + p_comparison: ComparisonOp! = lt + p_destination_universal_chain_id: String + p_limit: Int + p_network: String + p_packet_hash: String + p_sort_order: String + p_source_universal_chain_id: String + p_transaction_hash: String } -input dashboard_transfer_days_count_by_chain_args { - p_addresses_dashboard: jsonb +type v2_chain_edition { + name: String + environment: String } -scalar date - -""" -Boolean expression to compare columns of type "date". All fields are combined with logical 'AND'. -""" -input date_comparison_exp { - _eq: date - _gt: date - _gte: date - _in: [date!] - _is_null: Boolean - _lt: date - _lte: date - _neq: date - _nin: [date!] +type v2_chain_features { + environment: String + packet_list: Boolean + transfer_list: Boolean + connection_list: Boolean + channel_list: Boolean + index_status: Boolean + transfer_submission: Boolean } -type drip_dropMutation { - send(address: String!, captchaToken: String!, chainId: String!, denom: String!): String! +input v2_chain_features_bool_exp { + environment: String_comparison_exp = null } -type drip_dropQuery { - handledTransfers(limit: Int, offsetTime: String): [Request!]! - transfersForAddress(address: String!, limit: Int, offsetTime: String): [Request!]! - unhandledTransfers(limit: Int, offsetTime: String): [Request!]! +type v2_chain_status_type { + height: String + timestamp: DateTime + tip_age_seconds: Int + status: String } -scalar jsonb - -input jsonb_cast_exp { - String: String_comparison_exp +type v2_chain_type { + chain_id: String + display_name: String + testnet: Boolean + rpc_type: String + addr_prefix: String + logo_uri: String + universal_chain_id: String + minter_address_display: String + status: v2_chain_status_type! + editions: [v2_chain_edition!]! + explorers: [v2_explorers!]! + features(where: v2_chain_features_bool_exp! = {environment: null}): [v2_chain_features!]! + rpcs: [v2_rpcs!]! } -""" -Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'. -""" -input jsonb_comparison_exp { - _cast: jsonb_cast_exp - - """is the column contained in the given json value""" - _contained_in: jsonb - - """does the column contain the given json value at the top level""" - _contains: jsonb - _eq: jsonb - _gt: jsonb - _gte: jsonb - - """does the string exist as a top-level key in the column""" - _has_key: String - - """do all of these strings exist as top-level keys in the column""" - _has_keys_all: [String!] - - """do any of these strings exist as top-level keys in the column""" - _has_keys_any: [String!] - _in: [jsonb!] - _is_null: Boolean - _lt: jsonb - _lte: jsonb - _neq: jsonb - _nin: [jsonb!] +input v2_chains_args { + p_comparison: ComparisonOp! = lt + p_limit: Int + p_sort_order: String + p_universal_chain_id: String } -scalar latency_percentiles_scalar - -""" -Boolean expression to compare columns of type "latency_percentiles_scalar". All fields are combined with logical 'AND'. -""" -input latency_percentiles_scalar_comparison_exp { - _eq: latency_percentiles_scalar - _gt: latency_percentiles_scalar - _gte: latency_percentiles_scalar - _in: [latency_percentiles_scalar!] - _is_null: Boolean - _lt: latency_percentiles_scalar - _lte: latency_percentiles_scalar - _neq: latency_percentiles_scalar - _nin: [latency_percentiles_scalar!] +type v2_channel_fee { + action: String + fee: String } -"""mutation root""" -type mutation_root { - drip_drop: drip_dropMutation +type v2_channel_type { + source_universal_chain_id: String + source_client_id: Int + source_connection_id: Int + source_channel_id: Int + source_port_id: String + destination_universal_chain_id: String + destination_client_id: Int + destination_connection_id: Int + destination_channel_id: Int + destination_port_id: String + version: String + sort_order: String + tags: [String!] + sla: String + fees: [v2_channel_fee!]! + source_chain: v2_chain_type! + destination_chain: v2_chain_type! } -"""column ordering options""" -enum order_by { - """in ascending order, nulls last""" - asc - - """in ascending order, nulls first""" - asc_nulls_first - - """in ascending order, nulls last""" - asc_nulls_last - - """in descending order, nulls first""" - desc - - """in descending order, nulls first""" - desc_nulls_first - - """in descending order, nulls last""" - desc_nulls_last +input v2_channels_args { + p_comparison: ComparisonOp! = lt + p_destination_channel_id: Int + p_destination_client_id: Int + p_destination_connection_id: Int + p_destination_port_id: String + p_destination_universal_chain_id: String + p_limit: Int + p_recommended: Boolean + p_sort_order: String + p_source_channel_id: Int + p_source_client_id: Int + p_source_connection_id: Int + p_source_port_id: String + p_source_universal_chain_id: String + p_tags: jsonb + p_version: String } -type query_root { - """ - execute function "dashboard.transfer_count_by_chain" which returns "dashboard.count_by_chain_type" - """ - dashboard_transfer_count_by_chain( - """ - input parameters for function "dashboard_transfer_count_by_chain" - """ - args: dashboard_transfer_count_by_chain_args! - - """distinct select on columns""" - distinct_on: [dashboard_count_by_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [dashboard_count_by_chain_type_order_by!] - - """filter the rows returned""" - where: dashboard_count_by_chain_type_bool_exp - ): [dashboard_count_by_chain_type!]! - - """ - execute function "dashboard.transfer_days_count_by_chain" which returns "dashboard.days_by_chain_type" - """ - dashboard_transfer_days_count_by_chain( - """ - input parameters for function "dashboard_transfer_days_count_by_chain" - """ - args: dashboard_transfer_days_count_by_chain_args! - - """distinct select on columns""" - distinct_on: [dashboard_days_by_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [dashboard_days_by_chain_type_order_by!] - - """filter the rows returned""" - where: dashboard_days_by_chain_type_bool_exp - ): [dashboard_days_by_chain_type!]! - drip_drop: drip_dropQuery - - """ - execute function "v2.chains" which returns "v2.chain_type" - """ - v2_chains( - """ - input parameters for function "v2_chains" - """ - args: v2_chains_args - - """distinct select on columns""" - distinct_on: [v2_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_chain_type_order_by!] - - """filter the rows returned""" - where: v2_chain_type_bool_exp - ): [v2_chain_type!]! - - """ - execute function "v2.channels" which returns "v2.channel_type" - """ - v2_channels( - """ - input parameters for function "v2_channels" - """ - args: v2_channels_args - - """distinct select on columns""" - distinct_on: [v2_channel_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_channel_type_order_by!] +type v2_client_status_type { + block_hash: String + height: String + timestamp: DateTime + transaction_hash: String + counterparty_height: String +} - """filter the rows returned""" - where: v2_channel_type_bool_exp - ): [v2_channel_type!]! +type v2_client_type { + client_id: Int + counterparty_universal_chain_id: String + sort_order: String + universal_chain_id: String + status: v2_client_status_type + chain: v2_chain_type! + counterparty_chain: v2_chain_type! +} - """ - execute function "v2.clients" which returns "v2.client_type" - """ - v2_clients( - """ - input parameters for function "v2_clients" - """ - args: v2_clients_args +input v2_clients_args { + p_client_id: Int + p_comparison: ComparisonOp! = lt + p_counterparty_universal_chain_id: String + p_limit: Int + p_sort_order: String + p_universal_chain_id: String +} - """distinct select on columns""" - distinct_on: [v2_client_type_select_column!] +type v2_connection_type { + source_universal_chain_id: String + source_client_id: Int + source_connection_id: Int + destination_universal_chain_id: String + destination_client_id: Int + destination_connection_id: Int + sort_order: String + source_chain: v2_chain_type! + destination_chain: v2_chain_type! +} - """limit the number of rows returned""" - limit: Int +input v2_connections_args { + p_comparison: ComparisonOp! = lt + p_destination_client_id: Int + p_destination_connection_id: Int + p_destination_universal_chain_id: String + p_limit: Int + p_sort_order: String + p_source_client_id: Int + p_source_connection_id: Int + p_source_universal_chain_id: String +} - """skip the first n rows. Use only with order_by""" - offset: Int +type v2_error_type { + union_error_code: String + message: String + detail: String + hint: String +} - """sort the rows by one or more columns""" - order_by: [v2_client_type_order_by!] +type v2_explorers { + name: String + display_name: String + description: String + block_url: String + tx_url: String + address_url: String + home_url: String + logo_uri: String +} - """filter the rows returned""" - where: v2_client_type_bool_exp - ): [v2_client_type!]! +type v2_health_check_type { + status: String + last_update: DateTime + environment: String +} - """ - execute function "v2.connections" which returns "v2.connection_type" - """ - v2_connections( - """ - input parameters for function "v2_connections" - """ - args: v2_connections_args - - """distinct select on columns""" - distinct_on: [v2_connection_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_connection_type_order_by!] - - """filter the rows returned""" - where: v2_connection_type_bool_exp - ): [v2_connection_type!]! - - """ - fetch data from the table: "v2.error_type" - """ - v2_error_type( - """distinct select on columns""" - distinct_on: [v2_error_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_error_type_order_by!] - - """filter the rows returned""" - where: v2_error_type_bool_exp - ): [v2_error_type!]! - - """ - execute function "v2.errors" which returns "v2.error_type" - """ - v2_errors( - """distinct select on columns""" - distinct_on: [v2_error_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_error_type_order_by!] - - """filter the rows returned""" - where: v2_error_type_bool_exp - ): [v2_error_type!]! - - """ - execute function "v2.health_check" which returns "v2.health_check_type" - """ - v2_health_check( - """distinct select on columns""" - distinct_on: [v2_health_check_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_health_check_type_order_by!] - - """filter the rows returned""" - where: v2_health_check_type_bool_exp - ): [v2_health_check_type!]! - - """ - execute function "v2.packets" which returns "v2.packet_type" - """ - v2_packets( - """ - input parameters for function "v2_packets" - """ - args: v2_packets_args - - """distinct select on columns""" - distinct_on: [v2_packet_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_packet_type_order_by!] - - """filter the rows returned""" - where: v2_packet_type_bool_exp - ): [v2_packet_type!]! - - """ - execute function "v2.stats_count" which returns "v2.stats_type" - """ - v2_stats_count( - """distinct select on columns""" - distinct_on: [v2_stats_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_type_order_by!] - - """filter the rows returned""" - where: v2_stats_type_bool_exp - ): [v2_stats_type!]! - - """ - execute function "v2.stats_latency" which returns "v2.stats_latency_type" - """ - v2_stats_latency( - """ - input parameters for function "v2_stats_latency" - """ - args: v2_stats_latency_args! - - """distinct select on columns""" - distinct_on: [v2_stats_latency_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_latency_type_order_by!] - - """filter the rows returned""" - where: v2_stats_latency_type_bool_exp - ): [v2_stats_latency_type!]! - - """ - execute function "v2.stats_packets_chain" which returns "v2.stats_packets_chain_type" - """ - v2_stats_packets_chain( - """ - input parameters for function "v2_stats_packets_chain" - """ - args: v2_stats_packets_chain_args - - """distinct select on columns""" - distinct_on: [v2_stats_packets_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_packets_chain_type_order_by!] - - """filter the rows returned""" - where: v2_stats_packets_chain_type_bool_exp - ): [v2_stats_packets_chain_type!]! - - """ - execute function "v2.stats_packets_daily_count" which returns "v2.stats_daily_count_type" - """ - v2_stats_packets_daily_count( - """ - input parameters for function "v2_stats_packets_daily_count" - """ - args: v2_stats_packets_daily_count_args - - """distinct select on columns""" - distinct_on: [v2_stats_daily_count_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_daily_count_type_order_by!] - - """filter the rows returned""" - where: v2_stats_daily_count_type_bool_exp - ): [v2_stats_daily_count_type!]! - - """ - execute function "v2.stats_transfers_address" which returns "v2.stats_transfers_address_type" - """ - v2_stats_transfers_address( - """ - input parameters for function "v2_stats_transfers_address" - """ - args: v2_stats_transfers_address_args! - - """distinct select on columns""" - distinct_on: [v2_stats_transfers_address_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_transfers_address_type_order_by!] - - """filter the rows returned""" - where: v2_stats_transfers_address_type_bool_exp - ): [v2_stats_transfers_address_type!]! - - """ - execute function "v2.stats_transfers_chain" which returns "v2.stats_transfers_chain_type" - """ - v2_stats_transfers_chain( - """ - input parameters for function "v2_stats_transfers_chain" - """ - args: v2_stats_transfers_chain_args - - """distinct select on columns""" - distinct_on: [v2_stats_transfers_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_transfers_chain_type_order_by!] - - """filter the rows returned""" - where: v2_stats_transfers_chain_type_bool_exp - ): [v2_stats_transfers_chain_type!]! - - """ - execute function "v2.stats_transfers_daily_count" which returns "v2.stats_daily_count_type" - """ - v2_stats_transfers_daily_count( - """ - input parameters for function "v2_stats_transfers_daily_count" - """ - args: v2_stats_transfers_daily_count_args - - """distinct select on columns""" - distinct_on: [v2_stats_daily_count_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_daily_count_type_order_by!] - - """filter the rows returned""" - where: v2_stats_daily_count_type_bool_exp - ): [v2_stats_daily_count_type!]! - - """ - execute function "v2.tokens" which returns "v2.token_meta" - """ - v2_tokens( - """ - input parameters for function "v2_tokens" - """ - args: v2_tokens_args - - """distinct select on columns""" - distinct_on: [v2_token_meta_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_token_meta_order_by!] - - """filter the rows returned""" - where: v2_token_meta_bool_exp - ): [v2_token_meta!]! - - """ - execute function "v2.transfers" which returns "v2.transfer_type" - """ - v2_transfers( - """ - input parameters for function "v2_transfers" - """ - args: v2_transfers_args - - """distinct select on columns""" - distinct_on: [v2_transfer_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_transfer_type_order_by!] - - """filter the rows returned""" - where: v2_transfer_type_bool_exp - ): [v2_transfer_type!]! - - """ - execute function "v2.util_get_address_types_for_display_address" which returns "v2.util_get_address_types_for_display_address_type" - """ - v2_util_get_address_types_for_display_address( - """ - input parameters for function "v2_util_get_address_types_for_display_address" - """ - args: v2_util_get_address_types_for_display_address_args! - - """distinct select on columns""" - distinct_on: [v2_util_get_address_types_for_display_address_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_util_get_address_types_for_display_address_type_order_by!] - - """filter the rows returned""" - where: v2_util_get_address_types_for_display_address_type_bool_exp - ): [v2_util_get_address_types_for_display_address_type!]! - - """ - execute function "v2.util_get_transfer_request_details" which returns "v2.util_get_transfer_request_details_type" - """ - v2_util_get_transfer_request_details( - """ - input parameters for function "v2_util_get_transfer_request_details" - """ - args: v2_util_get_transfer_request_details_args! - - """distinct select on columns""" - distinct_on: [v2_util_get_transfer_request_details_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_util_get_transfer_request_details_type_order_by!] - - """filter the rows returned""" - where: v2_util_get_transfer_request_details_type_bool_exp - ): [v2_util_get_transfer_request_details_type!]! -} - -type subscription_root { - """ - execute function "dashboard.transfer_count_by_chain" which returns "dashboard.count_by_chain_type" - """ - dashboard_transfer_count_by_chain( - """ - input parameters for function "dashboard_transfer_count_by_chain" - """ - args: dashboard_transfer_count_by_chain_args! - - """distinct select on columns""" - distinct_on: [dashboard_count_by_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [dashboard_count_by_chain_type_order_by!] - - """filter the rows returned""" - where: dashboard_count_by_chain_type_bool_exp - ): [dashboard_count_by_chain_type!]! - - """ - execute function "dashboard.transfer_days_count_by_chain" which returns "dashboard.days_by_chain_type" - """ - dashboard_transfer_days_count_by_chain( - """ - input parameters for function "dashboard_transfer_days_count_by_chain" - """ - args: dashboard_transfer_days_count_by_chain_args! - - """distinct select on columns""" - distinct_on: [dashboard_days_by_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [dashboard_days_by_chain_type_order_by!] - - """filter the rows returned""" - where: dashboard_days_by_chain_type_bool_exp - ): [dashboard_days_by_chain_type!]! - - """ - execute function "v2.chains" which returns "v2.chain_type" - """ - v2_chains( - """ - input parameters for function "v2_chains" - """ - args: v2_chains_args - - """distinct select on columns""" - distinct_on: [v2_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_chain_type_order_by!] - - """filter the rows returned""" - where: v2_chain_type_bool_exp - ): [v2_chain_type!]! - - """ - execute function "v2.channels" which returns "v2.channel_type" - """ - v2_channels( - """ - input parameters for function "v2_channels" - """ - args: v2_channels_args - - """distinct select on columns""" - distinct_on: [v2_channel_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_channel_type_order_by!] - - """filter the rows returned""" - where: v2_channel_type_bool_exp - ): [v2_channel_type!]! - - """ - execute function "v2.clients" which returns "v2.client_type" - """ - v2_clients( - """ - input parameters for function "v2_clients" - """ - args: v2_clients_args - - """distinct select on columns""" - distinct_on: [v2_client_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_client_type_order_by!] - - """filter the rows returned""" - where: v2_client_type_bool_exp - ): [v2_client_type!]! - - """ - execute function "v2.connections" which returns "v2.connection_type" - """ - v2_connections( - """ - input parameters for function "v2_connections" - """ - args: v2_connections_args - - """distinct select on columns""" - distinct_on: [v2_connection_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_connection_type_order_by!] - - """filter the rows returned""" - where: v2_connection_type_bool_exp - ): [v2_connection_type!]! - - """ - fetch data from the table: "v2.error_type" - """ - v2_error_type( - """distinct select on columns""" - distinct_on: [v2_error_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_error_type_order_by!] - - """filter the rows returned""" - where: v2_error_type_bool_exp - ): [v2_error_type!]! - - """ - fetch data from the table in a streaming manner: "v2.error_type" - """ - v2_error_type_stream( - """maximum number of rows returned in a single batch""" - batch_size: Int! - - """cursor to stream the results returned by the query""" - cursor: [v2_error_type_stream_cursor_input]! - - """filter the rows returned""" - where: v2_error_type_bool_exp - ): [v2_error_type!]! - - """ - execute function "v2.errors" which returns "v2.error_type" - """ - v2_errors( - """distinct select on columns""" - distinct_on: [v2_error_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_error_type_order_by!] - - """filter the rows returned""" - where: v2_error_type_bool_exp - ): [v2_error_type!]! - - """ - execute function "v2.health_check" which returns "v2.health_check_type" - """ - v2_health_check( - """distinct select on columns""" - distinct_on: [v2_health_check_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_health_check_type_order_by!] - - """filter the rows returned""" - where: v2_health_check_type_bool_exp - ): [v2_health_check_type!]! - - """ - execute function "v2.packets" which returns "v2.packet_type" - """ - v2_packets( - """ - input parameters for function "v2_packets" - """ - args: v2_packets_args - - """distinct select on columns""" - distinct_on: [v2_packet_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_packet_type_order_by!] - - """filter the rows returned""" - where: v2_packet_type_bool_exp - ): [v2_packet_type!]! - - """ - execute function "v2.stats_count" which returns "v2.stats_type" - """ - v2_stats_count( - """distinct select on columns""" - distinct_on: [v2_stats_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_type_order_by!] - - """filter the rows returned""" - where: v2_stats_type_bool_exp - ): [v2_stats_type!]! - - """ - execute function "v2.stats_latency" which returns "v2.stats_latency_type" - """ - v2_stats_latency( - """ - input parameters for function "v2_stats_latency" - """ - args: v2_stats_latency_args! - - """distinct select on columns""" - distinct_on: [v2_stats_latency_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_latency_type_order_by!] - - """filter the rows returned""" - where: v2_stats_latency_type_bool_exp - ): [v2_stats_latency_type!]! - - """ - execute function "v2.stats_packets_chain" which returns "v2.stats_packets_chain_type" - """ - v2_stats_packets_chain( - """ - input parameters for function "v2_stats_packets_chain" - """ - args: v2_stats_packets_chain_args - - """distinct select on columns""" - distinct_on: [v2_stats_packets_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_packets_chain_type_order_by!] - - """filter the rows returned""" - where: v2_stats_packets_chain_type_bool_exp - ): [v2_stats_packets_chain_type!]! - - """ - execute function "v2.stats_packets_daily_count" which returns "v2.stats_daily_count_type" - """ - v2_stats_packets_daily_count( - """ - input parameters for function "v2_stats_packets_daily_count" - """ - args: v2_stats_packets_daily_count_args - - """distinct select on columns""" - distinct_on: [v2_stats_daily_count_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_daily_count_type_order_by!] - - """filter the rows returned""" - where: v2_stats_daily_count_type_bool_exp - ): [v2_stats_daily_count_type!]! - - """ - execute function "v2.stats_transfers_address" which returns "v2.stats_transfers_address_type" - """ - v2_stats_transfers_address( - """ - input parameters for function "v2_stats_transfers_address" - """ - args: v2_stats_transfers_address_args! - - """distinct select on columns""" - distinct_on: [v2_stats_transfers_address_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_transfers_address_type_order_by!] - - """filter the rows returned""" - where: v2_stats_transfers_address_type_bool_exp - ): [v2_stats_transfers_address_type!]! - - """ - execute function "v2.stats_transfers_chain" which returns "v2.stats_transfers_chain_type" - """ - v2_stats_transfers_chain( - """ - input parameters for function "v2_stats_transfers_chain" - """ - args: v2_stats_transfers_chain_args - - """distinct select on columns""" - distinct_on: [v2_stats_transfers_chain_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_transfers_chain_type_order_by!] - - """filter the rows returned""" - where: v2_stats_transfers_chain_type_bool_exp - ): [v2_stats_transfers_chain_type!]! - - """ - execute function "v2.stats_transfers_daily_count" which returns "v2.stats_daily_count_type" - """ - v2_stats_transfers_daily_count( - """ - input parameters for function "v2_stats_transfers_daily_count" - """ - args: v2_stats_transfers_daily_count_args - - """distinct select on columns""" - distinct_on: [v2_stats_daily_count_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_stats_daily_count_type_order_by!] - - """filter the rows returned""" - where: v2_stats_daily_count_type_bool_exp - ): [v2_stats_daily_count_type!]! - - """ - execute function "v2.tokens" which returns "v2.token_meta" - """ - v2_tokens( - """ - input parameters for function "v2_tokens" - """ - args: v2_tokens_args - - """distinct select on columns""" - distinct_on: [v2_token_meta_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_token_meta_order_by!] - - """filter the rows returned""" - where: v2_token_meta_bool_exp - ): [v2_token_meta!]! - - """ - execute function "v2.transfers" which returns "v2.transfer_type" - """ - v2_transfers( - """ - input parameters for function "v2_transfers" - """ - args: v2_transfers_args - - """distinct select on columns""" - distinct_on: [v2_transfer_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_transfer_type_order_by!] - - """filter the rows returned""" - where: v2_transfer_type_bool_exp - ): [v2_transfer_type!]! - - """ - execute function "v2.util_get_address_types_for_display_address" which returns "v2.util_get_address_types_for_display_address_type" - """ - v2_util_get_address_types_for_display_address( - """ - input parameters for function "v2_util_get_address_types_for_display_address" - """ - args: v2_util_get_address_types_for_display_address_args! - - """distinct select on columns""" - distinct_on: [v2_util_get_address_types_for_display_address_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_util_get_address_types_for_display_address_type_order_by!] - - """filter the rows returned""" - where: v2_util_get_address_types_for_display_address_type_bool_exp - ): [v2_util_get_address_types_for_display_address_type!]! - - """ - execute function "v2.util_get_transfer_request_details" which returns "v2.util_get_transfer_request_details_type" - """ - v2_util_get_transfer_request_details( - """ - input parameters for function "v2_util_get_transfer_request_details" - """ - args: v2_util_get_transfer_request_details_args! - - """distinct select on columns""" - distinct_on: [v2_util_get_transfer_request_details_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_util_get_transfer_request_details_type_order_by!] - - """filter the rows returned""" - where: v2_util_get_transfer_request_details_type_bool_exp - ): [v2_util_get_transfer_request_details_type!]! -} - -scalar timestamptz - -""" -Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'. -""" -input timestamptz_comparison_exp { - _eq: timestamptz - _gt: timestamptz - _gte: timestamptz - _in: [timestamptz!] - _is_null: Boolean - _lt: timestamptz - _lte: timestamptz - _neq: timestamptz - _nin: [timestamptz!] -} - -""" -columns and relationships of "v2.chain_features" -""" -type v2_chain_features { - channel_list: Boolean - connection_list: Boolean - environment: String - index_status: Boolean - packet_list: Boolean - transfer_list: Boolean - transfer_submission: Boolean -} - -""" -order by aggregate values of table "v2.chain_features" -""" -input v2_chain_features_aggregate_order_by { - count: order_by - max: v2_chain_features_max_order_by - min: v2_chain_features_min_order_by -} - -""" -Boolean expression to filter rows from the table "v2.chain_features". All fields are combined with a logical 'AND'. -""" -input v2_chain_features_bool_exp { - _and: [v2_chain_features_bool_exp!] - _not: v2_chain_features_bool_exp - _or: [v2_chain_features_bool_exp!] - channel_list: Boolean_comparison_exp - connection_list: Boolean_comparison_exp - environment: String_comparison_exp - index_status: Boolean_comparison_exp - packet_list: Boolean_comparison_exp - transfer_list: Boolean_comparison_exp - transfer_submission: Boolean_comparison_exp -} - -""" -order by max() on columns of table "v2.chain_features" -""" -input v2_chain_features_max_order_by { - environment: order_by -} - -""" -order by min() on columns of table "v2.chain_features" -""" -input v2_chain_features_min_order_by { - environment: order_by -} - -"""Ordering options when selecting data from "v2.chain_features".""" -input v2_chain_features_order_by { - channel_list: order_by - connection_list: order_by - environment: order_by - index_status: order_by - packet_list: order_by - transfer_list: order_by - transfer_submission: order_by -} - -""" -select columns of table "v2.chain_features" -""" -enum v2_chain_features_select_column { - """column name""" - channel_list - - """column name""" - connection_list - - """column name""" - environment - - """column name""" - index_status - - """column name""" - packet_list - - """column name""" - transfer_list - - """column name""" - transfer_submission -} - -""" -columns and relationships of "v2.chain_status_type" -""" -type v2_chain_status_type { - height: String - status: String - timestamp: timestamptz - tip_age_seconds: Int -} - -""" -order by aggregate values of table "v2.chain_status_type" -""" -input v2_chain_status_type_aggregate_order_by { - avg: v2_chain_status_type_avg_order_by - count: order_by - max: v2_chain_status_type_max_order_by - min: v2_chain_status_type_min_order_by - stddev: v2_chain_status_type_stddev_order_by - stddev_pop: v2_chain_status_type_stddev_pop_order_by - stddev_samp: v2_chain_status_type_stddev_samp_order_by - sum: v2_chain_status_type_sum_order_by - var_pop: v2_chain_status_type_var_pop_order_by - var_samp: v2_chain_status_type_var_samp_order_by - variance: v2_chain_status_type_variance_order_by -} - -""" -order by avg() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_avg_order_by { - tip_age_seconds: order_by -} - -""" -Boolean expression to filter rows from the table "v2.chain_status_type". All fields are combined with a logical 'AND'. -""" -input v2_chain_status_type_bool_exp { - _and: [v2_chain_status_type_bool_exp!] - _not: v2_chain_status_type_bool_exp - _or: [v2_chain_status_type_bool_exp!] - height: String_comparison_exp - status: String_comparison_exp - timestamp: timestamptz_comparison_exp - tip_age_seconds: Int_comparison_exp -} - -""" -order by max() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_max_order_by { - height: order_by - status: order_by - timestamp: order_by - tip_age_seconds: order_by -} - -""" -order by min() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_min_order_by { - height: order_by - status: order_by - timestamp: order_by - tip_age_seconds: order_by -} - -"""Ordering options when selecting data from "v2.chain_status_type".""" -input v2_chain_status_type_order_by { - height: order_by - status: order_by - timestamp: order_by - tip_age_seconds: order_by -} - -""" -select columns of table "v2.chain_status_type" -""" -enum v2_chain_status_type_select_column { - """column name""" - height - - """column name""" - status - - """column name""" - timestamp - - """column name""" - tip_age_seconds -} - -""" -order by stddev() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_stddev_order_by { - tip_age_seconds: order_by -} - -""" -order by stddev_pop() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_stddev_pop_order_by { - tip_age_seconds: order_by -} - -""" -order by stddev_samp() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_stddev_samp_order_by { - tip_age_seconds: order_by -} - -""" -order by sum() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_sum_order_by { - tip_age_seconds: order_by -} - -""" -order by var_pop() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_var_pop_order_by { - tip_age_seconds: order_by -} - -""" -order by var_samp() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_var_samp_order_by { - tip_age_seconds: order_by -} - -""" -order by variance() on columns of table "v2.chain_status_type" -""" -input v2_chain_status_type_variance_order_by { - tip_age_seconds: order_by -} - -""" -columns and relationships of "v2.chain_type" -""" -type v2_chain_type { - addr_prefix: String - chain_id: String - display_name: String - - """An array relationship""" - explorers( - """distinct select on columns""" - distinct_on: [v2_explorers_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_explorers_order_by!] - - """filter the rows returned""" - where: v2_explorers_bool_exp - ): [v2_explorers!]! - - """An array relationship""" - features( - """distinct select on columns""" - distinct_on: [v2_chain_features_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_chain_features_order_by!] - - """filter the rows returned""" - where: v2_chain_features_bool_exp - ): [v2_chain_features!]! - logo_uri: String - rpc_type: String - - """An array relationship""" - rpcs( - """distinct select on columns""" - distinct_on: [v2_rpcs_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_rpcs_order_by!] - - """filter the rows returned""" - where: v2_rpcs_bool_exp - ): [v2_rpcs!]! - - """ - A computed field, executes function "v2.chain_status" - """ - status( - """distinct select on columns""" - distinct_on: [v2_chain_status_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_chain_status_type_order_by!] - - """filter the rows returned""" - where: v2_chain_status_type_bool_exp - ): [v2_chain_status_type!] - testnet: Boolean - universal_chain_id: String -} - -""" -Boolean expression to filter rows from the table "v2.chain_type". All fields are combined with a logical 'AND'. -""" -input v2_chain_type_bool_exp { - _and: [v2_chain_type_bool_exp!] - _not: v2_chain_type_bool_exp - _or: [v2_chain_type_bool_exp!] - addr_prefix: String_comparison_exp - chain_id: String_comparison_exp - display_name: String_comparison_exp - explorers: v2_explorers_bool_exp - features: v2_chain_features_bool_exp - logo_uri: String_comparison_exp - rpc_type: String_comparison_exp - rpcs: v2_rpcs_bool_exp - status: v2_chain_status_type_bool_exp - testnet: Boolean_comparison_exp - universal_chain_id: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.chain_type".""" -input v2_chain_type_order_by { - addr_prefix: order_by - chain_id: order_by - display_name: order_by - explorers_aggregate: v2_explorers_aggregate_order_by - features_aggregate: v2_chain_features_aggregate_order_by - logo_uri: order_by - rpc_type: order_by - rpcs_aggregate: v2_rpcs_aggregate_order_by - status_aggregate: v2_chain_status_type_aggregate_order_by - testnet: order_by - universal_chain_id: order_by -} - -""" -select columns of table "v2.chain_type" -""" -enum v2_chain_type_select_column { - """column name""" - addr_prefix - - """column name""" - chain_id - - """column name""" - display_name - - """column name""" - logo_uri - - """column name""" - rpc_type - - """column name""" - testnet - - """column name""" - universal_chain_id -} - -input v2_chains_args { - p_comparison: String - p_limit: Int - p_sort_order: String - p_universal_chain_id: String -} - -""" -columns and relationships of "v2.chains_view" -""" -type v2_chains_view { - addr_prefix: String - chain_id: String - display_name: String - logo_uri: String - rpc_type: String - testnet: Boolean - universal_chain_id: String -} - -""" -Boolean expression to filter rows from the table "v2.chains_view". All fields are combined with a logical 'AND'. -""" -input v2_chains_view_bool_exp { - _and: [v2_chains_view_bool_exp!] - _not: v2_chains_view_bool_exp - _or: [v2_chains_view_bool_exp!] - addr_prefix: String_comparison_exp - chain_id: String_comparison_exp - display_name: String_comparison_exp - logo_uri: String_comparison_exp - rpc_type: String_comparison_exp - testnet: Boolean_comparison_exp - universal_chain_id: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.chains_view".""" -input v2_chains_view_order_by { - addr_prefix: order_by - chain_id: order_by - display_name: order_by - logo_uri: order_by - rpc_type: order_by - testnet: order_by - universal_chain_id: order_by -} - -""" -columns and relationships of "v2.channel_type" -""" -type v2_channel_type { - """An object relationship""" - destination_chain: v2_chains_view - destination_channel_id: Int - destination_client_id: Int - destination_connection_id: Int - destination_port_id: String - destination_universal_chain_id: String - sort_order: String - - """An object relationship""" - source_chain: v2_chains_view - source_channel_id: Int - source_client_id: Int - source_connection_id: Int - source_port_id: String - source_universal_chain_id: String - tags: [String!] - version: String -} - -""" -Boolean expression to filter rows from the table "v2.channel_type". All fields are combined with a logical 'AND'. -""" -input v2_channel_type_bool_exp { - _and: [v2_channel_type_bool_exp!] - _not: v2_channel_type_bool_exp - _or: [v2_channel_type_bool_exp!] - destination_chain: v2_chains_view_bool_exp - destination_channel_id: Int_comparison_exp - destination_client_id: Int_comparison_exp - destination_connection_id: Int_comparison_exp - destination_port_id: String_comparison_exp - destination_universal_chain_id: String_comparison_exp - sort_order: String_comparison_exp - source_chain: v2_chains_view_bool_exp - source_channel_id: Int_comparison_exp - source_client_id: Int_comparison_exp - source_connection_id: Int_comparison_exp - source_port_id: String_comparison_exp - source_universal_chain_id: String_comparison_exp - tags: String_array_comparison_exp - version: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.channel_type".""" -input v2_channel_type_order_by { - destination_chain: v2_chains_view_order_by - destination_channel_id: order_by - destination_client_id: order_by - destination_connection_id: order_by - destination_port_id: order_by - destination_universal_chain_id: order_by - sort_order: order_by - source_chain: v2_chains_view_order_by - source_channel_id: order_by - source_client_id: order_by - source_connection_id: order_by - source_port_id: order_by - source_universal_chain_id: order_by - tags: order_by - version: order_by -} - -""" -select columns of table "v2.channel_type" -""" -enum v2_channel_type_select_column { - """column name""" - destination_channel_id - - """column name""" - destination_client_id - - """column name""" - destination_connection_id - - """column name""" - destination_port_id - - """column name""" - destination_universal_chain_id - - """column name""" - sort_order - - """column name""" - source_channel_id - - """column name""" - source_client_id - - """column name""" - source_connection_id - - """column name""" - source_port_id - - """column name""" - source_universal_chain_id - - """column name""" - tags - - """column name""" - version -} - -input v2_channels_args { - p_comparison: String - p_destination_channel_id: Int - p_destination_client_id: Int - p_destination_connection_id: Int - p_destination_port_id: String - p_destination_universal_chain_id: String - p_limit: Int - p_recommended: Boolean - p_sort_order: String - p_source_channel_id: Int - p_source_client_id: Int - p_source_connection_id: Int - p_source_port_id: String - p_source_universal_chain_id: String - p_tags: jsonb - p_version: String -} - -""" -columns and relationships of "v2.client_type" -""" -type v2_client_type { - client_id: Int - counterparty_universal_chain_id: String - sort_order: String - universal_chain_id: String -} - -""" -Boolean expression to filter rows from the table "v2.client_type". All fields are combined with a logical 'AND'. -""" -input v2_client_type_bool_exp { - _and: [v2_client_type_bool_exp!] - _not: v2_client_type_bool_exp - _or: [v2_client_type_bool_exp!] - client_id: Int_comparison_exp - counterparty_universal_chain_id: String_comparison_exp - sort_order: String_comparison_exp - universal_chain_id: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.client_type".""" -input v2_client_type_order_by { - client_id: order_by - counterparty_universal_chain_id: order_by - sort_order: order_by - universal_chain_id: order_by -} - -""" -select columns of table "v2.client_type" -""" -enum v2_client_type_select_column { - """column name""" - client_id - - """column name""" - counterparty_universal_chain_id - - """column name""" - sort_order - - """column name""" - universal_chain_id -} - -input v2_clients_args { - p_client_id: Int - p_comparison: String - p_counterparty_universal_chain_id: String - p_limit: Int - p_sort_order: String - p_universal_chain_id: String -} - -""" -columns and relationships of "v2.connection_type" -""" -type v2_connection_type { - """An object relationship""" - destination_chain: v2_chains_view - destination_client_id: Int - destination_connection_id: Int - destination_universal_chain_id: String - sort_order: String - - """An object relationship""" - source_chain: v2_chains_view - source_client_id: Int - source_connection_id: Int - source_universal_chain_id: String -} - -""" -Boolean expression to filter rows from the table "v2.connection_type". All fields are combined with a logical 'AND'. -""" -input v2_connection_type_bool_exp { - _and: [v2_connection_type_bool_exp!] - _not: v2_connection_type_bool_exp - _or: [v2_connection_type_bool_exp!] - destination_chain: v2_chains_view_bool_exp - destination_client_id: Int_comparison_exp - destination_connection_id: Int_comparison_exp - destination_universal_chain_id: String_comparison_exp - sort_order: String_comparison_exp - source_chain: v2_chains_view_bool_exp - source_client_id: Int_comparison_exp - source_connection_id: Int_comparison_exp - source_universal_chain_id: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.connection_type".""" -input v2_connection_type_order_by { - destination_chain: v2_chains_view_order_by - destination_client_id: order_by - destination_connection_id: order_by - destination_universal_chain_id: order_by - sort_order: order_by - source_chain: v2_chains_view_order_by - source_client_id: order_by - source_connection_id: order_by - source_universal_chain_id: order_by -} - -""" -select columns of table "v2.connection_type" -""" -enum v2_connection_type_select_column { - """column name""" - destination_client_id - - """column name""" - destination_connection_id - - """column name""" - destination_universal_chain_id - - """column name""" - sort_order - - """column name""" - source_client_id - - """column name""" - source_connection_id - - """column name""" - source_universal_chain_id -} - -input v2_connections_args { - p_comparison: String - p_destination_client_id: Int - p_destination_connection_id: Int - p_destination_universal_chain_id: String - p_limit: Int - p_sort_order: String - p_source_client_id: Int - p_source_connection_id: Int - p_source_universal_chain_id: String -} - -""" -columns and relationships of "v2.error_type" -""" -type v2_error_type { - detail: String - hint: String - message: String - union_error_code: String -} - -""" -Boolean expression to filter rows from the table "v2.error_type". All fields are combined with a logical 'AND'. -""" -input v2_error_type_bool_exp { - _and: [v2_error_type_bool_exp!] - _not: v2_error_type_bool_exp - _or: [v2_error_type_bool_exp!] - detail: String_comparison_exp - hint: String_comparison_exp - message: String_comparison_exp - union_error_code: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.error_type".""" -input v2_error_type_order_by { - detail: order_by - hint: order_by - message: order_by - union_error_code: order_by -} - -""" -select columns of table "v2.error_type" -""" -enum v2_error_type_select_column { - """column name""" - detail - - """column name""" - hint - - """column name""" - message - - """column name""" - union_error_code -} - -""" -Streaming cursor of the table "v2_error_type" -""" -input v2_error_type_stream_cursor_input { - """Stream column input with initial value""" - initial_value: v2_error_type_stream_cursor_value_input! - - """cursor ordering""" - ordering: cursor_ordering -} - -"""Initial value of the column from where the streaming should start""" -input v2_error_type_stream_cursor_value_input { - detail: String - hint: String - message: String - union_error_code: String -} - -""" -columns and relationships of "v2.explorers" -""" -type v2_explorers { - address_url: String - block_url: String - description: String - display_name: String - home_url: String - logo_uri: String - name: String - tx_url: String -} - -""" -order by aggregate values of table "v2.explorers" -""" -input v2_explorers_aggregate_order_by { - count: order_by - max: v2_explorers_max_order_by - min: v2_explorers_min_order_by -} - -""" -Boolean expression to filter rows from the table "v2.explorers". All fields are combined with a logical 'AND'. -""" -input v2_explorers_bool_exp { - _and: [v2_explorers_bool_exp!] - _not: v2_explorers_bool_exp - _or: [v2_explorers_bool_exp!] - address_url: String_comparison_exp - block_url: String_comparison_exp - description: String_comparison_exp - display_name: String_comparison_exp - home_url: String_comparison_exp - logo_uri: String_comparison_exp - name: String_comparison_exp - tx_url: String_comparison_exp -} - -""" -order by max() on columns of table "v2.explorers" -""" -input v2_explorers_max_order_by { - address_url: order_by - block_url: order_by - description: order_by - display_name: order_by - home_url: order_by - logo_uri: order_by - name: order_by - tx_url: order_by -} - -""" -order by min() on columns of table "v2.explorers" -""" -input v2_explorers_min_order_by { - address_url: order_by - block_url: order_by - description: order_by - display_name: order_by - home_url: order_by - logo_uri: order_by - name: order_by - tx_url: order_by -} - -"""Ordering options when selecting data from "v2.explorers".""" -input v2_explorers_order_by { - address_url: order_by - block_url: order_by - description: order_by - display_name: order_by - home_url: order_by - logo_uri: order_by - name: order_by - tx_url: order_by -} - -""" -select columns of table "v2.explorers" -""" -enum v2_explorers_select_column { - """column name""" - address_url - - """column name""" - block_url - - """column name""" - description - - """column name""" - display_name - - """column name""" - home_url - - """column name""" - logo_uri - - """column name""" - name - - """column name""" - tx_url -} - -""" -columns and relationships of "v2.health_check_type" -""" -type v2_health_check_type { - environment: String - last_update: timestamptz - status: String -} - -""" -Boolean expression to filter rows from the table "v2.health_check_type". All fields are combined with a logical 'AND'. -""" -input v2_health_check_type_bool_exp { - _and: [v2_health_check_type_bool_exp!] - _not: v2_health_check_type_bool_exp - _or: [v2_health_check_type_bool_exp!] - environment: String_comparison_exp - last_update: timestamptz_comparison_exp - status: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.health_check_type".""" -input v2_health_check_type_order_by { - environment: order_by - last_update: order_by - status: order_by -} - -""" -select columns of table "v2.health_check_type" -""" -enum v2_health_check_type_select_column { - """column name""" - environment - - """column name""" - last_update - - """column name""" - status -} - -""" -columns and relationships of "v2.packet_type" -""" -type v2_packet_type { - acknowledgement: String - channel_version: String - data: String - decoded( - """JSON select path""" - path: String - ): jsonb - decoded_flattened( - """JSON select path""" - path: String - ): jsonb - - """An object relationship""" - destination_chain: v2_chains_view - destination_chain_id: String - destination_channel_id: Int - destination_client_id: Int - destination_connection_id: Int - destination_port_id: String - destination_universal_chain_id: String - packet_ack_block_hash: String - packet_ack_height: String - packet_ack_maker: String - packet_ack_timestamp: timestamptz - packet_ack_transaction_hash: String - packet_hash: String - packet_recv_block_hash: String - packet_recv_height: String - packet_recv_maker: String - packet_recv_maker_msg: String - packet_recv_timestamp: timestamptz - packet_recv_transaction_hash: String - packet_send_block_hash: String - packet_send_height: String - packet_send_timestamp: timestamptz - packet_send_transaction_hash: String - packet_timeout_block_hash: String - packet_timeout_height: String - packet_timeout_maker: String - packet_timeout_timestamp: timestamptz - packet_timeout_transaction_hash: String - sort_order: String - - """An object relationship""" - source_chain: v2_chains_view - source_channel_id: Int - source_client_id: Int - source_connection_id: Int - source_port_id: String - source_universal_chain_id: String - status: String - success: Boolean - timeout_height: String - timeout_timestamp: String - - """ - A computed field, executes function "v2.packet_traces" - """ - traces( - """distinct select on columns""" - distinct_on: [v2_traces_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_traces_type_order_by!] - - """filter the rows returned""" - where: v2_traces_type_bool_exp - ): [v2_traces_type!] - write_ack_block_hash: String - write_ack_height: String - write_ack_timestamp: timestamptz - write_ack_transaction_hash: String -} - -""" -Boolean expression to filter rows from the table "v2.packet_type". All fields are combined with a logical 'AND'. -""" -input v2_packet_type_bool_exp { - _and: [v2_packet_type_bool_exp!] - _not: v2_packet_type_bool_exp - _or: [v2_packet_type_bool_exp!] - acknowledgement: String_comparison_exp - channel_version: String_comparison_exp - data: String_comparison_exp - decoded: jsonb_comparison_exp - decoded_flattened: jsonb_comparison_exp - destination_chain: v2_chains_view_bool_exp - destination_chain_id: String_comparison_exp - destination_channel_id: Int_comparison_exp - destination_client_id: Int_comparison_exp - destination_connection_id: Int_comparison_exp - destination_port_id: String_comparison_exp - destination_universal_chain_id: String_comparison_exp - packet_ack_block_hash: String_comparison_exp - packet_ack_height: String_comparison_exp - packet_ack_maker: String_comparison_exp - packet_ack_timestamp: timestamptz_comparison_exp - packet_ack_transaction_hash: String_comparison_exp - packet_hash: String_comparison_exp - packet_recv_block_hash: String_comparison_exp - packet_recv_height: String_comparison_exp - packet_recv_maker: String_comparison_exp - packet_recv_maker_msg: String_comparison_exp - packet_recv_timestamp: timestamptz_comparison_exp - packet_recv_transaction_hash: String_comparison_exp - packet_send_block_hash: String_comparison_exp - packet_send_height: String_comparison_exp - packet_send_timestamp: timestamptz_comparison_exp - packet_send_transaction_hash: String_comparison_exp - packet_timeout_block_hash: String_comparison_exp - packet_timeout_height: String_comparison_exp - packet_timeout_maker: String_comparison_exp - packet_timeout_timestamp: timestamptz_comparison_exp - packet_timeout_transaction_hash: String_comparison_exp - sort_order: String_comparison_exp - source_chain: v2_chains_view_bool_exp - source_channel_id: Int_comparison_exp - source_client_id: Int_comparison_exp - source_connection_id: Int_comparison_exp - source_port_id: String_comparison_exp - source_universal_chain_id: String_comparison_exp - status: String_comparison_exp - success: Boolean_comparison_exp - timeout_height: String_comparison_exp - timeout_timestamp: String_comparison_exp - traces: v2_traces_type_bool_exp - write_ack_block_hash: String_comparison_exp - write_ack_height: String_comparison_exp - write_ack_timestamp: timestamptz_comparison_exp - write_ack_transaction_hash: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.packet_type".""" -input v2_packet_type_order_by { - acknowledgement: order_by - channel_version: order_by - data: order_by - decoded: order_by - decoded_flattened: order_by - destination_chain: v2_chains_view_order_by - destination_chain_id: order_by - destination_channel_id: order_by - destination_client_id: order_by - destination_connection_id: order_by - destination_port_id: order_by - destination_universal_chain_id: order_by - packet_ack_block_hash: order_by - packet_ack_height: order_by - packet_ack_maker: order_by - packet_ack_timestamp: order_by - packet_ack_transaction_hash: order_by - packet_hash: order_by - packet_recv_block_hash: order_by - packet_recv_height: order_by - packet_recv_maker: order_by - packet_recv_maker_msg: order_by - packet_recv_timestamp: order_by - packet_recv_transaction_hash: order_by - packet_send_block_hash: order_by - packet_send_height: order_by - packet_send_timestamp: order_by - packet_send_transaction_hash: order_by - packet_timeout_block_hash: order_by - packet_timeout_height: order_by - packet_timeout_maker: order_by - packet_timeout_timestamp: order_by - packet_timeout_transaction_hash: order_by - sort_order: order_by - source_chain: v2_chains_view_order_by - source_channel_id: order_by - source_client_id: order_by - source_connection_id: order_by - source_port_id: order_by - source_universal_chain_id: order_by - status: order_by - success: order_by - timeout_height: order_by - timeout_timestamp: order_by - traces_aggregate: v2_traces_type_aggregate_order_by - write_ack_block_hash: order_by - write_ack_height: order_by - write_ack_timestamp: order_by - write_ack_transaction_hash: order_by -} - -""" -select columns of table "v2.packet_type" -""" -enum v2_packet_type_select_column { - """column name""" - acknowledgement - - """column name""" - channel_version - - """column name""" - data - - """column name""" - decoded - - """column name""" - decoded_flattened - - """column name""" - destination_chain_id - - """column name""" - destination_channel_id - - """column name""" - destination_client_id - - """column name""" - destination_connection_id - - """column name""" - destination_port_id - - """column name""" - destination_universal_chain_id - - """column name""" - packet_ack_block_hash - - """column name""" - packet_ack_height - - """column name""" - packet_ack_maker - - """column name""" - packet_ack_timestamp - - """column name""" - packet_ack_transaction_hash - - """column name""" - packet_hash - - """column name""" - packet_recv_block_hash - - """column name""" - packet_recv_height - - """column name""" - packet_recv_maker - - """column name""" - packet_recv_maker_msg - - """column name""" - packet_recv_timestamp - - """column name""" - packet_recv_transaction_hash - - """column name""" - packet_send_block_hash - - """column name""" - packet_send_height - - """column name""" - packet_send_timestamp - - """column name""" - packet_send_transaction_hash - - """column name""" - packet_timeout_block_hash - - """column name""" - packet_timeout_height - - """column name""" - packet_timeout_maker - - """column name""" - packet_timeout_timestamp - - """column name""" - packet_timeout_transaction_hash - - """column name""" - sort_order - - """column name""" - source_channel_id - - """column name""" - source_client_id - - """column name""" - source_connection_id - - """column name""" - source_port_id - - """column name""" - source_universal_chain_id - - """column name""" - status - - """column name""" - success - - """column name""" - timeout_height - - """column name""" - timeout_timestamp - - """column name""" - write_ack_block_hash - - """column name""" - write_ack_height - - """column name""" - write_ack_timestamp - - """column name""" - write_ack_transaction_hash -} - -input v2_packets_args { - p_block_hash: String - p_comparison: String - p_destination_universal_chain_id: String - p_limit: Int - p_packet_hash: String - p_packet_send_timestamp: timestamptz - p_sort_order: String - p_source_universal_chain_id: String - p_transaction_hash: String -} - -""" -columns and relationships of "v2.rpcs" -""" -type v2_rpcs { - type: String - url: String -} - -""" -order by aggregate values of table "v2.rpcs" -""" -input v2_rpcs_aggregate_order_by { - count: order_by - max: v2_rpcs_max_order_by - min: v2_rpcs_min_order_by -} - -""" -Boolean expression to filter rows from the table "v2.rpcs". All fields are combined with a logical 'AND'. -""" -input v2_rpcs_bool_exp { - _and: [v2_rpcs_bool_exp!] - _not: v2_rpcs_bool_exp - _or: [v2_rpcs_bool_exp!] - type: String_comparison_exp - url: String_comparison_exp -} - -""" -order by max() on columns of table "v2.rpcs" -""" -input v2_rpcs_max_order_by { - type: order_by - url: order_by -} - -""" -order by min() on columns of table "v2.rpcs" -""" -input v2_rpcs_min_order_by { - type: order_by - url: order_by -} - -"""Ordering options when selecting data from "v2.rpcs".""" -input v2_rpcs_order_by { - type: order_by - url: order_by -} - -""" -select columns of table "v2.rpcs" -""" -enum v2_rpcs_select_column { - """column name""" - type - - """column name""" - url -} - -""" -columns and relationships of "v2.stats_daily_count_type" -""" -type v2_stats_daily_count_type { - count: String - day_date: date -} - -""" -Boolean expression to filter rows from the table "v2.stats_daily_count_type". All fields are combined with a logical 'AND'. -""" -input v2_stats_daily_count_type_bool_exp { - _and: [v2_stats_daily_count_type_bool_exp!] - _not: v2_stats_daily_count_type_bool_exp - _or: [v2_stats_daily_count_type_bool_exp!] - count: String_comparison_exp - day_date: date_comparison_exp -} - -"""Ordering options when selecting data from "v2.stats_daily_count_type".""" -input v2_stats_daily_count_type_order_by { - count: order_by - day_date: order_by -} - -""" -select columns of table "v2.stats_daily_count_type" -""" -enum v2_stats_daily_count_type_select_column { - """column name""" - count - - """column name""" - day_date -} - -input v2_stats_latency_args { - p_destination_universal_chain_id: String - p_phase: String - p_source_universal_chain_id: String -} - -""" -columns and relationships of "v2.stats_latency_type" -""" -type v2_stats_latency_type { - secs_until_packet_ack: latency_percentiles_scalar - secs_until_packet_recv: latency_percentiles_scalar - secs_until_write_ack: latency_percentiles_scalar -} - -""" -Boolean expression to filter rows from the table "v2.stats_latency_type". All fields are combined with a logical 'AND'. -""" -input v2_stats_latency_type_bool_exp { - _and: [v2_stats_latency_type_bool_exp!] - _not: v2_stats_latency_type_bool_exp - _or: [v2_stats_latency_type_bool_exp!] - secs_until_packet_ack: latency_percentiles_scalar_comparison_exp - secs_until_packet_recv: latency_percentiles_scalar_comparison_exp - secs_until_write_ack: latency_percentiles_scalar_comparison_exp -} - -"""Ordering options when selecting data from "v2.stats_latency_type".""" -input v2_stats_latency_type_order_by { - secs_until_packet_ack: order_by - secs_until_packet_recv: order_by - secs_until_write_ack: order_by -} - -""" -select columns of table "v2.stats_latency_type" -""" -enum v2_stats_latency_type_select_column { - """column name""" - secs_until_packet_ack - - """column name""" - secs_until_packet_recv - - """column name""" - secs_until_write_ack -} - -input v2_stats_packets_chain_args { - p_days_back: Int - p_destination_universal_chain_id: String - p_source_universal_chain_id: String -} - -""" -columns and relationships of "v2.stats_packets_chain_type" -""" -type v2_stats_packets_chain_type { - day_date: date - destination_universal_chain_id: String - source_universal_chain_id: String - total_packets: String -} - -""" -Boolean expression to filter rows from the table "v2.stats_packets_chain_type". All fields are combined with a logical 'AND'. -""" -input v2_stats_packets_chain_type_bool_exp { - _and: [v2_stats_packets_chain_type_bool_exp!] - _not: v2_stats_packets_chain_type_bool_exp - _or: [v2_stats_packets_chain_type_bool_exp!] - day_date: date_comparison_exp - destination_universal_chain_id: String_comparison_exp - source_universal_chain_id: String_comparison_exp - total_packets: String_comparison_exp -} - -""" -Ordering options when selecting data from "v2.stats_packets_chain_type". -""" -input v2_stats_packets_chain_type_order_by { - day_date: order_by - destination_universal_chain_id: order_by - source_universal_chain_id: order_by - total_packets: order_by -} - -""" -select columns of table "v2.stats_packets_chain_type" -""" -enum v2_stats_packets_chain_type_select_column { - """column name""" - day_date - - """column name""" - destination_universal_chain_id - - """column name""" - source_universal_chain_id - - """column name""" - total_packets -} - -input v2_stats_packets_daily_count_args { - p_days_back: Int -} - -input v2_stats_transfers_address_args { - p_addresses_canonical: jsonb - p_days_back: Int - p_destination_universal_chain_id: String - p_source_universal_chain_id: String -} - -""" -columns and relationships of "v2.stats_transfers_address_type" -""" -type v2_stats_transfers_address_type { - canonical_address: String - day_date: date - destination_universal_chain_id: String - source_universal_chain_id: String - transfer_count: String -} - -""" -Boolean expression to filter rows from the table "v2.stats_transfers_address_type". All fields are combined with a logical 'AND'. -""" -input v2_stats_transfers_address_type_bool_exp { - _and: [v2_stats_transfers_address_type_bool_exp!] - _not: v2_stats_transfers_address_type_bool_exp - _or: [v2_stats_transfers_address_type_bool_exp!] - canonical_address: String_comparison_exp - day_date: date_comparison_exp - destination_universal_chain_id: String_comparison_exp - source_universal_chain_id: String_comparison_exp - transfer_count: String_comparison_exp -} - -""" -Ordering options when selecting data from "v2.stats_transfers_address_type". -""" -input v2_stats_transfers_address_type_order_by { - canonical_address: order_by - day_date: order_by - destination_universal_chain_id: order_by - source_universal_chain_id: order_by - transfer_count: order_by -} - -""" -select columns of table "v2.stats_transfers_address_type" -""" -enum v2_stats_transfers_address_type_select_column { - """column name""" - canonical_address - - """column name""" - day_date - - """column name""" - destination_universal_chain_id - - """column name""" - source_universal_chain_id - - """column name""" - transfer_count -} - -input v2_stats_transfers_chain_args { - p_days_back: Int - p_destination_universal_chain_id: String - p_source_universal_chain_id: String -} - -""" -columns and relationships of "v2.stats_transfers_chain_type" -""" -type v2_stats_transfers_chain_type { - day_date: date - destination_universal_chain_id: String - source_universal_chain_id: String - total_transfers: String -} - -""" -Boolean expression to filter rows from the table "v2.stats_transfers_chain_type". All fields are combined with a logical 'AND'. -""" -input v2_stats_transfers_chain_type_bool_exp { - _and: [v2_stats_transfers_chain_type_bool_exp!] - _not: v2_stats_transfers_chain_type_bool_exp - _or: [v2_stats_transfers_chain_type_bool_exp!] - day_date: date_comparison_exp - destination_universal_chain_id: String_comparison_exp - source_universal_chain_id: String_comparison_exp - total_transfers: String_comparison_exp -} - -""" -Ordering options when selecting data from "v2.stats_transfers_chain_type". -""" -input v2_stats_transfers_chain_type_order_by { - day_date: order_by - destination_universal_chain_id: order_by - source_universal_chain_id: order_by - total_transfers: order_by -} - -""" -select columns of table "v2.stats_transfers_chain_type" -""" -enum v2_stats_transfers_chain_type_select_column { - """column name""" - day_date - - """column name""" - destination_universal_chain_id - - """column name""" - source_universal_chain_id - - """column name""" - total_transfers -} - -input v2_stats_transfers_daily_count_args { - p_days_back: Int -} - -""" -columns and relationships of "v2.stats_type" -""" -type v2_stats_type { - name: String - value: String -} - -""" -Boolean expression to filter rows from the table "v2.stats_type". All fields are combined with a logical 'AND'. -""" -input v2_stats_type_bool_exp { - _and: [v2_stats_type_bool_exp!] - _not: v2_stats_type_bool_exp - _or: [v2_stats_type_bool_exp!] - name: String_comparison_exp - value: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.stats_type".""" -input v2_stats_type_order_by { - name: order_by - value: order_by -} - -""" -select columns of table "v2.stats_type" -""" -enum v2_stats_type_select_column { - """column name""" - name - - """column name""" - value -} - -""" -columns and relationships of "v2.token_meta" -""" -type v2_token_meta { - """An object relationship""" - chain: v2_chains_view - denom: String - rank: Int - - """An array relationship""" - representations( - """distinct select on columns""" - distinct_on: [v2_token_meta_representations_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_token_meta_representations_order_by!] - - """filter the rows returned""" - where: v2_token_meta_representations_bool_exp - ): [v2_token_meta_representations!]! - - """An array relationship""" - wrapping( - """distinct select on columns""" - distinct_on: [v2_token_meta_wrapping_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_token_meta_wrapping_order_by!] - - """filter the rows returned""" - where: v2_token_meta_wrapping_bool_exp - ): [v2_token_meta_wrapping!]! -} - -""" -Boolean expression to filter rows from the table "v2.token_meta". All fields are combined with a logical 'AND'. -""" -input v2_token_meta_bool_exp { - _and: [v2_token_meta_bool_exp!] - _not: v2_token_meta_bool_exp - _or: [v2_token_meta_bool_exp!] - chain: v2_chains_view_bool_exp - denom: String_comparison_exp - rank: Int_comparison_exp - representations: v2_token_meta_representations_bool_exp - wrapping: v2_token_meta_wrapping_bool_exp -} - -"""Ordering options when selecting data from "v2.token_meta".""" -input v2_token_meta_order_by { - chain: v2_chains_view_order_by - denom: order_by - rank: order_by - representations_aggregate: v2_token_meta_representations_aggregate_order_by - wrapping_aggregate: v2_token_meta_wrapping_aggregate_order_by -} - -""" -columns and relationships of "v2.token_meta_representation_sources" -""" -type v2_token_meta_representation_sources { - """An object relationship""" - chain: v2_chains_view - decimals: Int - denom: String - name: String - - """An object relationship""" - source: v2_token_meta_sources - symbol: String - update_timestamp: timestamptz - - """An array relationship""" - wrapping( - """distinct select on columns""" - distinct_on: [v2_token_meta_representation_sources_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_token_meta_representation_sources_order_by!] - - """filter the rows returned""" - where: v2_token_meta_representation_sources_bool_exp - ): [v2_token_meta_representation_sources!]! -} - -""" -order by aggregate values of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_aggregate_order_by { - avg: v2_token_meta_representation_sources_avg_order_by - count: order_by - max: v2_token_meta_representation_sources_max_order_by - min: v2_token_meta_representation_sources_min_order_by - stddev: v2_token_meta_representation_sources_stddev_order_by - stddev_pop: v2_token_meta_representation_sources_stddev_pop_order_by - stddev_samp: v2_token_meta_representation_sources_stddev_samp_order_by - sum: v2_token_meta_representation_sources_sum_order_by - var_pop: v2_token_meta_representation_sources_var_pop_order_by - var_samp: v2_token_meta_representation_sources_var_samp_order_by - variance: v2_token_meta_representation_sources_variance_order_by -} - -""" -order by avg() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_avg_order_by { - decimals: order_by -} - -""" -Boolean expression to filter rows from the table "v2.token_meta_representation_sources". All fields are combined with a logical 'AND'. -""" -input v2_token_meta_representation_sources_bool_exp { - _and: [v2_token_meta_representation_sources_bool_exp!] - _not: v2_token_meta_representation_sources_bool_exp - _or: [v2_token_meta_representation_sources_bool_exp!] - chain: v2_chains_view_bool_exp - decimals: Int_comparison_exp - denom: String_comparison_exp - name: String_comparison_exp - source: v2_token_meta_sources_bool_exp - symbol: String_comparison_exp - update_timestamp: timestamptz_comparison_exp - wrapping: v2_token_meta_representation_sources_bool_exp -} - -""" -order by max() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_max_order_by { - decimals: order_by - denom: order_by - name: order_by - symbol: order_by - update_timestamp: order_by -} - -""" -order by min() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_min_order_by { - decimals: order_by - denom: order_by - name: order_by - symbol: order_by - update_timestamp: order_by -} - -""" -Ordering options when selecting data from "v2.token_meta_representation_sources". -""" -input v2_token_meta_representation_sources_order_by { - chain: v2_chains_view_order_by - decimals: order_by - denom: order_by - name: order_by - source: v2_token_meta_sources_order_by - symbol: order_by - update_timestamp: order_by - wrapping_aggregate: v2_token_meta_representation_sources_aggregate_order_by -} - -""" -select columns of table "v2.token_meta_representation_sources" -""" -enum v2_token_meta_representation_sources_select_column { - """column name""" - decimals - - """column name""" - denom - - """column name""" - name - - """column name""" - symbol - - """column name""" - update_timestamp -} - -""" -order by stddev() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_stddev_order_by { - decimals: order_by -} - -""" -order by stddev_pop() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_stddev_pop_order_by { - decimals: order_by -} - -""" -order by stddev_samp() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_stddev_samp_order_by { - decimals: order_by -} - -""" -order by sum() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_sum_order_by { - decimals: order_by -} - -""" -order by var_pop() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_var_pop_order_by { - decimals: order_by -} - -""" -order by var_samp() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_var_samp_order_by { - decimals: order_by -} - -""" -order by variance() on columns of table "v2.token_meta_representation_sources" -""" -input v2_token_meta_representation_sources_variance_order_by { - decimals: order_by -} - -""" -columns and relationships of "v2.token_meta_representations" -""" -type v2_token_meta_representations { - """An object relationship""" - chain: v2_chains_view - decimals: Int - logo_uri: String - name: String - - """An array relationship""" - sources( - """distinct select on columns""" - distinct_on: [v2_token_meta_representation_sources_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_token_meta_representation_sources_order_by!] - - """filter the rows returned""" - where: v2_token_meta_representation_sources_bool_exp - ): [v2_token_meta_representation_sources!]! - symbol: String -} - -""" -order by aggregate values of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_aggregate_order_by { - avg: v2_token_meta_representations_avg_order_by - count: order_by - max: v2_token_meta_representations_max_order_by - min: v2_token_meta_representations_min_order_by - stddev: v2_token_meta_representations_stddev_order_by - stddev_pop: v2_token_meta_representations_stddev_pop_order_by - stddev_samp: v2_token_meta_representations_stddev_samp_order_by - sum: v2_token_meta_representations_sum_order_by - var_pop: v2_token_meta_representations_var_pop_order_by - var_samp: v2_token_meta_representations_var_samp_order_by - variance: v2_token_meta_representations_variance_order_by -} - -""" -order by avg() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_avg_order_by { - decimals: order_by -} - -""" -Boolean expression to filter rows from the table "v2.token_meta_representations". All fields are combined with a logical 'AND'. -""" -input v2_token_meta_representations_bool_exp { - _and: [v2_token_meta_representations_bool_exp!] - _not: v2_token_meta_representations_bool_exp - _or: [v2_token_meta_representations_bool_exp!] - chain: v2_chains_view_bool_exp - decimals: Int_comparison_exp - logo_uri: String_comparison_exp - name: String_comparison_exp - sources: v2_token_meta_representation_sources_bool_exp - symbol: String_comparison_exp -} - -""" -order by max() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_max_order_by { - decimals: order_by - logo_uri: order_by - name: order_by - symbol: order_by -} - -""" -order by min() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_min_order_by { - decimals: order_by - logo_uri: order_by - name: order_by - symbol: order_by -} - -""" -Ordering options when selecting data from "v2.token_meta_representations". -""" -input v2_token_meta_representations_order_by { - chain: v2_chains_view_order_by - decimals: order_by - logo_uri: order_by - name: order_by - sources_aggregate: v2_token_meta_representation_sources_aggregate_order_by - symbol: order_by -} - -""" -select columns of table "v2.token_meta_representations" -""" -enum v2_token_meta_representations_select_column { - """column name""" - decimals - - """column name""" - logo_uri - - """column name""" - name - - """column name""" - symbol -} - -""" -order by stddev() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_stddev_order_by { - decimals: order_by -} - -""" -order by stddev_pop() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_stddev_pop_order_by { - decimals: order_by -} - -""" -order by stddev_samp() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_stddev_samp_order_by { - decimals: order_by -} - -""" -order by sum() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_sum_order_by { - decimals: order_by -} - -""" -order by var_pop() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_var_pop_order_by { - decimals: order_by -} - -""" -order by var_samp() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_var_samp_order_by { - decimals: order_by +type v2_instruction_type { + packet_hash: String + data: String + acknowledgement: String + decoded: JSON + decoded_flattened: JSON + timeout_height: String + timeout_timestamp: String + channel_version: String + internal_source_chain_id: Int + source_universal_chain_id: String + source_client_id: Int + source_connection_id: Int + source_channel_id: Int + source_port_id: String + internal_destination_chain_id: Int + destination_universal_chain_id: String + destination_client_id: Int + destination_chain_id: String + destination_connection_id: Int + destination_channel_id: Int + destination_port_id: String + packet_send_block_hash: String + packet_send_height: String + packet_send_timestamp: DateTime + packet_send_transaction_hash: String + packet_recv_block_hash: String + packet_recv_height: String + packet_recv_timestamp: DateTime + packet_recv_transaction_hash: String + packet_recv_maker: String + packet_recv_maker_msg: String + write_ack_block_hash: String + write_ack_height: String + write_ack_timestamp: DateTime + write_ack_transaction_hash: String + packet_ack_block_hash: String + packet_ack_height: String + packet_ack_timestamp: DateTime + packet_ack_transaction_hash: String + packet_ack_maker: String + packet_timeout_block_hash: String + packet_timeout_height: String + packet_timeout_timestamp: DateTime + packet_timeout_transaction_hash: String + packet_timeout_maker: String + sort_order: String + status: String + success: Boolean + structure: String + instruction: JSON + instruction_hash: String + path: String + salt: String + instruction_path: String + version: Int + opcode: Int + operand: JSON + instruction_type: String + instruction_index: String + source_chain: v2_chain_type! + destination_chain: v2_chain_type! +} + +input v2_instructions_args { + p_block_hash: String + p_comparison: ComparisonOp! = lt + p_limit: Int + p_multiplex_contract_address: String + p_multiplex_sender: String + p_network: String + p_packet_hash: String + p_sort_order: String + p_transaction_hash: String } -""" -order by variance() on columns of table "v2.token_meta_representations" -""" -input v2_token_meta_representations_variance_order_by { - decimals: order_by +type v2_packet_type { + packet_hash: String + data: String + acknowledgement: String + decoded: JSON + decoded_flattened: JSON + timeout_height: String + timeout_timestamp: String + channel_version: String + internal_source_chain_id: Int + source_universal_chain_id: String + source_client_id: Int + source_connection_id: Int + source_channel_id: Int + source_port_id: String + internal_destination_chain_id: Int + destination_universal_chain_id: String + destination_client_id: Int + destination_chain_id: String + destination_connection_id: Int + destination_channel_id: Int + destination_port_id: String + packet_send_block_hash: String + packet_send_height: String + packet_send_timestamp: DateTime + packet_send_transaction_hash: String + packet_recv_block_hash: String + packet_recv_height: String + packet_recv_timestamp: DateTime + packet_recv_transaction_hash: String + packet_recv_maker: String + packet_recv_maker_msg: String + write_ack_block_hash: String + write_ack_height: String + write_ack_timestamp: DateTime + write_ack_transaction_hash: String + packet_ack_block_hash: String + packet_ack_height: String + packet_ack_timestamp: DateTime + packet_ack_transaction_hash: String + packet_ack_maker: String + packet_timeout_block_hash: String + packet_timeout_height: String + packet_timeout_timestamp: DateTime + packet_timeout_transaction_hash: String + packet_timeout_maker: String + sort_order: String + status: String + success: Boolean + structure: String + source_chain: v2_chain_type! + destination_chain: v2_chain_type! + traces: [v2_traces_type!]! } -""" -select columns of table "v2.token_meta" -""" -enum v2_token_meta_select_column { - """column name""" - denom - - """column name""" - rank +input v2_packets_args { + p_block_hash: String + p_comparison: ComparisonOp! = lt + p_destination_universal_chain_id: String + p_exceeding_sla: String + p_limit: Int + p_network: String + p_packet_hash: String + p_packet_send_timestamp: DateTime + p_sort_order: String + p_source_universal_chain_id: String + p_transaction_hash: String } -""" -columns and relationships of "v2.token_meta_sources" -""" -type v2_token_meta_sources { - logo_uri: String - name: String - source_uri: String +type v2_rpcs { + url: String + description: String + contact: String + type: String } -""" -Boolean expression to filter rows from the table "v2.token_meta_sources". All fields are combined with a logical 'AND'. -""" -input v2_token_meta_sources_bool_exp { - _and: [v2_token_meta_sources_bool_exp!] - _not: v2_token_meta_sources_bool_exp - _or: [v2_token_meta_sources_bool_exp!] - logo_uri: String_comparison_exp - name: String_comparison_exp - source_uri: String_comparison_exp +type v2_stats_daily_count_type { + day_date: NaiveDate + count: String } -"""Ordering options when selecting data from "v2.token_meta_sources".""" -input v2_token_meta_sources_order_by { - logo_uri: order_by - name: order_by - source_uri: order_by +input v2_stats_latency_args { + p_destination_universal_chain_id: String + p_phase: String + p_source_universal_chain_id: String } -""" -columns and relationships of "v2.token_meta_wrapping" -""" -type v2_token_meta_wrapping { - destination_channel_id: Int - - """An object relationship""" - unwrapped_chain: v2_chains_view - unwrapped_denom: String - - """An object relationship""" - wrapped_chain: v2_chains_view - wrapper: String +type v2_stats_latency_type { + secs_until_packet_recv: LatencyPercentiles + secs_until_write_ack: LatencyPercentiles + secs_until_packet_ack: LatencyPercentiles } -""" -order by aggregate values of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_aggregate_order_by { - avg: v2_token_meta_wrapping_avg_order_by - count: order_by - max: v2_token_meta_wrapping_max_order_by - min: v2_token_meta_wrapping_min_order_by - stddev: v2_token_meta_wrapping_stddev_order_by - stddev_pop: v2_token_meta_wrapping_stddev_pop_order_by - stddev_samp: v2_token_meta_wrapping_stddev_samp_order_by - sum: v2_token_meta_wrapping_sum_order_by - var_pop: v2_token_meta_wrapping_var_pop_order_by - var_samp: v2_token_meta_wrapping_var_samp_order_by - variance: v2_token_meta_wrapping_variance_order_by +input v2_stats_packets_chain_args { + p_days_back: Int + p_destination_universal_chain_id: String + p_source_universal_chain_id: String } -""" -order by avg() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_avg_order_by { - destination_channel_id: order_by +type v2_stats_packets_chain_type { + day_date: NaiveDate + source_universal_chain_id: String + destination_universal_chain_id: String + total_packets: String } -""" -Boolean expression to filter rows from the table "v2.token_meta_wrapping". All fields are combined with a logical 'AND'. -""" -input v2_token_meta_wrapping_bool_exp { - _and: [v2_token_meta_wrapping_bool_exp!] - _not: v2_token_meta_wrapping_bool_exp - _or: [v2_token_meta_wrapping_bool_exp!] - destination_channel_id: Int_comparison_exp - unwrapped_chain: v2_chains_view_bool_exp - unwrapped_denom: String_comparison_exp - wrapped_chain: v2_chains_view_bool_exp - wrapper: String_comparison_exp +input v2_stats_packets_daily_count_args { + p_days_back: Int } -""" -order by max() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_max_order_by { - destination_channel_id: order_by - unwrapped_denom: order_by - wrapper: order_by +input v2_stats_transfers_chain_args { + p_days_back: Int + p_destination_universal_chain_id: String + p_source_universal_chain_id: String } -""" -order by min() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_min_order_by { - destination_channel_id: order_by - unwrapped_denom: order_by - wrapper: order_by +type v2_stats_transfers_chain_type { + day_date: NaiveDate + source_universal_chain_id: String + destination_universal_chain_id: String + total_transfers: String } -"""Ordering options when selecting data from "v2.token_meta_wrapping".""" -input v2_token_meta_wrapping_order_by { - destination_channel_id: order_by - unwrapped_chain: v2_chains_view_order_by - unwrapped_denom: order_by - wrapped_chain: v2_chains_view_order_by - wrapper: order_by +input v2_stats_transfers_daily_count_args { + p_days_back: Int } -""" -select columns of table "v2.token_meta_wrapping" -""" -enum v2_token_meta_wrapping_select_column { - """column name""" - destination_channel_id - - """column name""" - unwrapped_denom +type v2_stats_type { + name: String + value: String +} - """column name""" - wrapper +type v2_token_meta { + denom: String + rank: Int + universal_chain_id: String + chain: v2_chain_type! + bucket: v2_token_meta_bucket + representations: [v2_token_meta_representations!]! + wrapping(where: v2_token_meta_wrapping_bool_exp! = {destination_channel_id: null}): [v2_token_meta_wrapping!]! } -""" -order by stddev() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_stddev_order_by { - destination_channel_id: order_by +type v2_token_meta_bucket { + denom: String + capacity: String + refill_rate: String + chain: v2_chain_type! } -""" -order by stddev_pop() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_stddev_pop_order_by { - destination_channel_id: order_by +input v2_token_meta_order_by { + rank: OrderBy = null } -""" -order by stddev_samp() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_stddev_samp_order_by { - destination_channel_id: order_by +type v2_token_meta_representation_sources { + denom: String + symbol: String + name: String + decimals: Int + update_timestamp: DateTime + chain: v2_chain_type! + source: v2_token_meta_sources! } -""" -order by sum() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_sum_order_by { - destination_channel_id: order_by +type v2_token_meta_representations { + denom: String + symbol: String + name: String + decimals: Int + logo_uri: String + sources: [v2_token_meta_representation_sources!]! + chain: v2_chain_type! } -""" -order by var_pop() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_var_pop_order_by { - destination_channel_id: order_by +type v2_token_meta_sources { + source_uri: String + name: String + logo_uri: String } -""" -order by var_samp() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_var_samp_order_by { - destination_channel_id: order_by +type v2_token_meta_wrapping { + wrapped_denom: String + index: Int + unwrapped_denom: String + destination_channel_id: Int + wrapper: String + wrapped_chain: v2_chain_type! + unwrapped_chain: v2_chain_type! } -""" -order by variance() on columns of table "v2.token_meta_wrapping" -""" -input v2_token_meta_wrapping_variance_order_by { - destination_channel_id: order_by +input v2_token_meta_wrapping_bool_exp { + destination_channel_id: Int_comparison_exp = null } input v2_tokens_args { p_denom: String p_universal_chain_id: String + p_whitelist: Boolean } -""" -columns and relationships of "v2.traces_type" -""" type v2_traces_type { + type: String block_hash: String - - """An object relationship""" - chain: v2_chains_view - event_index: String height: String - timestamp: timestamptz + event_index: String + timestamp: DateTime transaction_hash: String - type: String universal_chain_id: String + chain: v2_chain_type! } -""" -order by aggregate values of table "v2.traces_type" -""" -input v2_traces_type_aggregate_order_by { - count: order_by - max: v2_traces_type_max_order_by - min: v2_traces_type_min_order_by -} - -""" -Boolean expression to filter rows from the table "v2.traces_type". All fields are combined with a logical 'AND'. -""" -input v2_traces_type_bool_exp { - _and: [v2_traces_type_bool_exp!] - _not: v2_traces_type_bool_exp - _or: [v2_traces_type_bool_exp!] - block_hash: String_comparison_exp - chain: v2_chains_view_bool_exp - event_index: String_comparison_exp - height: String_comparison_exp - timestamp: timestamptz_comparison_exp - transaction_hash: String_comparison_exp - type: String_comparison_exp - universal_chain_id: String_comparison_exp -} - -""" -order by max() on columns of table "v2.traces_type" -""" -input v2_traces_type_max_order_by { - block_hash: order_by - event_index: order_by - height: order_by - timestamp: order_by - transaction_hash: order_by - type: order_by - universal_chain_id: order_by -} - -""" -order by min() on columns of table "v2.traces_type" -""" -input v2_traces_type_min_order_by { - block_hash: order_by - event_index: order_by - height: order_by - timestamp: order_by - transaction_hash: order_by - type: order_by - universal_chain_id: order_by -} - -"""Ordering options when selecting data from "v2.traces_type".""" -input v2_traces_type_order_by { - block_hash: order_by - chain: v2_chains_view_order_by - event_index: order_by - height: order_by - timestamp: order_by - transaction_hash: order_by - type: order_by - universal_chain_id: order_by -} - -""" -select columns of table "v2.traces_type" -""" -enum v2_traces_type_select_column { - """column name""" - block_hash - - """column name""" - event_index - - """column name""" - height - - """column name""" - timestamp - - """column name""" - transaction_hash - - """column name""" - type - - """column name""" - universal_chain_id -} - -""" -columns and relationships of "v2.transfer_type" -""" type v2_transfer_type { - base_amount: String + packet_hash: String + success: Boolean + packet_shape: String + transfer_index: Int + source_universal_chain_id: String + destination_universal_chain_id: String + sender_canonical: String + sender_display: String + sender_zkgm: String + receiver_canonical: String + receiver_display: String + receiver_zkgm: String + wrap_direction: String base_token: String - base_token_decimals: Int - - """An object relationship""" - base_token_meta: v2_token_meta + base_amount: String base_token_name: String base_token_path: String base_token_symbol: String - - """An object relationship""" - destination_chain: v2_chains_view - destination_universal_chain_id: String - fee_amount: String + base_token_decimals: Int + quote_token: String + quote_amount: String + fee_type: String fee_token: String - - """An object relationship""" + fee_amount: String + transfer_send_timestamp: DateTime + transfer_send_transaction_hash: String + transfer_recv_timestamp: DateTime + transfer_recv_transaction_hash: String + transfer_timeout_timestamp: DateTime + transfer_timeout_transaction_hash: String + sort_order: String + source_chain: v2_chain_type! + destination_chain: v2_chain_type! + traces: [v2_traces_type!]! + base_token_meta: v2_token_meta fee_token_meta: v2_token_meta - fee_type: String + quote_token_meta: v2_token_meta +} + +input v2_transfers_args { + p_addresses_canonical: jsonb + p_block_hash: String + p_comparison: ComparisonOp! = lt + p_destination_universal_chain_id: String + p_limit: Int + p_network: String + p_packet_hash: String + p_sort_order: String + p_source_universal_chain_id: String + p_transaction_hash: String + p_transfer_index: Int +} + +type v2_unbond_type { packet_hash: String + success: Boolean packet_shape: String - quote_amount: String - quote_token: String - - """An object relationship""" - quote_token_meta: v2_token_meta - receiver_canonical: String - receiver_display: String - receiver_zkgm: String + source_universal_chain_id: String + destination_universal_chain_id: String sender_canonical: String sender_display: String sender_zkgm: String + receiver_canonical: String + receiver_display: String + receiver_zkgm: String + base_token: String + base_amount: String + unbond_amount: String + unbond_send_timestamp: DateTime + unbond_send_transaction_hash: String + unbond_recv_timestamp: DateTime + unbond_recv_transaction_hash: String + unbond_timeout_timestamp: DateTime + unbond_timeout_transaction_hash: String sort_order: String - - """An object relationship""" - source_chain: v2_chains_view - source_universal_chain_id: String - success: Boolean - - """ - A computed field, executes function "v2.transfer_traces" - """ - traces( - """distinct select on columns""" - distinct_on: [v2_traces_type_select_column!] - - """limit the number of rows returned""" - limit: Int - - """skip the first n rows. Use only with order_by""" - offset: Int - - """sort the rows by one or more columns""" - order_by: [v2_traces_type_order_by!] - - """filter the rows returned""" - where: v2_traces_type_bool_exp - ): [v2_traces_type!] - transfer_index: Int - transfer_recv_timestamp: timestamptz - transfer_recv_transaction_hash: String - transfer_send_timestamp: timestamptz - transfer_send_transaction_hash: String - transfer_timeout_timestamp: timestamptz - transfer_timeout_transaction_hash: String - wrap_direction: String -} - -""" -Boolean expression to filter rows from the table "v2.transfer_type". All fields are combined with a logical 'AND'. -""" -input v2_transfer_type_bool_exp { - _and: [v2_transfer_type_bool_exp!] - _not: v2_transfer_type_bool_exp - _or: [v2_transfer_type_bool_exp!] - base_amount: String_comparison_exp - base_token: String_comparison_exp - base_token_decimals: Int_comparison_exp - base_token_meta: v2_token_meta_bool_exp - base_token_name: String_comparison_exp - base_token_path: String_comparison_exp - base_token_symbol: String_comparison_exp - destination_chain: v2_chains_view_bool_exp - destination_universal_chain_id: String_comparison_exp - fee_amount: String_comparison_exp - fee_token: String_comparison_exp - fee_token_meta: v2_token_meta_bool_exp - fee_type: String_comparison_exp - packet_hash: String_comparison_exp - packet_shape: String_comparison_exp - quote_amount: String_comparison_exp - quote_token: String_comparison_exp - quote_token_meta: v2_token_meta_bool_exp - receiver_canonical: String_comparison_exp - receiver_display: String_comparison_exp - receiver_zkgm: String_comparison_exp - sender_canonical: String_comparison_exp - sender_display: String_comparison_exp - sender_zkgm: String_comparison_exp - sort_order: String_comparison_exp - source_chain: v2_chains_view_bool_exp - source_universal_chain_id: String_comparison_exp - success: Boolean_comparison_exp - traces: v2_traces_type_bool_exp - transfer_index: Int_comparison_exp - transfer_recv_timestamp: timestamptz_comparison_exp - transfer_recv_transaction_hash: String_comparison_exp - transfer_send_timestamp: timestamptz_comparison_exp - transfer_send_transaction_hash: String_comparison_exp - transfer_timeout_timestamp: timestamptz_comparison_exp - transfer_timeout_transaction_hash: String_comparison_exp - wrap_direction: String_comparison_exp -} - -"""Ordering options when selecting data from "v2.transfer_type".""" -input v2_transfer_type_order_by { - base_amount: order_by - base_token: order_by - base_token_decimals: order_by - base_token_meta: v2_token_meta_order_by - base_token_name: order_by - base_token_path: order_by - base_token_symbol: order_by - destination_chain: v2_chains_view_order_by - destination_universal_chain_id: order_by - fee_amount: order_by - fee_token: order_by - fee_token_meta: v2_token_meta_order_by - fee_type: order_by - packet_hash: order_by - packet_shape: order_by - quote_amount: order_by - quote_token: order_by - quote_token_meta: v2_token_meta_order_by - receiver_canonical: order_by - receiver_display: order_by - receiver_zkgm: order_by - sender_canonical: order_by - sender_display: order_by - sender_zkgm: order_by - sort_order: order_by - source_chain: v2_chains_view_order_by - source_universal_chain_id: order_by - success: order_by - traces_aggregate: v2_traces_type_aggregate_order_by - transfer_index: order_by - transfer_recv_timestamp: order_by - transfer_recv_transaction_hash: order_by - transfer_send_timestamp: order_by - transfer_send_transaction_hash: order_by - transfer_timeout_timestamp: order_by - transfer_timeout_transaction_hash: order_by - wrap_direction: order_by -} - -""" -select columns of table "v2.transfer_type" -""" -enum v2_transfer_type_select_column { - """column name""" - base_amount - - """column name""" - base_token - - """column name""" - base_token_decimals - - """column name""" - base_token_name - - """column name""" - base_token_path - - """column name""" - base_token_symbol - - """column name""" - destination_universal_chain_id - - """column name""" - fee_amount - - """column name""" - fee_token - - """column name""" - fee_type - - """column name""" - packet_hash - - """column name""" - packet_shape - - """column name""" - quote_amount - - """column name""" - quote_token - - """column name""" - receiver_canonical - - """column name""" - receiver_display - - """column name""" - receiver_zkgm - - """column name""" - sender_canonical - - """column name""" - sender_display - - """column name""" - sender_zkgm - - """column name""" - sort_order - - """column name""" - source_universal_chain_id - - """column name""" - success - - """column name""" - transfer_index - - """column name""" - transfer_recv_timestamp - - """column name""" - transfer_recv_transaction_hash - - """column name""" - transfer_send_timestamp - - """column name""" - transfer_send_transaction_hash - - """column name""" - transfer_timeout_timestamp - - """column name""" - transfer_timeout_transaction_hash - - """column name""" - wrap_direction + source_chain: v2_chain_type! + destination_chain: v2_chain_type! + traces: [v2_traces_type!]! + base_token_meta: v2_token_meta } -input v2_transfers_args { +input v2_unbonds_args { p_addresses_canonical: jsonb p_block_hash: String - p_comparison: String + p_comparison: ComparisonOp! = lt + p_destination_universal_chain_id: String p_limit: Int + p_network: String p_packet_hash: String p_sort_order: String p_source_universal_chain_id: String p_transaction_hash: String - p_transfer_index: Int } input v2_util_get_address_types_for_display_address_args { - p_chain_type: String p_display_address: String + p_chain_type: String } -""" -columns and relationships of "v2.util_get_address_types_for_display_address_type" -""" type v2_util_get_address_types_for_display_address_type { canonical: String display: String zkgm: String } -""" -Boolean expression to filter rows from the table "v2.util_get_address_types_for_display_address_type". All fields are combined with a logical 'AND'. -""" -input v2_util_get_address_types_for_display_address_type_bool_exp { - _and: [v2_util_get_address_types_for_display_address_type_bool_exp!] - _not: v2_util_get_address_types_for_display_address_type_bool_exp - _or: [v2_util_get_address_types_for_display_address_type_bool_exp!] - canonical: String_comparison_exp - display: String_comparison_exp - zkgm: String_comparison_exp -} - -""" -Ordering options when selecting data from "v2.util_get_address_types_for_display_address_type". -""" -input v2_util_get_address_types_for_display_address_type_order_by { - canonical: order_by - display: order_by - zkgm: order_by -} - -""" -select columns of table "v2.util_get_address_types_for_display_address_type" -""" -enum v2_util_get_address_types_for_display_address_type_select_column { - """column name""" - canonical - - """column name""" - display - - """column name""" - zkgm -} - input v2_util_get_transfer_request_details_args { - p_base_token: String - p_destination_universal_chain_id: String p_source_universal_chain_id: String + p_destination_universal_chain_id: String + p_base_token: String } -""" -columns and relationships of "v2.util_get_transfer_request_details_type" -""" type v2_util_get_transfer_request_details_type { - already_exists: Boolean - destination_channel_id: Int quote_token: String source_channel_id: Int + destination_channel_id: Int + already_exists: Boolean wrap_direction: String -} - -""" -Boolean expression to filter rows from the table "v2.util_get_transfer_request_details_type". All fields are combined with a logical 'AND'. -""" -input v2_util_get_transfer_request_details_type_bool_exp { - _and: [v2_util_get_transfer_request_details_type_bool_exp!] - _not: v2_util_get_transfer_request_details_type_bool_exp - _or: [v2_util_get_transfer_request_details_type_bool_exp!] - already_exists: Boolean_comparison_exp - destination_channel_id: Int_comparison_exp - quote_token: String_comparison_exp - source_channel_id: Int_comparison_exp - wrap_direction: String_comparison_exp -} - -""" -Ordering options when selecting data from "v2.util_get_transfer_request_details_type". -""" -input v2_util_get_transfer_request_details_type_order_by { - already_exists: order_by - destination_channel_id: order_by - quote_token: order_by - source_channel_id: order_by - wrap_direction: order_by -} - -""" -select columns of table "v2.util_get_transfer_request_details_type" -""" -enum v2_util_get_transfer_request_details_type_select_column { - """column name""" - already_exists - - """column name""" - destination_channel_id - - """column name""" - quote_token - - """column name""" - source_channel_id - - """column name""" - wrap_direction } \ No newline at end of file diff --git a/ts-sdk/src/graphql/fragments/ChainFragment.ts b/ts-sdk/src/graphql/fragments/ChainFragment.ts new file mode 100644 index 0000000000..c63772699e --- /dev/null +++ b/ts-sdk/src/graphql/fragments/ChainFragment.ts @@ -0,0 +1,38 @@ +import { graphql } from "gql.tada" + +export const ChainFragment = graphql(` +fragment ChainFragment on v2_chain_type { + chain_id + universal_chain_id + minter_address_display + display_name + addr_prefix + rpc_type + testnet + editions { + environment + name + } + features(where: { environment: { _eq: "PRODUCTION" } }) { + channel_list + connection_list + index_status + packet_list + transfer_submission + transfer_list + } + rpcs { + type + url + } + explorers { + address_url + block_url + description + display_name + home_url + name + tx_url + } +} +`) diff --git a/ts-sdk/src/graphql/fragments/TokenFragment.ts b/ts-sdk/src/graphql/fragments/TokenFragment.ts new file mode 100644 index 0000000000..88fc99acba --- /dev/null +++ b/ts-sdk/src/graphql/fragments/TokenFragment.ts @@ -0,0 +1,36 @@ +import { graphql } from "gql.tada" + +export const TokenFragment = graphql(` +fragment TokenFragment on v2_token_meta { + rank + denom + bucket { + capacity + refill_rate + } + representations { + logo_uri + name + symbol + decimals + sources { + update_timestamp + source { + name + logo_uri + source_uri + } + } + } + wrapping { + unwrapped_chain { + universal_chain_id + } + wrapped_chain { + universal_chain_id + } + destination_channel_id + unwrapped_denom + } +} +`) diff --git a/ts-sdk/src/graphql/fragments/TracesFragment.ts b/ts-sdk/src/graphql/fragments/TracesFragment.ts new file mode 100644 index 0000000000..972f5e7640 --- /dev/null +++ b/ts-sdk/src/graphql/fragments/TracesFragment.ts @@ -0,0 +1,14 @@ +import { graphql } from "gql.tada" + +export const TracesFragment = graphql(` +fragment TracesFragment on v2_traces_type { + type + height + block_hash + timestamp + transaction_hash + chain { + universal_chain_id + } +} +`) diff --git a/ts-sdk/src/index.ts b/ts-sdk/src/index.ts index 4d08fc65a7..27026fe0ef 100644 --- a/ts-sdk/src/index.ts +++ b/ts-sdk/src/index.ts @@ -179,6 +179,13 @@ export * as Indexer from "./Indexer.js" */ export * as Constants from "./Constants.js" +/** + * This module handles liquid staking. + * + * @since 2.0.0 + */ +export * as Staking from "./Staking.js" + /** * This module provides a chain-agnostic service for determining gas price. * diff --git a/ts-sdk/src/schema/chain.ts b/ts-sdk/src/schema/chain.ts index 608bbad192..bc6c547736 100644 --- a/ts-sdk/src/schema/chain.ts +++ b/ts-sdk/src/schema/chain.ts @@ -11,6 +11,13 @@ export const ChainId = S.String.pipe(S.brand("ChainId")) // TODO: narrow filter for arbitraries export const UniversalChainId = S.String.pipe(S.pattern(/^[a-z]+\.[a-z\-0-9]+$/)).pipe( S.brand("UniversalChainId"), + S.annotations({ + arbitrary: () => (fc) => + fc.constantFrom( + "union.union-1", + "babylon.bbn-1", + ) as unknown as any, + }), ) export type UniversalChainId = typeof UniversalChainId.Type diff --git a/ts-sdk/src/schema/stake.ts b/ts-sdk/src/schema/stake.ts new file mode 100644 index 0000000000..9969a1b35e --- /dev/null +++ b/ts-sdk/src/schema/stake.ts @@ -0,0 +1,186 @@ +import { BigDecimal, DateTime, pipe } from "effect" +import * as B from "effect/Boolean" +import * as O from "effect/Option" +import * as S from "effect/Schema" +import { Chain, UniversalChainId } from "./chain.js" +import { Hex } from "./hex.js" +import { PacketHash } from "./packet.js" +import { Token, TokenRawDenom } from "./token.js" +import { TransactionHash } from "./transaction.js" +import { Uint256 } from "./uint256.js" + +export enum ZkgmStakeState { + // The position doesn't exist yet. + UNDEFINED, + // The tokens are in-flight to be staked. + STAKING, + // The tokens are bonded and the position is being rewarded. + STAKED, + // The tokens are being unbonded, the position no longer earns rewards. + UNSTAKING, + // The tokens has been unstaked and withdrawn. + UNSTAKED, +} + +export const ZkgmStakeStateEnum = S.Enums(ZkgmStakeState) +export type ZkgmStakeStateEnum = typeof ZkgmStakeStateEnum.Type + +export const Stake = S.Struct({ + tokenId: Uint256, + governanceToken: Hex, + sender: Hex, + beneficiary: Hex, + validator: Hex, + amount: Uint256, +}) +export type Stake = typeof Stake.Type + +export const Unstake = S.Struct({ + tokenId: Uint256, + governanceToken: Hex, + sender: Hex, + validator: Hex, + amount: Uint256, +}) +export type Unstake = typeof Unstake.Type + +export class Bond extends S.TaggedClass("Bond")("Bond", { + packet_hash: PacketHash, + delivery_packet_hash: S.OptionFromNullOr(PacketHash), + bond_success: S.OptionFromNullOr(S.Boolean.pipe( + S.annotations({ + description: "the batch doing the bond didn't timeout or negative ack", + }), + )), + delivery_success: S.OptionFromNullOr(S.Boolean.pipe( + S.annotations({ + description: "the instruction doing the delivery didn't timeout or negative ack", + }), + )), + packet_shape: S.String, + source_universal_chain_id: UniversalChainId, + remote_universal_chain_id: UniversalChainId, + destination_universal_chain_id: UniversalChainId, + sender_canonical: S.String, + sender_display: S.String, + sender_zkgm: S.String, + receiver_canonical: S.String, + receiver_display: S.String, + receiver_zkgm: S.String, + base_token: TokenRawDenom, + base_amount: S.BigInt.pipe( + S.annotations({ + arbitrary: () => (fc) => fc.bigInt({ min: 1n, max: 10n ** 18n - 1n }), + }), + ), + quote_token: TokenRawDenom, + quote_amount: S.BigInt, + remote_base_token: S.String, + remote_base_amount: S.BigInt, + remote_quote_token: S.String, + remote_quote_amount: S.BigInt, + bond_send_timestamp: S.DateTimeUtc, + bond_send_transaction_hash: TransactionHash, + bond_recv_timestamp: S.OptionFromNullOr(S.DateTimeUtc), + bond_recv_transaction_hash: S.OptionFromNullOr(TransactionHash), + bond_timeout_timestamp: S.OptionFromNullOr(S.DateTimeUtc).pipe( + S.annotations({ + description: "none means no timeout", + }), + ), + bond_timeout_transaction_hash: S.OptionFromNullOr(TransactionHash), + delivery_send_timestamp: S.OptionFromNullOr(S.DateTimeUtc), + delivery_send_transaction_hash: S.OptionFromNullOr(TransactionHash), + delivery_recv_timestamp: S.OptionFromNullOr(S.DateTimeUtc), + delivery_recv_transaction_hash: S.OptionFromNullOr(TransactionHash), + delivery_timeout_timestamp: S.OptionFromNullOr(S.DateTimeUtc).pipe( + S.annotations({ + description: "none means no timeout", + }), + ), + delivery_timeout_transaction_hash: S.OptionFromNullOr(TransactionHash), + sort_order: S.String, + source_chain: Chain, + destination_chain: Chain, + // bond_traces: S.Array(PacketTrace), + // delivery_traces: S.Array(PacketTrace), + base_token_meta: Token, + quote_token_meta: S.OptionFromNullOr(Token), + remote_base_token_meta: Token, + remote_quote_token_meta: S.OptionFromNullOr(Token), +}) { + get amountFormatted() { + return pipe( + this.base_amount, + BigDecimal.fromBigInt, + BigDecimal.unsafeDivide(BigDecimal.make(1n, -O.getOrThrow(this.base_token_meta.decimals))), + BigDecimal.format, + ) + } + get sendTimestampFormatted() { + return pipe( + this.bond_send_timestamp, + DateTime.formatUtc, + ) + } + get status() { + return pipe( + this.bond_success, + O.map(B.match({ + onTrue: () => "success" as const, + onFalse: () => "failure" as const, + })), + O.getOrElse(() => "pending" as const), + ) + } +} + +export class Unbond extends S.TaggedClass("Unbond")("Unbond", { + packet_hash: PacketHash, + success: S.OptionFromNullOr(S.Boolean), + packet_shape: S.String, + source_universal_chain_id: UniversalChainId, + destination_universal_chain_id: UniversalChainId, + sender_canonical: S.String, + sender_display: S.String, + sender_zkgm: S.String, + base_token: TokenRawDenom, + base_amount: S.BigInt, + unbond_amount: S.BigInt, + unbond_send_timestamp: S.DateTimeUtc, + unbond_send_transaction_hash: TransactionHash, + unbond_recv_timestamp: S.DateTimeUtc, + unbond_recv_transaction_hash: TransactionHash, + unbond_timeout_timestamp: S.DateTimeUtc, + unbond_timeout_transaction_hash: TransactionHash, + sort_order: S.String, + // traces: S.Array(PacketTrace), + source_chain: Chain, + destination_chain: Chain, + base_token_meta: Token, +}) { + get amountFormatted() { + return pipe( + this.base_amount, + BigDecimal.fromBigInt, + BigDecimal.unsafeDivide(BigDecimal.make(1n, -O.getOrThrow(this.base_token_meta.decimals))), + BigDecimal.format, + ) + } + get sendTimestampFormatted() { + return pipe( + this.unbond_send_timestamp, + DateTime.formatUtc, + ) + } + get status() { + return pipe( + this.success, + O.map(B.match({ + onTrue: () => "success" as const, + onFalse: () => "failure" as const, + })), + O.getOrElse(() => "pending" as const), + ) + } +} diff --git a/ts-sdk/src/schema/staking.ts b/ts-sdk/src/schema/staking.ts deleted file mode 100644 index c25cef283f..0000000000 --- a/ts-sdk/src/schema/staking.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as S from "effect/Schema" -import { Hex } from "./hex.js" -import { Uint256 } from "./uint256.js" - -export enum ZkgmStakeState { - // The position doesn't exist yet. - UNDEFINED, - // The tokens are in-flight to be staked. - STAKING, - // The tokens are bonded and the position is being rewarded. - STAKED, - // The tokens are being unbonded, the position no longer earns rewards. - UNSTAKING, - // The tokens has been unstaked and withdrawn. - UNSTAKED, -} - -export const ZkgmStakeStateEnum = S.Enums(ZkgmStakeState) -export type ZkgmStakeStateEnum = typeof ZkgmStakeStateEnum.Type - -export const Stake = S.Struct({ - tokenId: Uint256, - governanceToken: Hex, - sender: Hex, - beneficiary: Hex, - validator: Hex, - amount: Uint256, -}) -export type Stake = typeof Stake.Type - -export const Unstake = S.Struct({ - tokenId: Uint256, - governanceToken: Hex, - sender: Hex, - validator: Hex, - amount: Uint256, -}) -export type Unstake = typeof Unstake.Type diff --git a/ts-sdk/src/schema/token.ts b/ts-sdk/src/schema/token.ts index d88b59dca9..18a54eeeef 100644 --- a/ts-sdk/src/schema/token.ts +++ b/ts-sdk/src/schema/token.ts @@ -1,4 +1,6 @@ -import { Schema } from "effect" +import { pipe, Schema, Struct } from "effect" +import * as A from "effect/Array" +import * as O from "effect/Option" import { AddressEvmCanonical } from "./address.js" import { UniversalChainId } from "./chain.js" import { ChannelId } from "./channel.js" @@ -7,6 +9,15 @@ import { Hex } from "./hex.js" export const TokenRawDenom = Hex.pipe( Schema.lowercased(), Schema.brand("TokenRawDenom"), + Schema.annotations({ + arbitrary: () => (fc) => + fc.constantFrom( + ...[ + "0x6175", + "0x7562626e", + ] as unknown as any, + ), + }), ) export type TokenRawDenom = typeof TokenRawDenom.Type @@ -69,7 +80,15 @@ export class Token extends Schema.Class("Token")({ wrapping: Schema.Array(TokenWrapping), bucket: Schema.OptionFromNullOr(Bucket), whitelisted: Schema.optional(Schema.Boolean), -}) {} +}) { + get decimals(): O.Option { + return pipe( + this.representations, + A.head, + O.map(Struct.get("decimals")), + ) + } +} export const Tokens = Schema.Array(Token) export type Tokens = typeof Tokens.Type From 7382f9826389d958ca7007ef3ca2cbd2ece1dd3d Mon Sep 17 00:00:00 2001 From: benluelo Date: Thu, 4 Sep 2025 02:59:23 +0100 Subject: [PATCH 002/111] fix: split mint amount and spend amount --- app2/examples/bond.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app2/examples/bond.ts b/app2/examples/bond.ts index 9660c38106..4ea008d1b8 100644 --- a/app2/examples/bond.ts +++ b/app2/examples/bond.ts @@ -60,11 +60,12 @@ const UCS03_MINTER_ON_UNION = Ucs05.CosmosDisplay.make({ const UCS03_ZKGM = Ucs05.CosmosDisplay.make({ address: "union1336jj8ertl8h7rdvnz4dh5rqahd09cy0x43guhsxx6xyrztx292qpe64fh", }) -const MIN_MINT_AMOUNT = (10n ** 18n) * 1_000n +const SEND_AMOUNT = (10n ** 18n) * 1_000n +const MIN_MINT_AMOUNT = 999999999000000000000n const VIEM_CHAIN = holesky const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const SENDER = Ucs05.EvmDisplay.make({ - address: "0x06627714f3F17a701f7074a12C02847a5D2Ca487", + address: "0x2C96e52fCE14BAa13868CA8182f8A7903e4e76E0", }) const VIEM_ACCOUNT = privateKeyToAccount( @@ -98,9 +99,9 @@ const sendBond = Effect.gen(function*() { sender: SENDER, receiver: ON_ZKGM_CALL_PROXY, baseToken: U_ERC20, - baseAmount: MIN_MINT_AMOUNT, + baseAmount: SEND_AMOUNT, quoteToken: U_BANK, - quoteAmount: MIN_MINT_AMOUNT, + quoteAmount: SEND_AMOUNT, kind: "solve", metadata: U_TO_UNION_SOLVER_METADATA, version: 2, From adf6cc9ed4fc619771695669d3851536298e1c78 Mon Sep 17 00:00:00 2001 From: Eric Hegnes Date: Thu, 4 Sep 2025 00:55:44 -0400 Subject: [PATCH 003/111] feat(app2): unstake progress Signed-off-by: Eric Hegnes --- app2/examples/bond.ts | 8 +- app2/examples/unbond.ts | 65 +- app2/src/lib/components/ui/JsonPreview.svelte | 142 + .../shared/data/transfer-data.svelte.ts | 10 +- app2/src/routes/stake/+page.svelte | 62 +- ts-sdk-evm/src/Evm.ts | 9 +- ts-sdk/src/Constants.ts | 13 +- ts-sdk/src/generated/graphql-env.d.ts | 5785 +---------------- 8 files changed, 316 insertions(+), 5778 deletions(-) create mode 100644 app2/src/lib/components/ui/JsonPreview.svelte diff --git a/app2/examples/bond.ts b/app2/examples/bond.ts index 4ea008d1b8..2719177ef0 100644 --- a/app2/examples/bond.ts +++ b/app2/examples/bond.ts @@ -27,13 +27,13 @@ import { Evm, EvmZkgmClient } from "@unionlabs/sdk-evm" import { ChainRegistry } from "@unionlabs/sdk/ChainRegistry" import { EU_ERC20, - EU_FROM_UNION_SOLVER_METADATA, EU_LST, + EU_SOLVER_ON_UNION_METADATA, EU_STAKING_HUB, ON_ZKGM_CALL_PROXY, U_BANK, U_ERC20, - U_TO_UNION_SOLVER_METADATA, + U_SOLVER_ON_UNION_METADATA, } from "@unionlabs/sdk/Constants" import { UniversalChainId } from "@unionlabs/sdk/schema/chain" import { ChannelId } from "@unionlabs/sdk/schema/channel" @@ -103,7 +103,7 @@ const sendBond = Effect.gen(function*() { quoteToken: U_BANK, quoteAmount: SEND_AMOUNT, kind: "solve", - metadata: U_TO_UNION_SOLVER_METADATA, + metadata: U_SOLVER_ON_UNION_METADATA, version: 2, }) @@ -176,7 +176,7 @@ const sendBond = Effect.gen(function*() { quoteToken: EU_ERC20, quoteAmount: MIN_MINT_AMOUNT, kind: "solve", - metadata: EU_FROM_UNION_SOLVER_METADATA, + metadata: EU_SOLVER_ON_UNION_METADATA, version: 2, }), Effect.flatMap(TokenOrder.encodeV2), diff --git a/app2/examples/unbond.ts b/app2/examples/unbond.ts index c32c681741..ba1080eaaf 100644 --- a/app2/examples/unbond.ts +++ b/app2/examples/unbond.ts @@ -13,6 +13,7 @@ if (typeof BigInt.prototype.toJSON !== "function") { import { Batch, Call, + Token, TokenOrder, Ucs05, ZkgmClient, @@ -22,10 +23,11 @@ import { import { Evm, EvmZkgmClient } from "@unionlabs/sdk-evm" import { ChainRegistry } from "@unionlabs/sdk/ChainRegistry" import { + EU_ERC20, + EU_LST, + EU_SOLVER_ON_UNION_METADATA, + EU_STAKING_HUB, ON_ZKGM_CALL_PROXY, - U_BANK, - U_ERC20, - U_TO_UNION_SOLVER_METADATA, } from "@unionlabs/sdk/Constants" import { UniversalChainId } from "@unionlabs/sdk/schema/chain" import { ChannelId } from "@unionlabs/sdk/schema/channel" @@ -43,8 +45,8 @@ const JsonFromBase64 = Schema.compose( const AMOUNT = 1n const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") -const SOURCE_CHANNEL_ID = ChannelId.make(1) // FIXME -const UCS03_MINTER = Ucs05.EvmDisplay.make({ +const SOURCE_CHANNEL_ID = ChannelId.make(6) +const UCS03_EVM = Ucs05.EvmDisplay.make({ address: "0x5fbe74a283f7954f10aa04c2edf55578811aeb03", }) const VIEM_CHAIN = holesky @@ -52,9 +54,6 @@ const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const SENDER = Ucs05.EvmDisplay.make({ address: "0x06627714f3F17a701f7074a12C02847a5D2Ca487", }) -const EU_STAKING_HUB = Ucs05.CosmosDisplay.make({ - address: "union1eueueueu9var4yhdruyzkjcsh74xzeug6ckyy60hs0vcqnzql2hq0lxc2f", // FIXME -}) const VIEM_ACCOUNT = privateKeyToAccount( process.env.KEY as any, @@ -64,30 +63,63 @@ const sendUnbond = Effect.gen(function*() { const ethereumChain = yield* ChainRegistry.byUniversalId(ETHEREUM_CHAIN_ID) const unionChain = yield* ChainRegistry.byUniversalId(UNION_CHAIN_ID) - const eu_staking_hub = yield* Ucs05.anyDisplayToZkgm(EU_STAKING_HUB) + yield* Evm.increaseErc20Allowance( + EU_ERC20.address, + UCS03_EVM, + 1n, + ) const tokenOrder = yield* TokenOrder.make({ source: ethereumChain, destination: unionChain, sender: SENDER, receiver: ON_ZKGM_CALL_PROXY, - baseToken: U_ERC20, + baseToken: EU_ERC20, baseAmount: AMOUNT, - quoteToken: U_BANK, + quoteToken: Token.Cw20.make({ address: EU_LST.address }), quoteAmount: AMOUNT, kind: "solve", - metadata: U_TO_UNION_SOLVER_METADATA, + metadata: EU_SOLVER_ON_UNION_METADATA, version: 2, }) + const increaseAllowanceCall = yield* pipe( + { + increase_allowance: { + spender: EU_STAKING_HUB.address, + amount: AMOUNT, + }, + } as const, + Schema.encode(JsonFromBase64), + Effect.map((msg) => ({ + contract: EU_LST.address, + msg, + funds: [], + call_action: "direct", + } as const)), + Effect.flatMap(Schema.decode(HexFromJson)), + Effect.map((contractCalldata) => + Call.make({ + sender: SENDER, + eureka: false, + contractAddress: ON_ZKGM_CALL_PROXY, + contractCalldata, + }) + ), + ) + const unbondCall = yield* pipe( - { amount: tokenOrder.quoteAmount } as const, + { + unbond: { + amount: tokenOrder.quoteAmount, + }, + } as const, Schema.encode(JsonFromBase64), Effect.map((msg) => ({ - contract: eu_staking_hub, + contract: EU_STAKING_HUB.address, msg, funds: [], - call_action: "call_proxy", + call_action: "call_on_proxy_call", } as const)), Effect.flatMap(Schema.decode(HexFromJson)), Effect.map((contractCalldata) => @@ -102,6 +134,7 @@ const sendUnbond = Effect.gen(function*() { const batch = Batch.make([ tokenOrder, + increaseAllowanceCall, unbondCall, ]) @@ -109,7 +142,7 @@ const sendUnbond = Effect.gen(function*() { source: ethereumChain, destination: unionChain, channelId: SOURCE_CHANNEL_ID, - ucs03Address: UCS03_MINTER.address, + ucs03Address: UCS03_EVM.address, instruction: batch, }) diff --git a/app2/src/lib/components/ui/JsonPreview.svelte b/app2/src/lib/components/ui/JsonPreview.svelte new file mode 100644 index 0000000000..1c1119d21b --- /dev/null +++ b/app2/src/lib/components/ui/JsonPreview.svelte @@ -0,0 +1,142 @@ + + +{#if isNested(value)} +
+ + {#if A.isArray(value)} + {"[…]"} + {(value as unknown[]).length} items + {:else if P.isRecord(value)} + {"{…}"} + {R.size(value)} keys + {:else} + render failure + {/if} + + +
+ {#each truncated as [k, v] (k)} + {#if isNested(v)} +
+ {k}: +
+ +
+
+ {:else} +
+ {k}: + +
+ {/if} + {/each} + + {#if A.length(entries) > maxChildren} +
+ … {A.length(entries) - maxChildren} more +
+ {/if} +
+
+{:else} + + {formatPrimitive(value)} + +{/if} diff --git a/app2/src/lib/transfer/shared/data/transfer-data.svelte.ts b/app2/src/lib/transfer/shared/data/transfer-data.svelte.ts index 8c432bd527..90973a38cc 100644 --- a/app2/src/lib/transfer/shared/data/transfer-data.svelte.ts +++ b/app2/src/lib/transfer/shared/data/transfer-data.svelte.ts @@ -14,12 +14,12 @@ import { signingMode } from "$lib/transfer/signingMode.svelte" import { Token, TokenOrder, Ucs05 } from "@unionlabs/sdk" import { EU_ERC20, - EU_FROM_UNION_SOLVER_METADATA, EU_LST, + EU_SOLVER_ON_UNION_METADATA, U_BANK, U_ERC20, - U_ON_ETH_SOLVER_METADATA, - U_TO_UNION_SOLVER_METADATA, + U_SOLVER_ON_ETH_METADATA, + U_SOLVER_ON_UNION_METADATA, } from "@unionlabs/sdk/Constants" import * as US from "@unionlabs/sdk/schema" import { Array as A, Brand, Effect, Match, Option, pipe, String as Str, Struct } from "effect" @@ -247,11 +247,11 @@ export class TransferData { Match.whenOr( ["solve", "0x6175", "evm", Match.any], ["solve", U_ERC20.address.toLowerCase(), "evm", Match.any], - () => Option.some(U_ON_ETH_SOLVER_METADATA), + () => Option.some(U_SOLVER_ON_ETH_METADATA), ), Match.when( ["solve", U_ERC20.address.toLowerCase(), "cosmos", Str.startsWith("union.")], - () => Option.some(U_TO_UNION_SOLVER_METADATA), + () => Option.some(U_SOLVER_ON_UNION_METADATA), ), Match.when( ["solve", Match.any, Match.any, Match.any], diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index 68050b9364..95c26f3b77 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -1,10 +1,12 @@ + +{#snippet renderBalanceSkeleton()} + +{/snippet} + +{#snippet renderBalance(amount: bigint)} +
+ { + pipe( + BigDecimal.fromBigInt(amount), + // XXX: check decimals + BigDecimal.unsafeDivide(BigDecimal.make(1n, -18)), + Utils.formatBigDecimal, + ) + } +
+{/snippet} + +
+
+ + {@render matchOption(uOnEvmBalance, renderBalance, renderBalanceSkeleton)} +
+ +
+ { + const { inputType, data, currentTarget } = event + const { value } = currentTarget + const proposed = value + (data ?? "") + + const maxDecimals = pipe( + uOnEvmToken, + O.map(Struct.get("representations")), + O.flatMap(A.head), + O.map(Struct.get("decimals")), + O.getOrElse(() => 18), + ) + + const validShape = /^\d*[.,]?\d*$/.test(proposed) + const validDecimalsDot = !proposed.includes(".") + || proposed.split(".")[1].length <= maxDecimals + const validDecimalsComma = !proposed.includes(",") + || proposed.split(",")[1].length <= maxDecimals + const isDelete = inputType.startsWith("delete") + const validDecimals = validDecimalsComma && validDecimalsDot + const noDuplicateLeadingZeroes = !proposed.startsWith("00") + + const allow = isDelete + || (validDecimals && validShape && noDuplicateLeadingZeroes) + + if (!allow) { + event.preventDefault() + } + }} + autocapitalize="none" + pattern="^[0-9]*[.,]?[0-9]*$" + value={bondInput} + class="h-14 text-center text-lg" + oninput={(event) => { + bondInput = event.currentTarget.value + }} + /> + {O.map(bondAmount, (wei) => wei.toString())} +
+ + +
+ {#if O.isSome(stakingRates.current) && stakingRates.current.value._tag === "Success"} +
+ Purchase rate: + + {pipe( + stakingRates.current.value.value.purchase_rate, + Utils.formatBigDecimal + )} + +
+
+ Expected receive: + + {pipe( + expectedReceiveAmount, + O.map(bd => { + const formatted = Utils.formatBigDecimal(bd) + const num = parseFloat(formatted) + return num === 0 ? "0" : formatted + }), + O.getOrElse(() => "0") + )} eU + +
+
+ Slippage tolerance: +
+ + % +
+
+
+ Minimum receive: + + {O.getOrElse(minimumReceiveAmount, () => "0")} eU + +
+ {:else} +
+ Loading rates... +
+
+ {/if} +
+ + + {#if !BondState.$is("Ready")(bondState)} +
+
+
+ {#if isBonding} +
+ {:else if isSuccess} + + + + {:else if isError} + + + + {/if} +
+
+
+ { + Match.value(bondState).pipe( + Match.when(BondState.$is("SwitchingChain"), () => "Switching to Holesky"), + Match.when(BondState.$is("CheckingAllowance"), () => "Checking Token Allowance"), + Match.when(BondState.$is("ApprovingAllowance"), () => "Approving Token Spending"), + Match.when(BondState.$is("AllowanceApproved"), () => "Allowance Approved"), + Match.when(BondState.$is("CreatingTokenOrder"), () => "Creating Token Order"), + Match.when(BondState.$is("PreparingBondTransaction"), () => "Preparing Bond Transaction"), + Match.when(BondState.$is("ExecutingBond"), () => "Executing Bond"), + Match.when(BondState.$is("WaitingForTxConfirmation"), () => "Transaction Confirming"), + Match.when(BondState.$is("WaitingForIndexer"), () => "Indexing Transaction"), + Match.when(BondState.$is("Success"), () => "Bond Successful"), + Match.when(BondState.$is("Error"), () => "Bond Failed"), + Match.when(BondState.$is("Ready"), () => "Ready"), + Match.exhaustive, + ) + } +
+
+ { + Match.value(bondState).pipe( + Match.when(BondState.$is("SwitchingChain"), () => "Please switch to Holesky network in your wallet"), + Match.when(BondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), + Match.when(BondState.$is("ApprovingAllowance"), () => "Confirm token approval transaction in your wallet"), + Match.when(BondState.$is("AllowanceApproved"), () => "Token spending approved, proceeding..."), + Match.when(BondState.$is("CreatingTokenOrder"), () => "Building cross-chain token order..."), + Match.when(BondState.$is("PreparingBondTransaction"), () => "Preparing bond transaction with contracts..."), + Match.when(BondState.$is("ExecutingBond"), () => "Confirm bond transaction in your wallet"), + Match.when(BondState.$is("WaitingForTxConfirmation"), () => "Transaction submitted, waiting for confirmation..."), + Match.when(BondState.$is("WaitingForIndexer"), () => "Transaction confirmed, indexing data..."), + Match.when(BondState.$is("Success"), ({ txHash }) => `Success! TX: ${txHash.slice(0, 10)}...`), + Match.when(BondState.$is("Error"), ({ message }) => message), + Match.when(BondState.$is("Ready"), () => ""), + Match.exhaustive, + ) + } +
+
+
+
+ {/if} + +
+ +
+
From 307b8a9910078087c9aac74a62bf7a33ca28c259 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 11 Sep 2025 12:21:07 +0200 Subject: [PATCH 014/111] feat(app): breakout to component --- .../components/stake/UnbondComponent.svelte | 614 ++++++++++++++++++ 1 file changed, 614 insertions(+) create mode 100644 app2/src/lib/components/stake/UnbondComponent.svelte diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte new file mode 100644 index 0000000000..76cac4ee6b --- /dev/null +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -0,0 +1,614 @@ + + +{#snippet renderBalanceSkeleton()} + +{/snippet} + +{#snippet renderBalance(amount: bigint)} +
+ { + pipe( + BigDecimal.fromBigInt(amount), + // XXX: check decimals + BigDecimal.unsafeDivide(BigDecimal.make(1n, -18)), + Utils.formatBigDecimal, + ) + } +
+{/snippet} + +
+
+ + {@render matchOption(eUOnEvmBalance, renderBalance, renderBalanceSkeleton)} +
+ +
+ { + const { inputType, data, currentTarget } = event + const { value } = currentTarget + const proposed = value + (data ?? "") + + const maxDecimals = pipe( + uOnEvmToken, + O.map(Struct.get("representations")), + O.flatMap(A.head), + O.map(Struct.get("decimals")), + O.getOrElse(() => 18), + ) + + const a = pipe( + S.BigDecimal, + S.filter( + (x) => x.scale <= 18, + { + description: "can have at most 18 decimals", + }, + ), + ) + + const validShape = /^\d*[.,]?\d*$/.test(proposed) + const validDecimalsDot = !proposed.includes(".") + || proposed.split(".")[1].length <= maxDecimals + const validDecimalsComma = !proposed.includes(",") + || proposed.split(",")[1].length <= maxDecimals + const isDelete = inputType.startsWith("delete") + const validDecimals = validDecimalsComma && validDecimalsDot + const noDuplicateLeadingZeroes = !proposed.startsWith("00") + + const allow = isDelete + || (validDecimals && validShape && noDuplicateLeadingZeroes) + + if (!allow) { + event.preventDefault() + } + }} + autocapitalize="none" + pattern="^[0-9]*[.,]?[0-9]*$" + value={unbondInput} + class="h-14 text-center text-lg" + oninput={(event) => { + unbondInput = event.currentTarget.value + }} + /> + {O.map(unbondAmount, (wei) => wei.toString())} +
+ + + {#if !UnbondState.$is("Ready")(unbondState)} +
+
+
+ {#if isUnbonding} +
+ {:else if isSuccess} + + + + {:else if isError} + + + + {/if} +
+
+
+ { + Match.value(unbondState).pipe( + Match.when(UnbondState.$is("SwitchingChain"), () => "Switching to Holesky"), + Match.when(UnbondState.$is("CheckingAllowance"), () => "Checking Token Allowance"), + Match.when(UnbondState.$is("ApprovingAllowance"), () => "Approving Token Spending"), + Match.when(UnbondState.$is("AllowanceApproved"), () => "Allowance Approved"), + Match.when(UnbondState.$is("CreatingTokenOrder"), () => "Creating Token Order"), + Match.when(UnbondState.$is("PreparingUnbondTransaction"), () => "Preparing Unbond Transaction"), + Match.when(UnbondState.$is("ExecutingUnbond"), () => "Executing Unbond"), + Match.when(UnbondState.$is("WaitingForTxConfirmation"), () => "Transaction Confirming"), + Match.when(UnbondState.$is("WaitingForIndexer"), () => "Indexing Transaction"), + Match.when(UnbondState.$is("Success"), () => "Unbond Successful"), + Match.when(UnbondState.$is("Error"), () => "Unbond Failed"), + Match.when(UnbondState.$is("Ready"), () => "Ready"), + Match.exhaustive, + ) + } +
+
+ { + Match.value(unbondState).pipe( + Match.when(UnbondState.$is("SwitchingChain"), () => "Please switch to Holesky network in your wallet"), + Match.when(UnbondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), + Match.when(UnbondState.$is("ApprovingAllowance"), () => "Confirm token approval transaction in your wallet"), + Match.when(UnbondState.$is("AllowanceApproved"), () => "Token spending approved, proceeding..."), + Match.when(UnbondState.$is("CreatingTokenOrder"), () => "Building cross-chain token order..."), + Match.when(UnbondState.$is("PreparingUnbondTransaction"), () => "Preparing unbond transaction with contracts..."), + Match.when(UnbondState.$is("ExecutingUnbond"), () => "Confirm unbond transaction in your wallet"), + Match.when(UnbondState.$is("WaitingForTxConfirmation"), () => "Transaction submitted, waiting for confirmation..."), + Match.when(UnbondState.$is("WaitingForIndexer"), () => "Transaction confirmed, indexing data..."), + Match.when(UnbondState.$is("Success"), ({ txHash }) => `Success! TX: ${txHash.slice(0, 10)}...`), + Match.when(UnbondState.$is("Error"), ({ message }) => message), + Match.when(UnbondState.$is("Ready"), () => ""), + Match.exhaustive, + ) + } +
+
+
+
+ {/if} + +
+ +
+
From dba4a1435cbc55c44c613800dfb6897c036a6e6f Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 11 Sep 2025 12:21:16 +0200 Subject: [PATCH 015/111] feat(app): update page --- app2/src/routes/stake/+page.svelte | 388 ++++++++++++++--------------- 1 file changed, 183 insertions(+), 205 deletions(-) diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index 953564608d..c98b03ea48 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -3,15 +3,12 @@ import ChevronDownIcon from "$lib/components/icons/SharpChevronDownIcon.svelte" import SharpRightArrowIcon from "$lib/components/icons/SharpRightArrowIcon.svelte" import ChainComponent from "$lib/components/model/ChainComponent.svelte" import NoWalletConnected from "$lib/components/NoWalletConnected.svelte" -import Button from "$lib/components/ui/Button.svelte" +import BondComponent from "$lib/components/stake/BondComponent.svelte" +import UnbondComponent from "$lib/components/stake/UnbondComponent.svelte" import Card from "$lib/components/ui/Card.svelte" -import Input from "$lib/components/ui/Input.svelte" import JsonPreview from "$lib/components/ui/JsonPreview.svelte" -import Label from "$lib/components/ui/Label.svelte" import Sections from "$lib/components/ui/Sections.svelte" -import Skeleton from "$lib/components/ui/Skeleton.svelte" import * as AppRuntime from "$lib/runtime" -import * as DoBond from "$lib/stake/bond.js" import { balancesStore as BalanceStore } from "$lib/stores/balances.svelte" import { chains as ChainStore } from "$lib/stores/chains.svelte" import { tokensStore as TokenStore } from "$lib/stores/tokens.svelte" @@ -25,7 +22,6 @@ import { Chain, TokenRawDenom, UniversalChainId } from "@unionlabs/sdk/schema" import { Bond, Unbond } from "@unionlabs/sdk/schema/stake" import * as Utils from "@unionlabs/sdk/Utils" import { - BigDecimal, Brand, ConfigProvider, DateTime, @@ -33,7 +29,6 @@ import { Layer, Order, pipe, - Struct, } from "effect" import * as A from "effect/Array" import * as E from "effect/Either" @@ -42,6 +37,9 @@ import * as O from "effect/Option" import * as S from "effect/Schema" import { onMount } from "svelte" +type StakeTab = "bond" | "unbond" +type TableFilter = "all" | "bond" | "unbond" + const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.17000") const QlpConfigProvider = pipe( @@ -63,21 +61,27 @@ const eUOnEvmToken = $derived(pipe( O.flatMap(A.findFirst(xs => Brand.unbranded(xs.denom) === EU_ERC20.address.toLowerCase())), )) -let bondInput = $state("") -const bondAmount = $derived>(pipe( - bondInput, - BigDecimal.fromString, - O.map(BigDecimal.multiply(BigDecimal.make(1n, -18))), -)) -let unbondInput = $state("") -const unbondAmount = $derived>(pipe( - unbondInput, - BigDecimal.fromString, - O.map(BigDecimal.multiply(BigDecimal.make(1n, -18))), -)) +let selectedTab = $state("bond") +let tableFilter = $state("all") +let currentPage = $state(1) +let refreshTrigger = $state(0) + +const itemsPerPage = 10 + +const refreshBondData = () => { + refreshTrigger = Date.now() + currentPage = 1 // Reset to first page when data refreshes +} + +// Reset page when filter changes +$effect(() => { + void tableFilter // Track dependency + currentPage = 1 +}) const data = AppRuntime.runPromiseExit$(() => { void WalletStore.evmAddress + void refreshTrigger // React to refresh trigger return Effect.gen(function*() { const staking = yield* Staking.Staking @@ -106,19 +110,6 @@ const data = AppRuntime.runPromiseExit$(() => { ) }) -const submitBond = $derived(pipe( - O.all({ - sender: WalletStore.evmAddress, - baseAmount: O.map(bondAmount, flow(BigDecimal.normalize, x => x.value)), - }), - O.map(({ sender, baseAmount }) => - DoBond.sendBond({ - sender, - baseAmount, - quoteAmount: baseAmount, - }) - ), -)) const evmChain = $derived(pipe( ChainStore.data, @@ -312,10 +303,95 @@ const close = (k: string) => { {#snippet maybeRenderBonds(maybeBonds: O.Option>)} {#snippet noBonds()}
- No bonds yet + No {tableFilter === "all" ? "bonds" : tableFilter === "bond" ? "stake transactions" : "unstake transactions"} yet
{/snippet} {#snippet hasBonds(bonds: A.NonEmptyReadonlyArray)} + {@const filteredBonds = bonds.filter(bond => + tableFilter === "all" || + (tableFilter === "bond" && bond._tag === "Bond") || + (tableFilter === "unbond" && bond._tag === "Unbond") + )} + {@const totalItems = filteredBonds.length} + {@const totalPages = Math.ceil(totalItems / itemsPerPage)} + {@const startIndex = (currentPage - 1) * itemsPerPage} + {@const endIndex = startIndex + itemsPerPage} + {@const paginatedBonds = filteredBonds.slice(startIndex, endIndex)} + + +
+
+
+ + + +
+ + + {#if totalPages > 1} +
+ + + {currentPage}/{totalPages} + + +
+ {/if} +
+
+
@@ -339,12 +415,13 @@ const close = (k: string) => { - {#each bonds as bond} + {#each paginatedBonds as bond} {@render renderBond(bond)} {/each}
+ {/snippet} {@render matchOption(maybeBonds, hasBonds, noBonds)} @@ -366,7 +443,7 @@ const close = (k: string) => { - {#each Array(5) as _} + {#each Array(10) as _}
@@ -390,9 +467,6 @@ const close = (k: string) => {
-
- -
{@render matchRuntimeResult(data.current, { onSuccess: maybeRenderBonds, onFailure: renderError, @@ -407,179 +481,83 @@ const close = (k: string) => { {/snippet} -{#snippet renderBalanceSkeleton()} - -{/snippet} - -{#snippet renderBalance(amount: bigint)} -
- { - pipe( - BigDecimal.fromBigInt(amount), - // XXX: check decimals - BigDecimal.unsafeDivide(BigDecimal.make(1n, -18)), - Utils.formatBigDecimal, - ) - } -
-{/snippet} - - {#if O.isSome(WalletStore.evmAddress)} - -
-
-
- - {@render matchOption(uOnEvmBalance, renderBalance, renderBalanceSkeleton)} -
- -
- { - const { inputType, data, currentTarget } = event - const { value } = currentTarget - const proposed = value + (data ?? "") - - const maxDecimals = pipe( - uOnEvmToken, - O.map(Struct.get("representations")), - O.flatMap(A.head), - O.map(Struct.get("decimals")), - O.getOrThrow, - ) - - const validShape = /^\d*[.,]?\d*$/.test(proposed) - const validDecimalsDot = !proposed.includes(".") - || proposed.split(".")[1].length <= maxDecimals - const validDecimalsComma = !proposed.includes(",") - || proposed.split(",")[1].length <= maxDecimals - const isDelete = inputType.startsWith("delete") - const validDecimals = validDecimalsComma && validDecimalsDot - const noDuplicateLeadingZeroes = !proposed.startsWith("00") - - const allow = isDelete - || (validDecimals && validShape && noDuplicateLeadingZeroes) - - if (!allow) { - event.preventDefault() - } - }} - autocapitalize="none" - pattern="^[0-9]*[.,]?[0-9]*$" - value={bondInput} - class="h-14 text-center text-lg" - oninput={(event) => { - bondInput = event.currentTarget.value - }} - /> - {O.map(bondAmount, Utils.formatBigDecimal)} -
-
- -
-
- - -
-
- - {@render matchOption(eUOnEvmBalance, renderBalance, renderBalanceSkeleton)} -
+ + +
+
+ $ +

liquid-stake

+ --mode={selectedTab} +
+
+ + +
+
+ + +
+
-
- { - const { inputType, data, currentTarget } = event - const { value } = currentTarget - const proposed = value + (data ?? "") - - const maxDecimals = pipe( - uOnEvmToken, - O.map(Struct.get("representations")), - O.flatMap(A.head), - O.map(Struct.get("decimals")), - O.getOrThrow, - ) - - const a = pipe( - S.BigDecimal, - S.filter( - (x) => x.scale <= 18, - { - description: "can have at most 18 decimals", - }, - ), - ) - - const validShape = /^\d*[.,]?\d*$/.test(proposed) - const validDecimalsDot = !proposed.includes(".") - || proposed.split(".")[1].length <= maxDecimals - const validDecimalsComma = !proposed.includes(",") - || proposed.split(",")[1].length <= maxDecimals - const isDelete = inputType.startsWith("delete") - const validDecimals = validDecimalsComma && validDecimalsDot - const noDuplicateLeadingZeroes = !proposed.startsWith("00") - - const allow = isDelete - || (validDecimals && validShape && noDuplicateLeadingZeroes) - - if (!allow) { - event.preventDefault() - } - }} - autocapitalize="none" - pattern="^[0-9]*[.,]?[0-9]*$" - value={unbondInput} - class="h-14 text-center text-lg" - oninput={(event) => { - unbondInput = event.currentTarget.value - }} - /> - {O.map(unbondAmount, Utils.formatBigDecimal)} -
-
- -
-
+ +
+ {#if selectedTab === "bond"} + + {:else if selectedTab === "unbond"} + + {/if} +
+ + + + + +
+
+ $ +

history

+ --filter={tableFilter}
- +
+ + {#if O.isSome(WalletStore.evmAddress)} {@render whenWallet()} {:else} - {@render noWallet()} +
+ wallet disconnected - connect to view history +
{/if}
From 641bcbc25693055734312a92a854a3a10099e05b Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 11 Sep 2025 12:24:01 +0200 Subject: [PATCH 016/111] chore(app): clean up --- .../lib/components/stake/BondComponent.svelte | 23 +++++++------------ .../components/stake/UnbondComponent.svelte | 15 +++--------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 433d0615df..5a795ab006 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -95,9 +95,8 @@ const BondState = Data.taggedEnum() let bondInput = $state("") let bondState = $state(BondState.Ready()) let shouldBond = $state(false) -let slippage = $state(1) // Default 1% slippage protection +let slippage = $state(1) -// Query real-time rates from staking hub const stakingRates = runPromiseExit$(() => Effect.gen(function*() { return yield* pipe( @@ -130,7 +129,7 @@ const bondAmount = $derived>(pipe( (bd) => { const multiplier = BigDecimal.make(10n ** 18n, 0) const result = BigDecimal.multiply(bd, multiplier) - // Adjust for the remaining scale to get the actual wei value + // Adjust for the remaining scale to get the actual au value const scale = result.scale const adjustedValue = scale >= 0 ? result.value / (10n ** BigInt(scale)) @@ -155,7 +154,6 @@ const isBonding = $derived( const isSuccess = $derived(BondState.$is("Success")(bondState)) const isError = $derived(BondState.$is("Error")(bondState)) -// Calculate expected receive amount using real purchase rate const expectedReceiveAmount = $derived>(pipe( O.all({ amount: bondAmount, rates: stakingRates.current }), O.flatMap(({ amount, rates }) => @@ -453,13 +451,10 @@ runPromiseExit$(() => const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const VIEM_CHAIN = holesky - // Get wagmi connector client const connectorClient = yield* getWagmiConnectorClient - // Switch to the correct chain yield* switchChain(VIEM_CHAIN) - // Create clients using connector const publicClient = Evm.PublicClient.Live({ chain: VIEM_CHAIN, transport: custom(connectorClient), @@ -479,13 +474,13 @@ runPromiseExit$(() => ) bondState = BondState.AllowanceApproved() - yield* Effect.sleep("500 millis") // Brief pause to show approval success + yield* Effect.sleep("500 millis") bondState = BondState.CreatingTokenOrder() - yield* Effect.sleep("300 millis") // Show token order creation + yield* Effect.sleep("300 millis") bondState = BondState.PreparingBondTransaction() - yield* Effect.sleep("300 millis") // Show transaction preparation + yield* Effect.sleep("300 millis") bondState = BondState.ExecutingBond() const { response, txHash } = yield* executeBond(sender, sendAmount).pipe( @@ -496,13 +491,11 @@ runPromiseExit$(() => ) bondState = BondState.WaitingForTxConfirmation() - yield* Effect.sleep("1 second") // Show tx confirmation step + yield* Effect.sleep("1 second") - // Bond transaction completed, now wait for indexer console.log("Bond transaction submitted with hash:", txHash) bondState = BondState.WaitingForIndexer() - // Wait for indexer with aggressive retry - the data WILL eventually be there const receipt = yield* Effect.retry( response.waitFor( ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), @@ -511,14 +504,14 @@ runPromiseExit$(() => schedule: pipe(Schedule.fixed("5 seconds"), Schedule.intersect(Schedule.recurs(30))), while: (error) => { console.log("Indexer not ready yet, retrying in 5 seconds...") - return true // Always retry - indexer will eventually have the data + return true } } ) bondState = BondState.Success({ txHash }) - // Reset form and refresh data on success + bondInput = "" shouldBond = false onBondSuccess?.() diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index 76cac4ee6b..4770409fe5 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -85,13 +85,12 @@ let unbondInput = $state("") let unbondState = $state(UnbondState.Ready()) let shouldUnbond = $state(false) -// Human readable amount as BigDecimal (maintains precision) const inputAmount = $derived>(pipe( unbondInput, BigDecimal.fromString, )) -// Wei amount for blockchain - properly convert BigDecimal to wei +// au amount for blockchain - properly convert BigDecimal to au const unbondAmount = $derived>(pipe( inputAmount, O.map(flow( @@ -99,7 +98,7 @@ const unbondAmount = $derived>(pipe( const multiplier = BigDecimal.make(10n ** 18n, 0) const result = BigDecimal.multiply(bd, multiplier) console.log("Unbond conversion - Input:", unbondInput, "Result value:", result.value) - return result.value // Don't normalize - we want the raw value + return result.value } )), )) @@ -118,7 +117,6 @@ const isUnbonding = $derived( const isSuccess = $derived(UnbondState.$is("Success")(unbondState)) const isError = $derived(UnbondState.$is("Error")(unbondState)) -// Helper functions from unbond.ts const bytecode_base_checksum = "0xec827349ed4c1fec5a9c3462ff7c979d4c40e7aa43b16ed34469d04ff835f2a1" as const const canonical_zkgm = Ucs05.anyDisplayToCanonical(UCS03_ZKGM) @@ -311,7 +309,6 @@ const executeUnbond = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => Effect.g yield* Effect.log("Submission TX Hash:", response.txHash) - // Return both response and txHash for separate indexer handling return { response, txHash: response.txHash } }) @@ -335,13 +332,10 @@ runPromiseExit$(() => const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const VIEM_CHAIN = holesky - // Get wagmi connector client const connectorClient = yield* getWagmiConnectorClient - // Switch to the correct chain yield* switchChain(VIEM_CHAIN) - // Create clients using connector const publicClient = Evm.PublicClient.Live({ chain: VIEM_CHAIN, transport: custom(connectorClient), @@ -368,11 +362,9 @@ runPromiseExit$(() => Effect.provide(ChainRegistry.Default), ) - // Unbond transaction completed, now wait for indexer console.log("Unbond transaction submitted with hash:", txHash) unbondState = UnbondState.WaitingForIndexer() - // Wait for indexer with aggressive retry - the data WILL eventually be there const receipt = yield* Effect.retry( response.waitFor( ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), @@ -381,14 +373,13 @@ runPromiseExit$(() => schedule: pipe(Schedule.fixed("5 seconds"), Schedule.intersect(Schedule.recurs(30))), while: (error) => { console.log("Indexer not ready yet, retrying in 5 seconds...") - return true // Always retry - indexer will eventually have the data + return true } } ) unbondState = UnbondState.Success({ txHash }) - // Reset form and refresh data on success unbondInput = "" shouldUnbond = false onUnbondSuccess?.() From e3a9301351db88ff17fc0cbe6cc505e7bc31f2ce Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 11 Sep 2025 16:14:12 +0200 Subject: [PATCH 017/111] feat(app): fix state --- .../lib/components/stake/BondComponent.svelte | 262 ++++++++++-------- .../components/stake/UnbondComponent.svelte | 79 +++--- app2/src/routes/stake/+page.svelte | 27 +- 3 files changed, 203 insertions(+), 165 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 5a795ab006..0d079ed0fe 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -43,7 +43,7 @@ import { BigDecimal, Data, Effect, Exit, Schedule, Match, pipe, Schema, Struct } import * as A from "effect/Array" import { flow } from "effect/Function" import * as O from "effect/Option" -import { bytesToHex, encodeAbiParameters, fromHex, keccak256 } from "viem" +import { bytesToHex, encodeAbiParameters, formatUnits, fromHex, keccak256, parseUnits } from "viem" import { cn } from "$lib/utils"; // Constants from bond.ts @@ -80,12 +80,15 @@ type BondState = Data.TaggedEnum<{ SwitchingChain: {} CheckingAllowance: {} ApprovingAllowance: {} + AllowanceSubmitted: { txHash: string } + WaitingForAllowanceConfirmation: { txHash: string } AllowanceApproved: {} CreatingTokenOrder: {} PreparingBondTransaction: {} - ExecutingBond: {} - WaitingForTxConfirmation: {} - WaitingForIndexer: {} + ConfirmingBond: {} + BondSubmitted: { txHash: string } + WaitingForConfirmation: { txHash: string } + WaitingForIndexer: { txHash: string } Success: { txHash: string } Error: { message: string } }> @@ -95,7 +98,7 @@ const BondState = Data.taggedEnum() let bondInput = $state("") let bondState = $state(BondState.Ready()) let shouldBond = $state(false) -let slippage = $state(1) +let slippage = $state(1) // Default 1% const stakingRates = runPromiseExit$(() => Effect.gen(function*() { @@ -118,72 +121,49 @@ const stakingRates = runPromiseExit$(() => }) ) -const inputAmount = $derived>(pipe( - bondInput, - BigDecimal.fromString, -)) - -const bondAmount = $derived>(pipe( - inputAmount, - O.map(flow( - (bd) => { - const multiplier = BigDecimal.make(10n ** 18n, 0) - const result = BigDecimal.multiply(bd, multiplier) - // Adjust for the remaining scale to get the actual au value - const scale = result.scale - const adjustedValue = scale >= 0 - ? result.value / (10n ** BigInt(scale)) - : result.value * (10n ** BigInt(-scale)) - console.log("Conversion - Input:", bondInput, "Scale:", scale, "Wei:", adjustedValue) - return adjustedValue - } - )), -)) const isBonding = $derived( - BondState.$is("SwitchingChain")(bondState) || - BondState.$is("CheckingAllowance")(bondState) || - BondState.$is("ApprovingAllowance")(bondState) || - BondState.$is("AllowanceApproved")(bondState) || - BondState.$is("CreatingTokenOrder")(bondState) || - BondState.$is("PreparingBondTransaction")(bondState) || - BondState.$is("ExecutingBond")(bondState) || - BondState.$is("WaitingForTxConfirmation")(bondState) || - BondState.$is("WaitingForIndexer")(bondState) + !BondState.$is("Ready")(bondState) && + !BondState.$is("Success")(bondState) && + !BondState.$is("Error")(bondState) ) const isSuccess = $derived(BondState.$is("Success")(bondState)) const isError = $derived(BondState.$is("Error")(bondState)) -const expectedReceiveAmount = $derived>(pipe( - O.all({ amount: bondAmount, rates: stakingRates.current }), - O.flatMap(({ amount, rates }) => - rates._tag === "Success" - ? O.some(pipe( - BigDecimal.fromBigInt(amount), - BigDecimal.unsafeDivide(BigDecimal.make(10n ** 18n, 0)), - BigDecimal.multiply(rates.value.purchase_rate), - )) - : O.none() - ) -)) -// Calculate minimum receive amount (expected - slippage protection) -const minimumReceiveAmount = $derived>(pipe( - bondInput, - O.fromNullable, - O.filter(s => s.trim() !== ""), - O.map(input => { - const inputNum = parseFloat(input) || 0 - const minNum = inputNum * (100 - slippage) / 100 - return minNum.toFixed(18) // Show all 18 decimals - }) -)) const bytecode_base_checksum = "0xec827349ed4c1fec5a9c3462ff7c979d4c40e7aa43b16ed34469d04ff835f2a1" as const const canonical_zkgm = Ucs05.anyDisplayToCanonical(UCS03_ZKGM) const module_hash = "0x120970d812836f19888625587a4606a5ad23cef31c8684e601771552548fc6b9" as const +const inputAmount = $derived>(pipe( + bondInput, + BigDecimal.fromString, +)) + +const bondAmount = $derived>(pipe( + inputAmount, + O.map(bd => BigDecimal.multiply(bd, BigDecimal.make(10n ** 18n, 0))) +)) + +const minimumReceiveAmount = $derived>(pipe( + O.Do, + O.bind("input", () => inputAmount), + O.bind("rates", () => O.isSome(stakingRates.current) && stakingRates.current.value._tag === "Success" + ? O.some(stakingRates.current.value.value) + : O.none()), + O.map(({ input, rates }) => { + const inputNorm = BigDecimal.normalize(input) + const rateNorm = BigDecimal.normalize(rates.purchase_rate) + + // Simple multiplication: input * rate * slippage + const expectedScaled = inputNorm.value * rateNorm.value + const minScaled = expectedScaled * BigInt(100 - slippage) / 100n + return BigDecimal.make(minScaled, inputNorm.scale + rateNorm.scale) + }) +)) + const instantiate2 = Effect.fn( function*(options: { path: bigint; channel: ChannelId; sender: Ucs05.EvmDisplay }) { const sender = yield* Ucs05.anyDisplayToZkgm(options.sender) @@ -267,26 +247,20 @@ const checkAndSubmitAllowance = (sender: Ucs05.EvmDisplay, sendAmount: bigint) = Effect.if(amount < sendAmount, { onTrue: () => pipe( - Effect.log(`Increasing allowance by ${sendAmount - amount} for ${U_ERC20.address}`), - Effect.andThen(() => - pipe( - Evm.increaseErc20Allowance( - U_ERC20.address, - UCS03_EVM, - sendAmount - amount, - ), - Effect.andThen(Evm.waitForTransactionReceipt), - ) + Evm.increaseErc20Allowance( + U_ERC20.address, + UCS03_EVM, + sendAmount, ), + Effect.andThen(Evm.waitForTransactionReceipt), ), - onFalse: () => - Effect.log(`Allowance fulfilled by ${sendAmount - amount} for ${U_ERC20.address}`), + onFalse: () => Effect.void }) ), ) -const executeBond = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => Effect.gen(function*() { - const minMintAmount = sendAmount * BigInt(100 - slippage) / 100n +const executeBond = (sender: Ucs05.EvmDisplay, sendAmount: bigint, slippagePercent: number) => Effect.gen(function*() { + const minMintAmount = sendAmount * BigInt(100 - slippagePercent) / 100n const ethereumChain = yield* ChainRegistry.byUniversalId(ETHEREUM_CHAIN_ID) const unionChain = yield* ChainRegistry.byUniversalId(UNION_CHAIN_ID) @@ -314,7 +288,7 @@ const executeBond = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => Effect.gen { bond: { mint_to_address: receiver.address, - min_mint_amount: minMintAmount, + min_mint_amount: minMintAmount, }, } as const, Schema.encode(JsonFromBase64), @@ -442,11 +416,10 @@ runPromiseExit$(() => } const sender = senderOpt.value - const sendAmount = bondAmount.value + const sendAmount = O.getOrThrow(bondAmount).value const chain = evmChain.value bondState = BondState.SwitchingChain() - yield* Effect.log("Starting bond execution", { sender: sender.address, sendAmount }) const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const VIEM_CHAIN = holesky @@ -467,11 +440,29 @@ runPromiseExit$(() => }) bondState = BondState.CheckingAllowance() - yield* checkAndSubmitAllowance(sender, sendAmount).pipe( - Effect.provide(walletClient), - Effect.provide(publicClient), - Effect.tap(() => Effect.sync(() => { bondState = BondState.ApprovingAllowance() })) - ) + // Check current allowance + const currentAllowance = yield* Evm.readErc20Allowance( + U_ERC20.address, + sender.address, + UCS03_EVM.address, + ).pipe(Effect.provide(publicClient)) + + if (currentAllowance < sendAmount) { + bondState = BondState.ApprovingAllowance() + const approveTxHash = yield* Evm.increaseErc20Allowance( + U_ERC20.address, + UCS03_EVM, + sendAmount, + ).pipe(Effect.provide(walletClient)) + + bondState = BondState.AllowanceSubmitted({ txHash: approveTxHash }) + yield* Effect.sleep("500 millis") + + bondState = BondState.WaitingForAllowanceConfirmation({ txHash: approveTxHash }) + yield* Evm.waitForTransactionReceipt(approveTxHash).pipe( + Effect.provide(publicClient) + ) + } bondState = BondState.AllowanceApproved() yield* Effect.sleep("500 millis") @@ -482,19 +473,24 @@ runPromiseExit$(() => bondState = BondState.PreparingBondTransaction() yield* Effect.sleep("300 millis") - bondState = BondState.ExecutingBond() - const { response, txHash } = yield* executeBond(sender, sendAmount).pipe( + bondState = BondState.ConfirmingBond() + const { response, txHash } = yield* executeBond(sender, sendAmount, slippage).pipe( Effect.provide(EvmZkgmClient.layerWithoutWallet), Effect.provide(walletClient), Effect.provide(publicClient), Effect.provide(ChainRegistry.Default), ) - bondState = BondState.WaitingForTxConfirmation() - yield* Effect.sleep("1 second") + bondState = BondState.BondSubmitted({ txHash }) + yield* Effect.sleep("500 millis") + + bondState = BondState.WaitingForConfirmation({ txHash }) + // Wait for actual transaction confirmation + yield* Evm.waitForTransactionReceipt(txHash).pipe( + Effect.provide(publicClient) + ) - console.log("Bond transaction submitted with hash:", txHash) - bondState = BondState.WaitingForIndexer() + bondState = BondState.WaitingForIndexer({ txHash }) const receipt = yield* Effect.retry( response.waitFor( @@ -503,7 +499,6 @@ runPromiseExit$(() => { schedule: pipe(Schedule.fixed("5 seconds"), Schedule.intersect(Schedule.recurs(30))), while: (error) => { - console.log("Indexer not ready yet, retrying in 5 seconds...") return true } } @@ -623,7 +618,7 @@ function handleRetry() { bondInput = event.currentTarget.value }} /> - {O.map(bondAmount, (wei) => wei.toString())} + {bondAmount}
@@ -638,38 +633,52 @@ function handleRetry() { )}
-
- Expected receive: - - {pipe( - expectedReceiveAmount, - O.map(bd => { - const formatted = Utils.formatBigDecimal(bd) - const num = parseFloat(formatted) - return num === 0 ? "0" : formatted - }), - O.getOrElse(() => "0") - )} eU - -
- Slippage tolerance: + Mint amount:
- - % + + +
- Minimum receive: + Min you'll receive: - {O.getOrElse(minimumReceiveAmount, () => "0")} eU + {pipe( + minimumReceiveAmount, + O.map(bd => Utils.formatBigDecimal(bd)), + O.getOrElse(() => "0") + )} eU
{:else} @@ -704,11 +713,14 @@ function handleRetry() { Match.when(BondState.$is("SwitchingChain"), () => "Switching to Holesky"), Match.when(BondState.$is("CheckingAllowance"), () => "Checking Token Allowance"), Match.when(BondState.$is("ApprovingAllowance"), () => "Approving Token Spending"), + Match.when(BondState.$is("AllowanceSubmitted"), () => "Allowance Submitted"), + Match.when(BondState.$is("WaitingForAllowanceConfirmation"), () => "Allowance Confirming"), Match.when(BondState.$is("AllowanceApproved"), () => "Allowance Approved"), Match.when(BondState.$is("CreatingTokenOrder"), () => "Creating Token Order"), Match.when(BondState.$is("PreparingBondTransaction"), () => "Preparing Bond Transaction"), - Match.when(BondState.$is("ExecutingBond"), () => "Executing Bond"), - Match.when(BondState.$is("WaitingForTxConfirmation"), () => "Transaction Confirming"), + Match.when(BondState.$is("ConfirmingBond"), () => "Confirming Bond"), + Match.when(BondState.$is("BondSubmitted"), () => "Bond Submitted"), + Match.when(BondState.$is("WaitingForConfirmation"), () => "Transaction Confirming"), Match.when(BondState.$is("WaitingForIndexer"), () => "Indexing Transaction"), Match.when(BondState.$is("Success"), () => "Bond Successful"), Match.when(BondState.$is("Error"), () => "Bond Failed"), @@ -723,12 +735,15 @@ function handleRetry() { Match.when(BondState.$is("SwitchingChain"), () => "Please switch to Holesky network in your wallet"), Match.when(BondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), Match.when(BondState.$is("ApprovingAllowance"), () => "Confirm token approval transaction in your wallet"), + Match.when(BondState.$is("AllowanceSubmitted"), ({ txHash }) => `Allowance transaction submitted: ${txHash.slice(0, 10)}...`), + Match.when(BondState.$is("WaitingForAllowanceConfirmation"), ({ txHash }) => `Waiting for allowance confirmation: ${txHash.slice(0, 10)}...`), Match.when(BondState.$is("AllowanceApproved"), () => "Token spending approved, proceeding..."), Match.when(BondState.$is("CreatingTokenOrder"), () => "Building cross-chain token order..."), Match.when(BondState.$is("PreparingBondTransaction"), () => "Preparing bond transaction with contracts..."), - Match.when(BondState.$is("ExecutingBond"), () => "Confirm bond transaction in your wallet"), - Match.when(BondState.$is("WaitingForTxConfirmation"), () => "Transaction submitted, waiting for confirmation..."), - Match.when(BondState.$is("WaitingForIndexer"), () => "Transaction confirmed, indexing data..."), + Match.when(BondState.$is("ConfirmingBond"), () => "Confirm bond transaction in your wallet"), + Match.when(BondState.$is("BondSubmitted"), ({ txHash }) => `Transaction submitted: ${txHash.slice(0, 10)}...`), + Match.when(BondState.$is("WaitingForConfirmation"), ({ txHash }) => `Waiting for confirmation: ${txHash.slice(0, 10)}...`), + Match.when(BondState.$is("WaitingForIndexer"), ({ txHash }) => `Transaction confirmed, indexing data...`), Match.when(BondState.$is("Success"), ({ txHash }) => `Success! TX: ${txHash.slice(0, 10)}...`), Match.when(BondState.$is("Error"), ({ message }) => message), Match.when(BondState.$is("Ready"), () => ""), @@ -764,12 +779,15 @@ function handleRetry() { ), Match.when(BondState.$is("SwitchingChain"), () => "Switching..."), Match.when(BondState.$is("CheckingAllowance"), () => "Checking..."), - Match.when(BondState.$is("ApprovingAllowance"), () => "Approving..."), + Match.when(BondState.$is("ApprovingAllowance"), () => "Confirm in Wallet"), + Match.when(BondState.$is("AllowanceSubmitted"), () => "Submitted"), + Match.when(BondState.$is("WaitingForAllowanceConfirmation"), () => "Confirming..."), Match.when(BondState.$is("AllowanceApproved"), () => "Approved ✓"), Match.when(BondState.$is("CreatingTokenOrder"), () => "Creating Order..."), Match.when(BondState.$is("PreparingBondTransaction"), () => "Preparing..."), - Match.when(BondState.$is("ExecutingBond"), () => "Executing..."), - Match.when(BondState.$is("WaitingForTxConfirmation"), () => "Confirming..."), + Match.when(BondState.$is("ConfirmingBond"), () => "Confirm in Wallet"), + Match.when(BondState.$is("BondSubmitted"), () => "Submitted"), + Match.when(BondState.$is("WaitingForConfirmation"), () => "Confirming..."), Match.when(BondState.$is("WaitingForIndexer"), () => "Indexing..."), Match.when(BondState.$is("Success"), () => "Success!"), Match.when(BondState.$is("Error"), () => "Try Again"), diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index 4770409fe5..d31b25250b 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -69,12 +69,15 @@ type UnbondState = Data.TaggedEnum<{ SwitchingChain: {} CheckingAllowance: {} ApprovingAllowance: {} + AllowanceSubmitted: { txHash: string } + WaitingForAllowanceConfirmation: { txHash: string } AllowanceApproved: {} CreatingTokenOrder: {} PreparingUnbondTransaction: {} - ExecutingUnbond: {} - WaitingForTxConfirmation: {} - WaitingForIndexer: {} + ConfirmingUnbond: {} + UnbondSubmitted: { txHash: string } + WaitingForConfirmation: { txHash: string } + WaitingForIndexer: { txHash: string } Success: { txHash: string } Error: { message: string } }> @@ -90,29 +93,15 @@ const inputAmount = $derived>(pipe( BigDecimal.fromString, )) -// au amount for blockchain - properly convert BigDecimal to au -const unbondAmount = $derived>(pipe( +const unbondAmount = $derived>(pipe( inputAmount, - O.map(flow( - (bd) => { - const multiplier = BigDecimal.make(10n ** 18n, 0) - const result = BigDecimal.multiply(bd, multiplier) - console.log("Unbond conversion - Input:", unbondInput, "Result value:", result.value) - return result.value - } - )), + O.map(bd => BigDecimal.multiply(bd, BigDecimal.make(10n ** 18n, 0))) )) const isUnbonding = $derived( - UnbondState.$is("SwitchingChain")(unbondState) || - UnbondState.$is("CheckingAllowance")(unbondState) || - UnbondState.$is("ApprovingAllowance")(unbondState) || - UnbondState.$is("AllowanceApproved")(unbondState) || - UnbondState.$is("CreatingTokenOrder")(unbondState) || - UnbondState.$is("PreparingUnbondTransaction")(unbondState) || - UnbondState.$is("ExecutingUnbond")(unbondState) || - UnbondState.$is("WaitingForTxConfirmation")(unbondState) || - UnbondState.$is("WaitingForIndexer")(unbondState) + !UnbondState.$is("Ready")(unbondState) && + !UnbondState.$is("Success")(unbondState) && + !UnbondState.$is("Error")(unbondState) ) const isSuccess = $derived(UnbondState.$is("Success")(unbondState)) const isError = $derived(UnbondState.$is("Error")(unbondState)) @@ -323,7 +312,7 @@ runPromiseExit$(() => } const sender = senderOpt.value - const sendAmount = unbondAmount.value + const sendAmount = O.getOrThrow(unbondAmount).value const chain = evmChain.value unbondState = UnbondState.SwitchingChain() @@ -354,7 +343,7 @@ runPromiseExit$(() => Effect.tap(() => Effect.sync(() => { unbondState = UnbondState.ApprovingAllowance() })) ) - unbondState = UnbondState.ExecutingUnbond() + unbondState = UnbondState.ConfirmingUnbond() const { response, txHash } = yield* executeUnbond(sender, sendAmount).pipe( Effect.provide(EvmZkgmClient.layerWithoutWallet), Effect.provide(walletClient), @@ -363,7 +352,16 @@ runPromiseExit$(() => ) console.log("Unbond transaction submitted with hash:", txHash) - unbondState = UnbondState.WaitingForIndexer() + unbondState = UnbondState.UnbondSubmitted({ txHash }) + yield* Effect.sleep("500 millis") + + unbondState = UnbondState.WaitingForConfirmation({ txHash }) + // Wait for actual transaction confirmation + yield* Evm.waitForTransactionReceipt(txHash).pipe( + Effect.provide(publicClient) + ) + + unbondState = UnbondState.WaitingForIndexer({ txHash }) const receipt = yield* Effect.retry( response.waitFor( @@ -468,8 +466,8 @@ function handleRetry() { ) const a = pipe( - S.BigDecimal, - S.filter( + Schema.BigDecimal, + Schema.filter( (x) => x.scale <= 18, { description: "can have at most 18 decimals", @@ -501,7 +499,7 @@ function handleRetry() { unbondInput = event.currentTarget.value }} /> - {O.map(unbondAmount, (wei) => wei.toString())} + {unbondAmount} @@ -528,11 +526,14 @@ function handleRetry() { Match.when(UnbondState.$is("SwitchingChain"), () => "Switching to Holesky"), Match.when(UnbondState.$is("CheckingAllowance"), () => "Checking Token Allowance"), Match.when(UnbondState.$is("ApprovingAllowance"), () => "Approving Token Spending"), + Match.when(UnbondState.$is("AllowanceSubmitted"), () => "Allowance Submitted"), + Match.when(UnbondState.$is("WaitingForAllowanceConfirmation"), () => "Allowance Confirming"), Match.when(UnbondState.$is("AllowanceApproved"), () => "Allowance Approved"), Match.when(UnbondState.$is("CreatingTokenOrder"), () => "Creating Token Order"), Match.when(UnbondState.$is("PreparingUnbondTransaction"), () => "Preparing Unbond Transaction"), - Match.when(UnbondState.$is("ExecutingUnbond"), () => "Executing Unbond"), - Match.when(UnbondState.$is("WaitingForTxConfirmation"), () => "Transaction Confirming"), + Match.when(UnbondState.$is("ConfirmingUnbond"), () => "Confirming Unbond"), + Match.when(UnbondState.$is("UnbondSubmitted"), () => "Unbond Submitted"), + Match.when(UnbondState.$is("WaitingForConfirmation"), () => "Transaction Confirming"), Match.when(UnbondState.$is("WaitingForIndexer"), () => "Indexing Transaction"), Match.when(UnbondState.$is("Success"), () => "Unbond Successful"), Match.when(UnbondState.$is("Error"), () => "Unbond Failed"), @@ -547,12 +548,15 @@ function handleRetry() { Match.when(UnbondState.$is("SwitchingChain"), () => "Please switch to Holesky network in your wallet"), Match.when(UnbondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), Match.when(UnbondState.$is("ApprovingAllowance"), () => "Confirm token approval transaction in your wallet"), + Match.when(UnbondState.$is("AllowanceSubmitted"), ({ txHash }) => `Allowance transaction submitted: ${txHash.slice(0, 10)}...`), + Match.when(UnbondState.$is("WaitingForAllowanceConfirmation"), ({ txHash }) => `Waiting for allowance confirmation: ${txHash.slice(0, 10)}...`), Match.when(UnbondState.$is("AllowanceApproved"), () => "Token spending approved, proceeding..."), Match.when(UnbondState.$is("CreatingTokenOrder"), () => "Building cross-chain token order..."), Match.when(UnbondState.$is("PreparingUnbondTransaction"), () => "Preparing unbond transaction with contracts..."), - Match.when(UnbondState.$is("ExecutingUnbond"), () => "Confirm unbond transaction in your wallet"), - Match.when(UnbondState.$is("WaitingForTxConfirmation"), () => "Transaction submitted, waiting for confirmation..."), - Match.when(UnbondState.$is("WaitingForIndexer"), () => "Transaction confirmed, indexing data..."), + Match.when(UnbondState.$is("ConfirmingUnbond"), () => "Confirm unbond transaction in your wallet"), + Match.when(UnbondState.$is("UnbondSubmitted"), ({ txHash }) => `Transaction submitted: ${txHash.slice(0, 10)}...`), + Match.when(UnbondState.$is("WaitingForConfirmation"), ({ txHash }) => `Waiting for confirmation: ${txHash.slice(0, 10)}...`), + Match.when(UnbondState.$is("WaitingForIndexer"), ({ txHash }) => `Transaction confirmed, indexing data...`), Match.when(UnbondState.$is("Success"), ({ txHash }) => `Success! TX: ${txHash.slice(0, 10)}...`), Match.when(UnbondState.$is("Error"), ({ message }) => message), Match.when(UnbondState.$is("Ready"), () => ""), @@ -588,12 +592,15 @@ function handleRetry() { ), Match.when(UnbondState.$is("SwitchingChain"), () => "Switching..."), Match.when(UnbondState.$is("CheckingAllowance"), () => "Checking..."), - Match.when(UnbondState.$is("ApprovingAllowance"), () => "Approving..."), + Match.when(UnbondState.$is("ApprovingAllowance"), () => "Confirm in Wallet"), + Match.when(UnbondState.$is("AllowanceSubmitted"), () => "Submitted"), + Match.when(UnbondState.$is("WaitingForAllowanceConfirmation"), () => "Confirming..."), Match.when(UnbondState.$is("AllowanceApproved"), () => "Approved ✓"), Match.when(UnbondState.$is("CreatingTokenOrder"), () => "Creating Order..."), Match.when(UnbondState.$is("PreparingUnbondTransaction"), () => "Preparing..."), - Match.when(UnbondState.$is("ExecutingUnbond"), () => "Executing..."), - Match.when(UnbondState.$is("WaitingForTxConfirmation"), () => "Confirming..."), + Match.when(UnbondState.$is("ConfirmingUnbond"), () => "Confirm in Wallet"), + Match.when(UnbondState.$is("UnbondSubmitted"), () => "Submitted"), + Match.when(UnbondState.$is("WaitingForConfirmation"), () => "Confirming..."), Match.when(UnbondState.$is("WaitingForIndexer"), () => "Indexing..."), Match.when(UnbondState.$is("Success"), () => "Success!"), Match.when(UnbondState.$is("Error"), () => "Try Again"), diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index c98b03ea48..5b5bbd28ba 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -37,7 +37,7 @@ import * as O from "effect/Option" import * as S from "effect/Schema" import { onMount } from "svelte" -type StakeTab = "bond" | "unbond" +type StakeTab = "bond" | "unbond" | "withdraw" type TableFilter = "all" | "bond" | "unbond" const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.17000") @@ -70,18 +70,17 @@ const itemsPerPage = 10 const refreshBondData = () => { refreshTrigger = Date.now() - currentPage = 1 // Reset to first page when data refreshes + currentPage = 1 } -// Reset page when filter changes $effect(() => { - void tableFilter // Track dependency + void tableFilter currentPage = 1 }) const data = AppRuntime.runPromiseExit$(() => { void WalletStore.evmAddress - void refreshTrigger // React to refresh trigger + void refreshTrigger return Effect.gen(function*() { const staking = yield* Staking.Staking @@ -122,7 +121,6 @@ onMount(() => { }) $effect(() => { - // Fetch U Balance on EVM O.match(O.all([evmChain, WalletStore.evmAddress, uOnEvmToken]), { onSome: ([chain, address, { denom }]) => BalanceStore.fetchBalances( @@ -134,7 +132,6 @@ $effect(() => { onNone: constVoid, }) - // Fetch eU Balance on EVM O.match(O.all([evmChain, WalletStore.evmAddress, eUOnEvmToken]), { onSome: ([chain, address, { denom }]) => BalanceStore.fetchBalances( @@ -518,6 +515,17 @@ const close = (k: string) => { > unstake + @@ -537,6 +545,11 @@ const close = (k: string) => { {eUOnEvmBalance} onUnbondSuccess={refreshBondData} /> + {:else if selectedTab === "withdraw"} +
+
Withdrawal functionality
+
Query withdrawable balance and implement withdrawal logic
+
{/if} From dccec1efb4874085d6cd52d76e1400881f9eabc6 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 11 Sep 2025 16:14:54 +0200 Subject: [PATCH 018/111] chore(app): fmt --- .../lib/components/stake/BondComponent.svelte | 587 ++++++++++-------- .../components/stake/UnbondComponent.svelte | 458 ++++++++------ app2/src/routes/stake/+page.svelte | 65 +- 3 files changed, 635 insertions(+), 475 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 0d079ed0fe..a013f1747e 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -5,7 +5,10 @@ import Label from "$lib/components/ui/Label.svelte" import Skeleton from "$lib/components/ui/Skeleton.svelte" import { runPromiseExit$ } from "$lib/runtime" import { getWagmiConnectorClient } from "$lib/services/evm/clients" +import { getWalletClient } from "$lib/services/evm/clients" +import { switchChain } from "$lib/services/transfer-ucs03-evm/chain" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" +import { cn } from "$lib/utils" import { matchOption } from "$lib/utils/snippets.svelte" import { Batch, @@ -21,10 +24,6 @@ import { } from "@unionlabs/sdk" import { Cosmos } from "@unionlabs/sdk-cosmos" import { Evm, EvmZkgmClient } from "@unionlabs/sdk-evm" -import { getWalletClient } from "$lib/services/evm/clients" -import { switchChain } from "$lib/services/transfer-ucs03-evm/chain" -import { custom, http } from "viem" -import { holesky } from "viem/chains" import { ChainRegistry } from "@unionlabs/sdk/ChainRegistry" import { EU_ERC20, @@ -39,12 +38,13 @@ import type { Chain, Token as TokenType } from "@unionlabs/sdk/schema" import { UniversalChainId } from "@unionlabs/sdk/schema/chain" import { ChannelId } from "@unionlabs/sdk/schema/channel" import { HexFromJson } from "@unionlabs/sdk/schema/hex" -import { BigDecimal, Data, Effect, Exit, Schedule, Match, pipe, Schema, Struct } from "effect" +import { BigDecimal, Data, Effect, Exit, Match, pipe, Schedule, Schema, Struct } from "effect" import * as A from "effect/Array" import { flow } from "effect/Function" import * as O from "effect/Option" +import { custom, http } from "viem" import { bytesToHex, encodeAbiParameters, formatUnits, fromHex, keccak256, parseUnits } from "viem" - import { cn } from "$lib/utils"; +import { holesky } from "viem/chains" // Constants from bond.ts const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") @@ -100,7 +100,7 @@ let bondState = $state(BondState.Ready()) let shouldBond = $state(false) let slippage = $state(1) // Default 1% -const stakingRates = runPromiseExit$(() => +const stakingRates = runPromiseExit$(() => Effect.gen(function*() { return yield* pipe( Cosmos.queryContract( @@ -121,17 +121,14 @@ const stakingRates = runPromiseExit$(() => }) ) - const isBonding = $derived( - !BondState.$is("Ready")(bondState) && - !BondState.$is("Success")(bondState) && - !BondState.$is("Error")(bondState) + !BondState.$is("Ready")(bondState) + && !BondState.$is("Success")(bondState) + && !BondState.$is("Error")(bondState), ) const isSuccess = $derived(BondState.$is("Success")(bondState)) const isError = $derived(BondState.$is("Error")(bondState)) - - const bytecode_base_checksum = "0xec827349ed4c1fec5a9c3462ff7c979d4c40e7aa43b16ed34469d04ff835f2a1" as const const canonical_zkgm = Ucs05.anyDisplayToCanonical(UCS03_ZKGM) @@ -144,24 +141,28 @@ const inputAmount = $derived>(pipe( const bondAmount = $derived>(pipe( inputAmount, - O.map(bd => BigDecimal.multiply(bd, BigDecimal.make(10n ** 18n, 0))) + O.map(bd => BigDecimal.multiply(bd, BigDecimal.make(10n ** 18n, 0))), )) const minimumReceiveAmount = $derived>(pipe( O.Do, O.bind("input", () => inputAmount), - O.bind("rates", () => O.isSome(stakingRates.current) && stakingRates.current.value._tag === "Success" - ? O.some(stakingRates.current.value.value) - : O.none()), + O.bind( + "rates", + () => + O.isSome(stakingRates.current) && stakingRates.current.value._tag === "Success" + ? O.some(stakingRates.current.value.value) + : O.none(), + ), O.map(({ input, rates }) => { const inputNorm = BigDecimal.normalize(input) const rateNorm = BigDecimal.normalize(rates.purchase_rate) - + // Simple multiplication: input * rate * slippage const expectedScaled = inputNorm.value * rateNorm.value const minScaled = expectedScaled * BigInt(100 - slippage) / 100n return BigDecimal.make(minScaled, inputNorm.scale + rateNorm.scale) - }) + }), )) const instantiate2 = Effect.fn( @@ -237,180 +238,184 @@ const instantiate2 = Effect.fn( }, ) -const checkAndSubmitAllowance = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => pipe( - Evm.readErc20Allowance( - U_ERC20.address, - sender.address, - UCS03_EVM.address, - ), - Effect.flatMap((amount) => - Effect.if(amount < sendAmount, { - onTrue: () => - pipe( - Evm.increaseErc20Allowance( - U_ERC20.address, - UCS03_EVM, - sendAmount, +const checkAndSubmitAllowance = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => + pipe( + Evm.readErc20Allowance( + U_ERC20.address, + sender.address, + UCS03_EVM.address, + ), + Effect.flatMap((amount) => + Effect.if(amount < sendAmount, { + onTrue: () => + pipe( + Evm.increaseErc20Allowance( + U_ERC20.address, + UCS03_EVM, + sendAmount, + ), + Effect.andThen(Evm.waitForTransactionReceipt), ), - Effect.andThen(Evm.waitForTransactionReceipt), - ), - onFalse: () => Effect.void - }) - ), -) + onFalse: () => Effect.void, + }) + ), + ) -const executeBond = (sender: Ucs05.EvmDisplay, sendAmount: bigint, slippagePercent: number) => Effect.gen(function*() { - const minMintAmount = sendAmount * BigInt(100 - slippagePercent) / 100n - - const ethereumChain = yield* ChainRegistry.byUniversalId(ETHEREUM_CHAIN_ID) - const unionChain = yield* ChainRegistry.byUniversalId(UNION_CHAIN_ID) - const receiver = yield* instantiate2({ - path: 0n, - channel: DESTINATION_CHANNEL_ID, - sender, - }) +const executeBond = (sender: Ucs05.EvmDisplay, sendAmount: bigint, slippagePercent: number) => + Effect.gen(function*() { + const minMintAmount = sendAmount * BigInt(100 - slippagePercent) / 100n + + const ethereumChain = yield* ChainRegistry.byUniversalId(ETHEREUM_CHAIN_ID) + const unionChain = yield* ChainRegistry.byUniversalId(UNION_CHAIN_ID) + const receiver = yield* instantiate2({ + path: 0n, + channel: DESTINATION_CHANNEL_ID, + sender, + }) - const tokenOrder = yield* TokenOrder.make({ - source: ethereumChain, - destination: unionChain, - sender, - receiver, - baseToken: U_ERC20, - baseAmount: sendAmount, - quoteToken: U_BANK, - quoteAmount: sendAmount, - kind: "solve", - metadata: U_SOLVER_ON_UNION_METADATA, - version: 2, - }) + const tokenOrder = yield* TokenOrder.make({ + source: ethereumChain, + destination: unionChain, + sender, + receiver, + baseToken: U_ERC20, + baseAmount: sendAmount, + quoteToken: U_BANK, + quoteAmount: sendAmount, + kind: "solve", + metadata: U_SOLVER_ON_UNION_METADATA, + version: 2, + }) - const bondCall = yield* pipe( - { - bond: { - mint_to_address: receiver.address, - min_mint_amount: minMintAmount, - }, - } as const, - Schema.encode(JsonFromBase64), - Effect.map((msg) => ({ - wasm: { - execute: { - contract_addr: EU_STAKING_HUB.address, - msg, - funds: [ - { denom: U_BANK.address, amount: sendAmount }, - ], + const bondCall = yield* pipe( + { + bond: { + mint_to_address: receiver.address, + min_mint_amount: minMintAmount, }, - }, - })), - ) - - const increaseAllowanceCall = yield* pipe( - { - increase_allowance: { - spender: UCS03_MINTER_ON_UNION.address, - amount: minMintAmount, - }, - } as const, - Schema.encode(JsonFromBase64), - Effect.map((msg) => ({ - wasm: { - execute: { - contract_addr: EU_LST.address, - msg, - funds: [], + } as const, + Schema.encode(JsonFromBase64), + Effect.map((msg) => ({ + wasm: { + execute: { + contract_addr: EU_STAKING_HUB.address, + msg, + funds: [ + { denom: U_BANK.address, amount: sendAmount }, + ], + }, }, - }, - })), - ) + })), + ) - const salt = yield* Utils.generateSalt("cosmos") - const timeout_timestamp = Utils.getTimeoutInNanoseconds24HoursFromNow() + const increaseAllowanceCall = yield* pipe( + { + increase_allowance: { + spender: UCS03_MINTER_ON_UNION.address, + amount: minMintAmount, + }, + } as const, + Schema.encode(JsonFromBase64), + Effect.map((msg) => ({ + wasm: { + execute: { + contract_addr: EU_LST.address, + msg, + funds: [], + }, + }, + })), + ) - const sendCall = yield* pipe( - TokenOrder.make({ - source: unionChain, - destination: ethereumChain, - sender: Ucs05.CosmosDisplay.make({ - address: "union1ylfrhs2y5zdj2394m6fxgpzrjav7le3z07jffq", + const salt = yield* Utils.generateSalt("cosmos") + const timeout_timestamp = Utils.getTimeoutInNanoseconds24HoursFromNow() + + const sendCall = yield* pipe( + TokenOrder.make({ + source: unionChain, + destination: ethereumChain, + sender: Ucs05.CosmosDisplay.make({ + address: "union1ylfrhs2y5zdj2394m6fxgpzrjav7le3z07jffq", + }), + receiver: sender, + baseToken: Token.Cw20.make({ address: EU_LST.address }), + baseAmount: minMintAmount, + quoteToken: EU_ERC20, + quoteAmount: minMintAmount, + kind: "solve", + metadata: EU_SOLVER_ON_ETH_METADATA, + version: 2, }), - receiver: sender, - baseToken: Token.Cw20.make({ address: EU_LST.address }), - baseAmount: minMintAmount, - quoteToken: EU_ERC20, - quoteAmount: minMintAmount, - kind: "solve", - metadata: EU_SOLVER_ON_ETH_METADATA, - version: 2, - }), - Effect.flatMap(TokenOrder.encodeV2), - Effect.flatMap(Schema.encode(Ucs03.Ucs03WithInstructionFromHex)), - Effect.map((instruction) => ({ - send: { - channel_id: DESTINATION_CHANNEL_ID, - timeout_height: 0n, - timeout_timestamp, - salt, - instruction, - }, - } as const)), - Effect.flatMap(Schema.encode(JsonFromBase64)), - Effect.map((msg) => ({ - wasm: { - execute: { - contract_addr: UCS03_ZKGM.address, - msg, - funds: [], + Effect.flatMap(TokenOrder.encodeV2), + Effect.flatMap(Schema.encode(Ucs03.Ucs03WithInstructionFromHex)), + Effect.map((instruction) => ({ + send: { + channel_id: DESTINATION_CHANNEL_ID, + timeout_height: 0n, + timeout_timestamp, + salt, + instruction, }, - }, - })), - ) + } as const)), + Effect.flatMap(Schema.encode(JsonFromBase64)), + Effect.map((msg) => ({ + wasm: { + execute: { + contract_addr: UCS03_ZKGM.address, + msg, + funds: [], + }, + }, + })), + ) - const calls = yield* pipe( - [ - bondCall, - increaseAllowanceCall, - sendCall, - ], - Schema.decode(HexFromJson), - Effect.map((contractCalldata) => - Call.make({ - sender, - eureka: false, - contractAddress: receiver, - contractCalldata, - }) - ), - ) + const calls = yield* pipe( + [ + bondCall, + increaseAllowanceCall, + sendCall, + ], + Schema.decode(HexFromJson), + Effect.map((contractCalldata) => + Call.make({ + sender, + eureka: false, + contractAddress: receiver, + contractCalldata, + }) + ), + ) - const batch = Batch.make([ - tokenOrder, - calls, - ]) - - const request = ZkgmClientRequest.make({ - source: ethereumChain, - destination: unionChain, - channelId: SOURCE_CHANNEL_ID, - ucs03Address: UCS03_EVM.address, - instruction: batch, - }) + const batch = Batch.make([ + tokenOrder, + calls, + ]) + + const request = ZkgmClientRequest.make({ + source: ethereumChain, + destination: unionChain, + channelId: SOURCE_CHANNEL_ID, + ucs03Address: UCS03_EVM.address, + instruction: batch, + }) - const client = yield* ZkgmClient.ZkgmClient - const response = yield* client.execute(request) - - yield* Effect.log("Submission TX Hash:", response.txHash) + const client = yield* ZkgmClient.ZkgmClient + const response = yield* client.execute(request) - // Return both response and txHash for separate indexer handling - return { response, txHash: response.txHash } -}) + yield* Effect.log("Submission TX Hash:", response.txHash) + + // Return both response and txHash for separate indexer handling + return { response, txHash: response.txHash } + }) runPromiseExit$(() => shouldBond ? Effect.gen(function*() { const senderOpt = WalletStore.evmAddress if (O.isNone(senderOpt) || O.isNone(bondAmount) || O.isNone(evmChain)) { - bondState = BondState.Error({ message: "Missing required data: wallet address, bond amount, or chain" }) + bondState = BondState.Error({ + message: "Missing required data: wallet address, bond amount, or chain", + }) shouldBond = false return yield* Effect.fail(new Error("Missing required data")) } @@ -420,14 +425,14 @@ runPromiseExit$(() => const chain = evmChain.value bondState = BondState.SwitchingChain() - + const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const VIEM_CHAIN = holesky - + const connectorClient = yield* getWagmiConnectorClient - + yield* switchChain(VIEM_CHAIN) - + const publicClient = Evm.PublicClient.Live({ chain: VIEM_CHAIN, transport: custom(connectorClient), @@ -438,15 +443,15 @@ runPromiseExit$(() => chain: VIEM_CHAIN, transport: custom(connectorClient), }) - + bondState = BondState.CheckingAllowance() - // Check current allowance + // Check current allowance const currentAllowance = yield* Evm.readErc20Allowance( U_ERC20.address, sender.address, UCS03_EVM.address, ).pipe(Effect.provide(publicClient)) - + if (currentAllowance < sendAmount) { bondState = BondState.ApprovingAllowance() const approveTxHash = yield* Evm.increaseErc20Allowance( @@ -454,25 +459,25 @@ runPromiseExit$(() => UCS03_EVM, sendAmount, ).pipe(Effect.provide(walletClient)) - + bondState = BondState.AllowanceSubmitted({ txHash: approveTxHash }) yield* Effect.sleep("500 millis") - + bondState = BondState.WaitingForAllowanceConfirmation({ txHash: approveTxHash }) yield* Evm.waitForTransactionReceipt(approveTxHash).pipe( - Effect.provide(publicClient) + Effect.provide(publicClient), ) } - + bondState = BondState.AllowanceApproved() yield* Effect.sleep("500 millis") - + bondState = BondState.CreatingTokenOrder() yield* Effect.sleep("300 millis") - + bondState = BondState.PreparingBondTransaction() yield* Effect.sleep("300 millis") - + bondState = BondState.ConfirmingBond() const { response, txHash } = yield* executeBond(sender, sendAmount, slippage).pipe( Effect.provide(EvmZkgmClient.layerWithoutWallet), @@ -480,18 +485,18 @@ runPromiseExit$(() => Effect.provide(publicClient), Effect.provide(ChainRegistry.Default), ) - + bondState = BondState.BondSubmitted({ txHash }) yield* Effect.sleep("500 millis") - + bondState = BondState.WaitingForConfirmation({ txHash }) // Wait for actual transaction confirmation yield* Evm.waitForTransactionReceipt(txHash).pipe( - Effect.provide(publicClient) + Effect.provide(publicClient), ) - + bondState = BondState.WaitingForIndexer({ txHash }) - + const receipt = yield* Effect.retry( response.waitFor( ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), @@ -500,17 +505,16 @@ runPromiseExit$(() => schedule: pipe(Schedule.fixed("5 seconds"), Schedule.intersect(Schedule.recurs(30))), while: (error) => { return true - } - } + }, + }, ) - + bondState = BondState.Success({ txHash }) - bondInput = "" shouldBond = false onBondSuccess?.() - + return receipt }).pipe( Effect.catchAll(error => @@ -521,7 +525,7 @@ runPromiseExit$(() => || errorObj?.message || JSON.stringify(error) const shortMessage = String(fullError).split(".")[0] - + bondState = BondState.Error({ message: shortMessage }) shouldBond = false return yield* Effect.succeed(false) @@ -542,7 +546,6 @@ function handleBondSubmit() { function handleRetry() { bondState = BondState.Ready() } - {#snippet renderBalanceSkeleton()} @@ -627,10 +630,12 @@ function handleRetry() {
Purchase rate: - {pipe( - stakingRates.current.value.value.purchase_rate, - Utils.formatBigDecimal - )} + { + pipe( + stakingRates.current.value.value.purchase_rate, + Utils.formatBigDecimal, + ) + }
@@ -639,9 +644,9 @@ function handleRetry() {
- + {#if totalPages > 1}
@@ -362,14 +359,16 @@ const close = (k: string) => { "px-2 py-1 text-xs font-mono border transition-colors min-h-[32px]", currentPage <= 1 ? "border-zinc-700 bg-zinc-900 text-zinc-600 cursor-not-allowed" - : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300" + : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300", )} disabled={currentPage <= 1} onclick={() => currentPage = Math.max(1, currentPage - 1)} > ← - + {currentPage}/{totalPages}
- {/snippet} {@render matchOption(maybeBonds, hasBonds, noBonds)} @@ -478,7 +476,6 @@ const close = (k: string) => { {/snippet} - @@ -498,7 +495,7 @@ const close = (k: string) => { "px-2 py-1 text-xs font-mono border transition-colors min-h-[32px]", selectedTab === "bond" ? "border-zinc-500 bg-zinc-800 text-zinc-200 font-medium" - : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300" + : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300", )} onclick={() => selectedTab = "bond"} > @@ -509,7 +506,7 @@ const close = (k: string) => { "px-2 py-1 text-xs font-mono border transition-colors min-h-[32px]", selectedTab === "unbond" ? "border-zinc-500 bg-zinc-800 text-zinc-200 font-medium" - : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300" + : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300", )} onclick={() => selectedTab = "unbond"} > @@ -520,7 +517,7 @@ const close = (k: string) => { "px-2 py-1 text-xs font-mono border transition-colors min-h-[32px]", selectedTab === "withdraw" ? "border-zinc-500 bg-zinc-800 text-zinc-200 font-medium" - : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300" + : "border-zinc-700 bg-zinc-900 text-zinc-400 hover:border-zinc-600 hover:text-zinc-300", )} onclick={() => selectedTab = "withdraw"} > @@ -532,14 +529,14 @@ const close = (k: string) => {
{#if selectedTab === "bond"} - {:else if selectedTab === "unbond"} - { {:else if selectedTab === "withdraw"}
Withdrawal functionality
-
Query withdrawable balance and implement withdrawal logic
+
+ Query withdrawable balance and implement withdrawal logic +
{/if}
- + From 157833a5dd01e8f9773dfba1eeea474556ff0457 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 11 Sep 2025 22:08:26 +0200 Subject: [PATCH 019/111] fix(app): push for sanity check --- .../lib/components/stake/BondComponent.svelte | 133 ++++++++++-------- 1 file changed, 76 insertions(+), 57 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index a013f1747e..f3b4990ff4 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -8,6 +8,7 @@ import { getWagmiConnectorClient } from "$lib/services/evm/clients" import { getWalletClient } from "$lib/services/evm/clients" import { switchChain } from "$lib/services/transfer-ucs03-evm/chain" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" +import { getLastConnectedWalletId } from "$lib/wallet/evm/config.svelte" import { cn } from "$lib/utils" import { matchOption } from "$lib/utils/snippets.svelte" import { @@ -23,7 +24,7 @@ import { ZkgmIncomingMessage, } from "@unionlabs/sdk" import { Cosmos } from "@unionlabs/sdk-cosmos" -import { Evm, EvmZkgmClient } from "@unionlabs/sdk-evm" +import { Evm, EvmZkgmClient, Safe } from "@unionlabs/sdk-evm" import { ChainRegistry } from "@unionlabs/sdk/ChainRegistry" import { EU_ERC20, @@ -239,27 +240,34 @@ const instantiate2 = Effect.fn( ) const checkAndSubmitAllowance = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => - pipe( - Evm.readErc20Allowance( + Effect.gen(function*() { + bondState = BondState.CheckingAllowance() + + const currentAllowance = yield* Evm.readErc20Allowance( U_ERC20.address, sender.address, UCS03_EVM.address, - ), - Effect.flatMap((amount) => - Effect.if(amount < sendAmount, { - onTrue: () => - pipe( - Evm.increaseErc20Allowance( - U_ERC20.address, - UCS03_EVM, - sendAmount, - ), - Effect.andThen(Evm.waitForTransactionReceipt), - ), - onFalse: () => Effect.void, - }) - ), - ) + ) + + if (currentAllowance < sendAmount) { + bondState = BondState.ApprovingAllowance() + + const approveTxHash = yield* Evm.increaseErc20Allowance( + U_ERC20.address, + UCS03_EVM, + sendAmount, + ) + + bondState = BondState.AllowanceSubmitted({ txHash: approveTxHash }) + yield* Effect.sleep("500 millis") + + bondState = BondState.WaitingForAllowanceConfirmation({ txHash: approveTxHash }) + yield* Evm.waitForTransactionReceipt(approveTxHash) + } + + bondState = BondState.AllowanceApproved() + yield* Effect.sleep("500 millis") + }) const executeBond = (sender: Ucs05.EvmDisplay, sendAmount: bigint, slippagePercent: number) => Effect.gen(function*() { @@ -431,7 +439,11 @@ runPromiseExit$(() => const connectorClient = yield* getWagmiConnectorClient - yield* switchChain(VIEM_CHAIN) + const isSafeWallet = getLastConnectedWalletId() === "safe" + + if (!isSafeWallet) { + yield* switchChain(VIEM_CHAIN) + } const publicClient = Evm.PublicClient.Live({ chain: VIEM_CHAIN, @@ -444,33 +456,11 @@ runPromiseExit$(() => transport: custom(connectorClient), }) - bondState = BondState.CheckingAllowance() - // Check current allowance - const currentAllowance = yield* Evm.readErc20Allowance( - U_ERC20.address, - sender.address, - UCS03_EVM.address, - ).pipe(Effect.provide(publicClient)) - - if (currentAllowance < sendAmount) { - bondState = BondState.ApprovingAllowance() - const approveTxHash = yield* Evm.increaseErc20Allowance( - U_ERC20.address, - UCS03_EVM, - sendAmount, - ).pipe(Effect.provide(walletClient)) - - bondState = BondState.AllowanceSubmitted({ txHash: approveTxHash }) - yield* Effect.sleep("500 millis") - - bondState = BondState.WaitingForAllowanceConfirmation({ txHash: approveTxHash }) - yield* Evm.waitForTransactionReceipt(approveTxHash).pipe( - Effect.provide(publicClient), - ) - } - - bondState = BondState.AllowanceApproved() - yield* Effect.sleep("500 millis") + // Use the dedicated allowance function with proper state management + yield* checkAndSubmitAllowance(sender, sendAmount).pipe( + Effect.provide(walletClient), + Effect.provide(publicClient), + ) bondState = BondState.CreatingTokenOrder() yield* Effect.sleep("300 millis") @@ -479,18 +469,39 @@ runPromiseExit$(() => yield* Effect.sleep("300 millis") bondState = BondState.ConfirmingBond() - const { response, txHash } = yield* executeBond(sender, sendAmount, slippage).pipe( - Effect.provide(EvmZkgmClient.layerWithoutWallet), - Effect.provide(walletClient), - Effect.provide(publicClient), - Effect.provide(ChainRegistry.Default), - ) + + const executeBondWithProviders = isSafeWallet + ? executeBond(sender, sendAmount, slippage).pipe( + Effect.provide(EvmZkgmClient.layerWithoutWallet), + Effect.provide(walletClient), + Effect.provide(publicClient), + Effect.provide(ChainRegistry.Default), + Effect.provide(Safe.Safe.Default({ + allowedDomains: [ + /gnosis-safe.io$/, + /app.safe.global$/, + /staging.btc.union.build$/, + /staging.app.union.build$/, + /btc.union.build$/, + ], + debug: false, + })), + ) + : executeBond(sender, sendAmount, slippage).pipe( + Effect.provide(EvmZkgmClient.layerWithoutWallet), + Effect.provide(walletClient), + Effect.provide(publicClient), + Effect.provide(ChainRegistry.Default), + ) + + const { response, txHash } = yield* executeBondWithProviders bondState = BondState.BondSubmitted({ txHash }) yield* Effect.sleep("500 millis") bondState = BondState.WaitingForConfirmation({ txHash }) - // Wait for actual transaction confirmation + // Always wait for transaction confirmation manually to ensure it's confirmed + // The SDK's lifecycle events may not be reliable for this step yield* Evm.waitForTransactionReceipt(txHash).pipe( Effect.provide(publicClient), ) @@ -504,6 +515,7 @@ runPromiseExit$(() => { schedule: pipe(Schedule.fixed("5 seconds"), Schedule.intersect(Schedule.recurs(30))), while: (error) => { + console.log("Indexer not ready yet, retrying in 5 seconds...") return true }, }, @@ -738,7 +750,10 @@ function handleRetry() {
{ Match.value(bondState).pipe( - Match.when(BondState.$is("SwitchingChain"), () => "Switching to Holesky"), + Match.when(BondState.$is("SwitchingChain"), () => { + const isSafeWallet = getLastConnectedWalletId() === "safe" + return isSafeWallet ? "Preparing Safe Transaction" : "Switching to Holesky" + }), Match.when(BondState.$is("CheckingAllowance"), () => "Checking Token Allowance"), Match.when(BondState.$is("ApprovingAllowance"), () => @@ -774,8 +789,12 @@ function handleRetry() {
{ Match.value(bondState).pipe( - Match.when(BondState.$is("SwitchingChain"), () => - "Please switch to Holesky network in your wallet"), + Match.when(BondState.$is("SwitchingChain"), () => { + const isSafeWallet = getLastConnectedWalletId() === "safe" + return isSafeWallet + ? "Preparing transaction for Safe wallet..." + : "Please switch to Holesky network in your wallet" + }), Match.when(BondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), Match.when(BondState.$is("ApprovingAllowance"), () => From 2a7cd494d38477a16192ec33cbc8518118f2aa86 Mon Sep 17 00:00:00 2001 From: Eric Hegnes Date: Thu, 11 Sep 2025 16:35:21 -0400 Subject: [PATCH 020/111] chore(app): types check out Signed-off-by: Eric Hegnes --- .../lib/components/stake/BondComponent.svelte | 98 +++++++++---------- 1 file changed, 45 insertions(+), 53 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index f3b4990ff4..e358b27cc1 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -8,9 +8,10 @@ import { getWagmiConnectorClient } from "$lib/services/evm/clients" import { getWalletClient } from "$lib/services/evm/clients" import { switchChain } from "$lib/services/transfer-ucs03-evm/chain" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" -import { getLastConnectedWalletId } from "$lib/wallet/evm/config.svelte" +import { safeOpts } from "$lib/transfer/shared/services/handlers/safe" import { cn } from "$lib/utils" import { matchOption } from "$lib/utils/snippets.svelte" +import { getLastConnectedWalletId } from "$lib/wallet/evm/config.svelte" import { Batch, Call, @@ -242,7 +243,7 @@ const instantiate2 = Effect.fn( const checkAndSubmitAllowance = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => Effect.gen(function*() { bondState = BondState.CheckingAllowance() - + const currentAllowance = yield* Evm.readErc20Allowance( U_ERC20.address, sender.address, @@ -251,7 +252,7 @@ const checkAndSubmitAllowance = (sender: Ucs05.EvmDisplay, sendAmount: bigint) = if (currentAllowance < sendAmount) { bondState = BondState.ApprovingAllowance() - + const approveTxHash = yield* Evm.increaseErc20Allowance( U_ERC20.address, UCS03_EVM, @@ -408,12 +409,7 @@ const executeBond = (sender: Ucs05.EvmDisplay, sendAmount: bigint, slippagePerce }) const client = yield* ZkgmClient.ZkgmClient - const response = yield* client.execute(request) - - yield* Effect.log("Submission TX Hash:", response.txHash) - - // Return both response and txHash for separate indexer handling - return { response, txHash: response.txHash } + return yield* client.execute(request) }) runPromiseExit$(() => @@ -469,65 +465,59 @@ runPromiseExit$(() => yield* Effect.sleep("300 millis") bondState = BondState.ConfirmingBond() - + const executeBondWithProviders = isSafeWallet ? executeBond(sender, sendAmount, slippage).pipe( - Effect.provide(EvmZkgmClient.layerWithoutWallet), - Effect.provide(walletClient), - Effect.provide(publicClient), - Effect.provide(ChainRegistry.Default), - Effect.provide(Safe.Safe.Default({ - allowedDomains: [ - /gnosis-safe.io$/, - /app.safe.global$/, - /staging.btc.union.build$/, - /staging.app.union.build$/, - /btc.union.build$/, - ], - debug: false, - })), - ) + Effect.provide(EvmZkgmClient.layerWithoutWallet), + Effect.provide(walletClient), + Effect.provide(publicClient), + Effect.provide(ChainRegistry.Default), + Effect.provide(Safe.Safe.Default({ + ...safeOpts, + debug: true, + })), + ) : executeBond(sender, sendAmount, slippage).pipe( - Effect.provide(EvmZkgmClient.layerWithoutWallet), - Effect.provide(walletClient), - Effect.provide(publicClient), - Effect.provide(ChainRegistry.Default), - ) + Effect.provide(EvmZkgmClient.layerWithoutWallet), + Effect.provide(walletClient), + Effect.provide(publicClient), + Effect.provide(ChainRegistry.Default), + ) - const { response, txHash } = yield* executeBondWithProviders + const response = yield* executeBondWithProviders + const txHash = response.txHash bondState = BondState.BondSubmitted({ txHash }) yield* Effect.sleep("500 millis") bondState = BondState.WaitingForConfirmation({ txHash }) - // Always wait for transaction confirmation manually to ensure it's confirmed - // The SDK's lifecycle events may not be reliable for this step - yield* Evm.waitForTransactionReceipt(txHash).pipe( - Effect.provide(publicClient), - ) - bondState = BondState.WaitingForIndexer({ txHash }) + const finalHash = yield* Effect.if(isSafeWallet, { + onTrue: () => + pipe( + response.waitFor( + ZkgmIncomingMessage.LifecycleEvent.$is("WaitForSafeWalletHash"), + ), + Effect.flatMap(O.map(x => x.hash)), + ), + onFalse: () => + pipe( + response.waitFor( + ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), + ), + Effect.flatMap(O.map(x => x.transactionHash)), + ), + }) - const receipt = yield* Effect.retry( - response.waitFor( - ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), - ), - { - schedule: pipe(Schedule.fixed("5 seconds"), Schedule.intersect(Schedule.recurs(30))), - while: (error) => { - console.log("Indexer not ready yet, retrying in 5 seconds...") - return true - }, - }, - ) + bondState = BondState.WaitingForIndexer({ txHash: finalHash }) + + // TODO: transferHashStore.startPolling(transactionHash) bondState = BondState.Success({ txHash }) bondInput = "" shouldBond = false onBondSuccess?.() - - return receipt }).pipe( Effect.catchAll(error => Effect.gen(function*() { @@ -752,7 +742,9 @@ function handleRetry() { Match.value(bondState).pipe( Match.when(BondState.$is("SwitchingChain"), () => { const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet ? "Preparing Safe Transaction" : "Switching to Holesky" + return isSafeWallet + ? "Preparing Safe Transaction" + : "Switching to Holesky" }), Match.when(BondState.$is("CheckingAllowance"), () => "Checking Token Allowance"), @@ -791,7 +783,7 @@ function handleRetry() { Match.value(bondState).pipe( Match.when(BondState.$is("SwitchingChain"), () => { const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet + return isSafeWallet ? "Preparing transaction for Safe wallet..." : "Please switch to Holesky network in your wallet" }), From 66bd9016c95cafe9de72c469efee3ba464aa0574 Mon Sep 17 00:00:00 2001 From: Eric Hegnes Date: Thu, 11 Sep 2025 16:59:50 -0400 Subject: [PATCH 021/111] fix(ts-sdk-evm): halt indexer lifecycle event emission until later time Signed-off-by: Eric Hegnes --- ts-sdk-evm/src/internal/zkgmClient.ts | 77 ++++++++++++++------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/ts-sdk-evm/src/internal/zkgmClient.ts b/ts-sdk-evm/src/internal/zkgmClient.ts index c958a09f8a..de71334910 100644 --- a/ts-sdk-evm/src/internal/zkgmClient.ts +++ b/ts-sdk-evm/src/internal/zkgmClient.ts @@ -1,4 +1,4 @@ -import { Indexer, ZkgmIncomingMessage } from "@unionlabs/sdk" +import { ZkgmIncomingMessage } from "@unionlabs/sdk" import * as Call from "@unionlabs/sdk/Call" import type { Hex } from "@unionlabs/sdk/schema/hex" import * as Token from "@unionlabs/sdk/Token" @@ -208,20 +208,20 @@ export abstract class IncomingMessageImpl extends Inspectable.Class get stream(): Stream.Stream { return Stream.async((emit) => { - const self = this - - const waitForReceipt = (hash: `0x${string}`) => - pipe( - Evm.waitForTransactionReceipt(this.txHash), - Effect.map((a) => - ZkgmIncomingMessage.LifecycleEvent.EvmTransactionReceiptComplete({ - transactionHash: a.transactionHash as `0x${string}` & Brand.Brand<"Hash">, - blockHash: a.blockHash as `0x${string}` & Brand.Brand<"Hash">, - gasUsed: a.gasUsed, - }) - ), - Effect.provideService(Evm.PublicClient, this.client), - ) + // TODO(ehegnes): maybe parameterize this for Safe compatibility? + const waitForReceipt = pipe( + Evm.waitForTransactionReceipt(this.txHash), + Effect.tap((x) => Effect.log("GOT RECEIPT", x)), + Effect.tapError((x) => Effect.logError("FAILED RECEIPT", x)), + Effect.map((a) => + ZkgmIncomingMessage.LifecycleEvent.EvmTransactionReceiptComplete({ + transactionHash: a.transactionHash as `0x${string}` & Brand.Brand<"Hash">, + blockHash: a.blockHash as `0x${string}` & Brand.Brand<"Hash">, + gasUsed: a.gasUsed, + }) + ), + Effect.provideService(Evm.PublicClient, this.client), + ) const maybeWaitForReceipt = pipe( Effect.serviceOption(Safe.Safe), @@ -229,7 +229,7 @@ export abstract class IncomingMessageImpl extends Inspectable.Class O.match({ onNone: () => pipe( - waitForReceipt(this.txHash), + waitForReceipt, Effect.map(Chunk.of), Effect.mapError(O.some), ), @@ -260,31 +260,32 @@ export abstract class IncomingMessageImpl extends Inspectable.Class ), ) - const maybeIndex = pipe( - Effect.serviceOption(Indexer.Indexer), - Effect.flatMap( - O.match({ - onNone: () => Effect.succeed(Chunk.empty()), - onSome: (indexer) => - pipe( - indexer.getPacketHashBySubmissionTxHash( - new Indexer.GetPacketHashBySubmissionTxHash({ - submissionTxHash: self.txHash, - }), - ), - Effect.map((packetHash) => - ZkgmIncomingMessage.LifecycleEvent.Indexed({ packetHash }) - ), - Effect.map(Chunk.of), - Effect.mapError(O.some), - ), - }), - ), - ) + // TODO(ehegnes): restore Indexer based lifecycle events + // const maybeIndex = pipe( + // Effect.serviceOption(Indexer.Indexer), + // Effect.flatMap( + // O.match({ + // onNone: () => Effect.succeed(Chunk.empty()), + // onSome: (indexer) => + // pipe( + // indexer.getPacketHashBySubmissionTxHash( + // new Indexer.GetPacketHashBySubmissionTxHash({ + // submissionTxHash: self.txHash, + // }), + // ), + // Effect.map((packetHash) => + // ZkgmIncomingMessage.LifecycleEvent.Indexed({ packetHash }) + // ), + // Effect.map(Chunk.of), + // Effect.mapError(O.some), + // ), + // }), + // ), + // ) emit(maybeWaitForSafe) emit(maybeWaitForReceipt) - emit(maybeIndex) + // emit(maybeIndex) }) } From 9ea6f7a52f3c9dcd44ae15773ac5990d17902447 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 11 Sep 2025 23:43:55 +0200 Subject: [PATCH 022/111] feat(app): fix wait for indexer --- .../lib/components/stake/BondComponent.svelte | 75 +++++++-- .../components/stake/UnbondComponent.svelte | 156 +++++++++++++----- 2 files changed, 171 insertions(+), 60 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index e358b27cc1..2b15bcc016 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -5,7 +5,6 @@ import Label from "$lib/components/ui/Label.svelte" import Skeleton from "$lib/components/ui/Skeleton.svelte" import { runPromiseExit$ } from "$lib/runtime" import { getWagmiConnectorClient } from "$lib/services/evm/clients" -import { getWalletClient } from "$lib/services/evm/clients" import { switchChain } from "$lib/services/transfer-ucs03-evm/chain" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" import { safeOpts } from "$lib/transfer/shared/services/handlers/safe" @@ -15,6 +14,7 @@ import { getLastConnectedWalletId } from "$lib/wallet/evm/config.svelte" import { Batch, Call, + Indexer, Token, TokenOrder, Ucs03, @@ -40,15 +40,25 @@ import type { Chain, Token as TokenType } from "@unionlabs/sdk/schema" import { UniversalChainId } from "@unionlabs/sdk/schema/chain" import { ChannelId } from "@unionlabs/sdk/schema/channel" import { HexFromJson } from "@unionlabs/sdk/schema/hex" -import { BigDecimal, Data, Effect, Exit, Match, pipe, Schedule, Schema, Struct } from "effect" +import { + BigDecimal, + ConfigProvider, + Data, + Effect, + Layer, + Match, + pipe, + Schedule, + Schema, + Struct, +} from "effect" import * as A from "effect/Array" -import { flow } from "effect/Function" import * as O from "effect/Option" -import { custom, http } from "viem" -import { bytesToHex, encodeAbiParameters, formatUnits, fromHex, keccak256, parseUnits } from "viem" +import { graphql } from "gql.tada" +import { custom } from "viem" +import { bytesToHex, encodeAbiParameters, fromHex, keccak256 } from "viem" import { holesky } from "viem/chains" -// Constants from bond.ts const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") const SOURCE_CHANNEL_ID = ChannelId.make(6) @@ -100,7 +110,7 @@ const BondState = Data.taggedEnum() let bondInput = $state("") let bondState = $state(BondState.Ready()) let shouldBond = $state(false) -let slippage = $state(1) // Default 1% +let slippage = $state(1) const stakingRates = runPromiseExit$(() => Effect.gen(function*() { @@ -136,6 +146,15 @@ const bytecode_base_checksum = const canonical_zkgm = Ucs05.anyDisplayToCanonical(UCS03_ZKGM) const module_hash = "0x120970d812836f19888625587a4606a5ad23cef31c8684e601771552548fc6b9" as const +const QlpConfigProvider = pipe( + ConfigProvider.fromMap( + new Map([ + ["GRAPHQL_ENDPOINT", "https://development.graphql.union.build/v1/graphql"], + ]), + ), + Layer.setConfigProvider, +) + const inputAmount = $derived>(pipe( bondInput, BigDecimal.fromString, @@ -160,7 +179,6 @@ const minimumReceiveAmount = $derived>(pipe( const inputNorm = BigDecimal.normalize(input) const rateNorm = BigDecimal.normalize(rates.purchase_rate) - // Simple multiplication: input * rate * slippage const expectedScaled = inputNorm.value * rateNorm.value const minScaled = expectedScaled * BigInt(100 - slippage) / 100n return BigDecimal.make(minScaled, inputNorm.scale + rateNorm.scale) @@ -218,12 +236,12 @@ const instantiate2 = Effect.fn( [ ...fromHex(module_hash, "bytes"), ...new TextEncoder().encode("wasm"), - 0, // null byte - ...u64toBeBytes(32n), // checksum len as 64-bit big endian bytes of int + 0, + ...u64toBeBytes(32n), ...fromHex(bytecode_base_checksum, "bytes"), - ...u64toBeBytes(32n), // creator canonical addr len + ...u64toBeBytes(32n), ...fromHex(canonical_zkgm, "bytes"), - ...u64toBeBytes(32n), // len + ...u64toBeBytes(32n), ...salt, ...u64toBeBytes(0n), ], @@ -430,7 +448,6 @@ runPromiseExit$(() => bondState = BondState.SwitchingChain() - const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const VIEM_CHAIN = holesky const connectorClient = yield* getWagmiConnectorClient @@ -452,7 +469,6 @@ runPromiseExit$(() => transport: custom(connectorClient), }) - // Use the dedicated allowance function with proper state management yield* checkAndSubmitAllowance(sender, sendAmount).pipe( Effect.provide(walletClient), Effect.provide(publicClient), @@ -511,9 +527,35 @@ runPromiseExit$(() => bondState = BondState.WaitingForIndexer({ txHash: finalHash }) - // TODO: transferHashStore.startPolling(transactionHash) + yield* pipe( + Effect.gen(function*() { + const indexer = yield* Indexer.Indexer + return yield* indexer.fetch({ + document: graphql(` + query GetBondByTxHash($tx_hash: String!) @cached(ttl: 10) { + v2_bonds(args: { p_transaction_hash: $tx_hash }) { + packet_hash + } + } + `), + variables: { tx_hash: finalHash }, + }) + }), + Effect.flatMap(Schema.decodeUnknown( + Schema.Struct({ + v2_bonds: Schema.NonEmptyArray(Schema.Struct({ packet_hash: Schema.String })), + }), + )), + Effect.retry({ + schedule: Schedule.fixed("2 seconds"), + times: 30, + while: (error) => String(error.message || "").includes("is missing"), + }), + Effect.provide(Indexer.Indexer.Default), + Effect.provide(QlpConfigProvider), + ) - bondState = BondState.Success({ txHash }) + bondState = BondState.Success({ txHash: finalHash }) bondInput = "" shouldBond = false @@ -559,7 +601,6 @@ function handleRetry() { { pipe( BigDecimal.fromBigInt(amount), - // XXX: check decimals BigDecimal.unsafeDivide(BigDecimal.make(1n, -18)), Utils.formatBigDecimal, ) diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index 2a988a7e80..b23c03d2d2 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -7,10 +7,13 @@ import { runPromiseExit$ } from "$lib/runtime" import { getWagmiConnectorClient } from "$lib/services/evm/clients" import { switchChain } from "$lib/services/transfer-ucs03-evm/chain" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" +import { safeOpts } from "$lib/transfer/shared/services/handlers/safe" import { matchOption } from "$lib/utils/snippets.svelte" +import { getLastConnectedWalletId } from "$lib/wallet/evm/config.svelte" import { Batch, Call, + Indexer, Token, TokenOrder, Ucs05, @@ -19,7 +22,7 @@ import { ZkgmClientRequest, ZkgmIncomingMessage, } from "@unionlabs/sdk" -import { Evm, EvmZkgmClient } from "@unionlabs/sdk-evm" +import { Evm, EvmZkgmClient, Safe } from "@unionlabs/sdk-evm" import { ChainRegistry } from "@unionlabs/sdk/ChainRegistry" import { EU_ERC20, @@ -31,14 +34,24 @@ import type { Chain, Token as TokenType } from "@unionlabs/sdk/schema" import { UniversalChainId } from "@unionlabs/sdk/schema/chain" import { ChannelId } from "@unionlabs/sdk/schema/channel" import { HexFromJson } from "@unionlabs/sdk/schema/hex" -import { BigDecimal, Data, Effect, Exit, Match, pipe, Schedule, Schema, Struct } from "effect" +import { + BigDecimal, + ConfigProvider, + Data, + Effect, + Layer, + Match, + pipe, + Schedule, + Schema, + Struct, +} from "effect" import * as A from "effect/Array" -import { flow } from "effect/Function" import * as O from "effect/Option" +import { graphql } from "gql.tada" import { bytesToHex, custom, encodeAbiParameters, fromHex, http, keccak256 } from "viem" import { holesky } from "viem/chains" -// Constants from unbond.ts const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") const SOURCE_CHANNEL_ID = ChannelId.make(6) @@ -111,6 +124,15 @@ const bytecode_base_checksum = const canonical_zkgm = Ucs05.anyDisplayToCanonical(UCS03_ZKGM) const module_hash = "0x120970d812836f19888625587a4606a5ad23cef31c8684e601771552548fc6b9" as const +const QlpConfigProvider = pipe( + ConfigProvider.fromMap( + new Map([ + ["GRAPHQL_ENDPOINT", "https://development.graphql.union.build/v1/graphql"], + ]), + ), + Layer.setConfigProvider, +) + const instantiate2 = Effect.fn( function*(options: { path: bigint; channel: ChannelId; sender: Ucs05.AnyDisplay }) { const sender = yield* Ucs05.anyDisplayToZkgm(options.sender) @@ -154,12 +176,12 @@ const instantiate2 = Effect.fn( const _args = [ ...fromHex(module_hash, "bytes"), ...new TextEncoder().encode("wasm"), - 0, // null byte - ...u64toBeBytes(32n), // checksum len as 64-bit big endian bytes of int + 0, + ...u64toBeBytes(32n), ...fromHex(bytecode_base_checksum, "bytes"), - ...u64toBeBytes(32n), // creator canonical addr len + ...u64toBeBytes(32n), ...fromHex(canonical_zkgm, "bytes"), - ...u64toBeBytes(32n), // len + ...u64toBeBytes(32n), ...salt, ...u64toBeBytes(0n), ] as const @@ -317,14 +339,16 @@ runPromiseExit$(() => const chain = evmChain.value unbondState = UnbondState.SwitchingChain() - yield* Effect.log("Starting unbond execution", { sender: sender.address, sendAmount }) - const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" const VIEM_CHAIN = holesky const connectorClient = yield* getWagmiConnectorClient - yield* switchChain(VIEM_CHAIN) + const isSafeWallet = getLastConnectedWalletId() === "safe" + + if (!isSafeWallet) { + yield* switchChain(VIEM_CHAIN) + } const publicClient = Evm.PublicClient.Live({ chain: VIEM_CHAIN, @@ -349,45 +373,86 @@ runPromiseExit$(() => ) unbondState = UnbondState.ConfirmingUnbond() - const { response, txHash } = yield* executeUnbond(sender, sendAmount).pipe( - Effect.provide(EvmZkgmClient.layerWithoutWallet), - Effect.provide(walletClient), - Effect.provide(publicClient), - Effect.provide(ChainRegistry.Default), - ) - console.log("Unbond transaction submitted with hash:", txHash) + const executeBondWithProviders = isSafeWallet + ? executeUnbond(sender, sendAmount).pipe( + Effect.provide(EvmZkgmClient.layerWithoutWallet), + Effect.provide(walletClient), + Effect.provide(publicClient), + Effect.provide(ChainRegistry.Default), + Effect.provide(Safe.Safe.Default({ + ...safeOpts, + debug: true, + })), + ) + : executeUnbond(sender, sendAmount).pipe( + Effect.provide(EvmZkgmClient.layerWithoutWallet), + Effect.provide(walletClient), + Effect.provide(publicClient), + Effect.provide(ChainRegistry.Default), + ) + + const { response, txHash } = yield* executeBondWithProviders + unbondState = UnbondState.UnbondSubmitted({ txHash }) yield* Effect.sleep("500 millis") unbondState = UnbondState.WaitingForConfirmation({ txHash }) - // Wait for actual transaction confirmation - yield* Evm.waitForTransactionReceipt(txHash).pipe( - Effect.provide(publicClient), - ) - unbondState = UnbondState.WaitingForIndexer({ txHash }) + const finalHash = yield* Effect.if(isSafeWallet, { + onTrue: () => + pipe( + response.waitFor( + ZkgmIncomingMessage.LifecycleEvent.$is("WaitForSafeWalletHash"), + ), + Effect.flatMap(O.map(x => x.hash)), + ), + onFalse: () => + pipe( + response.waitFor( + ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), + ), + Effect.flatMap(O.map(x => x.transactionHash)), + ), + }) + + unbondState = UnbondState.WaitingForIndexer({ txHash: finalHash }) - const receipt = yield* Effect.retry( - response.waitFor( - ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), - ), - { - schedule: pipe(Schedule.fixed("5 seconds"), Schedule.intersect(Schedule.recurs(30))), - while: (error) => { - console.log("Indexer not ready yet, retrying in 5 seconds...") - return true - }, - }, + yield* pipe( + Effect.gen(function*() { + const indexer = yield* Indexer.Indexer + return yield* indexer.fetch({ + document: graphql(` + query GetUnbondByTxHash($tx_hash: String!) @cached(ttl: 10) { + v2_unbonds(args: { p_transaction_hash: $tx_hash }) { + packet_hash + } + } + `), + variables: { tx_hash: finalHash }, + }) + }), + Effect.flatMap(Schema.decodeUnknown( + Schema.Struct({ + v2_unbonds: Schema.NonEmptyArray(Schema.Struct({ packet_hash: Schema.String })), + }), + )), + Effect.retry({ + schedule: Schedule.fixed("2 seconds"), + times: 30, + while: (error) => String(error.message || "").includes("is missing"), + }), + Effect.provide(Indexer.Indexer.Default), + Effect.provide(QlpConfigProvider), ) - unbondState = UnbondState.Success({ txHash }) + unbondState = UnbondState.Success({ txHash: finalHash }) unbondInput = "" shouldUnbond = false onUnbondSuccess?.() - return receipt + return finalHash }).pipe( Effect.catchAll(error => Effect.gen(function*() { @@ -429,7 +494,6 @@ function handleRetry() { { pipe( BigDecimal.fromBigInt(amount), - // XXX: check decimals BigDecimal.unsafeDivide(BigDecimal.make(1n, -18)), Utils.formatBigDecimal, ) @@ -548,10 +612,12 @@ function handleRetry() {
{ Match.value(unbondState).pipe( - Match.when( - UnbondState.$is("SwitchingChain"), - () => "Switching to Holesky", - ), + Match.when(UnbondState.$is("SwitchingChain"), () => { + const isSafeWallet = getLastConnectedWalletId() === "safe" + return isSafeWallet + ? "Preparing Safe Transaction" + : "Switching to Holesky" + }), Match.when( UnbondState.$is("CheckingAllowance"), () => "Checking Token Allowance", @@ -603,8 +669,12 @@ function handleRetry() {
{ Match.value(unbondState).pipe( - Match.when(UnbondState.$is("SwitchingChain"), () => - "Please switch to Holesky network in your wallet"), + Match.when(UnbondState.$is("SwitchingChain"), () => { + const isSafeWallet = getLastConnectedWalletId() === "safe" + return isSafeWallet + ? "Preparing transaction for Safe wallet..." + : "Please switch to Holesky network in your wallet" + }), Match.when(UnbondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), Match.when(UnbondState.$is("ApprovingAllowance"), () => From f849b44c993b6bac6bf367f3b73e9a1285aca999 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 12 Sep 2025 02:34:28 +0200 Subject: [PATCH 023/111] feat(app): save a bit of styling --- .../model/StakingListItemComponent.svelte | 135 ++++++++ app2/src/lib/components/ui/Tabs.svelte | 79 +++++ app2/src/routes/stake/+page.svelte | 293 ++++-------------- 3 files changed, 266 insertions(+), 241 deletions(-) create mode 100644 app2/src/lib/components/model/StakingListItemComponent.svelte create mode 100644 app2/src/lib/components/ui/Tabs.svelte diff --git a/app2/src/lib/components/model/StakingListItemComponent.svelte b/app2/src/lib/components/model/StakingListItemComponent.svelte new file mode 100644 index 0000000000..a5c5ff116c --- /dev/null +++ b/app2/src/lib/components/model/StakingListItemComponent.svelte @@ -0,0 +1,135 @@ + + +{#if Option.isSome(chains.data)} + + +
+
+
+ + {item._tag} + + {#if Option.isSome(sourceChain)} + + {/if} +
+
+ {#if Option.isSome(sourceChain)} + + {/if} + {#if Option.isSome(destinationChain)} + + + {/if} +
+
+
+
+
+{/if} diff --git a/app2/src/lib/components/ui/Tabs.svelte b/app2/src/lib/components/ui/Tabs.svelte new file mode 100644 index 0000000000..8d8e26f367 --- /dev/null +++ b/app2/src/lib/components/ui/Tabs.svelte @@ -0,0 +1,79 @@ + + +
+ +
+ + + {#each items as item, index (item.id)} + + {/each} +
diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index 41076f4cd4..e111fadbfc 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -1,13 +1,12 @@ {#snippet renderChain(chain: Chain, denom: TokenRawDenom)} @@ -212,82 +197,6 @@ const close = (k: string) => { {/if} {/snippet} -{#snippet renderBond(bond: Bond | Unbond)} - {@const k = keyForBond(bond)} - toggle(k)} - onkeydown={(e) => { - if (e.key === "Enter" || e.key === " ") { - e.preventDefault() - toggle(k) - } - if (e.key === "Escape") { - close(k) - } - }} - > - - - - - {#if bond._tag === "Bond"} - BOND - {:else} - UNBOND - {/if} - - - {bond.sendTimestampFormatted} - - - {#if S.is(Bond)(bond)} - {@render renderChain(bond.source_chain, bond.base_token)} - - {@render renderChain(bond.destination_chain, bond.quote_token)} - {/if} - {#if S.is(Unbond)(bond)} - {@render renderChain(bond.destination_chain, bond.base_token)} - {/if} - - - {bond.amountFormatted} - - - {@render renderStatus(bond)} - - - {#if isOpen(k)} - - -
-
-
TODO
-
-
- - RAW DATA - - -
-
- - - {/if} -{/snippet} - {#snippet maybeRenderBonds(maybeBonds: O.Option>)} {#snippet noBonds()}
@@ -313,73 +222,35 @@ const close = (k: string) => { {@const paginatedBonds = filteredBonds.slice(startIndex, endIndex)} -
-
-
- - - -
+
+
+ tableFilter = id as TableFilter} + /> {#if totalPages > 1} -
+
- +
{currentPage}/{totalPages} - +
@@ -388,34 +259,12 @@ const close = (k: string) => {
-
- - - - - - - - - - - - - {#each paginatedBonds as bond} - {@render renderBond(bond)} - {/each} - -
- Type - - Timestamp - - Chain - - Amount - - Status -
+
+ {#each paginatedBonds as item} + + {:else} +
No transactions found
+ {/each}
{/snippet} @@ -461,7 +310,7 @@ const close = (k: string) => {
-
+
{@render matchRuntimeResult(data.current, { onSuccess: maybeRenderBonds, onFailure: renderError, @@ -477,53 +326,21 @@ const close = (k: string) => { {/snippet} - - -
-
- $ -

liquid-stake

- --mode={selectedTab} -
-
- + -
-
- - - -
+
+ selectedTab = id as StakeTab} + />
@@ -554,16 +371,10 @@ const close = (k: string) => { - - -
-
- $ -

history

- --filter={tableFilter} -
-
- + {#if O.isSome(WalletStore.evmAddress)} {@render whenWallet()} {:else} From 1231c10364b78634a0f849e9ce02bd08b3b7ca58 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 12 Sep 2025 03:00:04 +0200 Subject: [PATCH 024/111] feat(app): unbond bond basic pages --- .../model/StakingListItemComponent.svelte | 3 +- .../explorer/bonds/[packet_hash]/+page.svelte | 244 ++++++++++++++++++ .../unbonds/[packet_hash]/+page.svelte | 234 +++++++++++++++++ 3 files changed, 480 insertions(+), 1 deletion(-) create mode 100644 app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte create mode 100644 app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte diff --git a/app2/src/lib/components/model/StakingListItemComponent.svelte b/app2/src/lib/components/model/StakingListItemComponent.svelte index a5c5ff116c..b32679bc28 100644 --- a/app2/src/lib/components/model/StakingListItemComponent.svelte +++ b/app2/src/lib/components/model/StakingListItemComponent.svelte @@ -30,7 +30,8 @@ const destinationChain = $derived( ) const handleClick = () => { - goto(`/explorer/transfers/${item.packet_hash}`) + const route = item._tag === "Bond" ? "bonds" : "unbonds" + goto(`/explorer/${route}/${item.packet_hash}`) } const status = $derived( diff --git a/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte b/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte new file mode 100644 index 0000000000..90f5764453 --- /dev/null +++ b/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte @@ -0,0 +1,244 @@ + + + + + {#if O.isSome(bondData.current)} + {#if bondData.current.value._tag === "Success"} + {@const bond = bondData.current.value.value} + {@const status = bond.bond_success === true ? "success" : bond.bond_success === false ? "failure" : "pending"} + +
+

Bond Transaction

+ +
+ +
+
+ +
+ {bond.packet_hash} +
+
+ +
+ + {#if O.isSome(sourceChain)} + + {:else} +
+ {bond.base_amount} {bond.base_token} +
+ {/if} +
+ +
+ +
+ + {status} + +
+
+ +
+ + {#if bond.bond_send_timestamp} +
+ {(() => { + try { + const date = new Date(bond.bond_send_timestamp) + return isNaN(date.getTime()) ? "Invalid date" : date.toLocaleString() + } catch { + return "Invalid date" + } + })()} +
+ {:else} +
No timestamp
+ {/if} +
+
+ + +
+
+ + {#if O.isSome(sourceChain)} + + {:else} +
{bond.source_universal_chain_id}
+ {/if} +
+ +
+ + {#if O.isSome(destinationChain)} + + {:else} +
{bond.destination_universal_chain_id}
+ {/if} +
+ +
+ +
+ {bond.sender_display} +
+
+ +
+ +
+ {bond.receiver_display} +
+
+
+
+
+ + +
+ + Raw Bond Data + + +
+ +
+
+ + {:else if bondData.current.value._tag === "Failure"} +
+ +
+ {/if} + {:else} +
+
+
+
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+
+
+ {/if} +
+
diff --git a/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte new file mode 100644 index 0000000000..fbf4c51c3a --- /dev/null +++ b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte @@ -0,0 +1,234 @@ + + + + + {#if O.isSome(unbondData.current)} + {#if unbondData.current.value._tag === "Success"} + {@const unbond = unbondData.current.value.value} + {@const status = unbond.success === true ? "success" : unbond.success === false ? "failure" : "pending"} + +
+

Unbond Transaction

+ +
+ +
+
+ +
+ {unbond.packet_hash} +
+
+ +
+ + {#if O.isSome(sourceChain)} + + {:else} +
+ {unbond.base_amount} {unbond.base_token} +
+ {/if} +
+ +
+ +
+ + {status} + +
+
+ +
+ + {#if unbond.unbond_send_timestamp} +
+ {(() => { + try { + const date = new Date(unbond.unbond_send_timestamp) + return isNaN(date.getTime()) ? "Invalid date" : date.toLocaleString() + } catch { + return "Invalid date" + } + })()} +
+ {:else} +
No timestamp
+ {/if} +
+
+ + +
+
+ + {#if O.isSome(sourceChain)} + + {:else} +
{unbond.source_universal_chain_id}
+ {/if} +
+ +
+ + {#if O.isSome(destinationChain)} + + {:else} +
{unbond.destination_universal_chain_id}
+ {/if} +
+ +
+ +
+ {unbond.sender_display} +
+
+
+
+
+ + +
+ + Raw Unbond Data + + +
+ +
+
+ + {:else if unbondData.current.value._tag === "Failure"} +
+ +
+ {/if} + {:else} +
+
+
+
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+
+
+ {/if} +
+
From 2348a50558c88be7a1ce6094dad4ab7f6730c973 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 12 Sep 2025 12:07:01 +0200 Subject: [PATCH 025/111] feat(app): clean up new pages --- .../explorer/bonds/[packet_hash]/+page.svelte | 213 +++++++++--------- .../unbonds/[packet_hash]/+page.svelte | 141 ++++++------ 2 files changed, 176 insertions(+), 178 deletions(-) diff --git a/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte b/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte index 90f5764453..b4d81d29b0 100644 --- a/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte +++ b/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte @@ -4,19 +4,17 @@ import ChainComponent from "$lib/components/model/ChainComponent.svelte" import ErrorComponent from "$lib/components/model/ErrorComponent.svelte" import TokenComponent from "$lib/components/model/TokenComponent.svelte" import Card from "$lib/components/ui/Card.svelte" -import DateTimeComponent from "$lib/components/ui/DateTimeComponent.svelte" import JsonPreview from "$lib/components/ui/JsonPreview.svelte" import Label from "$lib/components/ui/Label.svelte" import Sections from "$lib/components/ui/Sections.svelte" import * as AppRuntime from "$lib/runtime" -import { chains } from "$lib/stores/chains.svelte" import { Indexer } from "@unionlabs/sdk" -import { getChain, PacketHash } from "@unionlabs/sdk/schema" -import { ConfigProvider, Effect, Layer, Option, pipe, Schema } from "effect" +import { PacketHash, TokenRawAmount } from "@unionlabs/sdk/schema" +import { ConfigProvider, Effect, Layer, pipe } from "effect" import * as O from "effect/Option" import { graphql } from "gql.tada" -const packetHash = PacketHash.make(page.params.packet_hash) +const packetHash = $derived(PacketHash.make(page.params.packet_hash)) const QlpConfigProvider = Layer.setConfigProvider( ConfigProvider.fromMap( @@ -26,81 +24,113 @@ const QlpConfigProvider = Layer.setConfigProvider( ), ) -const bondData = AppRuntime.runPromiseExit$(() => { - void page.params.packet_hash - - return Effect.gen(function*() { - const currentPacketHash = PacketHash.make(page.params.packet_hash) - const indexer = yield* Indexer.Indexer - const result = yield* indexer.fetch({ - document: graphql(` - query GetBondByPacketHash($packet_hash: String!) @cached(ttl: 10) { - v2_bonds(args: { p_packet_hash: $packet_hash }) { - packet_hash - bond_success - delivery_success - source_universal_chain_id - destination_universal_chain_id - sender_display - receiver_display - base_token - base_amount - quote_token - quote_amount - bond_send_timestamp - bond_send_transaction_hash - sort_order +const bondData = $derived(pipe( + Effect.gen(function*() { + const indexer = yield* Indexer.Indexer + const result = yield* indexer.fetch({ + document: graphql(` + query GetBondByPacketHash($packet_hash: String!) @cached(ttl: 10) { + v2_bonds(args: { p_packet_hash: $packet_hash }) { + packet_hash + delivery_packet_hash + bond_success + delivery_success + packet_shape + source_universal_chain_id + remote_universal_chain_id + destination_universal_chain_id + sender_canonical + sender_display + sender_zkgm + receiver_canonical + receiver_display + receiver_zkgm + base_token + base_amount + quote_token + quote_amount + remote_base_token + remote_base_amount + remote_quote_token + remote_quote_amount + bond_send_timestamp + bond_send_transaction_hash + bond_recv_timestamp + bond_recv_transaction_hash + bond_timeout_timestamp + bond_timeout_transaction_hash + delivery_send_timestamp + delivery_send_transaction_hash + delivery_recv_timestamp + delivery_recv_transaction_hash + delivery_timeout_timestamp + delivery_timeout_transaction_hash + sort_order + source_chain { + chain_id + universal_chain_id + display_name + rpc_type + } + destination_chain { + chain_id + universal_chain_id + display_name + rpc_type + } + } } - } - `), - variables: { packet_hash: packetHash } - }) - - const bonds = result.v2_bonds as Array - - if (bonds.length === 0) { - return yield* Effect.fail(new Error("Bond not found")) - } - - return bonds[0] - }).pipe( + `), + variables: { packet_hash: packetHash } + }) + + const bonds = result.v2_bonds as Array + + if (bonds.length === 0) { + return yield* Effect.fail(new Error("Bond not found")) + } + + return bonds[0] + }), Effect.provide(Indexer.Indexer.Default), Effect.provide(QlpConfigProvider), - ) -}) - -const sourceChain = $derived( - pipe( - O.all([chains.data, bondData.current]), - O.flatMap(([chainsData, bond]) => - bond._tag === "Success" - ? getChain(chainsData, bond.value.source_universal_chain_id) - : O.none() - ) + Effect.runPromise ) ) -const destinationChain = $derived( - pipe( - O.all([chains.data, bondData.current]), - O.flatMap(([chainsData, bond]) => - bond._tag === "Success" - ? getChain(chainsData, bond.value.destination_universal_chain_id) - : O.none() - ) - ) -) - {#if O.isSome(bondData.current)} - {#if bondData.current.value._tag === "Success"} - {@const bond = bondData.current.value.value} - {@const status = bond.bond_success === true ? "success" : bond.bond_success === false ? "failure" : "pending"} + {#await bondData} +
+
+
+
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+
+
+ {:then bond} + {@const status = bond.bond_success === true ? "success" : bond.bond_success === false ? "failure" : "pending"}
-

Bond Transaction

+

Bond

@@ -114,11 +144,12 @@ const destinationChain = $derived(
- {#if O.isSome(sourceChain)} + + {#if bond.source_chain} {:else} @@ -166,8 +197,8 @@ const destinationChain = $derived(
- {#if O.isSome(sourceChain)} - + {#if bond.source_chain} + {:else}
{bond.source_universal_chain_id}
{/if} @@ -175,8 +206,8 @@ const destinationChain = $derived(
- {#if O.isSome(destinationChain)} - + {#if bond.destination_chain} + {:else}
{bond.destination_universal_chain_id}
{/if} @@ -209,36 +240,10 @@ const destinationChain = $derived(
- - {:else if bondData.current.value._tag === "Failure"} -
- -
- {/if} - {:else} + {:catch error}
-
-
-
-
- {#each Array(4) as _} -
-
-
-
- {/each} -
-
- {#each Array(4) as _} -
-
-
-
- {/each} -
-
-
+
- {/if} + {/await} diff --git a/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte index fbf4c51c3a..dd237d3bcc 100644 --- a/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte +++ b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte @@ -11,12 +11,12 @@ import Sections from "$lib/components/ui/Sections.svelte" import * as AppRuntime from "$lib/runtime" import { chains } from "$lib/stores/chains.svelte" import { Indexer } from "@unionlabs/sdk" -import { getChain, PacketHash } from "@unionlabs/sdk/schema" +import { PacketHash, TokenRawAmount } from "@unionlabs/sdk/schema" import { ConfigProvider, Effect, Layer, Option, pipe } from "effect" import * as O from "effect/Option" import { graphql } from "gql.tada" -const packetHash = PacketHash.make(page.params.packet_hash) +const packetHash = $derived(PacketHash.make(page.params.packet_hash)) // GraphQL config for development endpoint const QlpConfigProvider = Layer.setConfigProvider( @@ -27,11 +27,8 @@ const QlpConfigProvider = Layer.setConfigProvider( ), ) -const unbondData = AppRuntime.runPromiseExit$(() => { - void page.params.packet_hash - - return Effect.gen(function*() { - const currentPacketHash = PacketHash.make(page.params.packet_hash) +const unbondData = $derived(pipe( + Effect.gen(function*() { const indexer = yield* Indexer.Indexer const result = yield* indexer.fetch({ document: graphql(` @@ -39,18 +36,37 @@ const unbondData = AppRuntime.runPromiseExit$(() => { v2_unbonds(args: { p_packet_hash: $packet_hash }) { packet_hash success + packet_shape source_universal_chain_id destination_universal_chain_id + sender_canonical sender_display + sender_zkgm base_token base_amount unbond_send_timestamp unbond_send_transaction_hash + unbond_recv_timestamp + unbond_recv_transaction_hash + unbond_timeout_timestamp + unbond_timeout_transaction_hash sort_order + source_chain { + chain_id + universal_chain_id + display_name + rpc_type + } + destination_chain { + chain_id + universal_chain_id + display_name + rpc_type + } } } `), - variables: { packet_hash: currentPacketHash } + variables: { packet_hash: packetHash } }) const unbonds = result.v2_unbonds as Array @@ -60,44 +76,45 @@ const unbondData = AppRuntime.runPromiseExit$(() => { } return unbonds[0] - }).pipe( - Effect.provide(Indexer.Indexer.Default), - Effect.provide(QlpConfigProvider), - ) -}) - -const sourceChain = $derived( - pipe( - O.all([chains.data, unbondData.current]), - O.flatMap(([chainsData, unbond]) => - unbond._tag === "Success" - ? getChain(chainsData, unbond.value.source_universal_chain_id) - : O.none() - ) - ) -) + }), + Effect.provide(Indexer.Indexer.Default), + Effect.provide(QlpConfigProvider), + Effect.runPromise +)) -const destinationChain = $derived( - pipe( - O.all([chains.data, unbondData.current]), - O.flatMap(([chainsData, unbond]) => - unbond._tag === "Success" - ? getChain(chainsData, unbond.value.destination_universal_chain_id) - : O.none() - ) - ) -) - {#if O.isSome(unbondData.current)} - {#if unbondData.current.value._tag === "Success"} - {@const unbond = unbondData.current.value.value} - {@const status = unbond.success === true ? "success" : unbond.success === false ? "failure" : "pending"} + {#await unbondData} +
+
+
+
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+
+
+ {:then unbond} + {@const status = unbond.success === true ? "success" : unbond.success === false ? "failure" : "pending"}
-

Unbond Transaction

+

Unbond

@@ -111,11 +128,12 @@ const destinationChain = $derived(
- {#if O.isSome(sourceChain)} + + {#if unbond.source_chain} {:else} @@ -163,8 +181,8 @@ const destinationChain = $derived(
- {#if O.isSome(sourceChain)} - + {#if unbond.source_chain} + {:else}
{unbond.source_universal_chain_id}
{/if} @@ -172,8 +190,8 @@ const destinationChain = $derived(
- {#if O.isSome(destinationChain)} - + {#if unbond.destination_chain} + {:else}
{unbond.destination_universal_chain_id}
{/if} @@ -200,35 +218,10 @@ const destinationChain = $derived(
- {:else if unbondData.current.value._tag === "Failure"} -
- -
- {/if} - {:else} + {:catch error}
-
-
-
-
- {#each Array(4) as _} -
-
-
-
- {/each} -
-
- {#each Array(4) as _} -
-
-
-
- {/each} -
-
-
+
- {/if} + {/await} From 9920d761711a0f9a19cf7158b62c015abb63eb2f Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 12 Sep 2025 12:08:00 +0200 Subject: [PATCH 026/111] chore(app): fmt --- .../model/StakingListItemComponent.svelte | 40 +++++++++++-------- app2/src/lib/components/ui/Tabs.svelte | 11 ++--- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/app2/src/lib/components/model/StakingListItemComponent.svelte b/app2/src/lib/components/model/StakingListItemComponent.svelte index b32679bc28..828f076779 100644 --- a/app2/src/lib/components/model/StakingListItemComponent.svelte +++ b/app2/src/lib/components/model/StakingListItemComponent.svelte @@ -2,8 +2,8 @@ import { goto } from "$app/navigation" import TokenComponent from "$lib/components/model/TokenComponent.svelte" import { chains } from "$lib/stores/chains.svelte" -import type { Bond, Unbond } from "@unionlabs/sdk/schema/stake" import { getChain } from "@unionlabs/sdk/schema" +import type { Bond, Unbond } from "@unionlabs/sdk/schema/stake" import { Option, pipe } from "effect" import DateTimeComponent from "../ui/DateTimeComponent.svelte" import ChainComponent from "./ChainComponent.svelte" @@ -15,17 +15,22 @@ interface Props { const { item }: Props = $props() const sourceChain = $derived( - Option.flatMap(chains.data, chainsData => getChain(chainsData, item.source_chain.universal_chain_id)), + Option.flatMap( + chains.data, + chainsData => getChain(chainsData, item.source_chain.universal_chain_id), + ), ) const destinationChain = $derived( Option.flatMap( chains.data, - chainsData => getChain(chainsData, - item._tag === "Bond" - ? item.destination_chain.universal_chain_id - : item.destination_chain.universal_chain_id - ), + chainsData => + getChain( + chainsData, + item._tag === "Bond" + ? item.destination_chain.universal_chain_id + : item.destination_chain.universal_chain_id, + ), ), ) @@ -35,21 +40,21 @@ const handleClick = () => { } const status = $derived( - item._tag === "Bond" + item._tag === "Bond" ? item.status : pipe( - item.success, - Option.map(success => success ? "success" : "failure"), - Option.getOrElse(() => "pending"), - ) + item.success, + Option.map(success => success ? "success" : "failure"), + Option.getOrElse(() => "pending"), + ), ) const statusConfig = $derived( - status === "success" + status === "success" ? { bg: "bg-emerald-500/20 border-emerald-500/40", icon: "text-emerald-400", type: "checkmark" } - : status === "failure" - ? { bg: "bg-red-500/20 border-red-500/40", icon: "text-red-400", type: "warning" } - : { bg: "bg-orange-500/20 border-orange-500/40", icon: "text-orange-400", type: "spinner" } + : status === "failure" + ? { bg: "bg-red-500/20 border-red-500/40", icon: "text-red-400", type: "warning" } + : { bg: "bg-orange-500/20 border-orange-500/40", icon: "text-orange-400", type: "spinner" }, ) @@ -100,7 +105,8 @@ const statusConfig = $derived( />
{#if statusConfig.type === "spinner"} -
+
+
{:else if statusConfig.type === "checkmark"} { const activeIndex = items.findIndex(item => item.id === activeId) const activeElement = itemRefs[activeIndex] - + if (activeElement) { activeTabStyle = { width: activeElement.offsetWidth, @@ -48,7 +48,7 @@ $effect(() => { }) -
@@ -59,8 +59,9 @@ $effect(() => { style:height="{activeTabStyle.height}px" style:left="{activeTabStyle.left}px" style:top="{activeTabStyle.top}px" - >
- + > +
+ {#each items as item, index (item.id)}
diff --git a/app2/src/routes/explorer/bonds/[packet_hash]/+page.ts b/app2/src/routes/explorer/bonds/[packet_hash]/+page.ts new file mode 100644 index 0000000000..071420d39b --- /dev/null +++ b/app2/src/routes/explorer/bonds/[packet_hash]/+page.ts @@ -0,0 +1,20 @@ +import { redirect } from "@sveltejs/kit" +import { PacketHash } from "@unionlabs/sdk/schema" +import * as E from "effect/Either" +import * as S from "effect/Schema" +import type { PageLoad } from "./$types" + +export const prerender = false + +export const load: PageLoad = ({ params }) => { + const packetHash = S.decodeEither(PacketHash)(params.packet_hash) + + return E.match(packetHash, { + onLeft: () => { + throw redirect(302, "/stake") + }, + onRight: (packetHash) => ({ + packetHash, + }), + }) +} diff --git a/app2/src/routes/explorer/unbonds/[packet_hash]/+page.ts b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.ts new file mode 100644 index 0000000000..071420d39b --- /dev/null +++ b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.ts @@ -0,0 +1,20 @@ +import { redirect } from "@sveltejs/kit" +import { PacketHash } from "@unionlabs/sdk/schema" +import * as E from "effect/Either" +import * as S from "effect/Schema" +import type { PageLoad } from "./$types" + +export const prerender = false + +export const load: PageLoad = ({ params }) => { + const packetHash = S.decodeEither(PacketHash)(params.packet_hash) + + return E.match(packetHash, { + onLeft: () => { + throw redirect(302, "/stake") + }, + onRight: (packetHash) => ({ + packetHash, + }), + }) +} From 340f97a4f90f7eff3c5bf1581cd97df2d7fd619a Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 12 Sep 2025 12:36:04 +0200 Subject: [PATCH 028/111] fix(app): change nav --- app2/src/lib/components/layout/Sidebar/navigation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app2/src/lib/components/layout/Sidebar/navigation.ts b/app2/src/lib/components/layout/Sidebar/navigation.ts index 2b9d2cfbba..c8225d0ef5 100644 --- a/app2/src/lib/components/layout/Sidebar/navigation.ts +++ b/app2/src/lib/components/layout/Sidebar/navigation.ts @@ -105,7 +105,7 @@ export const navigation: Array = [ }, { items: [{ - path: "/liquid-staking", + path: "/stake", title: "Liquid Staking", icon: EscherLogo, }], From cb7e4c1512af1e7c084738a14559929734ce76eb Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 12 Sep 2025 13:13:46 +0200 Subject: [PATCH 029/111] fix(app): change to sepolia --- app2/src/lib/components/stake/UnbondComponent.svelte | 10 +++++----- app2/src/routes/stake/+page.svelte | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index b23c03d2d2..53551c95c6 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -50,9 +50,9 @@ import * as A from "effect/Array" import * as O from "effect/Option" import { graphql } from "gql.tada" import { bytesToHex, custom, encodeAbiParameters, fromHex, http, keccak256 } from "viem" -import { holesky } from "viem/chains" +import { sepolia } from "viem/chains" -const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") +const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.11155111") const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") const SOURCE_CHANNEL_ID = ChannelId.make(6) const DESTINATION_CHANNEL_ID = ChannelId.make(20) @@ -340,7 +340,7 @@ runPromiseExit$(() => unbondState = UnbondState.SwitchingChain() - const VIEM_CHAIN = holesky + const VIEM_CHAIN = sepolia const connectorClient = yield* getWagmiConnectorClient @@ -616,7 +616,7 @@ function handleRetry() { const isSafeWallet = getLastConnectedWalletId() === "safe" return isSafeWallet ? "Preparing Safe Transaction" - : "Switching to Holesky" + : "Switching to Sepolia" }), Match.when( UnbondState.$is("CheckingAllowance"), @@ -673,7 +673,7 @@ function handleRetry() { const isSafeWallet = getLastConnectedWalletId() === "safe" return isSafeWallet ? "Preparing transaction for Safe wallet..." - : "Please switch to Holesky network in your wallet" + : "Please switch to Sepolia network in your wallet" }), Match.when(UnbondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index e111fadbfc..ee7cc63bc5 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -31,7 +31,7 @@ import { onMount } from "svelte" type StakeTab = "bond" | "unbond" | "withdraw" type TableFilter = "all" | "bond" | "unbond" -const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.17000") +const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.11155111") const QlpConfigProvider = pipe( ConfigProvider.fromMap( From 1bc0c97dbbb73270c627f50401ed56af2df75de6 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 13 Sep 2025 10:46:48 +0200 Subject: [PATCH 030/111] fix(app): point to mainnet --- app2/src/lib/components/stake/BondComponent.svelte | 12 ++++++------ app2/src/lib/components/stake/UnbondComponent.svelte | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 2b15bcc016..ea18ff03d8 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -57,10 +57,10 @@ import * as O from "effect/Option" import { graphql } from "gql.tada" import { custom } from "viem" import { bytesToHex, encodeAbiParameters, fromHex, keccak256 } from "viem" -import { holesky } from "viem/chains" +import { mainnet } from "viem/chains" -const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") -const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") +const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.1") +const UNION_CHAIN_ID = UniversalChainId.make("union.union-1") const SOURCE_CHANNEL_ID = ChannelId.make(6) const DESTINATION_CHANNEL_ID = ChannelId.make(20) const UCS03_EVM = Ucs05.EvmDisplay.make({ @@ -448,7 +448,7 @@ runPromiseExit$(() => bondState = BondState.SwitchingChain() - const VIEM_CHAIN = holesky + const VIEM_CHAIN = mainnet const connectorClient = yield* getWagmiConnectorClient @@ -785,7 +785,7 @@ function handleRetry() { const isSafeWallet = getLastConnectedWalletId() === "safe" return isSafeWallet ? "Preparing Safe Transaction" - : "Switching to Holesky" + : "Switching to Sepolia" }), Match.when(BondState.$is("CheckingAllowance"), () => "Checking Token Allowance"), @@ -826,7 +826,7 @@ function handleRetry() { const isSafeWallet = getLastConnectedWalletId() === "safe" return isSafeWallet ? "Preparing transaction for Safe wallet..." - : "Please switch to Holesky network in your wallet" + : "Please switch to Sepolia network in your wallet" }), Match.when(BondState.$is("CheckingAllowance"), () => "Reading current token allowance from blockchain..."), diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index 53551c95c6..4f1f263dfc 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -50,10 +50,10 @@ import * as A from "effect/Array" import * as O from "effect/Option" import { graphql } from "gql.tada" import { bytesToHex, custom, encodeAbiParameters, fromHex, http, keccak256 } from "viem" -import { sepolia } from "viem/chains" +import { mainnet } from "viem/chains" -const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.11155111") -const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") +const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.1") +const UNION_CHAIN_ID = UniversalChainId.make("union.union-1") const SOURCE_CHANNEL_ID = ChannelId.make(6) const DESTINATION_CHANNEL_ID = ChannelId.make(20) const UCS03_EVM = Ucs05.EvmDisplay.make({ @@ -340,7 +340,7 @@ runPromiseExit$(() => unbondState = UnbondState.SwitchingChain() - const VIEM_CHAIN = sepolia + const VIEM_CHAIN = mainnet const connectorClient = yield* getWagmiConnectorClient From d1f2c6867c4f84c8a1b9d41d24cdf88a098808d3 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 13 Sep 2025 10:47:20 +0200 Subject: [PATCH 031/111] feat(app): incentive wip --- .../lib/components/stake/IncentiveCard.svelte | 145 ++++++++++++++++ app2/src/lib/services/incentive.ts | 160 ++++++++++++++++++ app2/src/routes/stake/+page.svelte | 143 ++++++++-------- 3 files changed, 371 insertions(+), 77 deletions(-) create mode 100644 app2/src/lib/components/stake/IncentiveCard.svelte create mode 100644 app2/src/lib/services/incentive.ts diff --git a/app2/src/lib/components/stake/IncentiveCard.svelte b/app2/src/lib/components/stake/IncentiveCard.svelte new file mode 100644 index 0000000000..1591c73cd7 --- /dev/null +++ b/app2/src/lib/components/stake/IncentiveCard.svelte @@ -0,0 +1,145 @@ + + +{#snippet renderIncentiveData(data: any)} +
+ +
+ selectedTab = id as "incentive" | "rewards"} + /> +
+ + +
+ {#if selectedTab === "incentive"} + +
+
+
+ {formatPercentage(data.rates.yearly)} +
+
Annual Compounded Rate
+
+
+ + +
+
+
+ {formatLargeNumber(data.totalSupply)} +
+
Total Supply
+
+
+
+ {formatLargeNumber(data.bondedTokens)} +
+
Bonded Tokens
+
+
+
+ {(data.bondedRatio * 100).toFixed(1)}% +
+
Bonded Ratio
+
+
+
+ {(data.inflation * 100).toFixed(1)}% +
+
Inflation Rate
+
+
+ {/if} +
+
+{/snippet} + +{#snippet renderLoading()} +
+ +
+
+
+
+
+
+ + +
+ +
+
+
+
+
+
+ + +
+ {#each Array(4) as _} +
+
+
+
+ {/each} +
+
+
+{/snippet} + +{#snippet renderError(error: any)} +
+
+
Failed to load incentive data
+
+ {error?.message || 'Unknown error occurred'} +
+
+
+{/snippet} + + + {@render matchRuntimeResult(incentives, { + onSuccess: renderIncentiveData, + onFailure: renderError, + onNone: renderLoading, + })} + diff --git a/app2/src/lib/services/incentive.ts b/app2/src/lib/services/incentive.ts new file mode 100644 index 0000000000..d5042eb974 --- /dev/null +++ b/app2/src/lib/services/incentive.ts @@ -0,0 +1,160 @@ +/** + * Incentive Service (WORK IN PROGRESS) + * + * Calculates staking incentives using: + * - Total supply from cosmos bank module + * - Inflation rate from cosmos mint module + * - Bonded token supply from staking pool + * - Community tax from distribution params + * + * Formula: Incentive = ((1 + [(inflation × total_supply ÷ bonded) × (1 − tax)] ÷ 365) ^ 365) − 1 + */ + +import { Data, Effect, Schema, pipe } from "effect" +import { HttpClient, HttpClientResponse } from "@effect/platform" + +const REST_BASE_URL = import.meta.env.DEV ? "/api/union" : "https://rest.union.build" + +export class IncentiveError extends Data.TaggedError("IncentiveError")<{ + message: string + cause?: unknown +}> {} + +const InflationResponse = Schema.Struct({ + inflation: Schema.String, +}) + +const StakingPoolResponse = Schema.Struct({ + pool: Schema.Struct({ + not_bonded_tokens: Schema.String, + bonded_tokens: Schema.String, + }), +}) + +const DistributionParamsResponse = Schema.Struct({ + params: Schema.Struct({ + community_tax: Schema.String, + base_proposer_reward: Schema.String, + bonus_proposer_reward: Schema.String, + withdraw_addr_enabled: Schema.Boolean, + }), +}) + +const CirculatingSupplyResponse = Schema.Struct({ + amount: Schema.Struct({ + denom: Schema.String, + amount: Schema.String, + }), +}) + +// Schema for the incentive calculation result +export const IncentiveResult = Schema.Struct({ + rates: Schema.Struct({ + yearly: Schema.Number, + }), + incentiveNominal: Schema.Number, + incentiveAfterTax: Schema.Number, + inflation: Schema.Number, + totalSupply: Schema.Number, + bondedTokens: Schema.Number, + communityTax: Schema.Number, + bondedRatio: Schema.Number, +}) + +export type IncentiveResult = Schema.Schema.Type + +const getInflation = pipe( + HttpClient.get(`${REST_BASE_URL}/cosmos/mint/v1beta1/inflation`), + Effect.flatMap(HttpClientResponse.schemaBodyJson(InflationResponse)), + Effect.mapError((cause) => new IncentiveError({ + message: "Failed to fetch inflation rate", + cause, + })), +) + +const getStakingPool = pipe( + HttpClient.get(`${REST_BASE_URL}/cosmos/staking/v1beta1/pool`), + Effect.flatMap(HttpClientResponse.schemaBodyJson(StakingPoolResponse)), + Effect.mapError((cause) => new IncentiveError({ + message: "Failed to fetch staking pool", + cause, + })), +) + +const getDistributionParams = pipe( + HttpClient.get(`${REST_BASE_URL}/cosmos/distribution/v1beta1/params`), + Effect.flatMap(HttpClientResponse.schemaBodyJson(DistributionParamsResponse)), + Effect.mapError((cause) => new IncentiveError({ + message: "Failed to fetch distribution params", + cause, + })), +) + +const getCirculatingSupply = pipe( + HttpClient.get(`${REST_BASE_URL}/cosmos/bank/v1beta1/supply/by_denom?denom=au`), + Effect.flatMap(HttpClientResponse.schemaBodyJson(CirculatingSupplyResponse)), + Effect.mapError((cause) => new IncentiveError({ + message: "Failed to fetch circulating supply", + cause, + })), +) + +export const calculateIncentive: Effect.Effect = Effect.gen(function*() { + const [inflationData, stakingPoolData, distributionData, circulatingSupplyData] = yield* Effect.all([ + getInflation, + getStakingPool, + getDistributionParams, + getCirculatingSupply, + ], { concurrency: "unbounded" }) + + const inflation = parseFloat(inflationData.inflation) + const bondedTokensRaw = parseFloat(stakingPoolData.pool.bonded_tokens) + const communityTax = parseFloat(distributionData.params.community_tax) + const circulatingSupplyRaw = parseFloat(circulatingSupplyData.amount.amount) + + const bondedTokens = bondedTokensRaw / 1_000_000_000_000_000_000 + const totalSupply = circulatingSupplyRaw / 1_000_000_000_000_000_000 + + if (isNaN(inflation) || isNaN(bondedTokens) || isNaN(totalSupply) || isNaN(communityTax)) { + return yield* Effect.fail(new IncentiveError({ + message: "Invalid numeric values in API responses", + })) + } + + if (totalSupply === 0) { + return yield* Effect.fail(new IncentiveError({ + message: "Invalid total supply", + })) + } + + if (bondedTokens === 0) { + return yield* Effect.fail(new IncentiveError({ + message: "No bonded tokens found", + })) + } + + // Step 1: Calculate nominal incentive rate + const incentiveNominal = (inflation * totalSupply) / bondedTokens + + // Step 2: Apply community tax + const incentiveAfterTax = incentiveNominal * (1 - communityTax) + + return { + rates: { + yearly: incentiveAfterTax, + }, + + incentiveNominal, + incentiveAfterTax, + inflation, + totalSupply, + bondedTokens, + communityTax, + bondedRatio: bondedTokens / totalSupply, + } +}) + +// Helper to format incentive as percentage +export const formatIncentive = (incentive: number): string => { + return `${(incentive * 100).toFixed(2)}%` +} diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index ee7cc63bc5..fbba7526d1 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -3,17 +3,20 @@ import ChainComponent from "$lib/components/model/ChainComponent.svelte" import StakingListItemComponent from "$lib/components/model/StakingListItemComponent.svelte" import NoWalletConnected from "$lib/components/NoWalletConnected.svelte" import BondComponent from "$lib/components/stake/BondComponent.svelte" +import IncentiveCard from "$lib/components/stake/IncentiveCard.svelte" import UnbondComponent from "$lib/components/stake/UnbondComponent.svelte" import Card from "$lib/components/ui/Card.svelte" import Sections from "$lib/components/ui/Sections.svelte" import Tabs from "$lib/components/ui/Tabs.svelte" import * as AppRuntime from "$lib/runtime" +import { calculateIncentive, formatIncentive } from "$lib/services/incentive" import { balancesStore as BalanceStore } from "$lib/stores/balances.svelte" import { chains as ChainStore } from "$lib/stores/chains.svelte" import { tokensStore as TokenStore } from "$lib/stores/tokens.svelte" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" import { cn } from "$lib/utils" import { matchOption, matchRuntimeResult } from "$lib/utils/snippets.svelte" +import { FetchHttpClient } from "@effect/platform" import { Staking, Ucs05 } from "@unionlabs/sdk" import { EU_ERC20, EU_LST, U_ERC20 } from "@unionlabs/sdk/Constants" import { Indexer } from "@unionlabs/sdk/Indexer" @@ -31,7 +34,7 @@ import { onMount } from "svelte" type StakeTab = "bond" | "unbond" | "withdraw" type TableFilter = "all" | "bond" | "unbond" -const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.11155111") +const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.1") const QlpConfigProvider = pipe( ConfigProvider.fromMap( @@ -107,6 +110,20 @@ const data = AppRuntime.runPromiseExit$(() => { ) }) +const incentives = AppRuntime.runPromiseExit$(() => { + return Effect.gen(function*() { + const incentive = yield* calculateIncentive + console.log("Incentive data loaded:", incentive) + return incentive + }).pipe( + Effect.provide(FetchHttpClient.layer), + Effect.catchAll((error) => { + console.error("Failed to load incentive data:", error) + return Effect.fail(error) + }), + ) +}) + const evmChain = $derived(pipe( ChainStore.data, O.flatMap(A.findFirst(x => x.universal_chain_id === EVM_UNIVERSAL_CHAIN_ID)), @@ -166,37 +183,6 @@ const eUOnEvmBalance = $derived(pipe( $inspect(data) -{#snippet renderChain(chain: Chain, denom: TokenRawDenom)} - -{/snippet} - -{#snippet renderStatus(bond: Bond | Unbond)} - {#if bond.status === "success"} - - success - - {/if} - {#if bond.status === "failure"} - - failure - - {/if} - {#if bond.status === "pending"} - - pending - - {/if} -{/snippet} - {#snippet maybeRenderBonds(maybeBonds: O.Option>)} {#snippet noBonds()}
@@ -321,54 +307,57 @@ $inspect(data)
{/snippet} -{#snippet noWallet()} - -{/snippet} - - - -
- selectedTab = id as StakeTab} - /> -
- - -
- {#if selectedTab === "bond"} - - {:else if selectedTab === "unbond"} - +
+ + + +
+ selectedTab = id as StakeTab} /> - {:else if selectedTab === "withdraw"} -
-
Withdrawal functionality
-
- Query withdrawable balance and implement withdrawal logic +
+ + +
+ {#if selectedTab === "bond"} + + {:else if selectedTab === "unbond"} + + {:else if selectedTab === "withdraw"} +
+
Withdrawal functionality
+
+ Query withdrawable balance and implement withdrawal logic +
-
- {/if} -
- + {/if} +
+
+ + + +
Date: Sat, 13 Sep 2025 10:47:31 +0200 Subject: [PATCH 032/111] fix(app): proxy --- app2/vite.config.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app2/vite.config.ts b/app2/vite.config.ts index f54bf13a13..b35d513606 100644 --- a/app2/vite.config.ts +++ b/app2/vite.config.ts @@ -10,7 +10,21 @@ export default defineConfig({ }, plugins: [sveltekit(), tailwindcss()], build: { sourcemap: true }, - server: { allowedHosts: true }, + server: { + allowedHosts: true, + proxy: { + "/api/union": { + target: "https://rest.union.build", + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api\/union/, ""), + configure: (proxy) => { + proxy.on("proxyReq", (proxyReq) => { + proxyReq.setHeader("origin", "https://rest.union.build") + }) + }, + }, + }, + }, test: { workspace: [ { From c9f6496e579e91ec439774a0cbe107d32aa3d114 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 13 Sep 2025 13:45:25 +0200 Subject: [PATCH 033/111] fix(app): change to sepolia and union testnet --- app2/src/lib/components/stake/BondComponent.svelte | 8 ++++---- app2/src/lib/components/stake/UnbondComponent.svelte | 8 ++++---- app2/src/routes/stake/+page.svelte | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index ea18ff03d8..7c09297aba 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -57,10 +57,10 @@ import * as O from "effect/Option" import { graphql } from "gql.tada" import { custom } from "viem" import { bytesToHex, encodeAbiParameters, fromHex, keccak256 } from "viem" -import { mainnet } from "viem/chains" +import { sepolia } from "viem/chains" -const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.1") -const UNION_CHAIN_ID = UniversalChainId.make("union.union-1") +const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.11155111") +const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") const SOURCE_CHANNEL_ID = ChannelId.make(6) const DESTINATION_CHANNEL_ID = ChannelId.make(20) const UCS03_EVM = Ucs05.EvmDisplay.make({ @@ -448,7 +448,7 @@ runPromiseExit$(() => bondState = BondState.SwitchingChain() - const VIEM_CHAIN = mainnet + const VIEM_CHAIN = sepolia const connectorClient = yield* getWagmiConnectorClient diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index 4f1f263dfc..53551c95c6 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -50,10 +50,10 @@ import * as A from "effect/Array" import * as O from "effect/Option" import { graphql } from "gql.tada" import { bytesToHex, custom, encodeAbiParameters, fromHex, http, keccak256 } from "viem" -import { mainnet } from "viem/chains" +import { sepolia } from "viem/chains" -const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.1") -const UNION_CHAIN_ID = UniversalChainId.make("union.union-1") +const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.11155111") +const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") const SOURCE_CHANNEL_ID = ChannelId.make(6) const DESTINATION_CHANNEL_ID = ChannelId.make(20) const UCS03_EVM = Ucs05.EvmDisplay.make({ @@ -340,7 +340,7 @@ runPromiseExit$(() => unbondState = UnbondState.SwitchingChain() - const VIEM_CHAIN = mainnet + const VIEM_CHAIN = sepolia const connectorClient = yield* getWagmiConnectorClient diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index fbba7526d1..bb0a7be7aa 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -34,7 +34,7 @@ import { onMount } from "svelte" type StakeTab = "bond" | "unbond" | "withdraw" type TableFilter = "all" | "bond" | "unbond" -const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.1") +const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.11155111") const QlpConfigProvider = pipe( ConfigProvider.fromMap( From 54ead79b2586aa80a7e035b5ba349245e4346c55 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 13 Sep 2025 14:19:22 +0200 Subject: [PATCH 034/111] fix(app): remove staker --- app2/src/lib/components/stake/UnbondComponent.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index 53551c95c6..a28706cfca 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -269,7 +269,6 @@ const executeUnbond = (sender: Ucs05.EvmDisplay, sendAmount: bigint) => const unbondCall = yield* pipe( { unbond: { - staker: receiver.address, amount: tokenOrder.quoteAmount, }, } as const, From 97a59fa027ca79c543dac6dc364bf55cef467c5b Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 13 Sep 2025 14:43:05 +0200 Subject: [PATCH 035/111] fix(app): channels --- app2/src/lib/components/stake/BondComponent.svelte | 4 ++-- app2/src/lib/components/stake/UnbondComponent.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 7c09297aba..7a5d61f150 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -61,8 +61,8 @@ import { sepolia } from "viem/chains" const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.11155111") const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") -const SOURCE_CHANNEL_ID = ChannelId.make(6) -const DESTINATION_CHANNEL_ID = ChannelId.make(20) +const SOURCE_CHANNEL_ID = ChannelId.make(3) +const DESTINATION_CHANNEL_ID = ChannelId.make(3) const UCS03_EVM = Ucs05.EvmDisplay.make({ address: "0x5fbe74a283f7954f10aa04c2edf55578811aeb03", }) diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index a28706cfca..86fad74640 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -54,8 +54,8 @@ import { sepolia } from "viem/chains" const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.11155111") const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") -const SOURCE_CHANNEL_ID = ChannelId.make(6) -const DESTINATION_CHANNEL_ID = ChannelId.make(20) +const SOURCE_CHANNEL_ID = ChannelId.make(3) +const DESTINATION_CHANNEL_ID = ChannelId.make(3) const UCS03_EVM = Ucs05.EvmDisplay.make({ address: "0x5fbe74a283f7954f10aa04c2edf55578811aeb03", }) From 92cb1c8660b44408b7a8787932903d91d274aa77 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 13 Sep 2025 18:09:27 +0200 Subject: [PATCH 036/111] fix(app): log incentive --- .../lib/components/stake/IncentiveCard.svelte | 20 ++-- app2/src/lib/services/incentive.ts | 91 +++++++++++-------- 2 files changed, 65 insertions(+), 46 deletions(-) diff --git a/app2/src/lib/components/stake/IncentiveCard.svelte b/app2/src/lib/components/stake/IncentiveCard.svelte index 1591c73cd7..41338dab12 100644 --- a/app2/src/lib/components/stake/IncentiveCard.svelte +++ b/app2/src/lib/components/stake/IncentiveCard.svelte @@ -1,10 +1,10 @@ {#if Option.isSome(chains.data)} @@ -104,13 +159,17 @@ const statusConfig = $derived( value={item._tag === "Bond" ? item.bond_send_timestamp : item.unbond_send_timestamp} showSeconds={false} /> -
- {#if statusConfig.type === "spinner"} +
+ {#if statusConfig().type === "spinner"}
- {:else if statusConfig.type === "checkmark"} + {:else if statusConfig().type === "time"} + + {statusConfig().text} + + {:else if statusConfig().type === "checkmark"} - {:else if statusConfig.type === "warning"} + {:else if statusConfig().type === "warning"} | undefined showIcon?: boolean showSymbol?: boolean + maxDecimals?: number | undefined } const { @@ -31,6 +32,7 @@ const { icon = Option.none(), showIcon = true, showSymbol = true, + maxDecimals = undefined, }: Props = $props() // Start the query when the component mounts @@ -71,10 +73,23 @@ const displayAmount = $derived( const whole = amt / decimal const fraction = amt % decimal - // Convert fraction to string and remove trailing zeros - const fractionStr = fraction === 0n - ? "" - : `.${fraction.toString().padStart(info.decimals, "0").replace(/0+$/, "")}` + // Convert fraction to string and apply decimal limiting + let fractionStr = "" + if (fraction !== 0n) { + let fractionPart = fraction.toString().padStart(info.decimals, "0") + + // Apply maxDecimals if specified + if (maxDecimals !== undefined && maxDecimals >= 0) { + fractionPart = fractionPart.substring(0, maxDecimals) + } + + // Remove trailing zeros + fractionPart = fractionPart.replace(/0+$/, "") + + if (fractionPart.length > 0) { + fractionStr = `.${fractionPart}` + } + } return Option.some(`${whole}${fractionStr}`) }, diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 7e80bed589..5cf074a191 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -1,8 +1,9 @@
+
{ pipe( BigDecimal.fromBigInt(amount), @@ -630,69 +624,41 @@ function handleRetry() {
- - {@render matchOption(uOnEvmBalance, renderBalance, renderBalanceSkeleton)} + + {#if O.isNone(WalletStore.evmAddress)} +
+ {:else if O.isSome(evmChain) && O.isSome(uOnEvmToken) && O.isSome(uOnEvmBalance)} + + {:else} + {@render renderBalanceSkeleton()} + {/if}
- { - const { inputType, data, currentTarget } = event - const { value } = currentTarget - const proposed = value + (data ?? "") - - const maxDecimals = pipe( - uOnEvmToken, - O.map(Struct.get("representations")), - O.flatMap(A.head), - O.map(Struct.get("decimals")), - O.getOrElse(() => 18), - ) - - const validShape = /^\d*[.,]?\d*$/.test(proposed) - const validDecimalsDot = !proposed.includes(".") - || proposed.split(".")[1].length <= maxDecimals - const validDecimalsComma = !proposed.includes(",") - || proposed.split(",")[1].length <= maxDecimals - const isDelete = inputType.startsWith("delete") - const validDecimals = validDecimalsComma && validDecimalsDot - const noDuplicateLeadingZeroes = !proposed.startsWith("00") - - const allow = isDelete - || (validDecimals && validShape && noDuplicateLeadingZeroes) - - if (!allow) { - event.preventDefault() - } - }} - autocapitalize="none" - pattern="^[0-9]*[.,]?[0-9]*$" - value={bondInput} - class="h-14 text-center text-lg" - oninput={(event) => { - bondInput = event.currentTarget.value - }} + disabled={O.isNone(uOnEvmBalance)} + token={uOnEvmToken} + balance={uOnEvmBalance} + bind:humanValue={bondInput} + bind:weiValue={bondAmount} /> - {bondAmount}
- -
+
{#if O.isSome(stakingRates.current) && stakingRates.current.value._tag === "Success"}
Purchase rate: - + { pipe( stakingRates.current.value.value.purchase_rate, @@ -701,199 +667,259 @@ function handleRetry() { }
-
- Mint amount: -
- - - + +
+
+ Slippage tolerance: +
+ + + +
+
+ +
+ You'll receive: +
+ {#if O.isSome(evmChain) && O.isSome(eUOnEvmToken) && O.isSome(minimumReceiveAmount)} + { + const bd = minimumReceiveAmount.value + const result = BigDecimal.multiply(bd, BigDecimal.make(10n ** 18n, 0)) + const normalized = BigDecimal.normalize(result) + return normalized.scale >= 0 + ? normalized.value / (10n ** BigInt(normalized.scale)) + : normalized.value * (10n ** BigInt(-normalized.scale)) + })())} + showWrapping={false} + showSymbol={true} + showIcon={true} + maxDecimals={4} + /> + {:else} + + { + pipe( + minimumReceiveAmount, + O.map(bd => Utils.formatBigDecimal(bd)), + O.getOrElse(() => "0"), + ) + } eU + + {/if} +
-
-
- Min you'll receive: - - { - pipe( - minimumReceiveAmount, - O.map(bd => Utils.formatBigDecimal(bd)), - O.getOrElse(() => "0"), - ) - } eU -
{:else}
- Loading rates... -
+ Purchase rate: +
+
+ +
+
+ Slippage tolerance: +
+
+
+
+
+
+ +
+ You'll receive: +
+
{/if}
- - {#if !BondState.$is("Ready")(bondState)} -
-
-
- {#if isBonding} -
-
- {:else if isSuccess} - - - - {:else if isError} - - - - {/if} -
-
-
- { - Match.value(bondState).pipe( - Match.when(BondState.$is("SwitchingChain"), () => { - const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet - ? "Preparing Safe Transaction" - : "Switching to Sepolia" - }), - Match.when(BondState.$is("CheckingAllowance"), () => - "Checking Token Allowance"), - Match.when(BondState.$is("ApprovingAllowance"), () => - "Approving Token Spending"), - Match.when(BondState.$is("AllowanceSubmitted"), () => - "Allowance Submitted"), - Match.when(BondState.$is("WaitingForAllowanceConfirmation"), () => - "Allowance Confirming"), - Match.when(BondState.$is("AllowanceApproved"), () => - "Allowance Approved"), - Match.when(BondState.$is("CreatingTokenOrder"), () => - "Creating Token Order"), - Match.when(BondState.$is("PreparingBondTransaction"), () => - "Preparing Bond Transaction"), - Match.when(BondState.$is("ConfirmingBond"), () => - "Confirming Bond"), - Match.when(BondState.$is("BondSubmitted"), () => - "Bond Submitted"), - Match.when(BondState.$is("WaitingForConfirmation"), () => - "Transaction Confirming"), - Match.when(BondState.$is("WaitingForIndexer"), () => - "Indexing Transaction"), - Match.when(BondState.$is("Success"), () => - "Bond Successful"), - Match.when(BondState.$is("Error"), () => - "Bond Failed"), - Match.when(BondState.$is("Ready"), () => - "Ready"), - Match.exhaustive, - ) - } -
-
- { - Match.value(bondState).pipe( - Match.when(BondState.$is("SwitchingChain"), () => { - const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet - ? "Preparing transaction for Safe wallet..." - : "Please switch to Sepolia network in your wallet" - }), - Match.when(BondState.$is("CheckingAllowance"), () => - "Reading current token allowance from blockchain..."), - Match.when(BondState.$is("ApprovingAllowance"), () => - "Confirm token approval transaction in your wallet"), - Match.when(BondState.$is("AllowanceSubmitted"), ({ txHash }) => - `Allowance transaction submitted: ${txHash.slice(0, 10)}...`), - Match.when( - BondState.$is("WaitingForAllowanceConfirmation"), - ({ txHash }) => - `Waiting for allowance confirmation: ${txHash.slice(0, 10)}...`, - ), - Match.when(BondState.$is("AllowanceApproved"), () => - "Token spending approved, proceeding..."), - Match.when(BondState.$is("CreatingTokenOrder"), () => - "Building cross-chain token order..."), - Match.when(BondState.$is("PreparingBondTransaction"), () => - "Preparing bond transaction with contracts..."), - Match.when(BondState.$is("ConfirmingBond"), () => - "Confirm bond transaction in your wallet"), - Match.when(BondState.$is("BondSubmitted"), ({ txHash }) => - `Transaction submitted: ${txHash.slice(0, 10)}...`), - Match.when(BondState.$is("WaitingForConfirmation"), ({ txHash }) => - `Waiting for confirmation: ${txHash.slice(0, 10)}...`), - Match.when(BondState.$is("WaitingForIndexer"), ({ txHash }) => - `Transaction confirmed, indexing data...`), - Match.when(BondState.$is("Success"), ({ txHash }) => - `Success! TX: ${txHash.slice(0, 10)}...`), - Match.when(BondState.$is("Error"), ({ message }) => - message), - Match.when(BondState.$is("Ready"), () => - ""), - Match.exhaustive, - ) - } +
+
+
+ {#if BondState.$is("Ready")(bondState)} + + + + {:else if isBonding} +
+ {:else if isSuccess} + + + + {:else if isError} + + + + {/if} +
+
+
+ { + Match.value(bondState).pipe( + Match.when(BondState.$is("Ready"), () => + O.isNone(WalletStore.evmAddress) + ? "Connect your wallet to start staking" + : bondInput + ? `Ready to stake ${bondInput} U` + : "Enter amount to stake U tokens"), + Match.when(BondState.$is("SwitchingChain"), () => { + const isSafeWallet = getLastConnectedWalletId() === "safe" + return isSafeWallet + ? "Preparing Safe Transaction" + : "Switching to mainnet" + }), + Match.when(BondState.$is("CheckingAllowance"), () => + "Checking Token Allowance"), + Match.when(BondState.$is("ApprovingAllowance"), () => + `Approving ${bondInput || "0"} U`), + Match.when(BondState.$is("AllowanceSubmitted"), () => + `Approval submitted`), + Match.when(BondState.$is("WaitingForAllowanceConfirmation"), () => + `Confirming submission`), + Match.when(BondState.$is("AllowanceApproved"), () => + `Approved ${bondInput || "0"} U`), + Match.when(BondState.$is("CreatingTokenOrder"), () => + `Creating order`), + Match.when(BondState.$is("PreparingBondTransaction"), () => + `Preparing bond`), + Match.when(BondState.$is("ConfirmingBond"), () => + `Confirm bond`), + Match.when(BondState.$is("BondSubmitted"), () => + `Bond successfully submitted`), + Match.when(BondState.$is("WaitingForConfirmation"), () => + `Confirming submission`), + Match.when(BondState.$is("WaitingForIndexer"), () => + `Indexing submission`), + Match.when(BondState.$is("Success"), () => + `Bond submitted`), + Match.when(BondState.$is("Error"), () => + "Bond Failed"), + Match.exhaustive, + ) + } +
+
+ { + Match.value(bondState).pipe( + Match.when(BondState.$is("Ready"), () => + O.isNone(WalletStore.evmAddress) + ? "Connect wallet to see balance and start staking" + : bondInput + ? "Click stake button to begin transaction" + : "Enter the amount of U tokens you want to stake"), + Match.when(BondState.$is("SwitchingChain"), () => { + const isSafeWallet = getLastConnectedWalletId() === "safe" + return isSafeWallet + ? "Preparing transaction for Safe wallet..." + : "Please switch to mainnet in your wallet" + }), + Match.when(BondState.$is("CheckingAllowance"), () => + "Reading current token allowance from blockchain..."), + Match.when(BondState.$is("ApprovingAllowance"), () => + "Confirm token approval transaction in your wallet"), + Match.when(BondState.$is("AllowanceSubmitted"), ({ txHash }) => + `Allowance transaction submitted: ${txHash.slice(0, 10)}...`), + Match.when( + BondState.$is("WaitingForAllowanceConfirmation"), + ({ txHash }) => + `Waiting for allowance confirmation: ${txHash.slice(0, 10)}...`, + ), + Match.when(BondState.$is("AllowanceApproved"), () => + "Token spending approved, proceeding..."), + Match.when(BondState.$is("CreatingTokenOrder"), () => + "Building cross-chain token order..."), + Match.when(BondState.$is("PreparingBondTransaction"), () => + "Preparing bond transaction with contracts..."), + Match.when(BondState.$is("ConfirmingBond"), () => + "Confirm bond transaction in your wallet"), + Match.when(BondState.$is("BondSubmitted"), ({ txHash }) => + `Transaction submitted: ${txHash.slice(0, 10)}...`), + Match.when(BondState.$is("WaitingForConfirmation"), ({ txHash }) => + `Waiting for confirmation: ${txHash.slice(0, 10)}...`), + Match.when(BondState.$is("WaitingForIndexer"), ({ txHash }) => + `Transaction confirmed, indexing data...`), + Match.when(BondState.$is("Success"), ({ txHash }) => + `Success! TX: ${txHash.slice(0, 10)}...`), + Match.when(BondState.$is("Error"), ({ message }) => + message), + Match.exhaustive, + ) + }
- {/if} +
+
+ {currentPage}/{totalPages} +
+ +
+ {/if} +
+
+ +
+ {#if hasData} + {#each paginatedBonds as item} + + {/each} + {:else} + {#each Array(5) as _} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/each} + +
+
+ {#if !walletConnected} +
+ Connect wallet to view history +
+
+ Your staking transactions will appear here +
+ {:else} +
+ No { + tableFilter === "all" + ? "transactions" + : tableFilter === "bond" + ? "stake transactions" + : "unstake transactions" + } yet +
+
+ Your staking history will appear here +
+ {/if} +
+
+ {/if} +
+
+{/snippet} + +{#snippet renderSkeleton()} +
+ + + + + + + + + + + + + {#each Array(10) as _} + + + + + + + {/each} + +
arrowTypeChain + Timestamp + AmountStatus
+
+
+
+{/snippet} + +{#snippet renderError(error: any)} +
{JSON.stringify(error, null, 2)}
+{/snippet} + + + {#if walletConnected} + {@render matchRuntimeResult(data, { + onSuccess: renderBondsTable, + onFailure: renderError, + onNone: renderSkeleton, + })} + {:else} + {@render renderBondsTable(O.none())} + {/if} + \ No newline at end of file diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index cef367a34f..3f9b9a5f99 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -1,8 +1,9 @@ + +
+ +
+ { + humanValue = event.currentTarget.value + }} + /> + {#if O.isSome(balance)} + + {/if} +
+
diff --git a/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte b/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte index b4d81d29b0..29172dbeb9 100644 --- a/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte +++ b/app2/src/routes/explorer/bonds/[packet_hash]/+page.svelte @@ -127,7 +127,7 @@ const bondData = $derived(pipe(
{:then bond} - {@const status = bond.bond_success === true ? "success" : bond.bond_success === false ? "failure" : "pending"} + {@const overallStatus = bond.bond_success && bond.delivery_success ? "success" : (bond.bond_success === false || bond.delivery_success === false) ? "failure" : "pending"}

Bond

@@ -163,13 +163,43 @@ const bondData = $derived(pipe(
- {status} + {overallStatus} + +
+
+ +
+ +
+ + {bond.bond_success === true ? "success" : bond.bond_success === false ? "failure" : "pending"} + +
+
+ +
+ +
+ + {bond.delivery_success === true ? "success" : bond.delivery_success === false ? "failure" : "pending"}
diff --git a/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte index dd237d3bcc..bc2eeed966 100644 --- a/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte +++ b/app2/src/routes/explorer/unbonds/[packet_hash]/+page.svelte @@ -157,6 +157,36 @@ const unbondData = $derived(pipe(
+ + + {#if unbond.unbond_send_timestamp && status === 'pending'} + {@const sendTime = new Date(unbond.unbond_send_timestamp)} + {@const now = new Date()} + {@const unbondPeriodMs = 27 * 24 * 60 * 60 * 1000} + {@const elapsedMs = now.getTime() - sendTime.getTime()} + {@const progressPercent = Math.min(100, Math.max(0, (elapsedMs / unbondPeriodMs) * 100))} + {@const remainingMs = Math.max(0, unbondPeriodMs - elapsedMs)} + {@const remainingDays = Math.floor(remainingMs / (24 * 60 * 60 * 1000))} + {@const remainingHours = Math.floor((remainingMs % (24 * 60 * 60 * 1000)) / (60 * 60 * 1000))} + +
+ +
+
+ + {remainingDays > 0 ? `${remainingDays}d ${remainingHours}h remaining ±4h` : remainingHours > 0 ? `${remainingHours}h remaining ±4h` : 'Almost ready ±4h'} + + {progressPercent.toFixed(1)}% +
+
+
+
+
+
+ {/if}
diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index fbba7526d1..7a311005cd 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -1,34 +1,30 @@ -{#snippet maybeRenderBonds(maybeBonds: O.Option>)} - {#snippet noBonds()} -
- No { - tableFilter === "all" - ? "bonds" - : tableFilter === "bond" - ? "stake transactions" - : "unstake transactions" - } yet -
- {/snippet} - {#snippet hasBonds(bonds: A.NonEmptyReadonlyArray)} - {@const filteredBonds = bonds.filter(bond => - tableFilter === "all" - || (tableFilter === "bond" && bond._tag === "Bond") - || (tableFilter === "unbond" && bond._tag === "Unbond") - )} - {@const totalItems = filteredBonds.length} - {@const totalPages = Math.ceil(totalItems / itemsPerPage)} - {@const startIndex = (currentPage - 1) * itemsPerPage} - {@const endIndex = startIndex + itemsPerPage} - {@const paginatedBonds = filteredBonds.slice(startIndex, endIndex)} - - -
-
- tableFilter = id as TableFilter} - /> - - - {#if totalPages > 1} -
- -
- {currentPage}/{totalPages} + + -
- -
- {#each paginatedBonds as item} - - {:else} -
No transactions found
- {/each} -
- {/snippet} - - {@render matchOption(maybeBonds, hasBonds, noBonds)} -{/snippet} - -{#snippet renderSkeleton()} -
- - - - - - - - - - - - - {#each Array(10) as _} - - - - - - - {/each} - -
arrowTypeChain - Timestamp - AmountStatus
-
-
-
-{/snippet} + -{#snippet renderError(error: any)} -
{JSON.stringify(error, null, 2)}
-{/snippet} + +
+
eU balance
+
+ {#if O.isNone(WalletStore.evmAddress)} +
+ {:else if O.isSome(evmChain) && O.isSome(eUOnEvmToken) && O.isSome(eUOnEvmBalance)} +
+ +
+ {:else} +
+
+
+
+ {/if} +
+
+
-{#snippet whenWallet()} -
- -
-
- {@render matchRuntimeResult(data.current, { - onSuccess: maybeRenderBonds, - onFailure: renderError, - onNone: renderSkeleton, - })} -
-
+ +
+
APY
+
+ {#if O.isSome(incentives.current) + && incentives.current.value._tag === "Success"} +
+ {(incentives.current.value.value.rates.yearly * 100).toFixed(2)}% +
+ {:else} +
+ {/if} +
+
+
-{/snippet} - -
- - - -
+ +
selectedTab = id as StakeTab} />
- -
+
{#if selectedTab === "bond"} {:else if selectedTab === "unbond"} @@ -355,21 +287,16 @@ $inspect(data)
- - +
- - - {#if O.isSome(WalletStore.evmAddress)} - {@render whenWallet()} - {:else} -
- wallet disconnected - connect to view history -
- {/if} -
+ From 48cba92a4e7ae9969d6f48b1a312753e5be44458 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 20 Sep 2025 01:29:38 +0200 Subject: [PATCH 060/111] feat(app): open wallet and cleaner match --- .../lib/components/stake/BondComponent.svelte | 33 ++++++++++++------- .../components/stake/UnbondComponent.svelte | 33 ++++++++++++------- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 5cf074a191..7777525682 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -7,6 +7,7 @@ import UInput from "$lib/components/ui/UInput.svelte" import { runPromiseExit$ } from "$lib/runtime" import { getWagmiConnectorClient } from "$lib/services/evm/clients" import { switchChain } from "$lib/services/transfer-ucs03-evm/chain" +import { uiStore } from "$lib/stores/ui.svelte" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" import { safeOpts } from "$lib/transfer/shared/services/handlers/safe" import { cn } from "$lib/utils" @@ -593,16 +594,24 @@ runPromiseExit$(() => : Effect.void ) -function handleBondSubmit() { - if (isBonding) { - return - } - bondState = BondState.Ready() - shouldBond = true -} - -function handleRetry() { - bondState = BondState.Ready() +function handleButtonClick() { + if (isBonding) return + + Match.value({ isError, isSuccess, hasWallet: O.isSome(WalletStore.evmAddress) }).pipe( + Match.when({ isError: true }, () => { + bondState = BondState.Ready() + }), + Match.when({ isSuccess: true }, () => { + bondState = BondState.Ready() + }), + Match.when({ hasWallet: false }, () => { + uiStore.openWalletModal() + }), + Match.orElse(() => { + bondState = BondState.Ready() + shouldBond = true + }) + ) } @@ -918,8 +927,8 @@ function handleRetry() { + {/if} +
+ +
+ {#each userBatches as batch} + + {/each} +
+
+ {/if} + +
+
+
+ {#if isReady} + + + + {:else if isLoading} +
+
+ {:else if isSuccess} + + + + {:else if isError} + + + + {/if} +
+
+
+ { + Match.value(withdrawalState).pipe( + Match.when(WithdrawalState.$is("Ready"), () => { + if (O.isNone(WalletStore.evmAddress)) return "Connect your wallet to view withdrawals" + if (userBatches.length === 0) return "No tokens available for withdrawal" + if (selectedBatches.length === 0) return "Select which batches to withdraw from" + + const totalFormatted = pipe( + selectedAmount, + BigDecimal.unsafeDivide(BigDecimal.make(10n ** 18n, 0)), + Utils.formatBigDecimal, + ) + + return `Withdraw ${totalFormatted} U` + }), + Match.when(WithdrawalState.$is("Loading"), () => "Processing withdrawal..."), + Match.when(WithdrawalState.$is("Success"), ({ message }) => message), + Match.when(WithdrawalState.$is("Error"), () => "Withdrawal failed"), + Match.exhaustive, + ) + } +
+
+ { + Match.value(withdrawalState).pipe( + Match.when(WithdrawalState.$is("Ready"), () => { + if (O.isNone(WalletStore.evmAddress)) { + return "Connect wallet to see your withdrawable batches" + } + if (userBatches.length === 0) { + return "Unstaked tokens will appear here after the 27-day unbonding period" + } + if (selectedBatches.length === 0) { + return "Select which batches to withdraw from" + } + + return selectedBatches.length > 1 + ? `From ${selectedBatches.length} selected batches` + : "From 1 selected batch" + }), + Match.when(WithdrawalState.$is("Loading"), () => "Please wait while we process your withdrawal..."), + Match.when(WithdrawalState.$is("Success"), () => "Withdrawal completed successfully"), + Match.when(WithdrawalState.$is("Error"), ({ message }) => message), + Match.exhaustive, + ) + } +
+
+
+
+ +
+ +
+
\ No newline at end of file diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index 8e6ae494b9..0682d22645 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -5,6 +5,7 @@ import BondComponent from "$lib/components/stake/BondComponent.svelte" import IncentiveCard from "$lib/components/stake/IncentiveCard.svelte" import StakingHistoryCard from "$lib/components/stake/StakingHistoryCard.svelte" import UnbondComponent from "$lib/components/stake/UnbondComponent.svelte" +import WithdrawalComponent from "$lib/components/stake/WithdrawalComponent.svelte" import Card from "$lib/components/ui/Card.svelte" import Sections from "$lib/components/ui/Sections.svelte" import Tabs from "$lib/components/ui/Tabs.svelte" @@ -14,7 +15,6 @@ import { balancesStore as BalanceStore } from "$lib/stores/balances.svelte" import { chains as ChainStore } from "$lib/stores/chains.svelte" import { tokensStore as TokenStore } from "$lib/stores/tokens.svelte" import { wallets as WalletStore } from "$lib/stores/wallets.svelte" -import { matchOption, matchRuntimeResult } from "$lib/utils/snippets.svelte" import { FetchHttpClient } from "@effect/platform" import { Staking, Ucs05, Utils } from "@unionlabs/sdk" import { EU_ERC20, EU_LST, U_ERC20 } from "@unionlabs/sdk/Constants" @@ -30,7 +30,7 @@ import { onMount } from "svelte" type StakeTab = "bond" | "unbond" | "withdraw" type TableFilter = "all" | "bond" | "unbond" -const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.1") +const EVM_UNIVERSAL_CHAIN_ID = UniversalChainId.make("ethereum.11155111") const QlpConfigProvider = pipe( ConfigProvider.fromMap( @@ -258,6 +258,7 @@ $inspect(data) items={[ { id: "bond", label: "Stake" }, { id: "unbond", label: "Unstake" }, + { id: "withdraw", label: "Withdraw" }, ]} activeId={selectedTab} onTabChange={(id) => selectedTab = id as StakeTab} @@ -283,12 +284,11 @@ $inspect(data) onUnbondSuccess={refreshBondData} /> {:else if selectedTab === "withdraw"} -
-
Withdrawal functionality
-
- Query withdrawable balance and implement withdrawal logic -
-
+ {/if}
From e7fe720540462aead69318bf9fa5e1721076af9c Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 23 Sep 2025 13:10:50 +0200 Subject: [PATCH 069/111] chore(app): remove old file --- app2/src/lib/stake/bond.ts | 258 ------------------------------------- 1 file changed, 258 deletions(-) delete mode 100644 app2/src/lib/stake/bond.ts diff --git a/app2/src/lib/stake/bond.ts b/app2/src/lib/stake/bond.ts deleted file mode 100644 index c2752298f3..0000000000 --- a/app2/src/lib/stake/bond.ts +++ /dev/null @@ -1,258 +0,0 @@ -import { - Batch, - Call, - Token, - TokenOrder, - Ucs03, - Ucs05, - Utils, - ZkgmClient, - ZkgmClientRequest, - ZkgmIncomingMessage, -} from "@unionlabs/sdk" -import { Cosmos } from "@unionlabs/sdk-cosmos" -import { Evm, EvmZkgmClient } from "@unionlabs/sdk-evm" -import { ChainRegistry } from "@unionlabs/sdk/ChainRegistry" -import { - EU_ERC20, - EU_LST, - EU_SOLVER_ON_UNION_METADATA, - EU_STAKING_HUB, - ON_ZKGM_CALL_PROXY, - U_BANK, - U_ERC20, - U_SOLVER_ON_UNION_METADATA, -} from "@unionlabs/sdk/Constants" -import { UniversalChainId } from "@unionlabs/sdk/schema/chain" -import { ChannelId } from "@unionlabs/sdk/schema/channel" -import { HexFromJson } from "@unionlabs/sdk/schema/hex" -import { Effect, Logger, pipe, Schema, Stream } from "effect" -import { http } from "viem" -import { privateKeyToAccount } from "viem/accounts" -import { holesky } from "viem/chains" - -const JsonFromBase64 = Schema.compose( - Schema.StringFromBase64, - Schema.parseJson(), -) - -const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.17000") -const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") -const SOURCE_CHANNEL_ID = ChannelId.make(6) -const UCS03_EVM = Ucs05.EvmDisplay.make({ - address: "0x5fbe74a283f7954f10aa04c2edf55578811aeb03", -}) -const UCS03_MINTER_ON_UNION = Ucs05.CosmosDisplay.make({ - address: "union1t5awl707x54k6yyx7qfkuqp890dss2pqgwxh07cu44x5lrlvt4rs8hqmk0", -}) -const UCS03_ZKGM = Ucs05.CosmosDisplay.make({ - address: "union1336jj8ertl8h7rdvnz4dh5rqahd09cy0x43guhsxx6xyrztx292qpe64fh", -}) -const SEND_AMOUNT = (10n ** 18n) * 1_000n -const MIN_MINT_AMOUNT = 999999999000000000000n -const VIEM_CHAIN = holesky -const RPC_URL = "https://rpc.17000.ethereum.chain.kitchen" -const SENDER = Ucs05.EvmDisplay.make({ - address: "0x2C96e52fCE14BAa13868CA8182f8A7903e4e76E0", -}) - -export const querySlippage = pipe( - Cosmos.queryContract( - EU_STAKING_HUB, - { - accounting_state: {}, - }, - ), - Effect.flatMap(Schema.decodeUnknown(Schema.Struct({ - total_bonded_native_tokens: Schema.BigInt, - total_issued_lst: Schema.BigInt, - total_reward_amount: Schema.BigInt, - redemption_rate: Schema.BigDecimal, - purchase_rate: Schema.BigDecimal, - }))), - Effect.provide(Cosmos.Client.Live("https://rpc.union-testnet-10.union.chain.kitchen")), -) - -export const sendBond = Effect.fn(function*(options: { - sender: Ucs05.EvmDisplay - baseAmount: bigint - quoteAmount: bigint -}) { - const { - sender, - baseAmount, - quoteAmount, - } = options - const ethereumChain = yield* ChainRegistry.byUniversalId(ETHEREUM_CHAIN_ID) - const unionChain = yield* ChainRegistry.byUniversalId(UNION_CHAIN_ID) - - const tokenOrder = yield* TokenOrder.make({ - source: ethereumChain, - destination: unionChain, - sender, - receiver: ON_ZKGM_CALL_PROXY, - baseToken: U_ERC20, - baseAmount, - quoteToken: U_BANK, - quoteAmount, - kind: "solve", - metadata: U_SOLVER_ON_UNION_METADATA, - version: 2, - }) - - const bondCall = yield* pipe( - { - bond: { - mint_to_address: ON_ZKGM_CALL_PROXY.address, - min_mint_amount: MIN_MINT_AMOUNT, - }, - } as const, - Schema.encode(JsonFromBase64), - Effect.map((msg) => ({ - contract: EU_STAKING_HUB.address, - msg, - funds: [{ - denom: tokenOrder.quoteToken.address, - amount: tokenOrder.quoteAmount, - }], - call_action: "call_on_proxy_call", - } as const)), - Effect.flatMap(Schema.decode(HexFromJson)), - Effect.map((contractCalldata) => - Call.make({ - sender, - eureka: false, - contractAddress: ON_ZKGM_CALL_PROXY, - contractCalldata, - }) - ), - ) - - const increaseAllowanceCall = yield* pipe( - { - increase_allowance: { - spender: UCS03_MINTER_ON_UNION.address, - amount: MIN_MINT_AMOUNT, - }, - } as const, - Schema.encode(JsonFromBase64), - Effect.map((msg) => ({ - contract: EU_LST.address, - msg, - funds: [], - call_action: "direct", - } as const)), - Effect.flatMap(Schema.decode(HexFromJson)), - Effect.map((contractCalldata) => - Call.make({ - sender, - eureka: false, - contractAddress: ON_ZKGM_CALL_PROXY, - contractCalldata, - }) - ), - ) - - const salt = yield* Utils.generateSalt("cosmos") - const timeout_timestamp = Utils.getTimeoutInNanoseconds24HoursFromNow() - - const sendCall = yield* pipe( - TokenOrder.make({ - source: unionChain, - destination: ethereumChain, - sender: Ucs05.CosmosDisplay.make({ - address: "union1ylfrhs2y5zdj2394m6fxgpzrjav7le3z07jffq", // NOTE: foundation for refunds - }), - receiver: sender, - baseToken: Token.Cw20.make({ address: EU_LST.address }), - baseAmount, - quoteToken: EU_ERC20, - quoteAmount, - kind: "solve", - metadata: EU_SOLVER_ON_UNION_METADATA, - version: 2, - }), - Effect.flatMap(TokenOrder.encodeV2), - Effect.flatMap(Schema.encode(Ucs03.Ucs03WithInstructionFromHex)), - Effect.tap((instr) => Effect.log("instruction:", instr)), - Effect.map((instruction) => ({ - send: { - channel_id: 20, - timeout_height: 0n, - timeout_timestamp, - salt, - instruction, - }, - } as const)), - Effect.flatMap(Schema.encode(JsonFromBase64)), - Effect.map((msg) => ({ - contract: UCS03_ZKGM.address, - msg, - funds: [], - call_action: "direct", - } as const)), - Effect.flatMap(Schema.decode(HexFromJson)), - Effect.map((contractCalldata) => - Call.make({ - sender: SENDER, - eureka: false, - contractAddress: ON_ZKGM_CALL_PROXY, - contractCalldata, - }) - ), - ) - - const batch = Batch.make([ - tokenOrder, - bondCall, - increaseAllowanceCall, - sendCall, - ]) - - console.log("batch", JSON.stringify(batch, null, 2)) - - const request = ZkgmClientRequest.make({ - source: ethereumChain, - destination: unionChain, - channelId: SOURCE_CHANNEL_ID, - ucs03Address: UCS03_EVM.address, - instruction: batch, - }) - - const client = yield* ZkgmClient.ZkgmClient - const execute = client.execute(request) - - return pipe( - Stream.fromEffect(execute), - Stream.flatMap((response) => - response.waitFor( - ZkgmIncomingMessage.LifecycleEvent.$is("EvmTransactionReceiptComplete"), - ) - ), - ) -}) -// }).pipe( -// Effect.provide(EvmZkgmClient.layerWithoutWallet), -// Effect.provide(Evm.WalletClient.Live({ -// account: VIEM_ACCOUNT, -// chain: VIEM_CHAIN, -// transport: http(RPC_URL), -// })), -// Effect.provide(Evm.PublicClient.Live({ -// chain: VIEM_CHAIN, -// transport: http(RPC_URL), -// })), -// Effect.provide(ChainRegistry.Default), -// Effect.provide(Logger.replace( -// Logger.defaultLogger, -// Logger.prettyLogger({ -// stderr: true, -// colors: true, -// mode: "tty", -// }), -// )), -// ) - -// Effect.runPromise(sendBond) -// .then(console.log) -// .catch(console.error) From a3e7d3fd0b04500692692b8ac794289c1a441c91 Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 23 Sep 2025 15:28:49 +0200 Subject: [PATCH 070/111] chore(app): update schema --- app2/src/generated/graphql-env.d.ts | 6 +- app2/src/generated/schema.graphql | 99 +++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 1 deletion(-) diff --git a/app2/src/generated/graphql-env.d.ts b/app2/src/generated/graphql-env.d.ts index 0e1c35ab48..856eb0c4e8 100644 --- a/app2/src/generated/graphql-env.d.ts +++ b/app2/src/generated/graphql-env.d.ts @@ -12,7 +12,7 @@ export type introspection_types = { 'LatencyPercentiles': { kind: 'OBJECT'; name: 'LatencyPercentiles'; fields: { 'median': { name: 'median'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; } }; 'p5': { name: 'p5'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; } }; 'p95': { name: 'p95'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; } }; }; }; 'NaiveDate': unknown; 'OrderBy': { name: 'OrderBy'; enumValues: 'asc' | 'asc_nulls_first' | 'asc_nulls_last' | 'desc' | 'desc_nulls_first' | 'desc_nulls_last'; }; - 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'dashboard_balance_current': { name: 'dashboard_balance_current'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_balance_current_type'; ofType: null; }; }; }; } }; 'dashboard_transfer_count_by_chain': { name: 'dashboard_transfer_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_count_by_chain_type'; ofType: null; }; }; }; } }; 'dashboard_transfer_days_count_by_chain': { name: 'dashboard_transfer_days_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_days_by_chain_type'; ofType: null; }; }; }; } }; 'v2_chains': { name: 'v2_chains'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; }; }; } }; 'v2_channels': { name: 'v2_channels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_channel_type'; ofType: null; }; }; }; } }; 'v2_clients': { name: 'v2_clients'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_client_type'; ofType: null; }; }; }; } }; 'v2_connections': { name: 'v2_connections'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_connection_type'; ofType: null; }; }; }; } }; 'v2_errors': { name: 'v2_errors'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_error_type'; ofType: null; }; }; }; } }; 'v2_health_check': { name: 'v2_health_check'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_health_check_type'; ofType: null; }; }; }; } }; 'v2_instructions': { name: 'v2_instructions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_instruction_type'; ofType: null; }; }; }; } }; 'v2_packets': { name: 'v2_packets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_packet_type'; ofType: null; }; }; }; } }; 'v2_stats_count': { name: 'v2_stats_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_type'; ofType: null; }; }; }; } }; 'v2_stats_latency': { name: 'v2_stats_latency'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_latency_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_chain': { name: 'v2_stats_packets_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_packets_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_daily_count': { name: 'v2_stats_packets_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_chain': { name: 'v2_stats_transfers_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_transfers_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_daily_count': { name: 'v2_stats_transfers_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_tokens': { name: 'v2_tokens'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; }; }; }; } }; 'v2_transfers': { name: 'v2_transfers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_transfer_type'; ofType: null; }; }; }; } }; 'v2_util_get_address_types_for_display_address': { name: 'v2_util_get_address_types_for_display_address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_address_types_for_display_address_type'; ofType: null; }; }; }; } }; 'v2_util_get_transfer_request_details': { name: 'v2_util_get_transfer_request_details'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_transfer_request_details_type'; ofType: null; }; }; }; } }; }; }; + 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'dashboard_balance_current': { name: 'dashboard_balance_current'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_balance_current_type'; ofType: null; }; }; }; } }; 'dashboard_transfer_count_by_chain': { name: 'dashboard_transfer_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_count_by_chain_type'; ofType: null; }; }; }; } }; 'dashboard_transfer_days_count_by_chain': { name: 'dashboard_transfer_days_count_by_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'dashboard_days_by_chain_type'; ofType: null; }; }; }; } }; 'v2_bonds': { name: 'v2_bonds'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_bond_type'; ofType: null; }; }; }; } }; 'v2_chains': { name: 'v2_chains'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; }; }; } }; 'v2_channels': { name: 'v2_channels'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_channel_type'; ofType: null; }; }; }; } }; 'v2_clients': { name: 'v2_clients'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_client_type'; ofType: null; }; }; }; } }; 'v2_connections': { name: 'v2_connections'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_connection_type'; ofType: null; }; }; }; } }; 'v2_errors': { name: 'v2_errors'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_error_type'; ofType: null; }; }; }; } }; 'v2_health_check': { name: 'v2_health_check'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_health_check_type'; ofType: null; }; }; }; } }; 'v2_instructions': { name: 'v2_instructions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_instruction_type'; ofType: null; }; }; }; } }; 'v2_packets': { name: 'v2_packets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_packet_type'; ofType: null; }; }; }; } }; 'v2_stats_count': { name: 'v2_stats_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_type'; ofType: null; }; }; }; } }; 'v2_stats_latency': { name: 'v2_stats_latency'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_latency_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_chain': { name: 'v2_stats_packets_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_packets_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_packets_daily_count': { name: 'v2_stats_packets_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_chain': { name: 'v2_stats_transfers_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_transfers_chain_type'; ofType: null; }; }; }; } }; 'v2_stats_transfers_daily_count': { name: 'v2_stats_transfers_daily_count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_stats_daily_count_type'; ofType: null; }; }; }; } }; 'v2_tokens': { name: 'v2_tokens'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; }; }; }; } }; 'v2_transfers': { name: 'v2_transfers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_transfer_type'; ofType: null; }; }; }; } }; 'v2_unbonds': { name: 'v2_unbonds'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_unbond_type'; ofType: null; }; }; }; } }; 'v2_util_get_address_types_for_display_address': { name: 'v2_util_get_address_types_for_display_address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_address_types_for_display_address_type'; ofType: null; }; }; }; } }; 'v2_util_get_transfer_request_details': { name: 'v2_util_get_transfer_request_details'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_util_get_transfer_request_details_type'; ofType: null; }; }; }; } }; }; }; 'String': unknown; 'String_comparison_exp': { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; isOneOf: false; inputFields: [{ name: '_eq'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; 'dashboard_balance_current_args': { kind: 'INPUT_OBJECT'; name: 'dashboard_balance_current_args'; isOneOf: false; inputFields: [{ name: 'p_contract_address_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_phase'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_wallet_addresses_canonical'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }]; }; @@ -24,6 +24,8 @@ export type introspection_types = { 'dashboard_days_by_chain_type': { kind: 'OBJECT'; name: 'dashboard_days_by_chain_type'; fields: { 'day_count': { name: 'day_count'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; 'dashboard_days_by_chain_type_order_by': { kind: 'INPUT_OBJECT'; name: 'dashboard_days_by_chain_type_order_by'; isOneOf: false; inputFields: [{ name: 'universal_chain_id'; type: { kind: 'ENUM'; name: 'OrderBy'; ofType: null; }; defaultValue: "null" }]; }; 'jsonb': unknown; + 'v2_bond_type': { kind: 'OBJECT'; name: 'v2_bond_type'; fields: { 'base_amount': { name: 'base_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token': { name: 'base_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_meta': { name: 'base_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'bond_recv_timestamp': { name: 'bond_recv_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'bond_recv_transaction_hash': { name: 'bond_recv_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'bond_send_timestamp': { name: 'bond_send_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'bond_send_transaction_hash': { name: 'bond_send_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'bond_success': { name: 'bond_success'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'bond_timeout_timestamp': { name: 'bond_timeout_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'bond_timeout_transaction_hash': { name: 'bond_timeout_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'bond_traces': { name: 'bond_traces'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_traces_type'; ofType: null; }; }; }; } }; 'delivery_packet_hash': { name: 'delivery_packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'delivery_recv_timestamp': { name: 'delivery_recv_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'delivery_recv_transaction_hash': { name: 'delivery_recv_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'delivery_send_timestamp': { name: 'delivery_send_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'delivery_send_transaction_hash': { name: 'delivery_send_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'delivery_success': { name: 'delivery_success'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'delivery_timeout_timestamp': { name: 'delivery_timeout_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'delivery_timeout_transaction_hash': { name: 'delivery_timeout_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'delivery_traces': { name: 'delivery_traces'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_traces_type'; ofType: null; }; }; }; } }; 'destination_chain': { name: 'destination_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_hash': { name: 'packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_shape': { name: 'packet_shape'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_amount': { name: 'quote_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_token': { name: 'quote_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_token_meta': { name: 'quote_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'receiver_canonical': { name: 'receiver_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'receiver_display': { name: 'receiver_display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'receiver_zkgm': { name: 'receiver_zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'remote_base_amount': { name: 'remote_base_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'remote_base_token': { name: 'remote_base_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'remote_base_token_meta': { name: 'remote_base_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'remote_quote_amount': { name: 'remote_quote_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'remote_quote_token': { name: 'remote_quote_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'remote_quote_token_meta': { name: 'remote_quote_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'remote_universal_chain_id': { name: 'remote_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_canonical': { name: 'sender_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_display': { name: 'sender_display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_zkgm': { name: 'sender_zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_chain': { name: 'source_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'v2_bonds_args': { kind: 'INPUT_OBJECT'; name: 'v2_bonds_args'; isOneOf: false; inputFields: [{ name: 'p_addresses_canonical'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: 'p_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_comparison'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ComparisonOp'; ofType: null; }; }; defaultValue: "lt" }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_network'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; 'v2_chain_edition': { kind: 'OBJECT'; name: 'v2_chain_edition'; fields: { 'environment': { name: 'environment'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; 'v2_chain_features': { kind: 'OBJECT'; name: 'v2_chain_features'; fields: { 'channel_list': { name: 'channel_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'connection_list': { name: 'connection_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'environment': { name: 'environment'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'index_status': { name: 'index_status'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'packet_list': { name: 'packet_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'transfer_list': { name: 'transfer_list'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'transfer_submission': { name: 'transfer_submission'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; }; }; 'v2_chain_features_bool_exp': { kind: 'INPUT_OBJECT'; name: 'v2_chain_features_bool_exp'; isOneOf: false; inputFields: [{ name: 'environment'; type: { kind: 'INPUT_OBJECT'; name: 'String_comparison_exp'; ofType: null; }; defaultValue: "null" }]; }; @@ -68,6 +70,8 @@ export type introspection_types = { 'v2_traces_type': { kind: 'OBJECT'; name: 'v2_traces_type'; fields: { 'block_hash': { name: 'block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'chain': { name: 'chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; } }; 'event_index': { name: 'event_index'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'height': { name: 'height'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'transaction_hash': { name: 'transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'type': { name: 'type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'universal_chain_id': { name: 'universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; 'v2_transfer_type': { kind: 'OBJECT'; name: 'v2_transfer_type'; fields: { 'base_amount': { name: 'base_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token': { name: 'base_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_decimals': { name: 'base_token_decimals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'base_token_meta': { name: 'base_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'base_token_name': { name: 'base_token_name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_path': { name: 'base_token_path'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_symbol': { name: 'base_token_symbol'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'destination_chain': { name: 'destination_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'fee_amount': { name: 'fee_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'fee_token': { name: 'fee_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'fee_token_meta': { name: 'fee_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'fee_type': { name: 'fee_type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_hash': { name: 'packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_shape': { name: 'packet_shape'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_amount': { name: 'quote_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_token': { name: 'quote_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'quote_token_meta': { name: 'quote_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'receiver_canonical': { name: 'receiver_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'receiver_display': { name: 'receiver_display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'receiver_zkgm': { name: 'receiver_zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_canonical': { name: 'sender_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_display': { name: 'sender_display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_zkgm': { name: 'sender_zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_chain': { name: 'source_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'success': { name: 'success'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'traces': { name: 'traces'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_traces_type'; ofType: null; }; }; }; } }; 'transfer_index': { name: 'transfer_index'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'transfer_recv_timestamp': { name: 'transfer_recv_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'transfer_recv_transaction_hash': { name: 'transfer_recv_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'transfer_send_timestamp': { name: 'transfer_send_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'transfer_send_transaction_hash': { name: 'transfer_send_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'transfer_timeout_timestamp': { name: 'transfer_timeout_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'transfer_timeout_transaction_hash': { name: 'transfer_timeout_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'wrap_direction': { name: 'wrap_direction'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; 'v2_transfers_args': { kind: 'INPUT_OBJECT'; name: 'v2_transfers_args'; isOneOf: false; inputFields: [{ name: 'p_addresses_canonical'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: 'p_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_comparison'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ComparisonOp'; ofType: null; }; }; defaultValue: "lt" }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_network'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_transfer_index'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; + 'v2_unbond_type': { kind: 'OBJECT'; name: 'v2_unbond_type'; fields: { 'base_amount': { name: 'base_amount'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token': { name: 'base_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'base_token_meta': { name: 'base_token_meta'; type: { kind: 'OBJECT'; name: 'v2_token_meta'; ofType: null; } }; 'batch': { name: 'batch'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'destination_chain': { name: 'destination_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; } }; 'destination_universal_chain_id': { name: 'destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_hash': { name: 'packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'packet_shape': { name: 'packet_shape'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_canonical': { name: 'sender_canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_display': { name: 'sender_display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sender_zkgm': { name: 'sender_zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'sort_order': { name: 'sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'source_chain': { name: 'source_chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_chain_type'; ofType: null; }; } }; 'source_universal_chain_id': { name: 'source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'success': { name: 'success'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'traces': { name: 'traces'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'v2_traces_type'; ofType: null; }; }; }; } }; 'unbond_recv_timestamp': { name: 'unbond_recv_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'unbond_recv_transaction_hash': { name: 'unbond_recv_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'unbond_send_timestamp': { name: 'unbond_send_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'unbond_send_transaction_hash': { name: 'unbond_send_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'unbond_timeout_timestamp': { name: 'unbond_timeout_timestamp'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'unbond_timeout_transaction_hash': { name: 'unbond_timeout_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'v2_unbonds_args': { kind: 'INPUT_OBJECT'; name: 'v2_unbonds_args'; isOneOf: false; inputFields: [{ name: 'p_addresses_canonical'; type: { kind: 'SCALAR'; name: 'jsonb'; ofType: null; }; defaultValue: null }, { name: 'p_block_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_comparison'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ComparisonOp'; ofType: null; }; }; defaultValue: "lt" }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_limit'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'p_network'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_packet_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_sort_order'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_transaction_hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; 'v2_util_get_address_types_for_display_address_args': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_address_types_for_display_address_args'; isOneOf: false; inputFields: [{ name: 'p_display_address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_chain_type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; 'v2_util_get_address_types_for_display_address_type': { kind: 'OBJECT'; name: 'v2_util_get_address_types_for_display_address_type'; fields: { 'canonical': { name: 'canonical'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'display': { name: 'display'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'zkgm': { name: 'zkgm'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; 'v2_util_get_transfer_request_details_args': { kind: 'INPUT_OBJECT'; name: 'v2_util_get_transfer_request_details_args'; isOneOf: false; inputFields: [{ name: 'p_source_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_destination_universal_chain_id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'p_base_token'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; diff --git a/app2/src/generated/schema.graphql b/app2/src/generated/schema.graphql index 9853af007f..407f50a565 100644 --- a/app2/src/generated/schema.graphql +++ b/app2/src/generated/schema.graphql @@ -56,6 +56,7 @@ enum OrderBy { } type Query { + v2_bonds(args: v2_bonds_args! = {p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}): [v2_bond_type!]! v2_chains(args: v2_chains_args! = {p_comparison: lt, p_limit: null, p_sort_order: null, p_universal_chain_id: null}): [v2_chain_type!]! v2_channels(args: v2_channels_args! = {p_comparison: lt, p_destination_channel_id: null, p_destination_client_id: null, p_destination_connection_id: null, p_destination_port_id: null, p_destination_universal_chain_id: null, p_limit: null, p_recommended: null, p_sort_order: null, p_source_channel_id: null, p_source_client_id: null, p_source_connection_id: null, p_source_port_id: null, p_source_universal_chain_id: null, p_tags: null, p_version: null}): [v2_channel_type!]! v2_clients(args: v2_clients_args! = {p_client_id: null, p_comparison: lt, p_counterparty_universal_chain_id: null, p_limit: null, p_sort_order: null, p_universal_chain_id: null}): [v2_client_type!]! @@ -66,6 +67,7 @@ type Query { v2_packets(args: v2_packets_args! = {p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_exceeding_sla: null, p_limit: null, p_network: null, p_packet_hash: null, p_packet_send_timestamp: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}): [v2_packet_type!]! v2_transfers(args: v2_transfers_args! = {p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null, p_transfer_index: null}): [v2_transfer_type!]! v2_tokens(args: v2_tokens_args! = {p_denom: null, p_universal_chain_id: null, p_whitelist: null}, order_by: v2_token_meta_order_by = null): [v2_token_meta!]! + v2_unbonds(args: v2_unbonds_args! = {p_addresses_canonical: null, p_block_hash: null, p_comparison: lt, p_destination_universal_chain_id: null, p_limit: null, p_network: null, p_packet_hash: null, p_sort_order: null, p_source_universal_chain_id: null, p_transaction_hash: null}): [v2_unbond_type!]! v2_util_get_transfer_request_details(args: v2_util_get_transfer_request_details_args! = {p_source_universal_chain_id: null, p_destination_universal_chain_id: null, p_base_token: null}): [v2_util_get_transfer_request_details_type!]! v2_util_get_address_types_for_display_address(args: v2_util_get_address_types_for_display_address_args! = {p_display_address: null, p_chain_type: null}): [v2_util_get_address_types_for_display_address_type!]! v2_stats_count: [v2_stats_type!]! @@ -133,6 +135,65 @@ input dashboard_days_by_chain_type_order_by { """Scalar implementation for GraphQL""" scalar jsonb +type v2_bond_type { + packet_hash: String + bond_success: Boolean + delivery_success: Boolean + packet_shape: String + source_universal_chain_id: String + remote_universal_chain_id: String + destination_universal_chain_id: String + sender_canonical: String + sender_display: String + sender_zkgm: String + receiver_canonical: String + receiver_display: String + receiver_zkgm: String + base_token: String + base_amount: String + quote_token: String + quote_amount: String + remote_base_token: String + remote_base_amount: String + remote_quote_token: String + remote_quote_amount: String + bond_send_timestamp: DateTime + bond_send_transaction_hash: String + bond_recv_timestamp: DateTime + bond_recv_transaction_hash: String + bond_timeout_timestamp: DateTime + bond_timeout_transaction_hash: String + delivery_packet_hash: String + delivery_send_timestamp: DateTime + delivery_send_transaction_hash: String + delivery_recv_timestamp: DateTime + delivery_recv_transaction_hash: String + delivery_timeout_timestamp: DateTime + delivery_timeout_transaction_hash: String + sort_order: String + source_chain: v2_chain_type! + destination_chain: v2_chain_type! + bond_traces: [v2_traces_type!]! + delivery_traces: [v2_traces_type!]! + base_token_meta: v2_token_meta + quote_token_meta: v2_token_meta + remote_base_token_meta: v2_token_meta + remote_quote_token_meta: v2_token_meta +} + +input v2_bonds_args { + p_addresses_canonical: jsonb + p_block_hash: String + p_comparison: ComparisonOp! = lt + p_destination_universal_chain_id: String + p_limit: Int + p_network: String + p_packet_hash: String + p_sort_order: String + p_source_universal_chain_id: String + p_transaction_hash: String +} + type v2_chain_edition { name: String environment: String @@ -641,6 +702,44 @@ input v2_transfers_args { p_transfer_index: Int } +type v2_unbond_type { + packet_hash: String + success: Boolean + packet_shape: String + source_universal_chain_id: String + destination_universal_chain_id: String + sender_canonical: String + sender_display: String + sender_zkgm: String + base_token: String + base_amount: String + batch: String + unbond_send_timestamp: DateTime + unbond_send_transaction_hash: String + unbond_recv_timestamp: DateTime + unbond_recv_transaction_hash: String + unbond_timeout_timestamp: DateTime + unbond_timeout_transaction_hash: String + sort_order: String + source_chain: v2_chain_type! + destination_chain: v2_chain_type! + traces: [v2_traces_type!]! + base_token_meta: v2_token_meta +} + +input v2_unbonds_args { + p_addresses_canonical: jsonb + p_block_hash: String + p_comparison: ComparisonOp! = lt + p_destination_universal_chain_id: String + p_limit: Int + p_network: String + p_packet_hash: String + p_sort_order: String + p_source_universal_chain_id: String + p_transaction_hash: String +} + input v2_util_get_address_types_for_display_address_args { p_display_address: String p_chain_type: String From 2f59a0885f4bfa509b972d19b34bde1d8dd74733 Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 24 Sep 2025 00:54:29 +0200 Subject: [PATCH 071/111] feat(app): clean up wip --- .../lib/components/stake/BalanceCard.svelte | 80 ++ .../lib/components/stake/BondComponent.svelte | 529 +++++-------- .../lib/components/stake/IncentiveCard.svelte | 299 -------- .../stake/QuickAmountButtons.svelte | 69 ++ .../stake/StakingHistoryCard.svelte | 17 +- .../components/stake/StakingStatsGrid.svelte | 98 +++ app2/src/lib/components/stake/StatCard.svelte | 106 +++ .../lib/components/stake/StatusDisplay.svelte | 284 +++++++ .../components/stake/TokenBalanceRow.svelte | 85 +++ .../components/stake/UnbondComponent.svelte | 406 ++++------ .../stake/WithdrawalComponent.svelte | 694 +++++++----------- app2/src/lib/components/ui/Tabs.svelte | 2 +- app2/src/lib/components/ui/UInput.svelte | 2 +- app2/src/lib/stake/config.ts | 29 + app2/src/lib/stake/instantiate2.ts | 2 +- app2/src/lib/stake/schemas.ts | 59 ++ app2/src/routes/stake/+page.svelte | 201 ++--- typescript-sdk/src/generated/graphql-env.d.ts | 6 +- 18 files changed, 1549 insertions(+), 1419 deletions(-) create mode 100644 app2/src/lib/components/stake/BalanceCard.svelte delete mode 100644 app2/src/lib/components/stake/IncentiveCard.svelte create mode 100644 app2/src/lib/components/stake/QuickAmountButtons.svelte create mode 100644 app2/src/lib/components/stake/StakingStatsGrid.svelte create mode 100644 app2/src/lib/components/stake/StatCard.svelte create mode 100644 app2/src/lib/components/stake/StatusDisplay.svelte create mode 100644 app2/src/lib/components/stake/TokenBalanceRow.svelte create mode 100644 app2/src/lib/stake/config.ts create mode 100644 app2/src/lib/stake/schemas.ts diff --git a/app2/src/lib/components/stake/BalanceCard.svelte b/app2/src/lib/components/stake/BalanceCard.svelte new file mode 100644 index 0000000000..77817166be --- /dev/null +++ b/app2/src/lib/components/stake/BalanceCard.svelte @@ -0,0 +1,80 @@ + + + +
+ selectedTab = id as BalanceTab} + /> +
+ +
+ {#if selectedTab === "balances"} +
+ + + + + + + + +
+ {:else} +
+ Rewards coming soon... +
+ {/if} +
+
diff --git a/app2/src/lib/components/stake/BondComponent.svelte b/app2/src/lib/components/stake/BondComponent.svelte index 218f66a659..32ad2c69ff 100644 --- a/app2/src/lib/components/stake/BondComponent.svelte +++ b/app2/src/lib/components/stake/BondComponent.svelte @@ -1,19 +1,27 @@ @@ -562,95 +553,104 @@ function handleButtonClick() { {/snippet}
-
- - {#if O.isNone(WalletStore.evmAddress)} -
- {:else if O.isSome(evmChain) && O.isSome(uOnEvmToken) && O.isSome(uOnEvmBalance)} - +
+
+ +
+ Balance: + {#if O.isNone(WalletStore.evmAddress)} + + {:else if O.isSome(evmChain) && O.isSome(uOnEvmToken) && O.isSome(uOnEvmBalance)} + + {:else} + + {/if} +
+
+ +
+ - {:else} - {@render renderBalanceSkeleton()} - {/if} -
-
- + +
+ { + bondInput = amount + bondAmount = O.some(wei) + }} + /> +
+
-
- {#if O.isSome(stakingRates.current) && stakingRates.current.value._tag === "Success"} -
- Purchase rate: - - { + +
+ {#if O.isSome(stakingRates.current) && Exit.isSuccess(stakingRates.current.value)} + +
+ Exchange Rate + + 1 U = { pipe( stakingRates.current.value.value.purchase_rate, + BigDecimal.round({ mode: "from-zero", scale: 6 }), Utils.formatBigDecimal, ) - } + } eU
+
- Slippage tolerance: -
- - - + Slippage +
+ {#each [0.5, 1, 2] as value} + + {/each}
- -
- You'll receive: -
- {#if O.isSome(evmChain) && O.isSome(eUOnEvmToken) && O.isSome(minimumReceiveAmount)} +
+ + +
+
+ You'll Receive +
+ {#if O.isSome(evmChain) && O.isSome(eUOnEvmToken) + && O.isSome(minimumReceiveAmount)}
{:else} -
- Purchase rate: -
+ +
+ Exchange Rate +
- + +
- Slippage tolerance: -
-
-
-
+ Slippage +
+ + +
- -
- You'll receive: -
-
- {/if} -
-
-
-
- {#if BondState.$is("Ready")(bondState)} - - - - {:else if isBonding} -
-
- {:else if isSuccess} - - - - {:else if isError} - - - - {/if} -
-
-
- { - Match.value(bondState).pipe( - Match.when(BondState.$is("Ready"), () => - O.isNone(WalletStore.evmAddress) - ? "Connect your wallet to start staking" - : bondInput - ? `Ready to stake ${bondInput} U` - : "Enter amount to stake U tokens"), - Match.when(BondState.$is("SwitchingChain"), () => { - const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet - ? "Preparing Safe Transaction" - : "Switching to mainnet" - }), - Match.when(BondState.$is("CheckingAllowance"), () => - "Checking Token Allowance"), - Match.when(BondState.$is("ApprovingAllowance"), () => - `Approving ${bondInput || "0"} U`), - Match.when(BondState.$is("AllowanceSubmitted"), () => - `Approval submitted`), - Match.when(BondState.$is("WaitingForAllowanceConfirmation"), () => - `Confirming submission`), - Match.when(BondState.$is("AllowanceApproved"), () => - `Approved ${bondInput || "0"} U`), - Match.when(BondState.$is("CreatingTokenOrder"), () => - `Creating order`), - Match.when(BondState.$is("PreparingBondTransaction"), () => - `Preparing bond`), - Match.when(BondState.$is("ConfirmingBond"), () => - `Confirm bond`), - Match.when(BondState.$is("BondSubmitted"), () => - `Bond successfully submitted`), - Match.when(BondState.$is("WaitingForConfirmation"), () => - `Confirming submission`), - Match.when(BondState.$is("WaitingForIndexer"), () => - `Indexing submission`), - Match.when(BondState.$is("Success"), () => - `Bond submitted`), - Match.when(BondState.$is("Error"), () => - "Bond Failed"), - Match.exhaustive, - ) - } -
-
- { - Match.value(bondState).pipe( - Match.when(BondState.$is("Ready"), () => - O.isNone(WalletStore.evmAddress) - ? "Connect wallet to see balance and start staking" - : bondInput - ? "Click stake button to begin transaction" - : "Enter the amount of U tokens you want to stake"), - Match.when(BondState.$is("SwitchingChain"), () => { - const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet - ? "Preparing transaction for Safe wallet..." - : "Please switch to mainnet in your wallet" - }), - Match.when(BondState.$is("CheckingAllowance"), () => - "Reading current token allowance from blockchain..."), - Match.when(BondState.$is("ApprovingAllowance"), () => - "Confirm token approval transaction in your wallet"), - Match.when(BondState.$is("AllowanceSubmitted"), ({ txHash }) => - `Allowance transaction submitted: ${txHash.slice(0, 10)}...`), - Match.when( - BondState.$is("WaitingForAllowanceConfirmation"), - ({ txHash }) => - `Waiting for allowance confirmation: ${txHash.slice(0, 10)}...`, - ), - Match.when(BondState.$is("AllowanceApproved"), () => - "Token spending approved, proceeding..."), - Match.when(BondState.$is("CreatingTokenOrder"), () => - "Building cross-chain token order..."), - Match.when(BondState.$is("PreparingBondTransaction"), () => - "Preparing bond transaction with contracts..."), - Match.when(BondState.$is("ConfirmingBond"), () => - "Confirm bond transaction in your wallet"), - Match.when(BondState.$is("BondSubmitted"), ({ txHash }) => - `Transaction submitted: ${txHash.slice(0, 10)}...`), - Match.when(BondState.$is("WaitingForConfirmation"), ({ txHash }) => - `Waiting for confirmation: ${txHash.slice(0, 10)}...`), - Match.when(BondState.$is("WaitingForIndexer"), ({ txHash }) => - `Transaction confirmed, indexing data...`), - Match.when(BondState.$is("Success"), ({ txHash }) => - `Success! TX: ${txHash.slice(0, 10)}...`), - Match.when(BondState.$is("Error"), ({ message }) => - message), - Match.exhaustive, - ) - } + +
+
+ You'll Receive +
-
+ {/if}
-
- -
+ + + + +
diff --git a/app2/src/lib/components/stake/IncentiveCard.svelte b/app2/src/lib/components/stake/IncentiveCard.svelte deleted file mode 100644 index da6ff56a37..0000000000 --- a/app2/src/lib/components/stake/IncentiveCard.svelte +++ /dev/null @@ -1,299 +0,0 @@ - - -{#snippet renderIncentiveData(data: any)} -
-
- selectedTab = id as "incentives" | "stats"} - /> -
- -
- {#if selectedTab === "incentives"} -
-
-
- Daily (est): -
- {#if O.isSome(evmChain) && O.isSome(uOnEvmToken)} - - {:else} -
- {/if} -
-
- -
- Weekly (est): -
- {#if O.isSome(evmChain) && O.isSome(uOnEvmToken)} - - {:else} -
- {/if} -
-
- -
- Monthly (est): -
- {#if O.isSome(evmChain) && O.isSome(uOnEvmToken)} - - {:else} -
- {/if} -
-
- -
- Yearly (est): -
- {#if O.isSome(evmChain) && O.isSome(uOnEvmToken)} - - {:else} -
- {/if} -
-
-
- -
- Incentives are estimates based on current rate -
-
- {:else if selectedTab === "stats"} -
-
-
- {formatPercentage(data.rates.yearly)} -
-
Annual Compounded Rate
-
-
- -
-
-
- {formatLargeNumber(data.totalSupply)} -
-
Total Supply
-
-
-
- {formatLargeNumber(data.bondedTokens)} -
-
Bonded Tokens
-
-
-
- {(data.bondedRatio * 100).toFixed(1)}% -
-
Bonded Ratio
-
-
-
- {(data.inflation * 100).toFixed(1)}% -
-
Inflation Rate
-
-
- {/if} -
-
-{/snippet} - -{#snippet renderLoading()} -
- -
-
-
-
-
-
- - -
- -
-
-
-
-
-
- - -
- {#each Array(4) as _} -
-
-
-
- {/each} -
-
-
-{/snippet} - -{#snippet renderError(error: any)} -
-
-
Failed to load incentive data
-
- {error?.message || "Unknown error occurred"} -
-
-
-{/snippet} - - - {@render matchRuntimeResult(incentives, { - onSuccess: renderIncentiveData, - onFailure: renderError, - onNone: renderLoading, - })} - diff --git a/app2/src/lib/components/stake/QuickAmountButtons.svelte b/app2/src/lib/components/stake/QuickAmountButtons.svelte new file mode 100644 index 0000000000..d167017da1 --- /dev/null +++ b/app2/src/lib/components/stake/QuickAmountButtons.svelte @@ -0,0 +1,69 @@ + + +
+ + + + +
\ No newline at end of file diff --git a/app2/src/lib/components/stake/StakingHistoryCard.svelte b/app2/src/lib/components/stake/StakingHistoryCard.svelte index e181839c20..3f7b95b5c2 100644 --- a/app2/src/lib/components/stake/StakingHistoryCard.svelte +++ b/app2/src/lib/components/stake/StakingHistoryCard.svelte @@ -1,6 +1,7 @@ + + +
+ +
+ + + {#snippet icon()} + + {/snippet} + + + + + {#snippet icon()} + + {/snippet} + + + + + {#snippet icon()} + + {/snippet} + + + + + {#snippet icon()} + + {/snippet} + {#snippet indicator()} + + {/snippet} + +
+
+
diff --git a/app2/src/lib/components/stake/StatCard.svelte b/app2/src/lib/components/stake/StatCard.svelte new file mode 100644 index 0000000000..cedf054d81 --- /dev/null +++ b/app2/src/lib/components/stake/StatCard.svelte @@ -0,0 +1,106 @@ + + +{#if clickable} + +{:else} +
+ {#if indicator} +
+ {@render indicator()} +
+ {/if} + +
+
+ {#if icon} + {@render icon()} + {/if} +
+ {label} +
+
+ {#if loading || value === undefined} +
+ {:else if subtitle} +
+ + {value} + + + {subtitle} + +
+ {:else} +
+ {value} +
+ {/if} +
+
+{/if} diff --git a/app2/src/lib/components/stake/StatusDisplay.svelte b/app2/src/lib/components/stake/StatusDisplay.svelte new file mode 100644 index 0000000000..1c2a9aad9a --- /dev/null +++ b/app2/src/lib/components/stake/StatusDisplay.svelte @@ -0,0 +1,284 @@ + + +
+
+
+ {#if isReady} + + + + {:else if isActive} + + {:else if isSuccess} + + + + {:else if isError} + + + + {/if} +
+
+
+ {currentMessage.title} +
+
+ {currentMessage.subtitle} + {#if currentMessage.txHash} + {" "} + + View + + {/if} +
+
+
+
\ No newline at end of file diff --git a/app2/src/lib/components/stake/TokenBalanceRow.svelte b/app2/src/lib/components/stake/TokenBalanceRow.svelte new file mode 100644 index 0000000000..2cc73b6662 --- /dev/null +++ b/app2/src/lib/components/stake/TokenBalanceRow.svelte @@ -0,0 +1,85 @@ + + +
+
+ +
+ {#if O.isSome(chain) && O.isSome(token)} +
+ +
+ {#if showSymbol} + + {symbol} + + {/if} + {:else} +
+
+ {#if showSymbol} +
+ {/if} +
+ {/if} +
+ + +
+ {#if !isWalletConnected} +
+ {:else if O.isSome(chain) && O.isSome(token) && O.isSome(balance)} + + {:else} +
+ {/if} +
+
+
diff --git a/app2/src/lib/components/stake/UnbondComponent.svelte b/app2/src/lib/components/stake/UnbondComponent.svelte index f15237134c..34dd87085b 100644 --- a/app2/src/lib/components/stake/UnbondComponent.svelte +++ b/app2/src/lib/components/stake/UnbondComponent.svelte @@ -1,18 +1,25 @@ -{#snippet renderBalanceSkeleton()} - -{/snippet} - -{#snippet renderBalance(amount: bigint)} -
- { - pipe( - BigDecimal.fromBigInt(amount), - BigDecimal.unsafeDivide(BigDecimal.make(1n, -18)), - Utils.formatBigDecimal, - ) - } -
-{/snippet} -
-
- - {#if O.isNone(WalletStore.evmAddress)} -
- {:else if O.isSome(evmChain) && O.isSome(eUOnEvmToken) && O.isSome(eUOnEvmBalance)} - - {:else} - {@render renderBalanceSkeleton()} - {/if} -
+ +
+
+ +
+ Balance: + {#if O.isNone(WalletStore.evmAddress)} + + {:else if O.isSome(evmChain) && O.isSome(eUOnEvmToken) && O.isSome(eUOnEvmBalance)} + + {:else} + + {/if} +
+
-
- -
+
+ -
- Unbond time: - 27 days + +
+ { + unbondInput = amount + unbondAmount = O.some(wei) + }} + /> +
+
-
- You'll receive: -
- {#if O.isSome(evmChain) && O.isSome(uOnEvmToken) && O.isSome(unbondAmount)} - + +
+
+ Exchange Rate + {#if O.isSome(stakingRates.current) && Exit.isSuccess(stakingRates.current.value)} + + 1 eU = { + pipe( + stakingRates.current.value.value.redemption_rate, + BigDecimal.round({ mode: "from-zero", scale: 6 }), + Utils.formatBigDecimal, + ) + } U + {:else} - 0 U + {/if}
-
-
-
-
- {#if UnbondState.$is("Ready")(unbondState)} - - - - {:else if isUnbonding} -
-
- {:else if isSuccess} - - - - {:else if isError} - - - +
+ Unbond Period + 27 days +
+ +
+
+ You'll Receive +
+ {#if O.isSome(evmChain) && O.isSome(uOnEvmToken) && O.isSome(unbondAmount)} + + {:else} + 0 U +
Enter amount
{/if}
-
-
- { - Match.value(unbondState).pipe( - Match.when(UnbondState.$is("Ready"), () => - O.isNone(WalletStore.evmAddress) - ? "Connect your wallet to start unstaking" - : unbondInput - ? `Ready to unstake ${unbondInput} eU` - : "Enter amount to unstake eU tokens"), - Match.when(UnbondState.$is("SwitchingChain"), () => { - const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet - ? "Preparing Safe Transaction" - : "Switching to mainnet" - }), - Match.when( - UnbondState.$is("CheckingAllowance"), - () => "Checking Token Allowance", - ), - Match.when( - UnbondState.$is("ApprovingAllowance"), - () => `Approving ${unbondInput || "0"} eU`, - ), - Match.when( - UnbondState.$is("AllowanceSubmitted"), - () => `Approval submitted`, - ), - Match.when( - UnbondState.$is("WaitingForAllowanceConfirmation"), - () => `Confirming submission`, - ), - Match.when( - UnbondState.$is("AllowanceApproved"), - () => `Approved ${unbondInput || "0"} eU`, - ), - Match.when( - UnbondState.$is("CreatingTokenOrder"), - () => `Creating order`, - ), - Match.when( - UnbondState.$is("PreparingUnbondTransaction"), - () => `Preparing unbond`, - ), - Match.when( - UnbondState.$is("ConfirmingUnbond"), - () => `Confirm unbond`, - ), - Match.when(UnbondState.$is("UnbondSubmitted"), () => `Unbond successfully submitted`), - Match.when( - UnbondState.$is("WaitingForConfirmation"), - () => `Confirming submission`, - ), - Match.when( - UnbondState.$is("WaitingForIndexer"), - () => `Indexing submission`, - ), - Match.when(UnbondState.$is("Success"), () => `Unbond submitted`), - Match.when(UnbondState.$is("Error"), () => "Unbond Failed"), - Match.exhaustive, - ) - } -
-
- { - Match.value(unbondState).pipe( - Match.when(UnbondState.$is("Ready"), () => - O.isNone(WalletStore.evmAddress) - ? "Connect wallet to see balance and start unstaking" - : unbondInput - ? "Click unstake button to begin transaction (27 day unbond period)" - : "Enter the amount of eU tokens you want to unstake"), - Match.when(UnbondState.$is("SwitchingChain"), () => { - const isSafeWallet = getLastConnectedWalletId() === "safe" - return isSafeWallet - ? "Preparing transaction for Safe wallet..." - : "Please switch to mainnet in your wallet" - }), - Match.when(UnbondState.$is("CheckingAllowance"), () => - "Reading current token allowance from blockchain..."), - Match.when(UnbondState.$is("ApprovingAllowance"), () => - "Confirm token approval transaction in your wallet"), - Match.when(UnbondState.$is("AllowanceSubmitted"), ({ txHash }) => - `Allowance transaction submitted: ${txHash.slice(0, 10)}...`), - Match.when( - UnbondState.$is("WaitingForAllowanceConfirmation"), - ({ txHash }) => - `Waiting for allowance confirmation: ${txHash.slice(0, 10)}...`, - ), - Match.when(UnbondState.$is("AllowanceApproved"), () => - "Token spending approved, proceeding..."), - Match.when(UnbondState.$is("CreatingTokenOrder"), () => - "Building cross-chain token order..."), - Match.when(UnbondState.$is("PreparingUnbondTransaction"), () => - "Preparing unbond transaction with contracts..."), - Match.when(UnbondState.$is("ConfirmingUnbond"), () => - "Confirm unbond transaction in your wallet"), - Match.when(UnbondState.$is("UnbondSubmitted"), ({ txHash }) => - `Transaction submitted: ${txHash.slice(0, 10)}...`), - Match.when(UnbondState.$is("WaitingForConfirmation"), ({ txHash }) => - `Waiting for confirmation: ${txHash.slice(0, 10)}...`), - Match.when(UnbondState.$is("WaitingForIndexer"), ({ txHash }) => - `Transaction confirmed, indexing data...`), - Match.when(UnbondState.$is("Success"), ({ txHash }) => - `Success! TX: ${txHash.slice(0, 10)}...`), - Match.when(UnbondState.$is("Error"), ({ message }) => - message), - Match.exhaustive, - ) - } -
-
+
+ + +
+ +
+
+ Available to Withdraw + + {#if userBatches.length > 0} + {userBatches.length} {userBatches.length === 1 ? "batch" : "batches"} + {:else} + No batches {/if} -
- -
- {#each userBatches as batch} - - {/each} -
+
- {/if} -
-
-
- {#if isReady} - - - - {:else if isLoading} -
+ {#if userBatches.length > 0} +
+
+ Total Amount +
+ {#if O.isSome(evmChain) && O.isSome(uOnEvmToken)} + + normalized.scale >= 0 + ? normalized.value / (10n ** BigInt(normalized.scale)) + : normalized.value * (10n ** BigInt(-normalized.scale)), + ))} + showWrapping={false} + showSymbol={true} + showIcon={true} + maxDecimals={4} + /> +
Ready to claim
+ {:else} + + {/if}
- {:else if isSuccess} - - - - {:else if isError} - - - - {/if} -
-
-
- { - Match.value(withdrawalState).pipe( - Match.when(WithdrawalState.$is("Ready"), () => { - if (O.isNone(WalletStore.evmAddress)) return "Connect your wallet to view withdrawals" - if (userBatches.length === 0) return "No tokens available for withdrawal" - if (selectedBatches.length === 0) return "Select which batches to withdraw from" - - const totalFormatted = pipe( - selectedAmount, - BigDecimal.unsafeDivide(BigDecimal.make(10n ** 18n, 0)), - Utils.formatBigDecimal, - ) - - return `Withdraw ${totalFormatted} U` - }), - Match.when(WithdrawalState.$is("Loading"), () => "Processing withdrawal..."), - Match.when(WithdrawalState.$is("Success"), ({ message }) => message), - Match.when(WithdrawalState.$is("Error"), () => "Withdrawal failed"), - Match.exhaustive, - ) - } -
-
- { - Match.value(withdrawalState).pipe( - Match.when(WithdrawalState.$is("Ready"), () => { - if (O.isNone(WalletStore.evmAddress)) { - return "Connect wallet to see your withdrawable batches" - } - if (userBatches.length === 0) { - return "Unstaked tokens will appear here after the 27-day unbonding period" - } - if (selectedBatches.length === 0) { - return "Select which batches to withdraw from" - } - - return selectedBatches.length > 1 - ? `From ${selectedBatches.length} selected batches` - : "From 1 selected batch" - }), - Match.when(WithdrawalState.$is("Loading"), () => "Please wait while we process your withdrawal..."), - Match.when(WithdrawalState.$is("Success"), () => "Withdrawal completed successfully"), - Match.when(WithdrawalState.$is("Error"), ({ message }) => message), - Match.exhaustive, - ) - }
-
-
- -
- +
+ {#if O.isNone(WalletStore.evmAddress)} + Connect wallet to view + {:else} + No withdrawals available + {/if} +
+
+ Unbonded tokens appear here after 27 days +
+
+ {/if}
-
\ No newline at end of file + + + {#if userBatches.length > 0} +
+
+ You'll Receive +
+ {#if O.isSome(evmChain) && O.isSome(uOnEvmToken)} + + normalized.scale >= 0 + ? normalized.value / (10n ** BigInt(normalized.scale)) + : normalized.value * (10n ** BigInt(-normalized.scale)), + ))} + showWrapping={false} + showSymbol={true} + showIcon={true} + maxDecimals={4} + /> +
To your wallet
+ {:else} + + {/if} +
+
+
+ {/if} + + + + + + +
diff --git a/app2/src/lib/components/ui/Tabs.svelte b/app2/src/lib/components/ui/Tabs.svelte index 72e5f28690..4c1d3027e7 100644 --- a/app2/src/lib/components/ui/Tabs.svelte +++ b/app2/src/lib/components/ui/Tabs.svelte @@ -68,7 +68,7 @@ $effect(() => { bind:this={itemRefs[index]} onclick={() => onTabChange(item.id)} class={cn( - "px-3 sm:px-4 py-2 sm:py-2 text-sm font-medium rounded-md transition-colors relative cursor-pointer z-10", + "px-2.5 sm:px-3 py-1.5 sm:py-1.5 text-xs sm:text-sm font-medium rounded-md transition-colors relative cursor-pointer z-10", activeId === item.id ? "text-white" : "text-zinc-500 hover:text-zinc-300", diff --git a/app2/src/lib/components/ui/UInput.svelte b/app2/src/lib/components/ui/UInput.svelte index f32368715c..c6358e71cb 100644 --- a/app2/src/lib/components/ui/UInput.svelte +++ b/app2/src/lib/components/ui/UInput.svelte @@ -29,7 +29,7 @@ let { decimals = 18, token = O.none(), balance = O.none(), - class: className = "h-14 text-center text-lg", + class: className = "h-14 pl-4 text-left text-lg", humanValue = $bindable(), weiValue = $bindable(), }: Props = $props() diff --git a/app2/src/lib/stake/config.ts b/app2/src/lib/stake/config.ts new file mode 100644 index 0000000000..c650b392ce --- /dev/null +++ b/app2/src/lib/stake/config.ts @@ -0,0 +1,29 @@ +import { UniversalChainId, ChannelId } from "@unionlabs/sdk/schema" +import { Ucs05 } from "@unionlabs/sdk" + +// Chain configuration +export const ETHEREUM_CHAIN_ID = UniversalChainId.make("ethereum.11155111") +export const UNION_CHAIN_ID = UniversalChainId.make("union.union-testnet-10") + +// Channel configuration +export const SOURCE_CHANNEL_ID = ChannelId.make(3) +export const DESTINATION_CHANNEL_ID = ChannelId.make(3) + +// Contract addresses +// TODO: Move these to environment-based configuration + +// UCS03 on EVM +// TESTNET (Sepolia): 0x5fbe74a283f7954f10aa04c2edf55578811aeb03 +export const UCS03_EVM_ADDRESS = "0x5fbe74a283f7954f10aa04c2edf55578811aeb03" + +// UCS03 Minter on Union +// MAINNET: union150u2vpdtau48c50lntaqgleu8rqfnnuh2u3pzfg7pfcvw4uzq6tqceagxy +// TESTNET: union1t5awl707x54k6yyx7qfkuqp890dss2pqgwxh07cu44x5lrlvt4rs8hqmk0 +export const UCS03_MINTER_ON_UNION = Ucs05.CosmosDisplay.make({ + address: "union1t5awl707x54k6yyx7qfkuqp890dss2pqgwxh07cu44x5lrlvt4rs8hqmk0", // testnet +}) + +// ZKGM Contract on Union +export const UCS03_ZKGM = Ucs05.CosmosDisplay.make({ + address: "union1336jj8ertl8h7rdvnz4dh5rqahd09cy0x43guhsxx6xyrztx292qpe64fh", +}) \ No newline at end of file diff --git a/app2/src/lib/stake/instantiate2.ts b/app2/src/lib/stake/instantiate2.ts index 95b8367d69..82544c0020 100644 --- a/app2/src/lib/stake/instantiate2.ts +++ b/app2/src/lib/stake/instantiate2.ts @@ -15,7 +15,7 @@ const module_hash = "0x120970d812836f19888625587a4606a5ad23cef31c8684e6017715525 * Generate a deterministic Union cosmos address from an EVM address using instantiate2 * This is used to create the receiver address for cross-chain operations */ -export const instantiate2 = Effect.fn( +export const predictProxy = Effect.fn( function*(options: { path: bigint; channel: ChannelId; sender: Ucs05.AnyDisplay }) { const sender = yield* Ucs05.anyDisplayToZkgm(options.sender) const abi = [ diff --git a/app2/src/lib/stake/schemas.ts b/app2/src/lib/stake/schemas.ts new file mode 100644 index 0000000000..b9424b87ec --- /dev/null +++ b/app2/src/lib/stake/schemas.ts @@ -0,0 +1,59 @@ +import { Schema } from "effect" + +// Schema for the staking hub status query response +export const StakingHubStatusSchema = Schema.Struct({ + total_assets: Schema.BigInt, + total_shares: Schema.BigInt, + total_reward_amount: Schema.BigInt, + redemption_rate: Schema.BigDecimal, + purchase_rate: Schema.BigDecimal, +}) + +export type StakingHubStatus = Schema.Schema.Type + +// Schemas for unstake requests and batch data +export const UnstakeRequestSchema = Schema.Struct({ + batch_id: Schema.String, + staker: Schema.String, + amount: Schema.String, +}) + +export type UnstakeRequest = Schema.Schema.Type + +export const BatchStatusPendingSchema = Schema.Struct({ + status: Schema.Literal("pending"), + total_lst_to_burn: Schema.String, + unstake_requests_count: Schema.String, +}) + +export const BatchStatusSubmittedSchema = Schema.Struct({ + status: Schema.Literal("submitted"), + total_lst_to_burn: Schema.String, + unstake_requests_count: Schema.String, + receive_time: Schema.String, + expected_native_unstaked: Schema.String, +}) + +export const BatchStatusReceivedSchema = Schema.Struct({ + status: Schema.Literal("received"), + total_lst_to_burn: Schema.String, + unstake_requests_count: Schema.String, + received_native_unstaked: Schema.String, +}) + +export const BatchSchema = Schema.Union( + BatchStatusPendingSchema, + BatchStatusSubmittedSchema, + BatchStatusReceivedSchema, +) + +export type BatchStatus = Schema.Schema.Type + +export const BatchResponseSchema = Schema.Struct({ + batches: Schema.Array(Schema.Struct({ + batch_id: Schema.String, + batch: BatchSchema, + })), +}) + +export type BatchResponse = Schema.Schema.Type diff --git a/app2/src/routes/stake/+page.svelte b/app2/src/routes/stake/+page.svelte index 0682d22645..d5577fb95d 100644 --- a/app2/src/routes/stake/+page.svelte +++ b/app2/src/routes/stake/+page.svelte @@ -1,9 +1,8 @@ - diff --git a/app2/src/routes/udrop/claim/step/Step4.svelte b/app2/src/routes/udrop/claim/step/Step4.svelte index 6e62c8c0d7..3080ad846a 100644 --- a/app2/src/routes/udrop/claim/step/Step4.svelte +++ b/app2/src/routes/udrop/claim/step/Step4.svelte @@ -120,28 +120,28 @@ function handleRetry() {