From ed879e8e7dda3e79f4b676b856a2cab752902a45 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 12:11:01 +0800 Subject: [PATCH 01/12] feat: update subsquid data, disable wormhole resource --- src/__generated__/gql.ts | 29 +- src/__generated__/graphql.ts | 1984 ++--------------- src/api/index.tsx | 6 +- src/api/wormhole.tsx | 235 +- .../network-provider/network-provider.tsx | 2 +- .../features/wormhole/DepositPoolStats.tsx | 136 +- .../wormhole/WormholeOutputDetails.tsx | 495 ++-- .../wormhole/WormholeOutputsTable.tsx | 154 +- src/config/site-navigations.ts | 4 +- src/routes/wormhole/$id.tsx | 6 +- src/routes/wormhole/index.tsx | 8 +- src/schemas/wormhole.ts | 114 +- 12 files changed, 822 insertions(+), 2351 deletions(-) diff --git a/src/__generated__/gql.ts b/src/__generated__/gql.ts index a223cf2..34aaa1d 100644 --- a/src/__generated__/gql.ts +++ b/src/__generated__/gql.ts @@ -44,9 +44,6 @@ type Documents = { '\n query GetRecentTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [TransferOrderByInput!]\n $where: TransferWhereInput\n ) {\n transactions: transfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetRecentTransactionsDocument; '\n query GetTransactionsStats($startDate: DateTime!, $endDate: DateTime!) {\n last24Hour: transfersConnection(\n orderBy: id_ASC\n where: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n extrinsicHash_isNull: false\n }\n ) {\n totalCount\n }\n allTime: transfersConnection(\n orderBy: id_ASC\n where: { extrinsicHash_isNull: false }\n ) {\n totalCount\n }\n }\n ': typeof types.GetTransactionsStatsDocument; '\n query GetTransactionByHash($hash: String!) {\n transactions: transfers(where: { extrinsicHash_eq: $hash }) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetTransactionByHashDocument; - '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [WormholeExtrinsicOrderByInput!]!\n $where: WormholeExtrinsicWhereInput\n ) {\n wormholeExtrinsics(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyLabel\n block {\n height\n }\n }\n meta: wormholeExtrinsicsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n': typeof types.GetWormholeExtrinsicsDocument; - '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById(id: $id) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyScore01Pct\n privacyScore1Pct\n privacyScore5Pct\n privacyLabel\n poolSnapshot\n block {\n id\n height\n hash\n timestamp\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n wormholeNullifiers(where: { extrinsic: { id_eq: $id } }) {\n nullifier\n nullifierHash\n }\n }\n': typeof types.GetWormholeExtrinsicByIdDocument; - '\n query GetDepositPoolStats {\n depositPoolStatsById(id: "global") {\n lastUpdatedBlock\n buckets\n }\n }\n': typeof types.GetDepositPoolStatsDocument; }; const documents: Documents = { '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [AccountOrderByInput!]\n ) {\n accounts(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': @@ -108,13 +105,7 @@ const documents: Documents = { '\n query GetTransactionsStats($startDate: DateTime!, $endDate: DateTime!) {\n last24Hour: transfersConnection(\n orderBy: id_ASC\n where: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n extrinsicHash_isNull: false\n }\n ) {\n totalCount\n }\n allTime: transfersConnection(\n orderBy: id_ASC\n where: { extrinsicHash_isNull: false }\n ) {\n totalCount\n }\n }\n ': types.GetTransactionsStatsDocument, '\n query GetTransactionByHash($hash: String!) {\n transactions: transfers(where: { extrinsicHash_eq: $hash }) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': - types.GetTransactionByHashDocument, - '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [WormholeExtrinsicOrderByInput!]!\n $where: WormholeExtrinsicWhereInput\n ) {\n wormholeExtrinsics(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyLabel\n block {\n height\n }\n }\n meta: wormholeExtrinsicsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n': - types.GetWormholeExtrinsicsDocument, - '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById(id: $id) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyScore01Pct\n privacyScore1Pct\n privacyScore5Pct\n privacyLabel\n poolSnapshot\n block {\n id\n height\n hash\n timestamp\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n wormholeNullifiers(where: { extrinsic: { id_eq: $id } }) {\n nullifier\n nullifierHash\n }\n }\n': - types.GetWormholeExtrinsicByIdDocument, - '\n query GetDepositPoolStats {\n depositPoolStatsById(id: "global") {\n lastUpdatedBlock\n buckets\n }\n }\n': - types.GetDepositPoolStatsDocument + types.GetTransactionByHashDocument }; /** @@ -311,24 +302,6 @@ export function gql( export function gql( source: '\n query GetTransactionByHash($hash: String!) {\n transactions: transfers(where: { extrinsicHash_eq: $hash }) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' ): (typeof documents)['\n query GetTransactionByHash($hash: String!) {\n transactions: transfers(where: { extrinsicHash_eq: $hash }) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [WormholeExtrinsicOrderByInput!]!\n $where: WormholeExtrinsicWhereInput\n ) {\n wormholeExtrinsics(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyLabel\n block {\n height\n }\n }\n meta: wormholeExtrinsicsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n' -): (typeof documents)['\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [WormholeExtrinsicOrderByInput!]!\n $where: WormholeExtrinsicWhereInput\n ) {\n wormholeExtrinsics(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyLabel\n block {\n height\n }\n }\n meta: wormholeExtrinsicsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById(id: $id) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyScore01Pct\n privacyScore1Pct\n privacyScore5Pct\n privacyLabel\n poolSnapshot\n block {\n id\n height\n hash\n timestamp\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n wormholeNullifiers(where: { extrinsic: { id_eq: $id } }) {\n nullifier\n nullifierHash\n }\n }\n' -): (typeof documents)['\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById(id: $id) {\n id\n extrinsicHash\n totalAmount\n outputCount\n timestamp\n privacyScore\n privacyScore01Pct\n privacyScore1Pct\n privacyScore5Pct\n privacyLabel\n poolSnapshot\n block {\n id\n height\n hash\n timestamp\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n wormholeNullifiers(where: { extrinsic: { id_eq: $id } }) {\n nullifier\n nullifierHash\n }\n }\n']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetDepositPoolStats {\n depositPoolStatsById(id: "global") {\n lastUpdatedBlock\n buckets\n }\n }\n' -): (typeof documents)['\n query GetDepositPoolStats {\n depositPoolStatsById(id: "global") {\n lastUpdatedBlock\n buckets\n }\n }\n']; export function gql(source: string) { return (documents as any)[source] ?? {}; diff --git a/src/__generated__/graphql.ts b/src/__generated__/graphql.ts index 4bd3c82..edd581a 100644 --- a/src/__generated__/graphql.ts +++ b/src/__generated__/graphql.ts @@ -39,8 +39,6 @@ export type Account = { frozen: Scalars['BigInt']['output']; /** Account address */ id: Scalars['String']['output']; - /** Whether this account has only received transfers (never sent). Used for deposit pool tracking. */ - isDepositOnly: Scalars['Boolean']['output']; lastUpdated: Scalars['Int']['output']; reserved: Scalars['BigInt']['output']; transfersFrom: Array; @@ -86,12 +84,6 @@ export enum AccountOrderByInput { IdDesc = 'id_DESC', IdDescNullsFirst = 'id_DESC_NULLS_FIRST', IdDescNullsLast = 'id_DESC_NULLS_LAST', - IsDepositOnlyAsc = 'isDepositOnly_ASC', - IsDepositOnlyAscNullsFirst = 'isDepositOnly_ASC_NULLS_FIRST', - IsDepositOnlyAscNullsLast = 'isDepositOnly_ASC_NULLS_LAST', - IsDepositOnlyDesc = 'isDepositOnly_DESC', - IsDepositOnlyDescNullsFirst = 'isDepositOnly_DESC_NULLS_FIRST', - IsDepositOnlyDescNullsLast = 'isDepositOnly_DESC_NULLS_LAST', LastUpdatedAsc = 'lastUpdated_ASC', LastUpdatedAscNullsFirst = 'lastUpdated_ASC_NULLS_FIRST', LastUpdatedAscNullsLast = 'lastUpdated_ASC_NULLS_LAST', @@ -144,9 +136,6 @@ export type AccountWhereInput = { id_not_in?: InputMaybe>; id_not_startsWith?: InputMaybe; id_startsWith?: InputMaybe; - isDepositOnly_eq?: InputMaybe; - isDepositOnly_isNull?: InputMaybe; - isDepositOnly_not_eq?: InputMaybe; lastUpdated_eq?: InputMaybe; lastUpdated_gt?: InputMaybe; lastUpdated_gte?: InputMaybe; @@ -216,12 +205,6 @@ export enum BalanceEventOrderByInput { AccountIdDesc = 'account_id_DESC', AccountIdDescNullsFirst = 'account_id_DESC_NULLS_FIRST', AccountIdDescNullsLast = 'account_id_DESC_NULLS_LAST', - AccountIsDepositOnlyAsc = 'account_isDepositOnly_ASC', - AccountIsDepositOnlyAscNullsFirst = 'account_isDepositOnly_ASC_NULLS_FIRST', - AccountIsDepositOnlyAscNullsLast = 'account_isDepositOnly_ASC_NULLS_LAST', - AccountIsDepositOnlyDesc = 'account_isDepositOnly_DESC', - AccountIsDepositOnlyDescNullsFirst = 'account_isDepositOnly_DESC_NULLS_FIRST', - AccountIsDepositOnlyDescNullsLast = 'account_isDepositOnly_DESC_NULLS_LAST', AccountLastUpdatedAsc = 'account_lastUpdated_ASC', AccountLastUpdatedAscNullsFirst = 'account_lastUpdated_ASC_NULLS_FIRST', AccountLastUpdatedAscNullsLast = 'account_lastUpdated_ASC_NULLS_LAST', @@ -288,12 +271,6 @@ export enum BalanceEventOrderByInput { FromIdDesc = 'from_id_DESC', FromIdDescNullsFirst = 'from_id_DESC_NULLS_FIRST', FromIdDescNullsLast = 'from_id_DESC_NULLS_LAST', - FromIsDepositOnlyAsc = 'from_isDepositOnly_ASC', - FromIsDepositOnlyAscNullsFirst = 'from_isDepositOnly_ASC_NULLS_FIRST', - FromIsDepositOnlyAscNullsLast = 'from_isDepositOnly_ASC_NULLS_LAST', - FromIsDepositOnlyDesc = 'from_isDepositOnly_DESC', - FromIsDepositOnlyDescNullsFirst = 'from_isDepositOnly_DESC_NULLS_FIRST', - FromIsDepositOnlyDescNullsLast = 'from_isDepositOnly_DESC_NULLS_LAST', FromLastUpdatedAsc = 'from_lastUpdated_ASC', FromLastUpdatedAscNullsFirst = 'from_lastUpdated_ASC_NULLS_FIRST', FromLastUpdatedAscNullsLast = 'from_lastUpdated_ASC_NULLS_LAST', @@ -330,12 +307,6 @@ export enum BalanceEventOrderByInput { ToIdDesc = 'to_id_DESC', ToIdDescNullsFirst = 'to_id_DESC_NULLS_FIRST', ToIdDescNullsLast = 'to_id_DESC_NULLS_LAST', - ToIsDepositOnlyAsc = 'to_isDepositOnly_ASC', - ToIsDepositOnlyAscNullsFirst = 'to_isDepositOnly_ASC_NULLS_FIRST', - ToIsDepositOnlyAscNullsLast = 'to_isDepositOnly_ASC_NULLS_LAST', - ToIsDepositOnlyDesc = 'to_isDepositOnly_DESC', - ToIsDepositOnlyDescNullsFirst = 'to_isDepositOnly_DESC_NULLS_FIRST', - ToIsDepositOnlyDescNullsLast = 'to_isDepositOnly_DESC_NULLS_LAST', ToLastUpdatedAsc = 'to_lastUpdated_ASC', ToLastUpdatedAscNullsFirst = 'to_lastUpdated_ASC_NULLS_FIRST', ToLastUpdatedAscNullsLast = 'to_lastUpdated_ASC_NULLS_LAST', @@ -571,99 +542,6 @@ export type BlocksConnection = { totalCount: Scalars['Int']['output']; }; -/** Bucketed deposit pool statistics for privacy score computation. Each bucket covers a bounded range of deposit amounts with overlapping ranges growing by factor 4. */ -export type DepositPoolStats = { - __typename?: 'DepositPoolStats'; - /** Bucket definitions and stats as JSON. Each bucket has: lo, hi (planck), count, sumAmounts, sumAmountsSquared */ - buckets: Scalars['String']['output']; - /** Singleton entity (id='global') */ - id: Scalars['String']['output']; - /** Block number of last update */ - lastUpdatedBlock: Scalars['Int']['output']; -}; - -export type DepositPoolStatsConnection = { - __typename?: 'DepositPoolStatsConnection'; - edges: Array; - pageInfo: PageInfo; - totalCount: Scalars['Int']['output']; -}; - -export type DepositPoolStatsEdge = { - __typename?: 'DepositPoolStatsEdge'; - cursor: Scalars['String']['output']; - node: DepositPoolStats; -}; - -export enum DepositPoolStatsOrderByInput { - BucketsAsc = 'buckets_ASC', - BucketsAscNullsFirst = 'buckets_ASC_NULLS_FIRST', - BucketsAscNullsLast = 'buckets_ASC_NULLS_LAST', - BucketsDesc = 'buckets_DESC', - BucketsDescNullsFirst = 'buckets_DESC_NULLS_FIRST', - BucketsDescNullsLast = 'buckets_DESC_NULLS_LAST', - IdAsc = 'id_ASC', - IdAscNullsFirst = 'id_ASC_NULLS_FIRST', - IdAscNullsLast = 'id_ASC_NULLS_LAST', - IdDesc = 'id_DESC', - IdDescNullsFirst = 'id_DESC_NULLS_FIRST', - IdDescNullsLast = 'id_DESC_NULLS_LAST', - LastUpdatedBlockAsc = 'lastUpdatedBlock_ASC', - LastUpdatedBlockAscNullsFirst = 'lastUpdatedBlock_ASC_NULLS_FIRST', - LastUpdatedBlockAscNullsLast = 'lastUpdatedBlock_ASC_NULLS_LAST', - LastUpdatedBlockDesc = 'lastUpdatedBlock_DESC', - LastUpdatedBlockDescNullsFirst = 'lastUpdatedBlock_DESC_NULLS_FIRST', - LastUpdatedBlockDescNullsLast = 'lastUpdatedBlock_DESC_NULLS_LAST' -} - -export type DepositPoolStatsWhereInput = { - AND?: InputMaybe>; - OR?: InputMaybe>; - buckets_contains?: InputMaybe; - buckets_containsInsensitive?: InputMaybe; - buckets_endsWith?: InputMaybe; - buckets_eq?: InputMaybe; - buckets_gt?: InputMaybe; - buckets_gte?: InputMaybe; - buckets_in?: InputMaybe>; - buckets_isNull?: InputMaybe; - buckets_lt?: InputMaybe; - buckets_lte?: InputMaybe; - buckets_not_contains?: InputMaybe; - buckets_not_containsInsensitive?: InputMaybe; - buckets_not_endsWith?: InputMaybe; - buckets_not_eq?: InputMaybe; - buckets_not_in?: InputMaybe>; - buckets_not_startsWith?: InputMaybe; - buckets_startsWith?: InputMaybe; - id_contains?: InputMaybe; - id_containsInsensitive?: InputMaybe; - id_endsWith?: InputMaybe; - id_eq?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_isNull?: InputMaybe; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_containsInsensitive?: InputMaybe; - id_not_endsWith?: InputMaybe; - id_not_eq?: InputMaybe; - id_not_in?: InputMaybe>; - id_not_startsWith?: InputMaybe; - id_startsWith?: InputMaybe; - lastUpdatedBlock_eq?: InputMaybe; - lastUpdatedBlock_gt?: InputMaybe; - lastUpdatedBlock_gte?: InputMaybe; - lastUpdatedBlock_in?: InputMaybe>; - lastUpdatedBlock_isNull?: InputMaybe; - lastUpdatedBlock_lt?: InputMaybe; - lastUpdatedBlock_lte?: InputMaybe; - lastUpdatedBlock_not_eq?: InputMaybe; - lastUpdatedBlock_not_in?: InputMaybe>; -}; - export type ErrorEvent = { __typename?: 'ErrorEvent'; block: Block; @@ -1162,12 +1040,6 @@ export enum EventOrderByInput { TransferFeeDesc = 'transfer_fee_DESC', TransferFeeDescNullsFirst = 'transfer_fee_DESC_NULLS_FIRST', TransferFeeDescNullsLast = 'transfer_fee_DESC_NULLS_LAST', - TransferFromHashAsc = 'transfer_fromHash_ASC', - TransferFromHashAscNullsFirst = 'transfer_fromHash_ASC_NULLS_FIRST', - TransferFromHashAscNullsLast = 'transfer_fromHash_ASC_NULLS_LAST', - TransferFromHashDesc = 'transfer_fromHash_DESC', - TransferFromHashDescNullsFirst = 'transfer_fromHash_DESC_NULLS_FIRST', - TransferFromHashDescNullsLast = 'transfer_fromHash_DESC_NULLS_LAST', TransferIdAsc = 'transfer_id_ASC', TransferIdAscNullsFirst = 'transfer_id_ASC_NULLS_FIRST', TransferIdAscNullsLast = 'transfer_id_ASC_NULLS_LAST', @@ -1180,12 +1052,6 @@ export enum EventOrderByInput { TransferTimestampDesc = 'transfer_timestamp_DESC', TransferTimestampDescNullsFirst = 'transfer_timestamp_DESC_NULLS_FIRST', TransferTimestampDescNullsLast = 'transfer_timestamp_DESC_NULLS_LAST', - TransferToHashAsc = 'transfer_toHash_ASC', - TransferToHashAscNullsFirst = 'transfer_toHash_ASC_NULLS_FIRST', - TransferToHashAscNullsLast = 'transfer_toHash_ASC_NULLS_LAST', - TransferToHashDesc = 'transfer_toHash_DESC', - TransferToHashDescNullsFirst = 'transfer_toHash_DESC_NULLS_FIRST', - TransferToHashDescNullsLast = 'transfer_toHash_DESC_NULLS_LAST', TypeAsc = 'type_ASC', TypeAscNullsFirst = 'type_ASC_NULLS_FIRST', TypeAscNullsLast = 'type_ASC_NULLS_LAST', @@ -1397,12 +1263,6 @@ export enum HighSecuritySetOrderByInput { InterceptorIdDesc = 'interceptor_id_DESC', InterceptorIdDescNullsFirst = 'interceptor_id_DESC_NULLS_FIRST', InterceptorIdDescNullsLast = 'interceptor_id_DESC_NULLS_LAST', - InterceptorIsDepositOnlyAsc = 'interceptor_isDepositOnly_ASC', - InterceptorIsDepositOnlyAscNullsFirst = 'interceptor_isDepositOnly_ASC_NULLS_FIRST', - InterceptorIsDepositOnlyAscNullsLast = 'interceptor_isDepositOnly_ASC_NULLS_LAST', - InterceptorIsDepositOnlyDesc = 'interceptor_isDepositOnly_DESC', - InterceptorIsDepositOnlyDescNullsFirst = 'interceptor_isDepositOnly_DESC_NULLS_FIRST', - InterceptorIsDepositOnlyDescNullsLast = 'interceptor_isDepositOnly_DESC_NULLS_LAST', InterceptorLastUpdatedAsc = 'interceptor_lastUpdated_ASC', InterceptorLastUpdatedAscNullsFirst = 'interceptor_lastUpdated_ASC_NULLS_FIRST', InterceptorLastUpdatedAscNullsLast = 'interceptor_lastUpdated_ASC_NULLS_LAST', @@ -1439,12 +1299,6 @@ export enum HighSecuritySetOrderByInput { WhoIdDesc = 'who_id_DESC', WhoIdDescNullsFirst = 'who_id_DESC_NULLS_FIRST', WhoIdDescNullsLast = 'who_id_DESC_NULLS_LAST', - WhoIsDepositOnlyAsc = 'who_isDepositOnly_ASC', - WhoIsDepositOnlyAscNullsFirst = 'who_isDepositOnly_ASC_NULLS_FIRST', - WhoIsDepositOnlyAscNullsLast = 'who_isDepositOnly_ASC_NULLS_LAST', - WhoIsDepositOnlyDesc = 'who_isDepositOnly_DESC', - WhoIsDepositOnlyDescNullsFirst = 'who_isDepositOnly_DESC_NULLS_FIRST', - WhoIsDepositOnlyDescNullsLast = 'who_isDepositOnly_DESC_NULLS_LAST', WhoLastUpdatedAsc = 'who_lastUpdated_ASC', WhoLastUpdatedAscNullsFirst = 'who_lastUpdated_ASC_NULLS_FIRST', WhoLastUpdatedAscNullsLast = 'who_lastUpdated_ASC_NULLS_LAST', @@ -1634,12 +1488,6 @@ export enum MinerRewardOrderByInput { MinerIdDesc = 'miner_id_DESC', MinerIdDescNullsFirst = 'miner_id_DESC_NULLS_FIRST', MinerIdDescNullsLast = 'miner_id_DESC_NULLS_LAST', - MinerIsDepositOnlyAsc = 'miner_isDepositOnly_ASC', - MinerIsDepositOnlyAscNullsFirst = 'miner_isDepositOnly_ASC_NULLS_FIRST', - MinerIsDepositOnlyAscNullsLast = 'miner_isDepositOnly_ASC_NULLS_LAST', - MinerIsDepositOnlyDesc = 'miner_isDepositOnly_DESC', - MinerIsDepositOnlyDescNullsFirst = 'miner_isDepositOnly_DESC_NULLS_FIRST', - MinerIsDepositOnlyDescNullsLast = 'miner_isDepositOnly_DESC_NULLS_LAST', MinerLastUpdatedAsc = 'miner_lastUpdated_ASC', MinerLastUpdatedAscNullsFirst = 'miner_lastUpdated_ASC_NULLS_FIRST', MinerLastUpdatedAscNullsLast = 'miner_lastUpdated_ASC_NULLS_LAST', @@ -1801,26 +1649,6 @@ export type MinerStatsWhereInput = { totalRewards_not_in?: InputMaybe>; }; -export type NullifierResult = { - __typename?: 'NullifierResult'; - blockHeight: Scalars['Int']['output']; - extrinsicHash: Scalars['String']['output']; - nullifier: Scalars['String']['output']; - nullifierHash: Scalars['String']['output']; - timestamp: Scalars['DateTime']['output']; -}; - -export type NullifiersByPrefixInput = { - afterBlock?: InputMaybe; - hashPrefixes: Array; -}; - -export type NullifiersByPrefixResponse = { - __typename?: 'NullifiersByPrefixResponse'; - nullifiers: Array; - totalCount: Scalars['Int']['output']; -}; - export type PageInfo = { __typename?: 'PageInfo'; endCursor: Scalars['String']['output']; @@ -1840,9 +1668,6 @@ export type Query = { blockById?: Maybe; blocks: Array; blocksConnection: BlocksConnection; - depositPoolStats: Array; - depositPoolStatsById?: Maybe; - depositPoolStatsConnection: DepositPoolStatsConnection; errorEventById?: Maybe; errorEvents: Array; errorEventsConnection: ErrorEventsConnection; @@ -1858,24 +1683,13 @@ export type Query = { minerStats: Array; minerStatsById?: Maybe; minerStatsConnection: MinerStatsConnection; - nullifiersByPrefix: NullifiersByPrefixResponse; reversibleTransferById?: Maybe; reversibleTransfers: Array; reversibleTransfersConnection: ReversibleTransfersConnection; squidStatus?: Maybe; transferById?: Maybe; transfers: Array; - transfersByHashPrefix: TransfersByPrefixResult; transfersConnection: TransfersConnection; - wormholeExtrinsicById?: Maybe; - wormholeExtrinsics: Array; - wormholeExtrinsicsConnection: WormholeExtrinsicsConnection; - wormholeNullifierById?: Maybe; - wormholeNullifiers: Array; - wormholeNullifiersConnection: WormholeNullifiersConnection; - wormholeOutputById?: Maybe; - wormholeOutputs: Array; - wormholeOutputsConnection: WormholeOutputsConnection; }; export type QueryAccountByIdArgs = { @@ -1932,24 +1746,6 @@ export type QueryBlocksConnectionArgs = { where?: InputMaybe; }; -export type QueryDepositPoolStatsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe>; - where?: InputMaybe; -}; - -export type QueryDepositPoolStatsByIdArgs = { - id: Scalars['String']['input']; -}; - -export type QueryDepositPoolStatsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; - orderBy: Array; - where?: InputMaybe; -}; - export type QueryErrorEventByIdArgs = { id: Scalars['String']['input']; }; @@ -2040,10 +1836,6 @@ export type QueryMinerStatsConnectionArgs = { where?: InputMaybe; }; -export type QueryNullifiersByPrefixArgs = { - input: NullifiersByPrefixInput; -}; - export type QueryReversibleTransferByIdArgs = { id: Scalars['String']['input']; }; @@ -2073,10 +1865,6 @@ export type QueryTransfersArgs = { where?: InputMaybe; }; -export type QueryTransfersByHashPrefixArgs = { - input: TransfersByPrefixInput; -}; - export type QueryTransfersConnectionArgs = { after?: InputMaybe; first?: InputMaybe; @@ -2084,60 +1872,6 @@ export type QueryTransfersConnectionArgs = { where?: InputMaybe; }; -export type QueryWormholeExtrinsicByIdArgs = { - id: Scalars['String']['input']; -}; - -export type QueryWormholeExtrinsicsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe>; - where?: InputMaybe; -}; - -export type QueryWormholeExtrinsicsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; - orderBy: Array; - where?: InputMaybe; -}; - -export type QueryWormholeNullifierByIdArgs = { - id: Scalars['String']['input']; -}; - -export type QueryWormholeNullifiersArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe>; - where?: InputMaybe; -}; - -export type QueryWormholeNullifiersConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; - orderBy: Array; - where?: InputMaybe; -}; - -export type QueryWormholeOutputByIdArgs = { - id: Scalars['String']['input']; -}; - -export type QueryWormholeOutputsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe>; - where?: InputMaybe; -}; - -export type QueryWormholeOutputsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; - orderBy: Array; - where?: InputMaybe; -}; - export type ReversibleTransfer = { __typename?: 'ReversibleTransfer'; amount: Scalars['BigInt']['output']; @@ -2217,12 +1951,6 @@ export enum ReversibleTransferOrderByInput { CancelledByIdDesc = 'cancelledBy_id_DESC', CancelledByIdDescNullsFirst = 'cancelledBy_id_DESC_NULLS_FIRST', CancelledByIdDescNullsLast = 'cancelledBy_id_DESC_NULLS_LAST', - CancelledByIsDepositOnlyAsc = 'cancelledBy_isDepositOnly_ASC', - CancelledByIsDepositOnlyAscNullsFirst = 'cancelledBy_isDepositOnly_ASC_NULLS_FIRST', - CancelledByIsDepositOnlyAscNullsLast = 'cancelledBy_isDepositOnly_ASC_NULLS_LAST', - CancelledByIsDepositOnlyDesc = 'cancelledBy_isDepositOnly_DESC', - CancelledByIsDepositOnlyDescNullsFirst = 'cancelledBy_isDepositOnly_DESC_NULLS_FIRST', - CancelledByIsDepositOnlyDescNullsLast = 'cancelledBy_isDepositOnly_DESC_NULLS_LAST', CancelledByLastUpdatedAsc = 'cancelledBy_lastUpdated_ASC', CancelledByLastUpdatedAscNullsFirst = 'cancelledBy_lastUpdated_ASC_NULLS_FIRST', CancelledByLastUpdatedAscNullsLast = 'cancelledBy_lastUpdated_ASC_NULLS_LAST', @@ -2283,12 +2011,6 @@ export enum ReversibleTransferOrderByInput { ExecutedTransferFeeDesc = 'executedTransfer_fee_DESC', ExecutedTransferFeeDescNullsFirst = 'executedTransfer_fee_DESC_NULLS_FIRST', ExecutedTransferFeeDescNullsLast = 'executedTransfer_fee_DESC_NULLS_LAST', - ExecutedTransferFromHashAsc = 'executedTransfer_fromHash_ASC', - ExecutedTransferFromHashAscNullsFirst = 'executedTransfer_fromHash_ASC_NULLS_FIRST', - ExecutedTransferFromHashAscNullsLast = 'executedTransfer_fromHash_ASC_NULLS_LAST', - ExecutedTransferFromHashDesc = 'executedTransfer_fromHash_DESC', - ExecutedTransferFromHashDescNullsFirst = 'executedTransfer_fromHash_DESC_NULLS_FIRST', - ExecutedTransferFromHashDescNullsLast = 'executedTransfer_fromHash_DESC_NULLS_LAST', ExecutedTransferIdAsc = 'executedTransfer_id_ASC', ExecutedTransferIdAscNullsFirst = 'executedTransfer_id_ASC_NULLS_FIRST', ExecutedTransferIdAscNullsLast = 'executedTransfer_id_ASC_NULLS_LAST', @@ -2301,12 +2023,6 @@ export enum ReversibleTransferOrderByInput { ExecutedTransferTimestampDesc = 'executedTransfer_timestamp_DESC', ExecutedTransferTimestampDescNullsFirst = 'executedTransfer_timestamp_DESC_NULLS_FIRST', ExecutedTransferTimestampDescNullsLast = 'executedTransfer_timestamp_DESC_NULLS_LAST', - ExecutedTransferToHashAsc = 'executedTransfer_toHash_ASC', - ExecutedTransferToHashAscNullsFirst = 'executedTransfer_toHash_ASC_NULLS_FIRST', - ExecutedTransferToHashAscNullsLast = 'executedTransfer_toHash_ASC_NULLS_LAST', - ExecutedTransferToHashDesc = 'executedTransfer_toHash_DESC', - ExecutedTransferToHashDescNullsFirst = 'executedTransfer_toHash_DESC_NULLS_FIRST', - ExecutedTransferToHashDescNullsLast = 'executedTransfer_toHash_DESC_NULLS_LAST', ExtrinsicHashAsc = 'extrinsicHash_ASC', ExtrinsicHashAscNullsFirst = 'extrinsicHash_ASC_NULLS_FIRST', ExtrinsicHashAscNullsLast = 'extrinsicHash_ASC_NULLS_LAST', @@ -2337,12 +2053,6 @@ export enum ReversibleTransferOrderByInput { FromIdDesc = 'from_id_DESC', FromIdDescNullsFirst = 'from_id_DESC_NULLS_FIRST', FromIdDescNullsLast = 'from_id_DESC_NULLS_LAST', - FromIsDepositOnlyAsc = 'from_isDepositOnly_ASC', - FromIsDepositOnlyAscNullsFirst = 'from_isDepositOnly_ASC_NULLS_FIRST', - FromIsDepositOnlyAscNullsLast = 'from_isDepositOnly_ASC_NULLS_LAST', - FromIsDepositOnlyDesc = 'from_isDepositOnly_DESC', - FromIsDepositOnlyDescNullsFirst = 'from_isDepositOnly_DESC_NULLS_FIRST', - FromIsDepositOnlyDescNullsLast = 'from_isDepositOnly_DESC_NULLS_LAST', FromLastUpdatedAsc = 'from_lastUpdated_ASC', FromLastUpdatedAscNullsFirst = 'from_lastUpdated_ASC_NULLS_FIRST', FromLastUpdatedAscNullsLast = 'from_lastUpdated_ASC_NULLS_LAST', @@ -2397,12 +2107,6 @@ export enum ReversibleTransferOrderByInput { ToIdDesc = 'to_id_DESC', ToIdDescNullsFirst = 'to_id_DESC_NULLS_FIRST', ToIdDescNullsLast = 'to_id_DESC_NULLS_LAST', - ToIsDepositOnlyAsc = 'to_isDepositOnly_ASC', - ToIsDepositOnlyAscNullsFirst = 'to_isDepositOnly_ASC_NULLS_FIRST', - ToIsDepositOnlyAscNullsLast = 'to_isDepositOnly_ASC_NULLS_LAST', - ToIsDepositOnlyDesc = 'to_isDepositOnly_DESC', - ToIsDepositOnlyDescNullsFirst = 'to_isDepositOnly_DESC_NULLS_FIRST', - ToIsDepositOnlyDescNullsLast = 'to_isDepositOnly_DESC_NULLS_LAST', ToLastUpdatedAsc = 'to_lastUpdated_ASC', ToLastUpdatedAscNullsFirst = 'to_lastUpdated_ASC_NULLS_FIRST', ToLastUpdatedAscNullsLast = 'to_lastUpdated_ASC_NULLS_LAST', @@ -2568,13 +2272,9 @@ export type Transfer = { extrinsicHash?: Maybe; fee: Scalars['BigInt']['output']; from: Account; - /** Blake3 hash of raw 'from' address bytes (hex string) for privacy-preserving prefix queries */ - fromHash: Scalars['String']['output']; id: Scalars['String']['output']; timestamp: Scalars['DateTime']['output']; to: Account; - /** Blake3 hash of raw 'to' address bytes (hex string) for privacy-preserving prefix queries */ - toHash: Scalars['String']['output']; }; export type TransferEdge = { @@ -2710,12 +2410,6 @@ export enum TransferOrderByInput { FeeDesc = 'fee_DESC', FeeDescNullsFirst = 'fee_DESC_NULLS_FIRST', FeeDescNullsLast = 'fee_DESC_NULLS_LAST', - FromHashAsc = 'fromHash_ASC', - FromHashAscNullsFirst = 'fromHash_ASC_NULLS_FIRST', - FromHashAscNullsLast = 'fromHash_ASC_NULLS_LAST', - FromHashDesc = 'fromHash_DESC', - FromHashDescNullsFirst = 'fromHash_DESC_NULLS_FIRST', - FromHashDescNullsLast = 'fromHash_DESC_NULLS_LAST', FromFreeAsc = 'from_free_ASC', FromFreeAscNullsFirst = 'from_free_ASC_NULLS_FIRST', FromFreeAscNullsLast = 'from_free_ASC_NULLS_LAST', @@ -2734,12 +2428,6 @@ export enum TransferOrderByInput { FromIdDesc = 'from_id_DESC', FromIdDescNullsFirst = 'from_id_DESC_NULLS_FIRST', FromIdDescNullsLast = 'from_id_DESC_NULLS_LAST', - FromIsDepositOnlyAsc = 'from_isDepositOnly_ASC', - FromIsDepositOnlyAscNullsFirst = 'from_isDepositOnly_ASC_NULLS_FIRST', - FromIsDepositOnlyAscNullsLast = 'from_isDepositOnly_ASC_NULLS_LAST', - FromIsDepositOnlyDesc = 'from_isDepositOnly_DESC', - FromIsDepositOnlyDescNullsFirst = 'from_isDepositOnly_DESC_NULLS_FIRST', - FromIsDepositOnlyDescNullsLast = 'from_isDepositOnly_DESC_NULLS_LAST', FromLastUpdatedAsc = 'from_lastUpdated_ASC', FromLastUpdatedAscNullsFirst = 'from_lastUpdated_ASC_NULLS_FIRST', FromLastUpdatedAscNullsLast = 'from_lastUpdated_ASC_NULLS_LAST', @@ -2764,12 +2452,6 @@ export enum TransferOrderByInput { TimestampDesc = 'timestamp_DESC', TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST', - ToHashAsc = 'toHash_ASC', - ToHashAscNullsFirst = 'toHash_ASC_NULLS_FIRST', - ToHashAscNullsLast = 'toHash_ASC_NULLS_LAST', - ToHashDesc = 'toHash_DESC', - ToHashDescNullsFirst = 'toHash_DESC_NULLS_FIRST', - ToHashDescNullsLast = 'toHash_DESC_NULLS_LAST', ToFreeAsc = 'to_free_ASC', ToFreeAscNullsFirst = 'to_free_ASC_NULLS_FIRST', ToFreeAscNullsLast = 'to_free_ASC_NULLS_LAST', @@ -2788,12 +2470,6 @@ export enum TransferOrderByInput { ToIdDesc = 'to_id_DESC', ToIdDescNullsFirst = 'to_id_DESC_NULLS_FIRST', ToIdDescNullsLast = 'to_id_DESC_NULLS_LAST', - ToIsDepositOnlyAsc = 'to_isDepositOnly_ASC', - ToIsDepositOnlyAscNullsFirst = 'to_isDepositOnly_ASC_NULLS_FIRST', - ToIsDepositOnlyAscNullsLast = 'to_isDepositOnly_ASC_NULLS_LAST', - ToIsDepositOnlyDesc = 'to_isDepositOnly_DESC', - ToIsDepositOnlyDescNullsFirst = 'to_isDepositOnly_DESC_NULLS_FIRST', - ToIsDepositOnlyDescNullsLast = 'to_isDepositOnly_DESC_NULLS_LAST', ToLastUpdatedAsc = 'to_lastUpdated_ASC', ToLastUpdatedAscNullsFirst = 'to_lastUpdated_ASC_NULLS_FIRST', ToLastUpdatedAscNullsLast = 'to_lastUpdated_ASC_NULLS_LAST', @@ -2855,23 +2531,6 @@ export type TransferWhereInput = { fee_not_eq?: InputMaybe; fee_not_in?: InputMaybe>; from?: InputMaybe; - fromHash_contains?: InputMaybe; - fromHash_containsInsensitive?: InputMaybe; - fromHash_endsWith?: InputMaybe; - fromHash_eq?: InputMaybe; - fromHash_gt?: InputMaybe; - fromHash_gte?: InputMaybe; - fromHash_in?: InputMaybe>; - fromHash_isNull?: InputMaybe; - fromHash_lt?: InputMaybe; - fromHash_lte?: InputMaybe; - fromHash_not_contains?: InputMaybe; - fromHash_not_containsInsensitive?: InputMaybe; - fromHash_not_endsWith?: InputMaybe; - fromHash_not_eq?: InputMaybe; - fromHash_not_in?: InputMaybe>; - fromHash_not_startsWith?: InputMaybe; - fromHash_startsWith?: InputMaybe; from_isNull?: InputMaybe; id_contains?: InputMaybe; id_containsInsensitive?: InputMaybe; @@ -2900,897 +2559,162 @@ export type TransferWhereInput = { timestamp_not_eq?: InputMaybe; timestamp_not_in?: InputMaybe>; to?: InputMaybe; - toHash_contains?: InputMaybe; - toHash_containsInsensitive?: InputMaybe; - toHash_endsWith?: InputMaybe; - toHash_eq?: InputMaybe; - toHash_gt?: InputMaybe; - toHash_gte?: InputMaybe; - toHash_in?: InputMaybe>; - toHash_isNull?: InputMaybe; - toHash_lt?: InputMaybe; - toHash_lte?: InputMaybe; - toHash_not_contains?: InputMaybe; - toHash_not_containsInsensitive?: InputMaybe; - toHash_not_endsWith?: InputMaybe; - toHash_not_eq?: InputMaybe; - toHash_not_in?: InputMaybe>; - toHash_not_startsWith?: InputMaybe; - toHash_startsWith?: InputMaybe; to_isNull?: InputMaybe; }; -export type TransferWithHash = { - __typename?: 'TransferWithHash'; - amount: Scalars['BigInt']['output']; - blockHeight: Scalars['Int']['output']; - blockId: Scalars['String']['output']; - extrinsicHash?: Maybe; - fee: Scalars['BigInt']['output']; - fromHash: Scalars['String']['output']; - fromId: Scalars['String']['output']; - id: Scalars['String']['output']; - timestamp: Scalars['DateTime']['output']; - toHash: Scalars['String']['output']; - toId: Scalars['String']['output']; +export type TransfersConnection = { + __typename?: 'TransfersConnection'; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars['Int']['output']; }; -export type TransfersByPrefixInput = { - afterBlock?: InputMaybe; - beforeBlock?: InputMaybe; - fromHashPrefixes?: InputMaybe>; +export type GetAccountsQueryVariables = Exact<{ limit?: InputMaybe; - maxAmount?: InputMaybe; - minAmount?: InputMaybe; offset?: InputMaybe; - toHashPrefixes?: InputMaybe>; -}; + orderBy?: InputMaybe | AccountOrderByInput>; +}>; -export type TransfersByPrefixResult = { - __typename?: 'TransfersByPrefixResult'; - totalCount: Scalars['Int']['output']; - transfers: Array; +export type GetAccountsQuery = { + __typename?: 'Query'; + accounts: Array<{ + __typename?: 'Account'; + id: string; + free: any; + frozen: any; + reserved: any; + }>; + meta: { __typename?: 'AccountsConnection'; totalCount: number }; }; -export type TransfersConnection = { - __typename?: 'TransfersConnection'; - edges: Array; - pageInfo: PageInfo; - totalCount: Scalars['Int']['output']; +export type GetAccountByIdQueryVariables = Exact<{ + id: Scalars['String']['input']; + limit: Scalars['Int']['input']; +}>; + +export type GetAccountByIdQuery = { + __typename?: 'Query'; + account?: { + __typename?: 'Account'; + id: string; + free: any; + frozen: any; + reserved: any; + } | null; + transactions: { + __typename?: 'TransfersConnection'; + totalCount: number; + edges: Array<{ + __typename?: 'TransferEdge'; + node: { + __typename?: 'Transfer'; + fee: any; + extrinsicHash?: string | null; + amount: any; + timestamp: any; + block: { __typename?: 'Block'; height: number }; + from: { __typename?: 'Account'; id: string }; + to: { __typename?: 'Account'; id: string }; + }; + }>; + }; + reversibleTransactions: { + __typename?: 'ReversibleTransfersConnection'; + totalCount: number; + edges: Array<{ + __typename?: 'ReversibleTransferEdge'; + node: { + __typename?: 'ReversibleTransfer'; + extrinsicHash?: string | null; + timestamp: any; + status: ReversibleTransferStatus; + amount: any; + block: { __typename?: 'Block'; height: number }; + from: { __typename?: 'Account'; id: string }; + to: { __typename?: 'Account'; id: string }; + }; + }>; + }; + minerRewards: { + __typename?: 'MinerRewardsConnection'; + totalCount: number; + edges: Array<{ + __typename?: 'MinerRewardEdge'; + node: { + __typename?: 'MinerReward'; + reward: any; + timestamp: any; + block: { __typename?: 'Block'; height: number; hash: string }; + miner: { __typename?: 'Account'; id: string }; + }; + }>; + }; + guardian: { + __typename?: 'HighSecuritySetsConnection'; + totalCount: number; + edges: Array<{ + __typename?: 'HighSecuritySetEdge'; + node: { + __typename?: 'HighSecuritySet'; + interceptor: { + __typename?: 'Account'; + id: string; + free: any; + frozen: any; + reserved: any; + }; + }; + }>; + }; + beneficiaries: { + __typename?: 'HighSecuritySetsConnection'; + totalCount: number; + edges: Array<{ + __typename?: 'HighSecuritySetEdge'; + node: { + __typename?: 'HighSecuritySet'; + who: { + __typename?: 'Account'; + id: string; + free: any; + frozen: any; + reserved: any; + }; + }; + }>; + }; }; -/** A single wormhole proof verification extrinsic, containing one or more exit outputs. */ -export type WormholeExtrinsic = { - __typename?: 'WormholeExtrinsic'; - block: Block; - extrinsicHash?: Maybe; - id: Scalars['String']['output']; - /** Number of non-zero exit outputs */ - outputCount: Scalars['Int']['output']; - /** Individual exit outputs in this extrinsic */ - outputs: Array; - /** Pool snapshot at time of proof verification (JSON bucket data) */ - poolSnapshot: Scalars['String']['output']; - /** Human-readable privacy label */ - privacyLabel: Scalars['String']['output']; - /** Privacy score at 0.01 DEV precision, in bits */ - privacyScore: Scalars['Float']['output']; - /** Privacy score with 0.1% sacrifice, in bits */ - privacyScore01Pct: Scalars['Float']['output']; - /** Privacy score with 1% sacrifice, in bits */ - privacyScore1Pct: Scalars['Float']['output']; - /** Privacy score with 5% sacrifice, in bits */ - privacyScore5Pct: Scalars['Float']['output']; - timestamp: Scalars['DateTime']['output']; - /** Total amount across all outputs in this extrinsic */ - totalAmount: Scalars['BigInt']['output']; +export type GetAccountsStatsQueryVariables = Exact<{ + startDate: Scalars['DateTime']['input']; + endDate: Scalars['DateTime']['input']; +}>; + +export type GetAccountsStatsQuery = { + __typename?: 'Query'; + all: { __typename?: 'AccountsConnection'; totalCount: number }; + recentlyActive: { __typename?: 'AccountsConnection'; totalCount: number }; + recentlyDeposited: { __typename?: 'AccountsConnection'; totalCount: number }; }; -/** A single wormhole proof verification extrinsic, containing one or more exit outputs. */ -export type WormholeExtrinsicOutputsArgs = { +export type GetBlocksQueryVariables = Exact<{ limit?: InputMaybe; offset?: InputMaybe; - orderBy?: InputMaybe>; - where?: InputMaybe; -}; + orderBy: Array | BlockOrderByInput; + where?: InputMaybe; +}>; -export type WormholeExtrinsicEdge = { - __typename?: 'WormholeExtrinsicEdge'; - cursor: Scalars['String']['output']; - node: WormholeExtrinsic; -}; - -export enum WormholeExtrinsicOrderByInput { - BlockHashAsc = 'block_hash_ASC', - BlockHashAscNullsFirst = 'block_hash_ASC_NULLS_FIRST', - BlockHashAscNullsLast = 'block_hash_ASC_NULLS_LAST', - BlockHashDesc = 'block_hash_DESC', - BlockHashDescNullsFirst = 'block_hash_DESC_NULLS_FIRST', - BlockHashDescNullsLast = 'block_hash_DESC_NULLS_LAST', - BlockHeightAsc = 'block_height_ASC', - BlockHeightAscNullsFirst = 'block_height_ASC_NULLS_FIRST', - BlockHeightAscNullsLast = 'block_height_ASC_NULLS_LAST', - BlockHeightDesc = 'block_height_DESC', - BlockHeightDescNullsFirst = 'block_height_DESC_NULLS_FIRST', - BlockHeightDescNullsLast = 'block_height_DESC_NULLS_LAST', - BlockIdAsc = 'block_id_ASC', - BlockIdAscNullsFirst = 'block_id_ASC_NULLS_FIRST', - BlockIdAscNullsLast = 'block_id_ASC_NULLS_LAST', - BlockIdDesc = 'block_id_DESC', - BlockIdDescNullsFirst = 'block_id_DESC_NULLS_FIRST', - BlockIdDescNullsLast = 'block_id_DESC_NULLS_LAST', - BlockRewardAsc = 'block_reward_ASC', - BlockRewardAscNullsFirst = 'block_reward_ASC_NULLS_FIRST', - BlockRewardAscNullsLast = 'block_reward_ASC_NULLS_LAST', - BlockRewardDesc = 'block_reward_DESC', - BlockRewardDescNullsFirst = 'block_reward_DESC_NULLS_FIRST', - BlockRewardDescNullsLast = 'block_reward_DESC_NULLS_LAST', - BlockTimestampAsc = 'block_timestamp_ASC', - BlockTimestampAscNullsFirst = 'block_timestamp_ASC_NULLS_FIRST', - BlockTimestampAscNullsLast = 'block_timestamp_ASC_NULLS_LAST', - BlockTimestampDesc = 'block_timestamp_DESC', - BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', - BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', - ExtrinsicHashAsc = 'extrinsicHash_ASC', - ExtrinsicHashAscNullsFirst = 'extrinsicHash_ASC_NULLS_FIRST', - ExtrinsicHashAscNullsLast = 'extrinsicHash_ASC_NULLS_LAST', - ExtrinsicHashDesc = 'extrinsicHash_DESC', - ExtrinsicHashDescNullsFirst = 'extrinsicHash_DESC_NULLS_FIRST', - ExtrinsicHashDescNullsLast = 'extrinsicHash_DESC_NULLS_LAST', - IdAsc = 'id_ASC', - IdAscNullsFirst = 'id_ASC_NULLS_FIRST', - IdAscNullsLast = 'id_ASC_NULLS_LAST', - IdDesc = 'id_DESC', - IdDescNullsFirst = 'id_DESC_NULLS_FIRST', - IdDescNullsLast = 'id_DESC_NULLS_LAST', - OutputCountAsc = 'outputCount_ASC', - OutputCountAscNullsFirst = 'outputCount_ASC_NULLS_FIRST', - OutputCountAscNullsLast = 'outputCount_ASC_NULLS_LAST', - OutputCountDesc = 'outputCount_DESC', - OutputCountDescNullsFirst = 'outputCount_DESC_NULLS_FIRST', - OutputCountDescNullsLast = 'outputCount_DESC_NULLS_LAST', - PoolSnapshotAsc = 'poolSnapshot_ASC', - PoolSnapshotAscNullsFirst = 'poolSnapshot_ASC_NULLS_FIRST', - PoolSnapshotAscNullsLast = 'poolSnapshot_ASC_NULLS_LAST', - PoolSnapshotDesc = 'poolSnapshot_DESC', - PoolSnapshotDescNullsFirst = 'poolSnapshot_DESC_NULLS_FIRST', - PoolSnapshotDescNullsLast = 'poolSnapshot_DESC_NULLS_LAST', - PrivacyLabelAsc = 'privacyLabel_ASC', - PrivacyLabelAscNullsFirst = 'privacyLabel_ASC_NULLS_FIRST', - PrivacyLabelAscNullsLast = 'privacyLabel_ASC_NULLS_LAST', - PrivacyLabelDesc = 'privacyLabel_DESC', - PrivacyLabelDescNullsFirst = 'privacyLabel_DESC_NULLS_FIRST', - PrivacyLabelDescNullsLast = 'privacyLabel_DESC_NULLS_LAST', - PrivacyScore01PctAsc = 'privacyScore01Pct_ASC', - PrivacyScore01PctAscNullsFirst = 'privacyScore01Pct_ASC_NULLS_FIRST', - PrivacyScore01PctAscNullsLast = 'privacyScore01Pct_ASC_NULLS_LAST', - PrivacyScore01PctDesc = 'privacyScore01Pct_DESC', - PrivacyScore01PctDescNullsFirst = 'privacyScore01Pct_DESC_NULLS_FIRST', - PrivacyScore01PctDescNullsLast = 'privacyScore01Pct_DESC_NULLS_LAST', - PrivacyScore1PctAsc = 'privacyScore1Pct_ASC', - PrivacyScore1PctAscNullsFirst = 'privacyScore1Pct_ASC_NULLS_FIRST', - PrivacyScore1PctAscNullsLast = 'privacyScore1Pct_ASC_NULLS_LAST', - PrivacyScore1PctDesc = 'privacyScore1Pct_DESC', - PrivacyScore1PctDescNullsFirst = 'privacyScore1Pct_DESC_NULLS_FIRST', - PrivacyScore1PctDescNullsLast = 'privacyScore1Pct_DESC_NULLS_LAST', - PrivacyScore5PctAsc = 'privacyScore5Pct_ASC', - PrivacyScore5PctAscNullsFirst = 'privacyScore5Pct_ASC_NULLS_FIRST', - PrivacyScore5PctAscNullsLast = 'privacyScore5Pct_ASC_NULLS_LAST', - PrivacyScore5PctDesc = 'privacyScore5Pct_DESC', - PrivacyScore5PctDescNullsFirst = 'privacyScore5Pct_DESC_NULLS_FIRST', - PrivacyScore5PctDescNullsLast = 'privacyScore5Pct_DESC_NULLS_LAST', - PrivacyScoreAsc = 'privacyScore_ASC', - PrivacyScoreAscNullsFirst = 'privacyScore_ASC_NULLS_FIRST', - PrivacyScoreAscNullsLast = 'privacyScore_ASC_NULLS_LAST', - PrivacyScoreDesc = 'privacyScore_DESC', - PrivacyScoreDescNullsFirst = 'privacyScore_DESC_NULLS_FIRST', - PrivacyScoreDescNullsLast = 'privacyScore_DESC_NULLS_LAST', - TimestampAsc = 'timestamp_ASC', - TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', - TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', - TimestampDesc = 'timestamp_DESC', - TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', - TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST', - TotalAmountAsc = 'totalAmount_ASC', - TotalAmountAscNullsFirst = 'totalAmount_ASC_NULLS_FIRST', - TotalAmountAscNullsLast = 'totalAmount_ASC_NULLS_LAST', - TotalAmountDesc = 'totalAmount_DESC', - TotalAmountDescNullsFirst = 'totalAmount_DESC_NULLS_FIRST', - TotalAmountDescNullsLast = 'totalAmount_DESC_NULLS_LAST' -} - -export type WormholeExtrinsicWhereInput = { - AND?: InputMaybe>; - OR?: InputMaybe>; - block?: InputMaybe; - block_isNull?: InputMaybe; - extrinsicHash_contains?: InputMaybe; - extrinsicHash_containsInsensitive?: InputMaybe; - extrinsicHash_endsWith?: InputMaybe; - extrinsicHash_eq?: InputMaybe; - extrinsicHash_gt?: InputMaybe; - extrinsicHash_gte?: InputMaybe; - extrinsicHash_in?: InputMaybe>; - extrinsicHash_isNull?: InputMaybe; - extrinsicHash_lt?: InputMaybe; - extrinsicHash_lte?: InputMaybe; - extrinsicHash_not_contains?: InputMaybe; - extrinsicHash_not_containsInsensitive?: InputMaybe< - Scalars['String']['input'] - >; - extrinsicHash_not_endsWith?: InputMaybe; - extrinsicHash_not_eq?: InputMaybe; - extrinsicHash_not_in?: InputMaybe>; - extrinsicHash_not_startsWith?: InputMaybe; - extrinsicHash_startsWith?: InputMaybe; - id_contains?: InputMaybe; - id_containsInsensitive?: InputMaybe; - id_endsWith?: InputMaybe; - id_eq?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_isNull?: InputMaybe; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_containsInsensitive?: InputMaybe; - id_not_endsWith?: InputMaybe; - id_not_eq?: InputMaybe; - id_not_in?: InputMaybe>; - id_not_startsWith?: InputMaybe; - id_startsWith?: InputMaybe; - outputCount_eq?: InputMaybe; - outputCount_gt?: InputMaybe; - outputCount_gte?: InputMaybe; - outputCount_in?: InputMaybe>; - outputCount_isNull?: InputMaybe; - outputCount_lt?: InputMaybe; - outputCount_lte?: InputMaybe; - outputCount_not_eq?: InputMaybe; - outputCount_not_in?: InputMaybe>; - outputs_every?: InputMaybe; - outputs_none?: InputMaybe; - outputs_some?: InputMaybe; - poolSnapshot_contains?: InputMaybe; - poolSnapshot_containsInsensitive?: InputMaybe; - poolSnapshot_endsWith?: InputMaybe; - poolSnapshot_eq?: InputMaybe; - poolSnapshot_gt?: InputMaybe; - poolSnapshot_gte?: InputMaybe; - poolSnapshot_in?: InputMaybe>; - poolSnapshot_isNull?: InputMaybe; - poolSnapshot_lt?: InputMaybe; - poolSnapshot_lte?: InputMaybe; - poolSnapshot_not_contains?: InputMaybe; - poolSnapshot_not_containsInsensitive?: InputMaybe; - poolSnapshot_not_endsWith?: InputMaybe; - poolSnapshot_not_eq?: InputMaybe; - poolSnapshot_not_in?: InputMaybe>; - poolSnapshot_not_startsWith?: InputMaybe; - poolSnapshot_startsWith?: InputMaybe; - privacyLabel_contains?: InputMaybe; - privacyLabel_containsInsensitive?: InputMaybe; - privacyLabel_endsWith?: InputMaybe; - privacyLabel_eq?: InputMaybe; - privacyLabel_gt?: InputMaybe; - privacyLabel_gte?: InputMaybe; - privacyLabel_in?: InputMaybe>; - privacyLabel_isNull?: InputMaybe; - privacyLabel_lt?: InputMaybe; - privacyLabel_lte?: InputMaybe; - privacyLabel_not_contains?: InputMaybe; - privacyLabel_not_containsInsensitive?: InputMaybe; - privacyLabel_not_endsWith?: InputMaybe; - privacyLabel_not_eq?: InputMaybe; - privacyLabel_not_in?: InputMaybe>; - privacyLabel_not_startsWith?: InputMaybe; - privacyLabel_startsWith?: InputMaybe; - privacyScore01Pct_eq?: InputMaybe; - privacyScore01Pct_gt?: InputMaybe; - privacyScore01Pct_gte?: InputMaybe; - privacyScore01Pct_in?: InputMaybe>; - privacyScore01Pct_isNull?: InputMaybe; - privacyScore01Pct_lt?: InputMaybe; - privacyScore01Pct_lte?: InputMaybe; - privacyScore01Pct_not_eq?: InputMaybe; - privacyScore01Pct_not_in?: InputMaybe>; - privacyScore1Pct_eq?: InputMaybe; - privacyScore1Pct_gt?: InputMaybe; - privacyScore1Pct_gte?: InputMaybe; - privacyScore1Pct_in?: InputMaybe>; - privacyScore1Pct_isNull?: InputMaybe; - privacyScore1Pct_lt?: InputMaybe; - privacyScore1Pct_lte?: InputMaybe; - privacyScore1Pct_not_eq?: InputMaybe; - privacyScore1Pct_not_in?: InputMaybe>; - privacyScore5Pct_eq?: InputMaybe; - privacyScore5Pct_gt?: InputMaybe; - privacyScore5Pct_gte?: InputMaybe; - privacyScore5Pct_in?: InputMaybe>; - privacyScore5Pct_isNull?: InputMaybe; - privacyScore5Pct_lt?: InputMaybe; - privacyScore5Pct_lte?: InputMaybe; - privacyScore5Pct_not_eq?: InputMaybe; - privacyScore5Pct_not_in?: InputMaybe>; - privacyScore_eq?: InputMaybe; - privacyScore_gt?: InputMaybe; - privacyScore_gte?: InputMaybe; - privacyScore_in?: InputMaybe>; - privacyScore_isNull?: InputMaybe; - privacyScore_lt?: InputMaybe; - privacyScore_lte?: InputMaybe; - privacyScore_not_eq?: InputMaybe; - privacyScore_not_in?: InputMaybe>; - timestamp_eq?: InputMaybe; - timestamp_gt?: InputMaybe; - timestamp_gte?: InputMaybe; - timestamp_in?: InputMaybe>; - timestamp_isNull?: InputMaybe; - timestamp_lt?: InputMaybe; - timestamp_lte?: InputMaybe; - timestamp_not_eq?: InputMaybe; - timestamp_not_in?: InputMaybe>; - totalAmount_eq?: InputMaybe; - totalAmount_gt?: InputMaybe; - totalAmount_gte?: InputMaybe; - totalAmount_in?: InputMaybe>; - totalAmount_isNull?: InputMaybe; - totalAmount_lt?: InputMaybe; - totalAmount_lte?: InputMaybe; - totalAmount_not_eq?: InputMaybe; - totalAmount_not_in?: InputMaybe>; -}; - -export type WormholeExtrinsicsConnection = { - __typename?: 'WormholeExtrinsicsConnection'; - edges: Array; - pageInfo: PageInfo; - totalCount: Scalars['Int']['output']; -}; - -/** A nullifier consumed by a wormhole proof verification. */ -export type WormholeNullifier = { - __typename?: 'WormholeNullifier'; - /** Block where the nullifier was consumed */ - block: Block; - /** The wormhole extrinsic that consumed this nullifier */ - extrinsic: WormholeExtrinsic; - id: Scalars['String']['output']; - /** The nullifier bytes as hex */ - nullifier: Scalars['String']['output']; - /** Blake3 hash of the nullifier for prefix queries */ - nullifierHash: Scalars['String']['output']; - timestamp: Scalars['DateTime']['output']; -}; - -export type WormholeNullifierEdge = { - __typename?: 'WormholeNullifierEdge'; - cursor: Scalars['String']['output']; - node: WormholeNullifier; -}; - -export enum WormholeNullifierOrderByInput { - BlockHashAsc = 'block_hash_ASC', - BlockHashAscNullsFirst = 'block_hash_ASC_NULLS_FIRST', - BlockHashAscNullsLast = 'block_hash_ASC_NULLS_LAST', - BlockHashDesc = 'block_hash_DESC', - BlockHashDescNullsFirst = 'block_hash_DESC_NULLS_FIRST', - BlockHashDescNullsLast = 'block_hash_DESC_NULLS_LAST', - BlockHeightAsc = 'block_height_ASC', - BlockHeightAscNullsFirst = 'block_height_ASC_NULLS_FIRST', - BlockHeightAscNullsLast = 'block_height_ASC_NULLS_LAST', - BlockHeightDesc = 'block_height_DESC', - BlockHeightDescNullsFirst = 'block_height_DESC_NULLS_FIRST', - BlockHeightDescNullsLast = 'block_height_DESC_NULLS_LAST', - BlockIdAsc = 'block_id_ASC', - BlockIdAscNullsFirst = 'block_id_ASC_NULLS_FIRST', - BlockIdAscNullsLast = 'block_id_ASC_NULLS_LAST', - BlockIdDesc = 'block_id_DESC', - BlockIdDescNullsFirst = 'block_id_DESC_NULLS_FIRST', - BlockIdDescNullsLast = 'block_id_DESC_NULLS_LAST', - BlockRewardAsc = 'block_reward_ASC', - BlockRewardAscNullsFirst = 'block_reward_ASC_NULLS_FIRST', - BlockRewardAscNullsLast = 'block_reward_ASC_NULLS_LAST', - BlockRewardDesc = 'block_reward_DESC', - BlockRewardDescNullsFirst = 'block_reward_DESC_NULLS_FIRST', - BlockRewardDescNullsLast = 'block_reward_DESC_NULLS_LAST', - BlockTimestampAsc = 'block_timestamp_ASC', - BlockTimestampAscNullsFirst = 'block_timestamp_ASC_NULLS_FIRST', - BlockTimestampAscNullsLast = 'block_timestamp_ASC_NULLS_LAST', - BlockTimestampDesc = 'block_timestamp_DESC', - BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', - BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', - ExtrinsicExtrinsicHashAsc = 'extrinsic_extrinsicHash_ASC', - ExtrinsicExtrinsicHashAscNullsFirst = 'extrinsic_extrinsicHash_ASC_NULLS_FIRST', - ExtrinsicExtrinsicHashAscNullsLast = 'extrinsic_extrinsicHash_ASC_NULLS_LAST', - ExtrinsicExtrinsicHashDesc = 'extrinsic_extrinsicHash_DESC', - ExtrinsicExtrinsicHashDescNullsFirst = 'extrinsic_extrinsicHash_DESC_NULLS_FIRST', - ExtrinsicExtrinsicHashDescNullsLast = 'extrinsic_extrinsicHash_DESC_NULLS_LAST', - ExtrinsicIdAsc = 'extrinsic_id_ASC', - ExtrinsicIdAscNullsFirst = 'extrinsic_id_ASC_NULLS_FIRST', - ExtrinsicIdAscNullsLast = 'extrinsic_id_ASC_NULLS_LAST', - ExtrinsicIdDesc = 'extrinsic_id_DESC', - ExtrinsicIdDescNullsFirst = 'extrinsic_id_DESC_NULLS_FIRST', - ExtrinsicIdDescNullsLast = 'extrinsic_id_DESC_NULLS_LAST', - ExtrinsicOutputCountAsc = 'extrinsic_outputCount_ASC', - ExtrinsicOutputCountAscNullsFirst = 'extrinsic_outputCount_ASC_NULLS_FIRST', - ExtrinsicOutputCountAscNullsLast = 'extrinsic_outputCount_ASC_NULLS_LAST', - ExtrinsicOutputCountDesc = 'extrinsic_outputCount_DESC', - ExtrinsicOutputCountDescNullsFirst = 'extrinsic_outputCount_DESC_NULLS_FIRST', - ExtrinsicOutputCountDescNullsLast = 'extrinsic_outputCount_DESC_NULLS_LAST', - ExtrinsicPoolSnapshotAsc = 'extrinsic_poolSnapshot_ASC', - ExtrinsicPoolSnapshotAscNullsFirst = 'extrinsic_poolSnapshot_ASC_NULLS_FIRST', - ExtrinsicPoolSnapshotAscNullsLast = 'extrinsic_poolSnapshot_ASC_NULLS_LAST', - ExtrinsicPoolSnapshotDesc = 'extrinsic_poolSnapshot_DESC', - ExtrinsicPoolSnapshotDescNullsFirst = 'extrinsic_poolSnapshot_DESC_NULLS_FIRST', - ExtrinsicPoolSnapshotDescNullsLast = 'extrinsic_poolSnapshot_DESC_NULLS_LAST', - ExtrinsicPrivacyLabelAsc = 'extrinsic_privacyLabel_ASC', - ExtrinsicPrivacyLabelAscNullsFirst = 'extrinsic_privacyLabel_ASC_NULLS_FIRST', - ExtrinsicPrivacyLabelAscNullsLast = 'extrinsic_privacyLabel_ASC_NULLS_LAST', - ExtrinsicPrivacyLabelDesc = 'extrinsic_privacyLabel_DESC', - ExtrinsicPrivacyLabelDescNullsFirst = 'extrinsic_privacyLabel_DESC_NULLS_FIRST', - ExtrinsicPrivacyLabelDescNullsLast = 'extrinsic_privacyLabel_DESC_NULLS_LAST', - ExtrinsicPrivacyScore01PctAsc = 'extrinsic_privacyScore01Pct_ASC', - ExtrinsicPrivacyScore01PctAscNullsFirst = 'extrinsic_privacyScore01Pct_ASC_NULLS_FIRST', - ExtrinsicPrivacyScore01PctAscNullsLast = 'extrinsic_privacyScore01Pct_ASC_NULLS_LAST', - ExtrinsicPrivacyScore01PctDesc = 'extrinsic_privacyScore01Pct_DESC', - ExtrinsicPrivacyScore01PctDescNullsFirst = 'extrinsic_privacyScore01Pct_DESC_NULLS_FIRST', - ExtrinsicPrivacyScore01PctDescNullsLast = 'extrinsic_privacyScore01Pct_DESC_NULLS_LAST', - ExtrinsicPrivacyScore1PctAsc = 'extrinsic_privacyScore1Pct_ASC', - ExtrinsicPrivacyScore1PctAscNullsFirst = 'extrinsic_privacyScore1Pct_ASC_NULLS_FIRST', - ExtrinsicPrivacyScore1PctAscNullsLast = 'extrinsic_privacyScore1Pct_ASC_NULLS_LAST', - ExtrinsicPrivacyScore1PctDesc = 'extrinsic_privacyScore1Pct_DESC', - ExtrinsicPrivacyScore1PctDescNullsFirst = 'extrinsic_privacyScore1Pct_DESC_NULLS_FIRST', - ExtrinsicPrivacyScore1PctDescNullsLast = 'extrinsic_privacyScore1Pct_DESC_NULLS_LAST', - ExtrinsicPrivacyScore5PctAsc = 'extrinsic_privacyScore5Pct_ASC', - ExtrinsicPrivacyScore5PctAscNullsFirst = 'extrinsic_privacyScore5Pct_ASC_NULLS_FIRST', - ExtrinsicPrivacyScore5PctAscNullsLast = 'extrinsic_privacyScore5Pct_ASC_NULLS_LAST', - ExtrinsicPrivacyScore5PctDesc = 'extrinsic_privacyScore5Pct_DESC', - ExtrinsicPrivacyScore5PctDescNullsFirst = 'extrinsic_privacyScore5Pct_DESC_NULLS_FIRST', - ExtrinsicPrivacyScore5PctDescNullsLast = 'extrinsic_privacyScore5Pct_DESC_NULLS_LAST', - ExtrinsicPrivacyScoreAsc = 'extrinsic_privacyScore_ASC', - ExtrinsicPrivacyScoreAscNullsFirst = 'extrinsic_privacyScore_ASC_NULLS_FIRST', - ExtrinsicPrivacyScoreAscNullsLast = 'extrinsic_privacyScore_ASC_NULLS_LAST', - ExtrinsicPrivacyScoreDesc = 'extrinsic_privacyScore_DESC', - ExtrinsicPrivacyScoreDescNullsFirst = 'extrinsic_privacyScore_DESC_NULLS_FIRST', - ExtrinsicPrivacyScoreDescNullsLast = 'extrinsic_privacyScore_DESC_NULLS_LAST', - ExtrinsicTimestampAsc = 'extrinsic_timestamp_ASC', - ExtrinsicTimestampAscNullsFirst = 'extrinsic_timestamp_ASC_NULLS_FIRST', - ExtrinsicTimestampAscNullsLast = 'extrinsic_timestamp_ASC_NULLS_LAST', - ExtrinsicTimestampDesc = 'extrinsic_timestamp_DESC', - ExtrinsicTimestampDescNullsFirst = 'extrinsic_timestamp_DESC_NULLS_FIRST', - ExtrinsicTimestampDescNullsLast = 'extrinsic_timestamp_DESC_NULLS_LAST', - ExtrinsicTotalAmountAsc = 'extrinsic_totalAmount_ASC', - ExtrinsicTotalAmountAscNullsFirst = 'extrinsic_totalAmount_ASC_NULLS_FIRST', - ExtrinsicTotalAmountAscNullsLast = 'extrinsic_totalAmount_ASC_NULLS_LAST', - ExtrinsicTotalAmountDesc = 'extrinsic_totalAmount_DESC', - ExtrinsicTotalAmountDescNullsFirst = 'extrinsic_totalAmount_DESC_NULLS_FIRST', - ExtrinsicTotalAmountDescNullsLast = 'extrinsic_totalAmount_DESC_NULLS_LAST', - IdAsc = 'id_ASC', - IdAscNullsFirst = 'id_ASC_NULLS_FIRST', - IdAscNullsLast = 'id_ASC_NULLS_LAST', - IdDesc = 'id_DESC', - IdDescNullsFirst = 'id_DESC_NULLS_FIRST', - IdDescNullsLast = 'id_DESC_NULLS_LAST', - NullifierHashAsc = 'nullifierHash_ASC', - NullifierHashAscNullsFirst = 'nullifierHash_ASC_NULLS_FIRST', - NullifierHashAscNullsLast = 'nullifierHash_ASC_NULLS_LAST', - NullifierHashDesc = 'nullifierHash_DESC', - NullifierHashDescNullsFirst = 'nullifierHash_DESC_NULLS_FIRST', - NullifierHashDescNullsLast = 'nullifierHash_DESC_NULLS_LAST', - NullifierAsc = 'nullifier_ASC', - NullifierAscNullsFirst = 'nullifier_ASC_NULLS_FIRST', - NullifierAscNullsLast = 'nullifier_ASC_NULLS_LAST', - NullifierDesc = 'nullifier_DESC', - NullifierDescNullsFirst = 'nullifier_DESC_NULLS_FIRST', - NullifierDescNullsLast = 'nullifier_DESC_NULLS_LAST', - TimestampAsc = 'timestamp_ASC', - TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', - TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', - TimestampDesc = 'timestamp_DESC', - TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', - TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST' -} - -export type WormholeNullifierWhereInput = { - AND?: InputMaybe>; - OR?: InputMaybe>; - block?: InputMaybe; - block_isNull?: InputMaybe; - extrinsic?: InputMaybe; - extrinsic_isNull?: InputMaybe; - id_contains?: InputMaybe; - id_containsInsensitive?: InputMaybe; - id_endsWith?: InputMaybe; - id_eq?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_isNull?: InputMaybe; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_containsInsensitive?: InputMaybe; - id_not_endsWith?: InputMaybe; - id_not_eq?: InputMaybe; - id_not_in?: InputMaybe>; - id_not_startsWith?: InputMaybe; - id_startsWith?: InputMaybe; - nullifierHash_contains?: InputMaybe; - nullifierHash_containsInsensitive?: InputMaybe; - nullifierHash_endsWith?: InputMaybe; - nullifierHash_eq?: InputMaybe; - nullifierHash_gt?: InputMaybe; - nullifierHash_gte?: InputMaybe; - nullifierHash_in?: InputMaybe>; - nullifierHash_isNull?: InputMaybe; - nullifierHash_lt?: InputMaybe; - nullifierHash_lte?: InputMaybe; - nullifierHash_not_contains?: InputMaybe; - nullifierHash_not_containsInsensitive?: InputMaybe< - Scalars['String']['input'] - >; - nullifierHash_not_endsWith?: InputMaybe; - nullifierHash_not_eq?: InputMaybe; - nullifierHash_not_in?: InputMaybe>; - nullifierHash_not_startsWith?: InputMaybe; - nullifierHash_startsWith?: InputMaybe; - nullifier_contains?: InputMaybe; - nullifier_containsInsensitive?: InputMaybe; - nullifier_endsWith?: InputMaybe; - nullifier_eq?: InputMaybe; - nullifier_gt?: InputMaybe; - nullifier_gte?: InputMaybe; - nullifier_in?: InputMaybe>; - nullifier_isNull?: InputMaybe; - nullifier_lt?: InputMaybe; - nullifier_lte?: InputMaybe; - nullifier_not_contains?: InputMaybe; - nullifier_not_containsInsensitive?: InputMaybe; - nullifier_not_endsWith?: InputMaybe; - nullifier_not_eq?: InputMaybe; - nullifier_not_in?: InputMaybe>; - nullifier_not_startsWith?: InputMaybe; - nullifier_startsWith?: InputMaybe; - timestamp_eq?: InputMaybe; - timestamp_gt?: InputMaybe; - timestamp_gte?: InputMaybe; - timestamp_in?: InputMaybe>; - timestamp_isNull?: InputMaybe; - timestamp_lt?: InputMaybe; - timestamp_lte?: InputMaybe; - timestamp_not_eq?: InputMaybe; - timestamp_not_in?: InputMaybe>; -}; - -export type WormholeNullifiersConnection = { - __typename?: 'WormholeNullifiersConnection'; - edges: Array; - pageInfo: PageInfo; - totalCount: Scalars['Int']['output']; -}; - -/** An individual exit output within a wormhole proof verification. */ -export type WormholeOutput = { - __typename?: 'WormholeOutput'; - amount: Scalars['BigInt']['output']; - exitAccount: Account; - extrinsic: WormholeExtrinsic; - id: Scalars['String']['output']; -}; - -export type WormholeOutputEdge = { - __typename?: 'WormholeOutputEdge'; - cursor: Scalars['String']['output']; - node: WormholeOutput; -}; - -export enum WormholeOutputOrderByInput { - AmountAsc = 'amount_ASC', - AmountAscNullsFirst = 'amount_ASC_NULLS_FIRST', - AmountAscNullsLast = 'amount_ASC_NULLS_LAST', - AmountDesc = 'amount_DESC', - AmountDescNullsFirst = 'amount_DESC_NULLS_FIRST', - AmountDescNullsLast = 'amount_DESC_NULLS_LAST', - ExitAccountFreeAsc = 'exitAccount_free_ASC', - ExitAccountFreeAscNullsFirst = 'exitAccount_free_ASC_NULLS_FIRST', - ExitAccountFreeAscNullsLast = 'exitAccount_free_ASC_NULLS_LAST', - ExitAccountFreeDesc = 'exitAccount_free_DESC', - ExitAccountFreeDescNullsFirst = 'exitAccount_free_DESC_NULLS_FIRST', - ExitAccountFreeDescNullsLast = 'exitAccount_free_DESC_NULLS_LAST', - ExitAccountFrozenAsc = 'exitAccount_frozen_ASC', - ExitAccountFrozenAscNullsFirst = 'exitAccount_frozen_ASC_NULLS_FIRST', - ExitAccountFrozenAscNullsLast = 'exitAccount_frozen_ASC_NULLS_LAST', - ExitAccountFrozenDesc = 'exitAccount_frozen_DESC', - ExitAccountFrozenDescNullsFirst = 'exitAccount_frozen_DESC_NULLS_FIRST', - ExitAccountFrozenDescNullsLast = 'exitAccount_frozen_DESC_NULLS_LAST', - ExitAccountIdAsc = 'exitAccount_id_ASC', - ExitAccountIdAscNullsFirst = 'exitAccount_id_ASC_NULLS_FIRST', - ExitAccountIdAscNullsLast = 'exitAccount_id_ASC_NULLS_LAST', - ExitAccountIdDesc = 'exitAccount_id_DESC', - ExitAccountIdDescNullsFirst = 'exitAccount_id_DESC_NULLS_FIRST', - ExitAccountIdDescNullsLast = 'exitAccount_id_DESC_NULLS_LAST', - ExitAccountIsDepositOnlyAsc = 'exitAccount_isDepositOnly_ASC', - ExitAccountIsDepositOnlyAscNullsFirst = 'exitAccount_isDepositOnly_ASC_NULLS_FIRST', - ExitAccountIsDepositOnlyAscNullsLast = 'exitAccount_isDepositOnly_ASC_NULLS_LAST', - ExitAccountIsDepositOnlyDesc = 'exitAccount_isDepositOnly_DESC', - ExitAccountIsDepositOnlyDescNullsFirst = 'exitAccount_isDepositOnly_DESC_NULLS_FIRST', - ExitAccountIsDepositOnlyDescNullsLast = 'exitAccount_isDepositOnly_DESC_NULLS_LAST', - ExitAccountLastUpdatedAsc = 'exitAccount_lastUpdated_ASC', - ExitAccountLastUpdatedAscNullsFirst = 'exitAccount_lastUpdated_ASC_NULLS_FIRST', - ExitAccountLastUpdatedAscNullsLast = 'exitAccount_lastUpdated_ASC_NULLS_LAST', - ExitAccountLastUpdatedDesc = 'exitAccount_lastUpdated_DESC', - ExitAccountLastUpdatedDescNullsFirst = 'exitAccount_lastUpdated_DESC_NULLS_FIRST', - ExitAccountLastUpdatedDescNullsLast = 'exitAccount_lastUpdated_DESC_NULLS_LAST', - ExitAccountReservedAsc = 'exitAccount_reserved_ASC', - ExitAccountReservedAscNullsFirst = 'exitAccount_reserved_ASC_NULLS_FIRST', - ExitAccountReservedAscNullsLast = 'exitAccount_reserved_ASC_NULLS_LAST', - ExitAccountReservedDesc = 'exitAccount_reserved_DESC', - ExitAccountReservedDescNullsFirst = 'exitAccount_reserved_DESC_NULLS_FIRST', - ExitAccountReservedDescNullsLast = 'exitAccount_reserved_DESC_NULLS_LAST', - ExtrinsicExtrinsicHashAsc = 'extrinsic_extrinsicHash_ASC', - ExtrinsicExtrinsicHashAscNullsFirst = 'extrinsic_extrinsicHash_ASC_NULLS_FIRST', - ExtrinsicExtrinsicHashAscNullsLast = 'extrinsic_extrinsicHash_ASC_NULLS_LAST', - ExtrinsicExtrinsicHashDesc = 'extrinsic_extrinsicHash_DESC', - ExtrinsicExtrinsicHashDescNullsFirst = 'extrinsic_extrinsicHash_DESC_NULLS_FIRST', - ExtrinsicExtrinsicHashDescNullsLast = 'extrinsic_extrinsicHash_DESC_NULLS_LAST', - ExtrinsicIdAsc = 'extrinsic_id_ASC', - ExtrinsicIdAscNullsFirst = 'extrinsic_id_ASC_NULLS_FIRST', - ExtrinsicIdAscNullsLast = 'extrinsic_id_ASC_NULLS_LAST', - ExtrinsicIdDesc = 'extrinsic_id_DESC', - ExtrinsicIdDescNullsFirst = 'extrinsic_id_DESC_NULLS_FIRST', - ExtrinsicIdDescNullsLast = 'extrinsic_id_DESC_NULLS_LAST', - ExtrinsicOutputCountAsc = 'extrinsic_outputCount_ASC', - ExtrinsicOutputCountAscNullsFirst = 'extrinsic_outputCount_ASC_NULLS_FIRST', - ExtrinsicOutputCountAscNullsLast = 'extrinsic_outputCount_ASC_NULLS_LAST', - ExtrinsicOutputCountDesc = 'extrinsic_outputCount_DESC', - ExtrinsicOutputCountDescNullsFirst = 'extrinsic_outputCount_DESC_NULLS_FIRST', - ExtrinsicOutputCountDescNullsLast = 'extrinsic_outputCount_DESC_NULLS_LAST', - ExtrinsicPoolSnapshotAsc = 'extrinsic_poolSnapshot_ASC', - ExtrinsicPoolSnapshotAscNullsFirst = 'extrinsic_poolSnapshot_ASC_NULLS_FIRST', - ExtrinsicPoolSnapshotAscNullsLast = 'extrinsic_poolSnapshot_ASC_NULLS_LAST', - ExtrinsicPoolSnapshotDesc = 'extrinsic_poolSnapshot_DESC', - ExtrinsicPoolSnapshotDescNullsFirst = 'extrinsic_poolSnapshot_DESC_NULLS_FIRST', - ExtrinsicPoolSnapshotDescNullsLast = 'extrinsic_poolSnapshot_DESC_NULLS_LAST', - ExtrinsicPrivacyLabelAsc = 'extrinsic_privacyLabel_ASC', - ExtrinsicPrivacyLabelAscNullsFirst = 'extrinsic_privacyLabel_ASC_NULLS_FIRST', - ExtrinsicPrivacyLabelAscNullsLast = 'extrinsic_privacyLabel_ASC_NULLS_LAST', - ExtrinsicPrivacyLabelDesc = 'extrinsic_privacyLabel_DESC', - ExtrinsicPrivacyLabelDescNullsFirst = 'extrinsic_privacyLabel_DESC_NULLS_FIRST', - ExtrinsicPrivacyLabelDescNullsLast = 'extrinsic_privacyLabel_DESC_NULLS_LAST', - ExtrinsicPrivacyScore01PctAsc = 'extrinsic_privacyScore01Pct_ASC', - ExtrinsicPrivacyScore01PctAscNullsFirst = 'extrinsic_privacyScore01Pct_ASC_NULLS_FIRST', - ExtrinsicPrivacyScore01PctAscNullsLast = 'extrinsic_privacyScore01Pct_ASC_NULLS_LAST', - ExtrinsicPrivacyScore01PctDesc = 'extrinsic_privacyScore01Pct_DESC', - ExtrinsicPrivacyScore01PctDescNullsFirst = 'extrinsic_privacyScore01Pct_DESC_NULLS_FIRST', - ExtrinsicPrivacyScore01PctDescNullsLast = 'extrinsic_privacyScore01Pct_DESC_NULLS_LAST', - ExtrinsicPrivacyScore1PctAsc = 'extrinsic_privacyScore1Pct_ASC', - ExtrinsicPrivacyScore1PctAscNullsFirst = 'extrinsic_privacyScore1Pct_ASC_NULLS_FIRST', - ExtrinsicPrivacyScore1PctAscNullsLast = 'extrinsic_privacyScore1Pct_ASC_NULLS_LAST', - ExtrinsicPrivacyScore1PctDesc = 'extrinsic_privacyScore1Pct_DESC', - ExtrinsicPrivacyScore1PctDescNullsFirst = 'extrinsic_privacyScore1Pct_DESC_NULLS_FIRST', - ExtrinsicPrivacyScore1PctDescNullsLast = 'extrinsic_privacyScore1Pct_DESC_NULLS_LAST', - ExtrinsicPrivacyScore5PctAsc = 'extrinsic_privacyScore5Pct_ASC', - ExtrinsicPrivacyScore5PctAscNullsFirst = 'extrinsic_privacyScore5Pct_ASC_NULLS_FIRST', - ExtrinsicPrivacyScore5PctAscNullsLast = 'extrinsic_privacyScore5Pct_ASC_NULLS_LAST', - ExtrinsicPrivacyScore5PctDesc = 'extrinsic_privacyScore5Pct_DESC', - ExtrinsicPrivacyScore5PctDescNullsFirst = 'extrinsic_privacyScore5Pct_DESC_NULLS_FIRST', - ExtrinsicPrivacyScore5PctDescNullsLast = 'extrinsic_privacyScore5Pct_DESC_NULLS_LAST', - ExtrinsicPrivacyScoreAsc = 'extrinsic_privacyScore_ASC', - ExtrinsicPrivacyScoreAscNullsFirst = 'extrinsic_privacyScore_ASC_NULLS_FIRST', - ExtrinsicPrivacyScoreAscNullsLast = 'extrinsic_privacyScore_ASC_NULLS_LAST', - ExtrinsicPrivacyScoreDesc = 'extrinsic_privacyScore_DESC', - ExtrinsicPrivacyScoreDescNullsFirst = 'extrinsic_privacyScore_DESC_NULLS_FIRST', - ExtrinsicPrivacyScoreDescNullsLast = 'extrinsic_privacyScore_DESC_NULLS_LAST', - ExtrinsicTimestampAsc = 'extrinsic_timestamp_ASC', - ExtrinsicTimestampAscNullsFirst = 'extrinsic_timestamp_ASC_NULLS_FIRST', - ExtrinsicTimestampAscNullsLast = 'extrinsic_timestamp_ASC_NULLS_LAST', - ExtrinsicTimestampDesc = 'extrinsic_timestamp_DESC', - ExtrinsicTimestampDescNullsFirst = 'extrinsic_timestamp_DESC_NULLS_FIRST', - ExtrinsicTimestampDescNullsLast = 'extrinsic_timestamp_DESC_NULLS_LAST', - ExtrinsicTotalAmountAsc = 'extrinsic_totalAmount_ASC', - ExtrinsicTotalAmountAscNullsFirst = 'extrinsic_totalAmount_ASC_NULLS_FIRST', - ExtrinsicTotalAmountAscNullsLast = 'extrinsic_totalAmount_ASC_NULLS_LAST', - ExtrinsicTotalAmountDesc = 'extrinsic_totalAmount_DESC', - ExtrinsicTotalAmountDescNullsFirst = 'extrinsic_totalAmount_DESC_NULLS_FIRST', - ExtrinsicTotalAmountDescNullsLast = 'extrinsic_totalAmount_DESC_NULLS_LAST', - IdAsc = 'id_ASC', - IdAscNullsFirst = 'id_ASC_NULLS_FIRST', - IdAscNullsLast = 'id_ASC_NULLS_LAST', - IdDesc = 'id_DESC', - IdDescNullsFirst = 'id_DESC_NULLS_FIRST', - IdDescNullsLast = 'id_DESC_NULLS_LAST' -} - -export type WormholeOutputWhereInput = { - AND?: InputMaybe>; - OR?: InputMaybe>; - amount_eq?: InputMaybe; - amount_gt?: InputMaybe; - amount_gte?: InputMaybe; - amount_in?: InputMaybe>; - amount_isNull?: InputMaybe; - amount_lt?: InputMaybe; - amount_lte?: InputMaybe; - amount_not_eq?: InputMaybe; - amount_not_in?: InputMaybe>; - exitAccount?: InputMaybe; - exitAccount_isNull?: InputMaybe; - extrinsic?: InputMaybe; - extrinsic_isNull?: InputMaybe; - id_contains?: InputMaybe; - id_containsInsensitive?: InputMaybe; - id_endsWith?: InputMaybe; - id_eq?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_isNull?: InputMaybe; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_containsInsensitive?: InputMaybe; - id_not_endsWith?: InputMaybe; - id_not_eq?: InputMaybe; - id_not_in?: InputMaybe>; - id_not_startsWith?: InputMaybe; - id_startsWith?: InputMaybe; -}; - -export type WormholeOutputsConnection = { - __typename?: 'WormholeOutputsConnection'; - edges: Array; - pageInfo: PageInfo; - totalCount: Scalars['Int']['output']; -}; - -export type GetAccountsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe | AccountOrderByInput>; -}>; - -export type GetAccountsQuery = { - __typename?: 'Query'; - accounts: Array<{ - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - }>; - meta: { __typename?: 'AccountsConnection'; totalCount: number }; -}; - -export type GetAccountByIdQueryVariables = Exact<{ - id: Scalars['String']['input']; - limit: Scalars['Int']['input']; -}>; - -export type GetAccountByIdQuery = { - __typename?: 'Query'; - account?: { - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - } | null; - transactions: { - __typename?: 'TransfersConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'TransferEdge'; - node: { - __typename?: 'Transfer'; - fee: any; - extrinsicHash?: string | null; - amount: any; - timestamp: any; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }; - }>; - }; - reversibleTransactions: { - __typename?: 'ReversibleTransfersConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'ReversibleTransferEdge'; - node: { - __typename?: 'ReversibleTransfer'; - extrinsicHash?: string | null; - timestamp: any; - status: ReversibleTransferStatus; - amount: any; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }; - }>; - }; - minerRewards: { - __typename?: 'MinerRewardsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'MinerRewardEdge'; - node: { - __typename?: 'MinerReward'; - reward: any; - timestamp: any; - block: { __typename?: 'Block'; height: number; hash: string }; - miner: { __typename?: 'Account'; id: string }; - }; - }>; - }; - guardian: { - __typename?: 'HighSecuritySetsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'HighSecuritySetEdge'; - node: { - __typename?: 'HighSecuritySet'; - interceptor: { - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - }; - }; - }>; - }; - beneficiaries: { - __typename?: 'HighSecuritySetsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'HighSecuritySetEdge'; - node: { - __typename?: 'HighSecuritySet'; - who: { - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - }; - }; - }>; - }; -}; - -export type GetAccountsStatsQueryVariables = Exact<{ - startDate: Scalars['DateTime']['input']; - endDate: Scalars['DateTime']['input']; -}>; - -export type GetAccountsStatsQuery = { - __typename?: 'Query'; - all: { __typename?: 'AccountsConnection'; totalCount: number }; - recentlyActive: { __typename?: 'AccountsConnection'; totalCount: number }; - recentlyDeposited: { __typename?: 'AccountsConnection'; totalCount: number }; -}; - -export type GetBlocksQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy: Array | BlockOrderByInput; - where?: InputMaybe; -}>; - -export type GetBlocksQuery = { - __typename?: 'Query'; - blocks: Array<{ - __typename?: 'Block'; - id: string; - hash: string; - height: number; - reward: any; - timestamp: any; - }>; - meta: { __typename?: 'BlocksConnection'; totalCount: number }; +export type GetBlocksQuery = { + __typename?: 'Query'; + blocks: Array<{ + __typename?: 'Block'; + id: string; + hash: string; + height: number; + reward: any; + timestamp: any; + }>; + meta: { __typename?: 'BlocksConnection'; totalCount: number }; }; export type GetRecentBlocksQueryVariables = Exact<{ @@ -4342,97 +3266,23 @@ export type GetTransactionsStatsQuery = { }; export type GetTransactionByHashQueryVariables = Exact<{ - hash: Scalars['String']['input']; -}>; - -export type GetTransactionByHashQuery = { - __typename?: 'Query'; - transactions: Array<{ - __typename?: 'Transfer'; - fee: any; - extrinsicHash?: string | null; - amount: any; - timestamp: any; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }>; -}; - -export type GetWormholeExtrinsicsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy: Array | WormholeExtrinsicOrderByInput; - where?: InputMaybe; -}>; - -export type GetWormholeExtrinsicsQuery = { - __typename?: 'Query'; - wormholeExtrinsics: Array<{ - __typename?: 'WormholeExtrinsic'; - id: string; - extrinsicHash?: string | null; - totalAmount: any; - outputCount: number; - timestamp: any; - privacyScore: number; - privacyLabel: string; - block: { __typename?: 'Block'; height: number }; - }>; - meta: { __typename?: 'WormholeExtrinsicsConnection'; totalCount: number }; -}; - -export type GetWormholeExtrinsicByIdQueryVariables = Exact<{ - id: Scalars['String']['input']; + hash: Scalars['String']['input']; }>; -export type GetWormholeExtrinsicByIdQuery = { +export type GetTransactionByHashQuery = { __typename?: 'Query'; - wormholeExtrinsicById?: { - __typename?: 'WormholeExtrinsic'; - id: string; + transactions: Array<{ + __typename?: 'Transfer'; + fee: any; extrinsicHash?: string | null; - totalAmount: any; - outputCount: number; + amount: any; timestamp: any; - privacyScore: number; - privacyScore01Pct: number; - privacyScore1Pct: number; - privacyScore5Pct: number; - privacyLabel: string; - poolSnapshot: string; - block: { - __typename?: 'Block'; - id: string; - height: number; - hash: string; - timestamp: any; - }; - outputs: Array<{ - __typename?: 'WormholeOutput'; - id: string; - amount: any; - exitAccount: { __typename?: 'Account'; id: string }; - }>; - } | null; - wormholeNullifiers: Array<{ - __typename?: 'WormholeNullifier'; - nullifier: string; - nullifierHash: string; + block: { __typename?: 'Block'; height: number }; + from: { __typename?: 'Account'; id: string }; + to: { __typename?: 'Account'; id: string }; }>; }; -export type GetDepositPoolStatsQueryVariables = Exact<{ [key: string]: never }>; - -export type GetDepositPoolStatsQuery = { - __typename?: 'Query'; - depositPoolStatsById?: { - __typename?: 'DepositPoolStats'; - lastUpdatedBlock: number; - buckets: string; - } | null; -}; - export const GetAccountsDocument = { kind: 'Document', definitions: [ @@ -9485,263 +8335,19 @@ export const GetTransactionsStatsDocument = { { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetTransactionsStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'transfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_isNull' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'transfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_isNull' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetTransactionsStatsQuery, - GetTransactionsStatsQueryVariables ->; -export const GetTransactionByHashDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetTransactionByHash' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfers' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetTransactionByHashQuery, - GetTransactionByHashQueryVariables ->; -export const GetWormholeExtrinsicsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetWormholeExtrinsics' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, + name: { kind: 'Name', value: 'GetTransactionsStats' }, + variableDefinitions: [ { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } + name: { kind: 'Name', value: 'startDate' } }, type: { kind: 'NonNullType', type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'WormholeExtrinsicOrderByInput' } - } - } + kind: 'NamedType', + name: { kind: 'Name', value: 'DateTime' } } } }, @@ -9749,11 +8355,14 @@ export const GetWormholeExtrinsicsDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'where' } + name: { kind: 'Name', value: 'endDate' } }, type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'WormholeExtrinsicWhereInput' } + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'DateTime' } + } } } ], @@ -9762,82 +8371,75 @@ export const GetWormholeExtrinsicsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'wormholeExtrinsics' }, + alias: { kind: 'Name', value: 'last24Hour' }, + name: { kind: 'Name', value: 'transfersConnection' }, arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, { kind: 'Argument', name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } + value: { kind: 'EnumValue', value: 'id_ASC' } }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsicHash_isNull' }, + value: { kind: 'BooleanValue', value: false } + } + ] } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalAmount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'outputCount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacyScore' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacyLabel' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'wormholeExtrinsicsConnection' }, + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'transfersConnection' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'orderBy' }, value: { kind: 'EnumValue', value: 'id_ASC' } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsicHash_isNull' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } } ], selectionSet: { @@ -9852,20 +8454,20 @@ export const GetWormholeExtrinsicsDocument = { } ] } as unknown as DocumentNode< - GetWormholeExtrinsicsQuery, - GetWormholeExtrinsicsQueryVariables + GetTransactionsStatsQuery, + GetTransactionsStatsQueryVariables >; -export const GetWormholeExtrinsicByIdDocument = { +export const GetTransactionByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetWormholeExtrinsicById' }, + name: { kind: 'Name', value: 'GetTransactionByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } @@ -9877,133 +8479,66 @@ export const GetWormholeExtrinsicByIdDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'wormholeExtrinsicById' }, + alias: { kind: 'Name', value: 'transactions' }, + name: { kind: 'Name', value: 'transfers' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } } + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsicHash_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] + } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, { kind: 'Field', name: { kind: 'Name', value: 'extrinsicHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'totalAmount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'outputCount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacyScore' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacyScore01Pct' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacyScore1Pct' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacyScore5Pct' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacyLabel' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'poolSnapshot' } - }, { kind: 'Field', name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } }, + { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'outputs' }, + name: { kind: 'Name', value: 'from' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'exitAccount' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'wormholeNullifiers' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'nullifier' } }, + }, { kind: 'Field', - name: { kind: 'Name', value: 'nullifierHash' } + name: { kind: 'Name', value: 'to' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } } ] } @@ -10013,45 +8548,6 @@ export const GetWormholeExtrinsicByIdDocument = { } ] } as unknown as DocumentNode< - GetWormholeExtrinsicByIdQuery, - GetWormholeExtrinsicByIdQueryVariables ->; -export const GetDepositPoolStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetDepositPoolStats' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'depositPoolStatsById' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'lastUpdatedBlock' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'buckets' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetDepositPoolStatsQuery, - GetDepositPoolStatsQueryVariables + GetTransactionByHashQuery, + GetTransactionByHashQueryVariables >; diff --git a/src/api/index.tsx b/src/api/index.tsx index 78b5ae2..1a12375 100644 --- a/src/api/index.tsx +++ b/src/api/index.tsx @@ -10,7 +10,7 @@ import { minerRewards } from './miner-rewards'; import { reversibleTransactions } from './reversible-transactions'; import { search } from './search'; import { transactions } from './transactions'; -import { wormhole } from './wormhole'; +// import { wormhole } from './wormhole'; const useApiClient = () => { const fetcher = useFetchClient(); @@ -25,8 +25,8 @@ const useApiClient = () => { blocks, minerRewards, minerLeaderboard, - highSecuritySets, - wormhole + highSecuritySets + // wormhole }; return api; diff --git a/src/api/wormhole.tsx b/src/api/wormhole.tsx index 836b03b..b5247df 100644 --- a/src/api/wormhole.tsx +++ b/src/api/wormhole.tsx @@ -1,124 +1,125 @@ -import { gql, useQuery } from '@apollo/client'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import type { - WormholeExtrinsicListResponse, - WormholeExtrinsicResponse, - DepositPoolStatsResponse -} from '@/schemas/wormhole'; +// import { gql, useQuery } from '@apollo/client'; -const GET_WORMHOLE_EXTRINSICS = gql` - query GetWormholeExtrinsics( - $limit: Int - $offset: Int - $orderBy: [WormholeExtrinsicOrderByInput!]! - $where: WormholeExtrinsicWhereInput - ) { - wormholeExtrinsics( - limit: $limit - offset: $offset - orderBy: $orderBy - where: $where - ) { - id - extrinsicHash - totalAmount - outputCount - timestamp - privacyScore - privacyLabel - block { - height - } - } - meta: wormholeExtrinsicsConnection(orderBy: id_ASC) { - totalCount - } - } -`; +// import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +// import type { +// DepositPoolStatsResponse, +// WormholeExtrinsicListResponse, +// WormholeExtrinsicResponse +// } from '@/schemas/wormhole'; -const GET_WORMHOLE_EXTRINSIC_BY_ID = gql` - query GetWormholeExtrinsicById($id: String!) { - wormholeExtrinsicById(id: $id) { - id - extrinsicHash - totalAmount - outputCount - timestamp - privacyScore - privacyScore01Pct - privacyScore1Pct - privacyScore5Pct - privacyLabel - poolSnapshot - block { - id - height - hash - timestamp - } - outputs { - id - exitAccount { - id - } - amount - } - } - wormholeNullifiers(where: { extrinsic: { id_eq: $id } }) { - nullifier - nullifierHash - } - } -`; +// const GET_WORMHOLE_EXTRINSICS = gql` +// query GetWormholeExtrinsics( +// $limit: Int +// $offset: Int +// $orderBy: [WormholeExtrinsicOrderByInput!]! +// $where: WormholeExtrinsicWhereInput +// ) { +// wormholeExtrinsics( +// limit: $limit +// offset: $offset +// orderBy: $orderBy +// where: $where +// ) { +// id +// extrinsicHash +// totalAmount +// outputCount +// timestamp +// privacyScore +// privacyLabel +// block { +// height +// } +// } +// meta: wormholeExtrinsicsConnection(orderBy: id_ASC) { +// totalCount +// } +// } +// `; -const GET_DEPOSIT_POOL_STATS = gql` - query GetDepositPoolStats { - depositPoolStatsById(id: "global") { - lastUpdatedBlock - buckets - } - } -`; +// const GET_WORMHOLE_EXTRINSIC_BY_ID = gql` +// query GetWormholeExtrinsicById($id: String!) { +// wormholeExtrinsicById(id: $id) { +// id +// extrinsicHash +// totalAmount +// outputCount +// timestamp +// privacyScore +// privacyScore01Pct +// privacyScore1Pct +// privacyScore5Pct +// privacyLabel +// poolSnapshot +// block { +// id +// height +// hash +// timestamp +// } +// outputs { +// id +// exitAccount { +// id +// } +// amount +// } +// } +// wormholeNullifiers(where: { extrinsic: { id_eq: $id } }) { +// nullifier +// nullifierHash +// } +// } +// `; -export const wormhole = { - useGetAll: (config?: { - pollInterval?: number; - variables?: Record; - }) => { - const { pollInterval = DATA_POOL_INTERVAL, variables = {} } = config ?? {}; - const { - orderBy = 'timestamp_DESC', - limit = 25, - offset = 0, - where - } = variables as Record; +// const GET_DEPOSIT_POOL_STATS = gql` +// query GetDepositPoolStats { +// depositPoolStatsById(id: "global") { +// lastUpdatedBlock +// buckets +// } +// } +// `; - return useQuery(GET_WORMHOLE_EXTRINSICS, { - pollInterval, - variables: { orderBy: [orderBy], limit, offset, where } - }); - }, +// export const wormhole = { +// useGetAll: (config?: { +// pollInterval?: number; +// variables?: Record; +// }) => { +// const { pollInterval = DATA_POOL_INTERVAL, variables = {} } = config ?? {}; +// const { +// orderBy = 'timestamp_DESC', +// limit = 25, +// offset = 0, +// where +// } = variables as Record; - getById: () => { - return { - useQuery: (id: string, config?: { pollInterval?: number }) => { - const { pollInterval = 0 } = config ?? {}; - return useQuery( - GET_WORMHOLE_EXTRINSIC_BY_ID, - { - variables: { id }, - pollInterval, - skip: !id - } - ); - } - }; - }, +// return useQuery(GET_WORMHOLE_EXTRINSICS, { +// pollInterval, +// variables: { orderBy: [orderBy], limit, offset, where } +// }); +// }, - useGetDepositPoolStats: (config?: { pollInterval?: number }) => { - const { pollInterval = DATA_POOL_INTERVAL } = config ?? {}; - return useQuery(GET_DEPOSIT_POOL_STATS, { - pollInterval - }); - } -}; +// getById: () => { +// return { +// useQuery: (id: string, config?: { pollInterval?: number }) => { +// const { pollInterval = 0 } = config ?? {}; +// return useQuery( +// GET_WORMHOLE_EXTRINSIC_BY_ID, +// { +// variables: { id }, +// pollInterval, +// skip: !id +// } +// ); +// } +// }; +// }, + +// useGetDepositPoolStats: (config?: { pollInterval?: number }) => { +// const { pollInterval = DATA_POOL_INTERVAL } = config ?? {}; +// return useQuery(GET_DEPOSIT_POOL_STATS, { +// pollInterval +// }); +// } +// }; diff --git a/src/components/common/network-provider/network-provider.tsx b/src/components/common/network-provider/network-provider.tsx index 6a5a6ae..afa1dd3 100644 --- a/src/components/common/network-provider/network-provider.tsx +++ b/src/components/common/network-provider/network-provider.tsx @@ -4,7 +4,7 @@ const ENABLE_LOCAL_NETWORK = import.meta.env.VITE_ENABLE_LOCAL_NETWORK === 'true'; const BASE_NETWORKS = { - dirac: 'https://subsquid.quantus.com/graphql' + dirac: 'https://subsquid.quantus.com/green/graphql' } as const; const LOCAL_NETWORK = { diff --git a/src/components/features/wormhole/DepositPoolStats.tsx b/src/components/features/wormhole/DepositPoolStats.tsx index 6fcb0f1..966a02b 100644 --- a/src/components/features/wormhole/DepositPoolStats.tsx +++ b/src/components/features/wormhole/DepositPoolStats.tsx @@ -1,74 +1,74 @@ -import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +// import useApiClient from '@/api'; +// import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -export const DepositPoolStatsCard = () => { - const api = useApiClient(); - const { data, loading } = api.wormhole.useGetDepositPoolStats(); +// export const DepositPoolStatsCard = () => { +// const api = useApiClient(); +// const { data, loading } = api.wormhole.useGetDepositPoolStats(); - const stats = data?.depositPoolStatsById; +// const stats = data?.depositPoolStatsById; - if (loading) { - return ( - - - Deposit Pool - - -
-
-
-
- - - ); - } +// if (loading) { +// return ( +// +// +// Deposit Pool +// +// +//
+//
+//
+//
+// +// +// ); +// } - if (!stats) return null; +// if (!stats) return null; - // Parse buckets JSON and compute totals - let totalDeposits = 0; - let totalValue = 0; - try { - const buckets = JSON.parse(stats.buckets); - // Use bucket 0 [0, 1 DEV) as it contains all sub-DEV deposits without overlap - // Sum all buckets but avoid double-counting from overlaps by just using count from non-overlapping ranges - // Simplest: just show the raw bucket data - for (const b of buckets) { - // Only count non-overlapping contributions (first bucket that contains each deposit) - // For display purposes, sum the largest bucket's count as a rough total - if (b.count > totalDeposits) totalDeposits = b.count; - totalValue += Number(b.sumAmounts); - } - // Actually, deposits appear in multiple overlapping buckets, so just sum unique ones - // The [0, 1 DEV) bucket is non-overlapping with others for sub-DEV deposits - // For a rough total, use the sum across all non-overlapping base buckets - totalDeposits = buckets.reduce( - (sum: number, b: { count: number }) => sum + b.count, - 0 - ); - } catch { - // fallback - } +// // Parse buckets JSON and compute totals +// let totalDeposits = 0; +// let totalValue = 0; +// try { +// const buckets = JSON.parse(stats.buckets); +// // Use bucket 0 [0, 1 DEV) as it contains all sub-DEV deposits without overlap +// // Sum all buckets but avoid double-counting from overlaps by just using count from non-overlapping ranges +// // Simplest: just show the raw bucket data +// for (const b of buckets) { +// // Only count non-overlapping contributions (first bucket that contains each deposit) +// // For display purposes, sum the largest bucket's count as a rough total +// if (b.count > totalDeposits) totalDeposits = b.count; +// totalValue += Number(b.sumAmounts); +// } +// // Actually, deposits appear in multiple overlapping buckets, so just sum unique ones +// // The [0, 1 DEV) bucket is non-overlapping with others for sub-DEV deposits +// // For a rough total, use the sum across all non-overlapping base buckets +// totalDeposits = buckets.reduce( +// (sum: number, b: { count: number }) => sum + b.count, +// 0 +// ); +// } catch { +// // fallback +// } - return ( - - - Wormhole Deposit Pool - - -
-
-

Deposits Tracked

-

- {totalDeposits.toLocaleString()} -

-
-
-

Last Updated

-

Block {stats.lastUpdatedBlock}

-
-
-
-
- ); -}; +// return ( +// +// +// Wormhole Deposit Pool +// +// +//
+//
+//

Deposits Tracked

+//

+// {totalDeposits.toLocaleString()} +//

+//
+//
+//

Last Updated

+//

Block {stats.lastUpdatedBlock}

+//
+//
+//
+//
+// ); +// }; diff --git a/src/components/features/wormhole/WormholeOutputDetails.tsx b/src/components/features/wormhole/WormholeOutputDetails.tsx index 23ed992..6d17b89 100644 --- a/src/components/features/wormhole/WormholeOutputDetails.tsx +++ b/src/components/features/wormhole/WormholeOutputDetails.tsx @@ -1,258 +1,259 @@ -import { notFound } from '@tanstack/react-router'; +// import { notFound } from '@tanstack/react-router'; -import useApiClient from '@/api'; -import { DataList } from '@/components/ui/composites/data-list/DataList'; -import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; -import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; -import { Card, CardContent } from '@/components/ui/card'; -import { RESOURCES } from '@/constants/resources'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; -import { PrivacyScoreBadge } from './PrivacyScoreBadge'; +// import useApiClient from '@/api'; +// import { Card, CardContent } from '@/components/ui/card'; +// import { DataList } from '@/components/ui/composites/data-list/DataList'; +// import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +// import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +// import { RESOURCES } from '@/constants/resources'; +// import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; -interface WormholeOutputDetailsProps { - id: string; -} +// import { PrivacyScoreBadge } from './PrivacyScoreBadge'; -interface ExtrinsicInfo { - extrinsicHash: string | null; - totalAmount: string; - outputCount: number; - block: { height: number; hash: string }; - timestamp: string; - privacyScore: number; - privacyLabel: string; - privacyScore01Pct: number; - privacyScore1Pct: number; - privacyScore5Pct: number; - poolSnapshot: string; -} +// interface WormholeOutputDetailsProps { +// id: string; +// } -export const WormholeOutputInformation = ({ - id -}: WormholeOutputDetailsProps) => { - const api = useApiClient(); - const { data, loading } = api.wormhole.getById().useQuery(id); +// interface ExtrinsicInfo { +// extrinsicHash: string | null; +// totalAmount: string; +// outputCount: number; +// block: { height: number; hash: string }; +// timestamp: string; +// privacyScore: number; +// privacyLabel: string; +// privacyScore01Pct: number; +// privacyScore1Pct: number; +// privacyScore5Pct: number; +// poolSnapshot: string; +// } - const extrinsic = data?.wormholeExtrinsicById; - const nullifiers = data?.wormholeNullifiers ?? []; +// export const WormholeOutputInformation = ({ +// id +// }: WormholeOutputDetailsProps) => { +// const api = useApiClient(); +// const { data, loading } = api.wormhole.getById().useQuery(id); - if (!loading && !extrinsic) throw notFound(); +// const extrinsic = data?.wormholeExtrinsicById; +// const nullifiers = data?.wormholeNullifiers ?? []; - const extrinsicInfo: Partial[] = [ - { - extrinsicHash: extrinsic?.extrinsicHash, - totalAmount: extrinsic?.totalAmount, - outputCount: extrinsic?.outputCount, - block: extrinsic?.block, - timestamp: extrinsic?.timestamp, - privacyScore: extrinsic?.privacyScore, - privacyLabel: extrinsic?.privacyLabel, - privacyScore01Pct: extrinsic?.privacyScore01Pct, - privacyScore1Pct: extrinsic?.privacyScore1Pct, - privacyScore5Pct: extrinsic?.privacyScore5Pct, - poolSnapshot: extrinsic?.poolSnapshot - } - ]; +// if (!loading && !extrinsic) throw notFound(); - return ( - <> -

Transaction Details

- > - loading={loading} - data={extrinsicInfo} - fields={[ - { - label: 'Extrinsic Hash', - key: 'extrinsicHash', - render: (value) => - value ? ( - - ) : ( - - - ) - }, - { - label: 'Total Amount', - key: 'totalAmount', - render: (value) => formatMonetaryValue(Number(value)) - }, - { - label: 'Exit Outputs', - key: 'outputCount', - render: (value) => `${value}` - }, - { - label: 'Block', - key: 'block', - render: (value) => ( - - ) - }, - { - label: 'Timestamp', - key: 'timestamp', - render: (value) => formatTimestamp(value, true) - } - ]} - /> +// const extrinsicInfo: Partial[] = [ +// { +// extrinsicHash: extrinsic?.extrinsicHash, +// totalAmount: extrinsic?.totalAmount, +// outputCount: extrinsic?.outputCount, +// block: extrinsic?.block, +// timestamp: extrinsic?.timestamp, +// privacyScore: extrinsic?.privacyScore, +// privacyLabel: extrinsic?.privacyLabel, +// privacyScore01Pct: extrinsic?.privacyScore01Pct, +// privacyScore1Pct: extrinsic?.privacyScore1Pct, +// privacyScore5Pct: extrinsic?.privacyScore5Pct, +// poolSnapshot: extrinsic?.poolSnapshot +// } +// ]; -

Privacy Analysis

- > - loading={loading} - data={extrinsicInfo} - fields={[ - { - label: 'Privacy Score', - key: 'privacyScore', - render: (value, item) => ( - - ), - tooltip: - 'Estimated bits of anonymity at 0.01 DEV precision. Based on how many deposit subsets could produce this total.' - }, - { - label: 'With 0.1% sacrifice', - key: 'privacyScore01Pct', - render: (value) => `${(value as number).toFixed(1)} bits`, - tooltip: - 'Score if the user had sacrificed 0.1% of the output for privacy.' - }, - { - label: 'With 1% sacrifice', - key: 'privacyScore1Pct', - render: (value) => `${(value as number).toFixed(1)} bits`, - tooltip: - 'Score if the user had sacrificed 1% of the output for privacy.' - }, - { - label: 'With 5% sacrifice', - key: 'privacyScore5Pct', - render: (value) => `${(value as number).toFixed(1)} bits`, - tooltip: - 'Score if the user had sacrificed 5% of the output for privacy.' - }, - { - label: 'Pool Snapshot', - key: 'poolSnapshot', - render: (value) => { - try { - const buckets = JSON.parse(value as string); - const nonEmpty = buckets.filter( - (b: { count: number }) => b.count > 0 - ); - return `${nonEmpty.length} active buckets`; - } catch { - return '-'; - } - }, - tooltip: - 'Deposit pool bucket distribution at time of proof verification.' - } - ]} - /> +// return ( +// <> +//

Transaction Details

+// > +// loading={loading} +// data={extrinsicInfo} +// fields={[ +// { +// label: 'Extrinsic Hash', +// key: 'extrinsicHash', +// render: (value) => +// value ? ( +// +// ) : ( +// - +// ) +// }, +// { +// label: 'Total Amount', +// key: 'totalAmount', +// render: (value) => formatMonetaryValue(Number(value)) +// }, +// { +// label: 'Exit Outputs', +// key: 'outputCount', +// render: (value) => `${value}` +// }, +// { +// label: 'Block', +// key: 'block', +// render: (value) => ( +// +// ) +// }, +// { +// label: 'Timestamp', +// key: 'timestamp', +// render: (value) => formatTimestamp(value, true) +// } +// ]} +// /> -

Exit Outputs

- {loading ? ( - - -
-
-
-
- - - ) : ( -
- {extrinsic?.outputs?.map( - ( - output: { - id: string; - exitAccount: { id: string }; - amount: string; - }, - idx: number - ) => ( - - -
-
-
- Output {idx + 1} of {extrinsic.outputCount} -
-
{formatMonetaryValue(Number(output.amount))}
-
-
-
- Exit Account -
-
- -
-
-
-
-
- ) - )} -
- )} +//

Privacy Analysis

+// > +// loading={loading} +// data={extrinsicInfo} +// fields={[ +// { +// label: 'Privacy Score', +// key: 'privacyScore', +// render: (value, item) => ( +// +// ), +// tooltip: +// 'Estimated bits of anonymity at 0.01 DEV precision. Based on how many deposit subsets could produce this total.' +// }, +// { +// label: 'With 0.1% sacrifice', +// key: 'privacyScore01Pct', +// render: (value) => `${(value as number).toFixed(1)} bits`, +// tooltip: +// 'Score if the user had sacrificed 0.1% of the output for privacy.' +// }, +// { +// label: 'With 1% sacrifice', +// key: 'privacyScore1Pct', +// render: (value) => `${(value as number).toFixed(1)} bits`, +// tooltip: +// 'Score if the user had sacrificed 1% of the output for privacy.' +// }, +// { +// label: 'With 5% sacrifice', +// key: 'privacyScore5Pct', +// render: (value) => `${(value as number).toFixed(1)} bits`, +// tooltip: +// 'Score if the user had sacrificed 5% of the output for privacy.' +// }, +// { +// label: 'Pool Snapshot', +// key: 'poolSnapshot', +// render: (value) => { +// try { +// const buckets = JSON.parse(value as string); +// const nonEmpty = buckets.filter( +// (b: { count: number }) => b.count > 0 +// ); +// return `${nonEmpty.length} active buckets`; +// } catch { +// return '-'; +// } +// }, +// tooltip: +// 'Deposit pool bucket distribution at time of proof verification.' +// } +// ]} +// /> - {nullifiers.length > 0 && ( - <> -

Nullifiers

- - -

- {nullifiers.length} nullifier - {nullifiers.length !== 1 ? 's' : ''} consumed by this proof - verification. Each corresponds to a spent wormhole deposit. -

-
- {nullifiers.map( - ( - n: { nullifier: string; nullifierHash: string }, - idx: number - ) => ( -
-
-
-
- Nullifier {idx + 1} -
-
- -
-
-
-
- Hash (blake3) -
-
- {n.nullifierHash} -
-
-
-
- ) - )} -
-
-
- - )} - - ); -}; +//

Exit Outputs

+// {loading ? ( +// +// +//
+//
+//
+//
+// +// +// ) : ( +//
+// {extrinsic?.outputs?.map( +// ( +// output: { +// id: string; +// exitAccount: { id: string }; +// amount: string; +// }, +// idx: number +// ) => ( +// +// +//
+//
+//
+// Output {idx + 1} of {extrinsic.outputCount} +//
+//
{formatMonetaryValue(Number(output.amount))}
+//
+//
+//
+// Exit Account +//
+//
+// +//
+//
+//
+//
+//
+// ) +// )} +//
+// )} + +// {nullifiers.length > 0 && ( +// <> +//

Nullifiers

+// +// +//

+// {nullifiers.length} nullifier +// {nullifiers.length !== 1 ? 's' : ''} consumed by this proof +// verification. Each corresponds to a spent wormhole deposit. +//

+//
+// {nullifiers.map( +// ( +// n: { nullifier: string; nullifierHash: string }, +// idx: number +// ) => ( +//
+//
+//
+//
+// Nullifier {idx + 1} +//
+//
+// +//
+//
+//
+//
+// Hash (blake3) +//
+//
+// {n.nullifierHash} +//
+//
+//
+//
+// ) +// )} +//
+//
+//
+// +// )} +// +// ); +// }; diff --git a/src/components/features/wormhole/WormholeOutputsTable.tsx b/src/components/features/wormhole/WormholeOutputsTable.tsx index 4d7660f..1588d8e 100644 --- a/src/components/features/wormhole/WormholeOutputsTable.tsx +++ b/src/components/features/wormhole/WormholeOutputsTable.tsx @@ -1,86 +1,86 @@ -import { useMemo } from 'react'; -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { parseAsInteger, parseAsStringLiteral, useQueryState } from 'nuqs'; +// import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +// import { parseAsInteger, parseAsStringLiteral, useQueryState } from 'nuqs'; +// import { useMemo } from 'react'; -import useApiClient from '@/api'; -import { DataTable } from '@/components/ui/composites/data-table/DataTable'; -import { - WORMHOLE_EXTRINSIC_COLUMNS, - type WormholeExtrinsicRow -} from '@/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS'; -import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +// import useApiClient from '@/api'; +// import { +// WORMHOLE_EXTRINSIC_COLUMNS, +// type WormholeExtrinsicRow +// } from '@/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS'; +// import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +// import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +// import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -const SORT_OPTIONS = [ - 'timestamp_DESC', - 'timestamp_ASC', - 'totalAmount_DESC', - 'totalAmount_ASC' -] as const; +// const SORT_OPTIONS = [ +// 'timestamp_DESC', +// 'timestamp_ASC', +// 'totalAmount_DESC', +// 'totalAmount_ASC' +// ] as const; -export const WormholeOutputsTable = () => { - const api = useApiClient(); - const [page, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); - const [limit, setLimit] = useQueryState( - 'limit', - parseAsInteger.withDefault(QUERY_DEFAULT_LIMIT) - ); - const [sortBy] = useQueryState( - 'sortBy', - parseAsStringLiteral(SORT_OPTIONS).withDefault('timestamp_DESC') - ); +// export const WormholeOutputsTable = () => { +// const api = useApiClient(); +// const [page, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); +// const [limit, setLimit] = useQueryState( +// 'limit', +// parseAsInteger.withDefault(QUERY_DEFAULT_LIMIT) +// ); +// const [sortBy] = useQueryState( +// 'sortBy', +// parseAsStringLiteral(SORT_OPTIONS).withDefault('timestamp_DESC') +// ); - const offset = (page - 1) * limit; +// const offset = (page - 1) * limit; - const { data, loading, error } = api.wormhole.useGetAll({ - pollInterval: DATA_POOL_INTERVAL, - variables: { - orderBy: sortBy, - limit, - offset, - where: { extrinsicHash_isNull: false } - } - }); +// const { data, loading, error } = api.wormhole.useGetAll({ +// pollInterval: DATA_POOL_INTERVAL, +// variables: { +// orderBy: sortBy, +// limit, +// offset, +// where: { extrinsicHash_isNull: false } +// } +// }); - const rows: WormholeExtrinsicRow[] = useMemo( - () => data?.wormholeExtrinsics ?? [], - [data] - ); - const totalCount = data?.meta?.totalCount ?? 0; +// const rows: WormholeExtrinsicRow[] = useMemo( +// () => data?.wormholeExtrinsics ?? [], +// [data] +// ); +// const totalCount = data?.meta?.totalCount ?? 0; - const table = useReactTable({ - data: rows, - columns: WORMHOLE_EXTRINSIC_COLUMNS, - getCoreRowModel: getCoreRowModel(), - manualSorting: true, - manualPagination: true, - pageCount: Math.ceil(totalCount / limit), - state: { - pagination: { pageIndex: page - 1, pageSize: limit } - }, - onPaginationChange: (updater) => { - if (typeof updater === 'function') { - const next = updater({ pageIndex: page - 1, pageSize: limit }); - setPage(next.pageIndex + 1); - setLimit(next.pageSize); - } - } - }); +// const table = useReactTable({ +// data: rows, +// columns: WORMHOLE_EXTRINSIC_COLUMNS, +// getCoreRowModel: getCoreRowModel(), +// manualSorting: true, +// manualPagination: true, +// pageCount: Math.ceil(totalCount / limit), +// state: { +// pagination: { pageIndex: page - 1, pageSize: limit } +// }, +// onPaginationChange: (updater) => { +// if (typeof updater === 'function') { +// const next = updater({ pageIndex: page - 1, pageSize: limit }); +// setPage(next.pageIndex + 1); +// setLimit(next.pageSize); +// } +// } +// }); - const getStatus = () => { - if (loading) return 'loading' as const; - if (error) return 'error' as const; - return 'success' as const; - }; +// const getStatus = () => { +// if (loading) return 'loading' as const; +// if (error) return 'error' as const; +// return 'success' as const; +// }; - return ( - Error: {error.message}
: undefined - }} - withControls - /> - ); -}; +// return ( +// Error: {error.message}
: undefined +// }} +// withControls +// /> +// ); +// }; diff --git a/src/config/site-navigations.ts b/src/config/site-navigations.ts index 1cb0d97..22875a6 100644 --- a/src/config/site-navigations.ts +++ b/src/config/site-navigations.ts @@ -70,6 +70,6 @@ export const SITE_NAVIGATIONS: (SiteNavigation | ParentNavigation)[] = [ longLabel: 'Error Events' } ] - }, - { label: 'Wormhole', path: '/wormhole', longLabel: 'Wormhole Privacy' } + } + // { label: 'Wormhole', path: '/wormhole', longLabel: 'Wormhole Privacy' } ] as const; diff --git a/src/routes/wormhole/$id.tsx b/src/routes/wormhole/$id.tsx index c92662e..8632144 100644 --- a/src/routes/wormhole/$id.tsx +++ b/src/routes/wormhole/$id.tsx @@ -1,6 +1,6 @@ import { createFileRoute } from '@tanstack/react-router'; -import { WormholeOutputInformation } from '@/components/features/wormhole/WormholeOutputDetails'; +// import { WormholeOutputInformation } from '@/components/features/wormhole/WormholeOutputDetails'; import { ContentContainer } from '@/components/ui/content-container'; import { SectionContainer } from '@/components/ui/section-container'; @@ -9,13 +9,13 @@ export const Route = createFileRoute('/wormhole/$id')({ }); function WormholeOutputDetailsPage() { - const { id } = Route.useParams(); + // const { id } = Route.useParams(); return (

Wormhole Output

- + {/* */}
); diff --git a/src/routes/wormhole/index.tsx b/src/routes/wormhole/index.tsx index 3eb5f6c..45057a7 100644 --- a/src/routes/wormhole/index.tsx +++ b/src/routes/wormhole/index.tsx @@ -1,9 +1,9 @@ import { createFileRoute } from '@tanstack/react-router'; +// import { DepositPoolStatsCard } from '@/components/features/wormhole/DepositPoolStats'; +// import { WormholeOutputsTable } from '@/components/features/wormhole/WormholeOutputsTable'; import { ContentContainer } from '@/components/ui/content-container'; import { SectionContainer } from '@/components/ui/section-container'; -import { DepositPoolStatsCard } from '@/components/features/wormhole/DepositPoolStats'; -import { WormholeOutputsTable } from '@/components/features/wormhole/WormholeOutputsTable'; export const Route = createFileRoute('/wormhole/')({ component: WormholePage @@ -21,9 +21,9 @@ function WormholePage() { it.

- + {/* */}

Recent Outputs

- + {/* */} ); diff --git a/src/schemas/wormhole.ts b/src/schemas/wormhole.ts index c20ad2f..94f0fcd 100644 --- a/src/schemas/wormhole.ts +++ b/src/schemas/wormhole.ts @@ -1,65 +1,65 @@ -import type * as gql from '../__generated__/graphql'; +// import type * as gql from '../__generated__/graphql'; -// Core wormhole extrinsic for list views -export interface WormholeExtrinsic - extends Pick< - gql.WormholeExtrinsic, - | 'id' - | 'extrinsicHash' - | 'totalAmount' - | 'outputCount' - | 'timestamp' - | 'privacyScore' - | 'privacyLabel' - > { - block: Pick; -} +// // Core wormhole extrinsic for list views +// export interface WormholeExtrinsic +// extends Pick< +// gql.WormholeExtrinsic, +// | 'id' +// | 'extrinsicHash' +// | 'totalAmount' +// | 'outputCount' +// | 'timestamp' +// | 'privacyScore' +// | 'privacyLabel' +// > { +// block: Pick; +// } -// Full wormhole extrinsic for detail view -export interface WormholeExtrinsicDetail - extends Pick< - gql.WormholeExtrinsic, - | 'id' - | 'extrinsicHash' - | 'totalAmount' - | 'outputCount' - | 'timestamp' - | 'privacyScore' - | 'privacyScore01Pct' - | 'privacyScore1Pct' - | 'privacyScore5Pct' - | 'privacyLabel' - | 'poolSnapshot' - > { - block: Pick; - outputs: WormholeOutput[]; -} +// // Full wormhole extrinsic for detail view +// export interface WormholeExtrinsicDetail +// extends Pick< +// gql.WormholeExtrinsic, +// | 'id' +// | 'extrinsicHash' +// | 'totalAmount' +// | 'outputCount' +// | 'timestamp' +// | 'privacyScore' +// | 'privacyScore01Pct' +// | 'privacyScore1Pct' +// | 'privacyScore5Pct' +// | 'privacyLabel' +// | 'poolSnapshot' +// > { +// block: Pick; +// outputs: WormholeOutput[]; +// } -export interface WormholeOutput { - id: string; - exitAccount: Pick; - amount: gql.Scalars['BigInt']['output']; -} +// export interface WormholeOutput { +// id: string; +// exitAccount: Pick; +// amount: gql.Scalars['BigInt']['output']; +// } -export interface WormholeNullifier - extends Pick {} +// export interface WormholeNullifier +// extends Pick {} -export interface DepositPoolStats - extends Pick {} +// export interface DepositPoolStats +// extends Pick {} -// API Response types -export interface WormholeExtrinsicListResponse { - wormholeExtrinsics: WormholeExtrinsic[]; - meta: { - totalCount: number; - }; -} +// // API Response types +// export interface WormholeExtrinsicListResponse { +// wormholeExtrinsics: WormholeExtrinsic[]; +// meta: { +// totalCount: number; +// }; +// } -export interface WormholeExtrinsicResponse { - wormholeExtrinsicById: WormholeExtrinsicDetail; - wormholeNullifiers: WormholeNullifier[]; -} +// export interface WormholeExtrinsicResponse { +// wormholeExtrinsicById: WormholeExtrinsicDetail; +// wormholeNullifiers: WormholeNullifier[]; +// } -export interface DepositPoolStatsResponse { - depositPoolStatsById: DepositPoolStats; -} +// export interface DepositPoolStatsResponse { +// depositPoolStatsById: DepositPoolStats; +// } From f6ab2533d1a67dbf86e8e509001e14e5e44db257 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 13:42:04 +0800 Subject: [PATCH 02/12] wip: updating reversible transactions --- codegen.ts | 3 +- src/__generated__/gql.ts | 117 - src/__generated__/graphql.ts | 6064 +++++------------ src/api/cancelled-reversible-transactions.tsx | 148 + src/api/executed-reversible-transactions.tsx | 142 + src/api/index.tsx | 6 + src/api/scheduled-reversible-transactions.tsx | 128 + .../query-sorts/reversible-transactions.ts | 53 + src/schemas/reversible-transaction.ts | 63 +- 9 files changed, 2210 insertions(+), 4514 deletions(-) create mode 100644 src/api/cancelled-reversible-transactions.tsx create mode 100644 src/api/executed-reversible-transactions.tsx create mode 100644 src/api/scheduled-reversible-transactions.tsx diff --git a/codegen.ts b/codegen.ts index 51ddf06..9c2a0f1 100644 --- a/codegen.ts +++ b/codegen.ts @@ -2,7 +2,8 @@ import type { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { schema: - process.env.CODEGEN_SCHEMA_URL || 'https://subsquid.quantus.com/graphql', + process.env.CODEGEN_SCHEMA_URL || + 'https://subsquid.quantus.com/green/graphql', documents: ['src/**/*.{ts,tsx}'], generates: { './src/__generated__/': { diff --git a/src/__generated__/gql.ts b/src/__generated__/gql.ts index 34aaa1d..b9b59f7 100644 --- a/src/__generated__/gql.ts +++ b/src/__generated__/gql.ts @@ -14,13 +14,6 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size */ type Documents = { - '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [AccountOrderByInput!]\n ) {\n accounts(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': typeof types.GetAccountsDocument; - '\n query GetAccountById($id: String!, $limit: Int!) {\n account: accountById(id: $id) {\n id\n free\n frozen\n reserved\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n minerRewards: minerRewardsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { miner: { id_eq: $id } }\n ) {\n edges {\n node {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n\n totalCount\n }\n guardian: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { who: { id_eq: $id } }\n ) {\n edges {\n node {\n interceptor {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n beneficiaries: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { interceptor: { id_eq: $id } }\n ) {\n edges {\n node {\n who {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n }\n ': typeof types.GetAccountByIdDocument; - '\n query GetAccountsStats($startDate: DateTime!, $endDate: DateTime!) {\n all: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n recentlyActive: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n recentlyDeposited: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ': typeof types.GetAccountsStatsDocument; - '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]!\n $where: BlockWhereInput\n ) {\n blocks(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n }\n meta: blocksConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': typeof types.GetBlocksDocument; - '\n query GetRecentBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]\n ) {\n blocks(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n }\n }\n ': typeof types.GetRecentBlocksDocument; - '\n query GetBlockById($height: Int!, $hash: String!, $limit: Int!) {\n blocks(where: { height_eq: $height, OR: { hash_eq: $hash } }) {\n id\n hash\n height\n reward\n timestamp\n }\n miners: minerRewards(\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n miner {\n id\n }\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n highSecuritySets: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n delay\n block {\n height\n }\n who {\n id\n }\n interceptor {\n id\n }\n }\n }\n\n totalCount\n }\n errorEvents: errorEventsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n timestamp\n block {\n height\n }\n }\n }\n\n totalCount\n }\n }\n ': typeof types.GetBlockByIdDocument; - '\n query GetStatus(\n $beginningDate: DateTime!\n $todayDate: DateTime!\n $endDate: DateTime!\n ) {\n transactions: transfersConnection(\n orderBy: id_ASC\n where: { extrinsicHash_isNull: false }\n ) {\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n status: squidStatus {\n hash\n height\n finalizedHeight\n finalizedHash\n }\n minedBlocks24Hours: blocksConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $todayDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allActiveAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n allDepositAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ': typeof types.GetStatusDocument; '\n query GetErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [ErrorEventOrderByInput!]\n $where: ErrorEventWhereInput\n ) {\n errorEvents(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n id\n timestamp\n block {\n height\n }\n }\n meta: errorEventsConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ': typeof types.GetErrorEventsDocument; '\n query GetRecentErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [ErrorEventOrderByInput!]\n $where: ErrorEventWhereInput\n ) {\n errorEvents(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n id\n timestamp\n block {\n height\n }\n }\n }\n ': typeof types.GetRecentErrorEventsDocument; '\n query GetErrorEventsStats($startDate: DateTime!, $endDate: DateTime!) {\n last24Hour: errorEventsConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $startDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allTime: errorEventsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': typeof types.GetErrorEventsStatsDocument; @@ -34,32 +27,12 @@ type Documents = { '\n query GetRecentMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [MinerRewardOrderByInput!]\n $where: MinerRewardWhereInput\n ) {\n minerRewards(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ': typeof types.GetRecentMinerRewardsDocument; '\n query GetMinerRewardsStats($startDate: DateTime!, $endDate: DateTime!) {\n last24Hour: minerRewardsConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $startDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allTime: minerRewardsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': typeof types.GetMinerRewardsStatsDocument; '\n query GetMinerRewardByHash($hash: String!) {\n minerRewards(where: { block: { hash_eq: $hash } }) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ': typeof types.GetMinerRewardByHashDocument; - '\n query GetReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n $where: ReversibleTransferWhereInput\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: reversibleTransfersConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ': typeof types.GetReversibleTransactionsDocument; - '\n query GetRecentReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetRecentReversibleTransactionsDocument; - '\n query GetReversibleTransactionsStats(\n $startDate: DateTime!\n $endDate: DateTime!\n ) {\n last24Hour: reversibleTransfersConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $startDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allTime: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': typeof types.GetReversibleTransactionsStatsDocument; - '\n query GetReversibleTransactionByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n fee\n amount\n extrinsicHash\n txId\n scheduledAt\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetReversibleTransactionByHashDocument; - '\n query GetReversibleTransactionStatusByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n status\n }\n }\n ': typeof types.GetReversibleTransactionStatusByHashDocument; - '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n accounts(limit: $limit, where: { id_startsWith: $keyword }) {\n id\n }\n blocks(\n limit: $limit\n where: {\n hash_startsWith: $keyword\n OR: { height_eq: $keyword_number }\n }\n ) {\n height\n }\n highSecuritySets(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n minerRewards(\n limit: $limit\n where: { block: { hash_startsWith: $keyword } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents(\n limit: $limit\n where: {\n errorType_containsInsensitive: $keyword\n OR: { errorName_containsInsensitive: $keyword }\n }\n ) {\n extrinsicHash\n }\n }\n ': typeof types.SearchAllDocument; '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [TransferOrderByInput!]\n $where: TransferWhereInput\n ) {\n transactions: transfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n meta: transfersConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ': typeof types.GetTransactionsDocument; '\n query GetRecentTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [TransferOrderByInput!]\n $where: TransferWhereInput\n ) {\n transactions: transfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetRecentTransactionsDocument; '\n query GetTransactionsStats($startDate: DateTime!, $endDate: DateTime!) {\n last24Hour: transfersConnection(\n orderBy: id_ASC\n where: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n extrinsicHash_isNull: false\n }\n ) {\n totalCount\n }\n allTime: transfersConnection(\n orderBy: id_ASC\n where: { extrinsicHash_isNull: false }\n ) {\n totalCount\n }\n }\n ': typeof types.GetTransactionsStatsDocument; '\n query GetTransactionByHash($hash: String!) {\n transactions: transfers(where: { extrinsicHash_eq: $hash }) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetTransactionByHashDocument; }; const documents: Documents = { - '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [AccountOrderByInput!]\n ) {\n accounts(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': - types.GetAccountsDocument, - '\n query GetAccountById($id: String!, $limit: Int!) {\n account: accountById(id: $id) {\n id\n free\n frozen\n reserved\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n minerRewards: minerRewardsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { miner: { id_eq: $id } }\n ) {\n edges {\n node {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n\n totalCount\n }\n guardian: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { who: { id_eq: $id } }\n ) {\n edges {\n node {\n interceptor {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n beneficiaries: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { interceptor: { id_eq: $id } }\n ) {\n edges {\n node {\n who {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n }\n ': - types.GetAccountByIdDocument, - '\n query GetAccountsStats($startDate: DateTime!, $endDate: DateTime!) {\n all: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n recentlyActive: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n recentlyDeposited: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ': - types.GetAccountsStatsDocument, - '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]!\n $where: BlockWhereInput\n ) {\n blocks(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n }\n meta: blocksConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': - types.GetBlocksDocument, - '\n query GetRecentBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]\n ) {\n blocks(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n }\n }\n ': - types.GetRecentBlocksDocument, - '\n query GetBlockById($height: Int!, $hash: String!, $limit: Int!) {\n blocks(where: { height_eq: $height, OR: { hash_eq: $hash } }) {\n id\n hash\n height\n reward\n timestamp\n }\n miners: minerRewards(\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n miner {\n id\n }\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n highSecuritySets: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n delay\n block {\n height\n }\n who {\n id\n }\n interceptor {\n id\n }\n }\n }\n\n totalCount\n }\n errorEvents: errorEventsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n timestamp\n block {\n height\n }\n }\n }\n\n totalCount\n }\n }\n ': - types.GetBlockByIdDocument, - '\n query GetStatus(\n $beginningDate: DateTime!\n $todayDate: DateTime!\n $endDate: DateTime!\n ) {\n transactions: transfersConnection(\n orderBy: id_ASC\n where: { extrinsicHash_isNull: false }\n ) {\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n status: squidStatus {\n hash\n height\n finalizedHeight\n finalizedHash\n }\n minedBlocks24Hours: blocksConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $todayDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allActiveAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n allDepositAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ': - types.GetStatusDocument, '\n query GetErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [ErrorEventOrderByInput!]\n $where: ErrorEventWhereInput\n ) {\n errorEvents(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n id\n timestamp\n block {\n height\n }\n }\n meta: errorEventsConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ': types.GetErrorEventsDocument, '\n query GetRecentErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [ErrorEventOrderByInput!]\n $where: ErrorEventWhereInput\n ) {\n errorEvents(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n id\n timestamp\n block {\n height\n }\n }\n }\n ': @@ -86,18 +59,6 @@ const documents: Documents = { types.GetMinerRewardsStatsDocument, '\n query GetMinerRewardByHash($hash: String!) {\n minerRewards(where: { block: { hash_eq: $hash } }) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ': types.GetMinerRewardByHashDocument, - '\n query GetReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n $where: ReversibleTransferWhereInput\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: reversibleTransfersConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ': - types.GetReversibleTransactionsDocument, - '\n query GetRecentReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': - types.GetRecentReversibleTransactionsDocument, - '\n query GetReversibleTransactionsStats(\n $startDate: DateTime!\n $endDate: DateTime!\n ) {\n last24Hour: reversibleTransfersConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $startDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allTime: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ': - types.GetReversibleTransactionsStatsDocument, - '\n query GetReversibleTransactionByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n fee\n amount\n extrinsicHash\n txId\n scheduledAt\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': - types.GetReversibleTransactionByHashDocument, - '\n query GetReversibleTransactionStatusByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n status\n }\n }\n ': - types.GetReversibleTransactionStatusByHashDocument, - '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n accounts(limit: $limit, where: { id_startsWith: $keyword }) {\n id\n }\n blocks(\n limit: $limit\n where: {\n hash_startsWith: $keyword\n OR: { height_eq: $keyword_number }\n }\n ) {\n height\n }\n highSecuritySets(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n minerRewards(\n limit: $limit\n where: { block: { hash_startsWith: $keyword } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents(\n limit: $limit\n where: {\n errorType_containsInsensitive: $keyword\n OR: { errorName_containsInsensitive: $keyword }\n }\n ) {\n extrinsicHash\n }\n }\n ': - types.SearchAllDocument, '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [TransferOrderByInput!]\n $where: TransferWhereInput\n ) {\n transactions: transfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n meta: transfersConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ': types.GetTransactionsDocument, '\n query GetRecentTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [TransferOrderByInput!]\n $where: TransferWhereInput\n ) {\n transactions: transfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': @@ -122,48 +83,6 @@ const documents: Documents = { */ export function gql(source: string): unknown; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [AccountOrderByInput!]\n ) {\n accounts(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [AccountOrderByInput!]\n ) {\n accounts(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetAccountById($id: String!, $limit: Int!) {\n account: accountById(id: $id) {\n id\n free\n frozen\n reserved\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n minerRewards: minerRewardsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { miner: { id_eq: $id } }\n ) {\n edges {\n node {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n\n totalCount\n }\n guardian: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { who: { id_eq: $id } }\n ) {\n edges {\n node {\n interceptor {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n beneficiaries: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { interceptor: { id_eq: $id } }\n ) {\n edges {\n node {\n who {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetAccountById($id: String!, $limit: Int!) {\n account: accountById(id: $id) {\n id\n free\n frozen\n reserved\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n minerRewards: minerRewardsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { miner: { id_eq: $id } }\n ) {\n edges {\n node {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n\n totalCount\n }\n guardian: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { who: { id_eq: $id } }\n ) {\n edges {\n node {\n interceptor {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n beneficiaries: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: { interceptor: { id_eq: $id } }\n ) {\n edges {\n node {\n who {\n id\n free\n frozen\n reserved\n }\n }\n }\n\n totalCount\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetAccountsStats($startDate: DateTime!, $endDate: DateTime!) {\n all: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n recentlyActive: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n recentlyDeposited: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetAccountsStats($startDate: DateTime!, $endDate: DateTime!) {\n all: accountsConnection(orderBy: id_ASC) {\n totalCount\n }\n recentlyActive: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n recentlyDeposited: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $startDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]!\n $where: BlockWhereInput\n ) {\n blocks(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n }\n meta: blocksConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]!\n $where: BlockWhereInput\n ) {\n blocks(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n }\n meta: blocksConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetRecentBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]\n ) {\n blocks(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n }\n }\n ' -): (typeof documents)['\n query GetRecentBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [BlockOrderByInput!]\n ) {\n blocks(limit: $limit, offset: $offset, orderBy: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetBlockById($height: Int!, $hash: String!, $limit: Int!) {\n blocks(where: { height_eq: $height, OR: { hash_eq: $hash } }) {\n id\n hash\n height\n reward\n timestamp\n }\n miners: minerRewards(\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n miner {\n id\n }\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n highSecuritySets: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n delay\n block {\n height\n }\n who {\n id\n }\n interceptor {\n id\n }\n }\n }\n\n totalCount\n }\n errorEvents: errorEventsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n timestamp\n block {\n height\n }\n }\n }\n\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetBlockById($height: Int!, $hash: String!, $limit: Int!) {\n blocks(where: { height_eq: $height, OR: { hash_eq: $hash } }) {\n id\n hash\n height\n reward\n timestamp\n }\n miners: minerRewards(\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n miner {\n id\n }\n }\n transactions: transfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n extrinsicHash_isNull: false\n AND: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n }\n ) {\n edges {\n node {\n fee\n extrinsicHash\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n status\n amount\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n\n totalCount\n }\n highSecuritySets: highSecuritySetsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n extrinsicHash\n timestamp\n delay\n block {\n height\n }\n who {\n id\n }\n interceptor {\n id\n }\n }\n }\n\n totalCount\n }\n errorEvents: errorEventsConnection(\n orderBy: timestamp_DESC\n first: $limit\n where: {\n block: { height_eq: $height }\n OR: { block: { hash_eq: $hash } }\n }\n ) {\n edges {\n node {\n errorDocs\n errorModule\n errorName\n errorType\n extrinsicHash\n timestamp\n block {\n height\n }\n }\n }\n\n totalCount\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetStatus(\n $beginningDate: DateTime!\n $todayDate: DateTime!\n $endDate: DateTime!\n ) {\n transactions: transfersConnection(\n orderBy: id_ASC\n where: { extrinsicHash_isNull: false }\n ) {\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n status: squidStatus {\n hash\n height\n finalizedHeight\n finalizedHash\n }\n minedBlocks24Hours: blocksConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $todayDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allActiveAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n allDepositAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetStatus(\n $beginningDate: DateTime!\n $todayDate: DateTime!\n $endDate: DateTime!\n ) {\n transactions: transfersConnection(\n orderBy: id_ASC\n where: { extrinsicHash_isNull: false }\n ) {\n totalCount\n }\n reversibleTransactions: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n status: squidStatus {\n hash\n height\n finalizedHeight\n finalizedHash\n }\n minedBlocks24Hours: blocksConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $todayDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allActiveAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersFrom_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n allDepositAccounts: accountsConnection(\n orderBy: id_ASC\n where: {\n transfersTo_some: {\n timestamp_gte: $beginningDate\n timestamp_lte: $endDate\n }\n }\n ) {\n totalCount\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -242,42 +161,6 @@ export function gql( export function gql( source: '\n query GetMinerRewardByHash($hash: String!) {\n minerRewards(where: { block: { hash_eq: $hash } }) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ' ): (typeof documents)['\n query GetMinerRewardByHash($hash: String!) {\n minerRewards(where: { block: { hash_eq: $hash } }) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n $where: ReversibleTransferWhereInput\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: reversibleTransfersConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n $where: ReversibleTransferWhereInput\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n where: $where\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: reversibleTransfersConnection(orderBy: id_ASC, where: $where) {\n totalCount\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetRecentReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [ReversibleTransferOrderByInput!]\n ) {\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n ) {\n extrinsicHash\n amount\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetReversibleTransactionsStats(\n $startDate: DateTime!\n $endDate: DateTime!\n ) {\n last24Hour: reversibleTransfersConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $startDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allTime: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ' -): (typeof documents)['\n query GetReversibleTransactionsStats(\n $startDate: DateTime!\n $endDate: DateTime!\n ) {\n last24Hour: reversibleTransfersConnection(\n orderBy: id_ASC\n where: { timestamp_gte: $startDate, timestamp_lte: $endDate }\n ) {\n totalCount\n }\n allTime: reversibleTransfersConnection(orderBy: id_ASC) {\n totalCount\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetReversibleTransactionByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n fee\n amount\n extrinsicHash\n txId\n scheduledAt\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' -): (typeof documents)['\n query GetReversibleTransactionByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n fee\n amount\n extrinsicHash\n txId\n scheduledAt\n timestamp\n status\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query GetReversibleTransactionStatusByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n status\n }\n }\n ' -): (typeof documents)['\n query GetReversibleTransactionStatusByHash($hash: String!) {\n reversibleTransactions: reversibleTransfers(\n where: { extrinsicHash_eq: $hash }\n ) {\n status\n }\n }\n ']; -/** - * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function gql( - source: '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n accounts(limit: $limit, where: { id_startsWith: $keyword }) {\n id\n }\n blocks(\n limit: $limit\n where: {\n hash_startsWith: $keyword\n OR: { height_eq: $keyword_number }\n }\n ) {\n height\n }\n highSecuritySets(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n minerRewards(\n limit: $limit\n where: { block: { hash_startsWith: $keyword } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents(\n limit: $limit\n where: {\n errorType_containsInsensitive: $keyword\n OR: { errorName_containsInsensitive: $keyword }\n }\n ) {\n extrinsicHash\n }\n }\n ' -): (typeof documents)['\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n reversibleTransactions: reversibleTransfers(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n accounts(limit: $limit, where: { id_startsWith: $keyword }) {\n id\n }\n blocks(\n limit: $limit\n where: {\n hash_startsWith: $keyword\n OR: { height_eq: $keyword_number }\n }\n ) {\n height\n }\n highSecuritySets(\n limit: $limit\n where: { extrinsicHash_startsWith: $keyword }\n ) {\n extrinsicHash\n }\n minerRewards(\n limit: $limit\n where: { block: { hash_startsWith: $keyword } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents(\n limit: $limit\n where: {\n errorType_containsInsensitive: $keyword\n OR: { errorName_containsInsensitive: $keyword }\n }\n ) {\n extrinsicHash\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/src/__generated__/graphql.ts b/src/__generated__/graphql.ts index edd581a..8a9ae7e 100644 --- a/src/__generated__/graphql.ts +++ b/src/__generated__/graphql.ts @@ -35,6 +35,7 @@ export type Scalars = { export type Account = { __typename?: 'Account'; + accountEvents: Array; free: Scalars['BigInt']['output']; frozen: Scalars['BigInt']['output']; /** Account address */ @@ -45,6 +46,13 @@ export type Account = { transfersTo: Array; }; +export type AccountAccountEventsArgs = { + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + export type AccountTransfersFromArgs = { limit?: InputMaybe; offset?: InputMaybe; @@ -65,6 +73,317 @@ export type AccountEdge = { node: Account; }; +export type AccountEvent = { + __typename?: 'AccountEvent'; + account: Account; + balanceEvent?: Maybe; + cancelledReversibleTransfer?: Maybe; + executedReversibleTransfer?: Maybe; + highSecuritySet?: Maybe; + id: Scalars['String']['output']; + minerReward?: Maybe; + scheduledReversibleTransfer?: Maybe; + timestamp: Scalars['DateTime']['output']; + transfer?: Maybe; +}; + +export type AccountEventEdge = { + __typename?: 'AccountEventEdge'; + cursor: Scalars['String']['output']; + node: AccountEvent; +}; + +export enum AccountEventOrderByInput { + AccountFreeAsc = 'account_free_ASC', + AccountFreeAscNullsFirst = 'account_free_ASC_NULLS_FIRST', + AccountFreeAscNullsLast = 'account_free_ASC_NULLS_LAST', + AccountFreeDesc = 'account_free_DESC', + AccountFreeDescNullsFirst = 'account_free_DESC_NULLS_FIRST', + AccountFreeDescNullsLast = 'account_free_DESC_NULLS_LAST', + AccountFrozenAsc = 'account_frozen_ASC', + AccountFrozenAscNullsFirst = 'account_frozen_ASC_NULLS_FIRST', + AccountFrozenAscNullsLast = 'account_frozen_ASC_NULLS_LAST', + AccountFrozenDesc = 'account_frozen_DESC', + AccountFrozenDescNullsFirst = 'account_frozen_DESC_NULLS_FIRST', + AccountFrozenDescNullsLast = 'account_frozen_DESC_NULLS_LAST', + AccountIdAsc = 'account_id_ASC', + AccountIdAscNullsFirst = 'account_id_ASC_NULLS_FIRST', + AccountIdAscNullsLast = 'account_id_ASC_NULLS_LAST', + AccountIdDesc = 'account_id_DESC', + AccountIdDescNullsFirst = 'account_id_DESC_NULLS_FIRST', + AccountIdDescNullsLast = 'account_id_DESC_NULLS_LAST', + AccountLastUpdatedAsc = 'account_lastUpdated_ASC', + AccountLastUpdatedAscNullsFirst = 'account_lastUpdated_ASC_NULLS_FIRST', + AccountLastUpdatedAscNullsLast = 'account_lastUpdated_ASC_NULLS_LAST', + AccountLastUpdatedDesc = 'account_lastUpdated_DESC', + AccountLastUpdatedDescNullsFirst = 'account_lastUpdated_DESC_NULLS_FIRST', + AccountLastUpdatedDescNullsLast = 'account_lastUpdated_DESC_NULLS_LAST', + AccountReservedAsc = 'account_reserved_ASC', + AccountReservedAscNullsFirst = 'account_reserved_ASC_NULLS_FIRST', + AccountReservedAscNullsLast = 'account_reserved_ASC_NULLS_LAST', + AccountReservedDesc = 'account_reserved_DESC', + AccountReservedDescNullsFirst = 'account_reserved_DESC_NULLS_FIRST', + AccountReservedDescNullsLast = 'account_reserved_DESC_NULLS_LAST', + BalanceEventAmountAsc = 'balanceEvent_amount_ASC', + BalanceEventAmountAscNullsFirst = 'balanceEvent_amount_ASC_NULLS_FIRST', + BalanceEventAmountAscNullsLast = 'balanceEvent_amount_ASC_NULLS_LAST', + BalanceEventAmountDesc = 'balanceEvent_amount_DESC', + BalanceEventAmountDescNullsFirst = 'balanceEvent_amount_DESC_NULLS_FIRST', + BalanceEventAmountDescNullsLast = 'balanceEvent_amount_DESC_NULLS_LAST', + BalanceEventIdAsc = 'balanceEvent_id_ASC', + BalanceEventIdAscNullsFirst = 'balanceEvent_id_ASC_NULLS_FIRST', + BalanceEventIdAscNullsLast = 'balanceEvent_id_ASC_NULLS_LAST', + BalanceEventIdDesc = 'balanceEvent_id_DESC', + BalanceEventIdDescNullsFirst = 'balanceEvent_id_DESC_NULLS_FIRST', + BalanceEventIdDescNullsLast = 'balanceEvent_id_DESC_NULLS_LAST', + BalanceEventTimestampAsc = 'balanceEvent_timestamp_ASC', + BalanceEventTimestampAscNullsFirst = 'balanceEvent_timestamp_ASC_NULLS_FIRST', + BalanceEventTimestampAscNullsLast = 'balanceEvent_timestamp_ASC_NULLS_LAST', + BalanceEventTimestampDesc = 'balanceEvent_timestamp_DESC', + BalanceEventTimestampDescNullsFirst = 'balanceEvent_timestamp_DESC_NULLS_FIRST', + BalanceEventTimestampDescNullsLast = 'balanceEvent_timestamp_DESC_NULLS_LAST', + BalanceEventTypeAsc = 'balanceEvent_type_ASC', + BalanceEventTypeAscNullsFirst = 'balanceEvent_type_ASC_NULLS_FIRST', + BalanceEventTypeAscNullsLast = 'balanceEvent_type_ASC_NULLS_LAST', + BalanceEventTypeDesc = 'balanceEvent_type_DESC', + BalanceEventTypeDescNullsFirst = 'balanceEvent_type_DESC_NULLS_FIRST', + BalanceEventTypeDescNullsLast = 'balanceEvent_type_DESC_NULLS_LAST', + CancelledReversibleTransferExtrinsicHashAsc = 'cancelledReversibleTransfer_extrinsicHash_ASC', + CancelledReversibleTransferExtrinsicHashAscNullsFirst = 'cancelledReversibleTransfer_extrinsicHash_ASC_NULLS_FIRST', + CancelledReversibleTransferExtrinsicHashAscNullsLast = 'cancelledReversibleTransfer_extrinsicHash_ASC_NULLS_LAST', + CancelledReversibleTransferExtrinsicHashDesc = 'cancelledReversibleTransfer_extrinsicHash_DESC', + CancelledReversibleTransferExtrinsicHashDescNullsFirst = 'cancelledReversibleTransfer_extrinsicHash_DESC_NULLS_FIRST', + CancelledReversibleTransferExtrinsicHashDescNullsLast = 'cancelledReversibleTransfer_extrinsicHash_DESC_NULLS_LAST', + CancelledReversibleTransferIdAsc = 'cancelledReversibleTransfer_id_ASC', + CancelledReversibleTransferIdAscNullsFirst = 'cancelledReversibleTransfer_id_ASC_NULLS_FIRST', + CancelledReversibleTransferIdAscNullsLast = 'cancelledReversibleTransfer_id_ASC_NULLS_LAST', + CancelledReversibleTransferIdDesc = 'cancelledReversibleTransfer_id_DESC', + CancelledReversibleTransferIdDescNullsFirst = 'cancelledReversibleTransfer_id_DESC_NULLS_FIRST', + CancelledReversibleTransferIdDescNullsLast = 'cancelledReversibleTransfer_id_DESC_NULLS_LAST', + CancelledReversibleTransferTimestampAsc = 'cancelledReversibleTransfer_timestamp_ASC', + CancelledReversibleTransferTimestampAscNullsFirst = 'cancelledReversibleTransfer_timestamp_ASC_NULLS_FIRST', + CancelledReversibleTransferTimestampAscNullsLast = 'cancelledReversibleTransfer_timestamp_ASC_NULLS_LAST', + CancelledReversibleTransferTimestampDesc = 'cancelledReversibleTransfer_timestamp_DESC', + CancelledReversibleTransferTimestampDescNullsFirst = 'cancelledReversibleTransfer_timestamp_DESC_NULLS_FIRST', + CancelledReversibleTransferTimestampDescNullsLast = 'cancelledReversibleTransfer_timestamp_DESC_NULLS_LAST', + CancelledReversibleTransferTxIdAsc = 'cancelledReversibleTransfer_txId_ASC', + CancelledReversibleTransferTxIdAscNullsFirst = 'cancelledReversibleTransfer_txId_ASC_NULLS_FIRST', + CancelledReversibleTransferTxIdAscNullsLast = 'cancelledReversibleTransfer_txId_ASC_NULLS_LAST', + CancelledReversibleTransferTxIdDesc = 'cancelledReversibleTransfer_txId_DESC', + CancelledReversibleTransferTxIdDescNullsFirst = 'cancelledReversibleTransfer_txId_DESC_NULLS_FIRST', + CancelledReversibleTransferTxIdDescNullsLast = 'cancelledReversibleTransfer_txId_DESC_NULLS_LAST', + ExecutedReversibleTransferIdAsc = 'executedReversibleTransfer_id_ASC', + ExecutedReversibleTransferIdAscNullsFirst = 'executedReversibleTransfer_id_ASC_NULLS_FIRST', + ExecutedReversibleTransferIdAscNullsLast = 'executedReversibleTransfer_id_ASC_NULLS_LAST', + ExecutedReversibleTransferIdDesc = 'executedReversibleTransfer_id_DESC', + ExecutedReversibleTransferIdDescNullsFirst = 'executedReversibleTransfer_id_DESC_NULLS_FIRST', + ExecutedReversibleTransferIdDescNullsLast = 'executedReversibleTransfer_id_DESC_NULLS_LAST', + ExecutedReversibleTransferTimestampAsc = 'executedReversibleTransfer_timestamp_ASC', + ExecutedReversibleTransferTimestampAscNullsFirst = 'executedReversibleTransfer_timestamp_ASC_NULLS_FIRST', + ExecutedReversibleTransferTimestampAscNullsLast = 'executedReversibleTransfer_timestamp_ASC_NULLS_LAST', + ExecutedReversibleTransferTimestampDesc = 'executedReversibleTransfer_timestamp_DESC', + ExecutedReversibleTransferTimestampDescNullsFirst = 'executedReversibleTransfer_timestamp_DESC_NULLS_FIRST', + ExecutedReversibleTransferTimestampDescNullsLast = 'executedReversibleTransfer_timestamp_DESC_NULLS_LAST', + ExecutedReversibleTransferTxIdAsc = 'executedReversibleTransfer_txId_ASC', + ExecutedReversibleTransferTxIdAscNullsFirst = 'executedReversibleTransfer_txId_ASC_NULLS_FIRST', + ExecutedReversibleTransferTxIdAscNullsLast = 'executedReversibleTransfer_txId_ASC_NULLS_LAST', + ExecutedReversibleTransferTxIdDesc = 'executedReversibleTransfer_txId_DESC', + ExecutedReversibleTransferTxIdDescNullsFirst = 'executedReversibleTransfer_txId_DESC_NULLS_FIRST', + ExecutedReversibleTransferTxIdDescNullsLast = 'executedReversibleTransfer_txId_DESC_NULLS_LAST', + HighSecuritySetDelayAsc = 'highSecuritySet_delay_ASC', + HighSecuritySetDelayAscNullsFirst = 'highSecuritySet_delay_ASC_NULLS_FIRST', + HighSecuritySetDelayAscNullsLast = 'highSecuritySet_delay_ASC_NULLS_LAST', + HighSecuritySetDelayDesc = 'highSecuritySet_delay_DESC', + HighSecuritySetDelayDescNullsFirst = 'highSecuritySet_delay_DESC_NULLS_FIRST', + HighSecuritySetDelayDescNullsLast = 'highSecuritySet_delay_DESC_NULLS_LAST', + HighSecuritySetExtrinsicHashAsc = 'highSecuritySet_extrinsicHash_ASC', + HighSecuritySetExtrinsicHashAscNullsFirst = 'highSecuritySet_extrinsicHash_ASC_NULLS_FIRST', + HighSecuritySetExtrinsicHashAscNullsLast = 'highSecuritySet_extrinsicHash_ASC_NULLS_LAST', + HighSecuritySetExtrinsicHashDesc = 'highSecuritySet_extrinsicHash_DESC', + HighSecuritySetExtrinsicHashDescNullsFirst = 'highSecuritySet_extrinsicHash_DESC_NULLS_FIRST', + HighSecuritySetExtrinsicHashDescNullsLast = 'highSecuritySet_extrinsicHash_DESC_NULLS_LAST', + HighSecuritySetIdAsc = 'highSecuritySet_id_ASC', + HighSecuritySetIdAscNullsFirst = 'highSecuritySet_id_ASC_NULLS_FIRST', + HighSecuritySetIdAscNullsLast = 'highSecuritySet_id_ASC_NULLS_LAST', + HighSecuritySetIdDesc = 'highSecuritySet_id_DESC', + HighSecuritySetIdDescNullsFirst = 'highSecuritySet_id_DESC_NULLS_FIRST', + HighSecuritySetIdDescNullsLast = 'highSecuritySet_id_DESC_NULLS_LAST', + HighSecuritySetTimestampAsc = 'highSecuritySet_timestamp_ASC', + HighSecuritySetTimestampAscNullsFirst = 'highSecuritySet_timestamp_ASC_NULLS_FIRST', + HighSecuritySetTimestampAscNullsLast = 'highSecuritySet_timestamp_ASC_NULLS_LAST', + HighSecuritySetTimestampDesc = 'highSecuritySet_timestamp_DESC', + HighSecuritySetTimestampDescNullsFirst = 'highSecuritySet_timestamp_DESC_NULLS_FIRST', + HighSecuritySetTimestampDescNullsLast = 'highSecuritySet_timestamp_DESC_NULLS_LAST', + IdAsc = 'id_ASC', + IdAscNullsFirst = 'id_ASC_NULLS_FIRST', + IdAscNullsLast = 'id_ASC_NULLS_LAST', + IdDesc = 'id_DESC', + IdDescNullsFirst = 'id_DESC_NULLS_FIRST', + IdDescNullsLast = 'id_DESC_NULLS_LAST', + MinerRewardIdAsc = 'minerReward_id_ASC', + MinerRewardIdAscNullsFirst = 'minerReward_id_ASC_NULLS_FIRST', + MinerRewardIdAscNullsLast = 'minerReward_id_ASC_NULLS_LAST', + MinerRewardIdDesc = 'minerReward_id_DESC', + MinerRewardIdDescNullsFirst = 'minerReward_id_DESC_NULLS_FIRST', + MinerRewardIdDescNullsLast = 'minerReward_id_DESC_NULLS_LAST', + MinerRewardRewardAsc = 'minerReward_reward_ASC', + MinerRewardRewardAscNullsFirst = 'minerReward_reward_ASC_NULLS_FIRST', + MinerRewardRewardAscNullsLast = 'minerReward_reward_ASC_NULLS_LAST', + MinerRewardRewardDesc = 'minerReward_reward_DESC', + MinerRewardRewardDescNullsFirst = 'minerReward_reward_DESC_NULLS_FIRST', + MinerRewardRewardDescNullsLast = 'minerReward_reward_DESC_NULLS_LAST', + MinerRewardTimestampAsc = 'minerReward_timestamp_ASC', + MinerRewardTimestampAscNullsFirst = 'minerReward_timestamp_ASC_NULLS_FIRST', + MinerRewardTimestampAscNullsLast = 'minerReward_timestamp_ASC_NULLS_LAST', + MinerRewardTimestampDesc = 'minerReward_timestamp_DESC', + MinerRewardTimestampDescNullsFirst = 'minerReward_timestamp_DESC_NULLS_FIRST', + MinerRewardTimestampDescNullsLast = 'minerReward_timestamp_DESC_NULLS_LAST', + ScheduledReversibleTransferAmountAsc = 'scheduledReversibleTransfer_amount_ASC', + ScheduledReversibleTransferAmountAscNullsFirst = 'scheduledReversibleTransfer_amount_ASC_NULLS_FIRST', + ScheduledReversibleTransferAmountAscNullsLast = 'scheduledReversibleTransfer_amount_ASC_NULLS_LAST', + ScheduledReversibleTransferAmountDesc = 'scheduledReversibleTransfer_amount_DESC', + ScheduledReversibleTransferAmountDescNullsFirst = 'scheduledReversibleTransfer_amount_DESC_NULLS_FIRST', + ScheduledReversibleTransferAmountDescNullsLast = 'scheduledReversibleTransfer_amount_DESC_NULLS_LAST', + ScheduledReversibleTransferExtrinsicHashAsc = 'scheduledReversibleTransfer_extrinsicHash_ASC', + ScheduledReversibleTransferExtrinsicHashAscNullsFirst = 'scheduledReversibleTransfer_extrinsicHash_ASC_NULLS_FIRST', + ScheduledReversibleTransferExtrinsicHashAscNullsLast = 'scheduledReversibleTransfer_extrinsicHash_ASC_NULLS_LAST', + ScheduledReversibleTransferExtrinsicHashDesc = 'scheduledReversibleTransfer_extrinsicHash_DESC', + ScheduledReversibleTransferExtrinsicHashDescNullsFirst = 'scheduledReversibleTransfer_extrinsicHash_DESC_NULLS_FIRST', + ScheduledReversibleTransferExtrinsicHashDescNullsLast = 'scheduledReversibleTransfer_extrinsicHash_DESC_NULLS_LAST', + ScheduledReversibleTransferFeeAsc = 'scheduledReversibleTransfer_fee_ASC', + ScheduledReversibleTransferFeeAscNullsFirst = 'scheduledReversibleTransfer_fee_ASC_NULLS_FIRST', + ScheduledReversibleTransferFeeAscNullsLast = 'scheduledReversibleTransfer_fee_ASC_NULLS_LAST', + ScheduledReversibleTransferFeeDesc = 'scheduledReversibleTransfer_fee_DESC', + ScheduledReversibleTransferFeeDescNullsFirst = 'scheduledReversibleTransfer_fee_DESC_NULLS_FIRST', + ScheduledReversibleTransferFeeDescNullsLast = 'scheduledReversibleTransfer_fee_DESC_NULLS_LAST', + ScheduledReversibleTransferIdAsc = 'scheduledReversibleTransfer_id_ASC', + ScheduledReversibleTransferIdAscNullsFirst = 'scheduledReversibleTransfer_id_ASC_NULLS_FIRST', + ScheduledReversibleTransferIdAscNullsLast = 'scheduledReversibleTransfer_id_ASC_NULLS_LAST', + ScheduledReversibleTransferIdDesc = 'scheduledReversibleTransfer_id_DESC', + ScheduledReversibleTransferIdDescNullsFirst = 'scheduledReversibleTransfer_id_DESC_NULLS_FIRST', + ScheduledReversibleTransferIdDescNullsLast = 'scheduledReversibleTransfer_id_DESC_NULLS_LAST', + ScheduledReversibleTransferScheduledAtAsc = 'scheduledReversibleTransfer_scheduledAt_ASC', + ScheduledReversibleTransferScheduledAtAscNullsFirst = 'scheduledReversibleTransfer_scheduledAt_ASC_NULLS_FIRST', + ScheduledReversibleTransferScheduledAtAscNullsLast = 'scheduledReversibleTransfer_scheduledAt_ASC_NULLS_LAST', + ScheduledReversibleTransferScheduledAtDesc = 'scheduledReversibleTransfer_scheduledAt_DESC', + ScheduledReversibleTransferScheduledAtDescNullsFirst = 'scheduledReversibleTransfer_scheduledAt_DESC_NULLS_FIRST', + ScheduledReversibleTransferScheduledAtDescNullsLast = 'scheduledReversibleTransfer_scheduledAt_DESC_NULLS_LAST', + ScheduledReversibleTransferTimestampAsc = 'scheduledReversibleTransfer_timestamp_ASC', + ScheduledReversibleTransferTimestampAscNullsFirst = 'scheduledReversibleTransfer_timestamp_ASC_NULLS_FIRST', + ScheduledReversibleTransferTimestampAscNullsLast = 'scheduledReversibleTransfer_timestamp_ASC_NULLS_LAST', + ScheduledReversibleTransferTimestampDesc = 'scheduledReversibleTransfer_timestamp_DESC', + ScheduledReversibleTransferTimestampDescNullsFirst = 'scheduledReversibleTransfer_timestamp_DESC_NULLS_FIRST', + ScheduledReversibleTransferTimestampDescNullsLast = 'scheduledReversibleTransfer_timestamp_DESC_NULLS_LAST', + ScheduledReversibleTransferTxIdAsc = 'scheduledReversibleTransfer_txId_ASC', + ScheduledReversibleTransferTxIdAscNullsFirst = 'scheduledReversibleTransfer_txId_ASC_NULLS_FIRST', + ScheduledReversibleTransferTxIdAscNullsLast = 'scheduledReversibleTransfer_txId_ASC_NULLS_LAST', + ScheduledReversibleTransferTxIdDesc = 'scheduledReversibleTransfer_txId_DESC', + ScheduledReversibleTransferTxIdDescNullsFirst = 'scheduledReversibleTransfer_txId_DESC_NULLS_FIRST', + ScheduledReversibleTransferTxIdDescNullsLast = 'scheduledReversibleTransfer_txId_DESC_NULLS_LAST', + TimestampAsc = 'timestamp_ASC', + TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', + TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', + TimestampDesc = 'timestamp_DESC', + TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', + TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST', + TransferAmountAsc = 'transfer_amount_ASC', + TransferAmountAscNullsFirst = 'transfer_amount_ASC_NULLS_FIRST', + TransferAmountAscNullsLast = 'transfer_amount_ASC_NULLS_LAST', + TransferAmountDesc = 'transfer_amount_DESC', + TransferAmountDescNullsFirst = 'transfer_amount_DESC_NULLS_FIRST', + TransferAmountDescNullsLast = 'transfer_amount_DESC_NULLS_LAST', + TransferExtrinsicHashAsc = 'transfer_extrinsicHash_ASC', + TransferExtrinsicHashAscNullsFirst = 'transfer_extrinsicHash_ASC_NULLS_FIRST', + TransferExtrinsicHashAscNullsLast = 'transfer_extrinsicHash_ASC_NULLS_LAST', + TransferExtrinsicHashDesc = 'transfer_extrinsicHash_DESC', + TransferExtrinsicHashDescNullsFirst = 'transfer_extrinsicHash_DESC_NULLS_FIRST', + TransferExtrinsicHashDescNullsLast = 'transfer_extrinsicHash_DESC_NULLS_LAST', + TransferFeeAsc = 'transfer_fee_ASC', + TransferFeeAscNullsFirst = 'transfer_fee_ASC_NULLS_FIRST', + TransferFeeAscNullsLast = 'transfer_fee_ASC_NULLS_LAST', + TransferFeeDesc = 'transfer_fee_DESC', + TransferFeeDescNullsFirst = 'transfer_fee_DESC_NULLS_FIRST', + TransferFeeDescNullsLast = 'transfer_fee_DESC_NULLS_LAST', + TransferFromHashAsc = 'transfer_fromHash_ASC', + TransferFromHashAscNullsFirst = 'transfer_fromHash_ASC_NULLS_FIRST', + TransferFromHashAscNullsLast = 'transfer_fromHash_ASC_NULLS_LAST', + TransferFromHashDesc = 'transfer_fromHash_DESC', + TransferFromHashDescNullsFirst = 'transfer_fromHash_DESC_NULLS_FIRST', + TransferFromHashDescNullsLast = 'transfer_fromHash_DESC_NULLS_LAST', + TransferIdAsc = 'transfer_id_ASC', + TransferIdAscNullsFirst = 'transfer_id_ASC_NULLS_FIRST', + TransferIdAscNullsLast = 'transfer_id_ASC_NULLS_LAST', + TransferIdDesc = 'transfer_id_DESC', + TransferIdDescNullsFirst = 'transfer_id_DESC_NULLS_FIRST', + TransferIdDescNullsLast = 'transfer_id_DESC_NULLS_LAST', + TransferTimestampAsc = 'transfer_timestamp_ASC', + TransferTimestampAscNullsFirst = 'transfer_timestamp_ASC_NULLS_FIRST', + TransferTimestampAscNullsLast = 'transfer_timestamp_ASC_NULLS_LAST', + TransferTimestampDesc = 'transfer_timestamp_DESC', + TransferTimestampDescNullsFirst = 'transfer_timestamp_DESC_NULLS_FIRST', + TransferTimestampDescNullsLast = 'transfer_timestamp_DESC_NULLS_LAST', + TransferToHashAsc = 'transfer_toHash_ASC', + TransferToHashAscNullsFirst = 'transfer_toHash_ASC_NULLS_FIRST', + TransferToHashAscNullsLast = 'transfer_toHash_ASC_NULLS_LAST', + TransferToHashDesc = 'transfer_toHash_DESC', + TransferToHashDescNullsFirst = 'transfer_toHash_DESC_NULLS_FIRST', + TransferToHashDescNullsLast = 'transfer_toHash_DESC_NULLS_LAST' +} + +export type AccountEventWhereInput = { + AND?: InputMaybe>; + OR?: InputMaybe>; + account?: InputMaybe; + account_isNull?: InputMaybe; + balanceEvent?: InputMaybe; + balanceEvent_isNull?: InputMaybe; + cancelledReversibleTransfer?: InputMaybe; + cancelledReversibleTransfer_isNull?: InputMaybe; + executedReversibleTransfer?: InputMaybe; + executedReversibleTransfer_isNull?: InputMaybe; + highSecuritySet?: InputMaybe; + highSecuritySet_isNull?: InputMaybe; + id_contains?: InputMaybe; + id_containsInsensitive?: InputMaybe; + id_endsWith?: InputMaybe; + id_eq?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_isNull?: InputMaybe; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_containsInsensitive?: InputMaybe; + id_not_endsWith?: InputMaybe; + id_not_eq?: InputMaybe; + id_not_in?: InputMaybe>; + id_not_startsWith?: InputMaybe; + id_startsWith?: InputMaybe; + minerReward?: InputMaybe; + minerReward_isNull?: InputMaybe; + scheduledReversibleTransfer?: InputMaybe; + scheduledReversibleTransfer_isNull?: InputMaybe; + timestamp_eq?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_isNull?: InputMaybe; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not_eq?: InputMaybe; + timestamp_not_in?: InputMaybe>; + transfer?: InputMaybe; + transfer_isNull?: InputMaybe; +}; + +export type AccountEventsConnection = { + __typename?: 'AccountEventsConnection'; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars['Int']['output']; +}; + export enum AccountOrderByInput { FreeAsc = 'free_ASC', FreeAscNullsFirst = 'free_ASC_NULLS_FIRST', @@ -101,6 +420,9 @@ export enum AccountOrderByInput { export type AccountWhereInput = { AND?: InputMaybe>; OR?: InputMaybe>; + accountEvents_every?: InputMaybe; + accountEvents_none?: InputMaybe; + accountEvents_some?: InputMaybe; free_eq?: InputMaybe; free_gt?: InputMaybe; free_gte?: InputMaybe; @@ -176,6 +498,7 @@ export type BalanceEvent = { event?: Maybe; from?: Maybe; id: Scalars['String']['output']; + timestamp: Scalars['DateTime']['output']; to?: Maybe; type: BalanceEventType; }; @@ -235,12 +558,6 @@ export enum BalanceEventOrderByInput { EventIdDesc = 'event_id_DESC', EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', - EventIsScheduledAsc = 'event_isScheduled_ASC', - EventIsScheduledAscNullsFirst = 'event_isScheduled_ASC_NULLS_FIRST', - EventIsScheduledAscNullsLast = 'event_isScheduled_ASC_NULLS_LAST', - EventIsScheduledDesc = 'event_isScheduled_DESC', - EventIsScheduledDescNullsFirst = 'event_isScheduled_DESC_NULLS_FIRST', - EventIsScheduledDescNullsLast = 'event_isScheduled_DESC_NULLS_LAST', EventTimestampAsc = 'event_timestamp_ASC', EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', @@ -289,6 +606,12 @@ export enum BalanceEventOrderByInput { IdDesc = 'id_DESC', IdDescNullsFirst = 'id_DESC_NULLS_FIRST', IdDescNullsLast = 'id_DESC_NULLS_LAST', + TimestampAsc = 'timestamp_ASC', + TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', + TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', + TimestampDesc = 'timestamp_DESC', + TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', + TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST', ToFreeAsc = 'to_free_ASC', ToFreeAscNullsFirst = 'to_free_ASC_NULLS_FIRST', ToFreeAscNullsLast = 'to_free_ASC_NULLS_LAST', @@ -383,6 +706,15 @@ export type BalanceEventWhereInput = { id_not_in?: InputMaybe>; id_not_startsWith?: InputMaybe; id_startsWith?: InputMaybe; + timestamp_eq?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_isNull?: InputMaybe; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not_eq?: InputMaybe; + timestamp_not_in?: InputMaybe>; to?: InputMaybe; to_isNull?: InputMaybe; type_eq?: InputMaybe; @@ -542,26 +874,25 @@ export type BlocksConnection = { totalCount: Scalars['Int']['output']; }; -export type ErrorEvent = { - __typename?: 'ErrorEvent'; +export type CancelledReversibleTransfer = { + __typename?: 'CancelledReversibleTransfer'; block: Block; - errorDocs?: Maybe; - errorModule?: Maybe; - errorName?: Maybe; - errorType: Scalars['String']['output']; + cancelledBy: Account; event?: Maybe; extrinsicHash?: Maybe; id: Scalars['String']['output']; + scheduledTransfer: ScheduledReversibleTransfer; timestamp: Scalars['DateTime']['output']; + txId: Scalars['String']['output']; }; -export type ErrorEventEdge = { - __typename?: 'ErrorEventEdge'; +export type CancelledReversibleTransferEdge = { + __typename?: 'CancelledReversibleTransferEdge'; cursor: Scalars['String']['output']; - node: ErrorEvent; + node: CancelledReversibleTransfer; }; -export enum ErrorEventOrderByInput { +export enum CancelledReversibleTransferOrderByInput { BlockHashAsc = 'block_hash_ASC', BlockHashAscNullsFirst = 'block_hash_ASC_NULLS_FIRST', BlockHashAscNullsLast = 'block_hash_ASC_NULLS_LAST', @@ -592,49 +923,297 @@ export enum ErrorEventOrderByInput { BlockTimestampDesc = 'block_timestamp_DESC', BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', - ErrorDocsAsc = 'errorDocs_ASC', - ErrorDocsAscNullsFirst = 'errorDocs_ASC_NULLS_FIRST', - ErrorDocsAscNullsLast = 'errorDocs_ASC_NULLS_LAST', - ErrorDocsDesc = 'errorDocs_DESC', - ErrorDocsDescNullsFirst = 'errorDocs_DESC_NULLS_FIRST', - ErrorDocsDescNullsLast = 'errorDocs_DESC_NULLS_LAST', - ErrorModuleAsc = 'errorModule_ASC', - ErrorModuleAscNullsFirst = 'errorModule_ASC_NULLS_FIRST', - ErrorModuleAscNullsLast = 'errorModule_ASC_NULLS_LAST', - ErrorModuleDesc = 'errorModule_DESC', - ErrorModuleDescNullsFirst = 'errorModule_DESC_NULLS_FIRST', - ErrorModuleDescNullsLast = 'errorModule_DESC_NULLS_LAST', - ErrorNameAsc = 'errorName_ASC', - ErrorNameAscNullsFirst = 'errorName_ASC_NULLS_FIRST', - ErrorNameAscNullsLast = 'errorName_ASC_NULLS_LAST', - ErrorNameDesc = 'errorName_DESC', - ErrorNameDescNullsFirst = 'errorName_DESC_NULLS_FIRST', - ErrorNameDescNullsLast = 'errorName_DESC_NULLS_LAST', - ErrorTypeAsc = 'errorType_ASC', - ErrorTypeAscNullsFirst = 'errorType_ASC_NULLS_FIRST', - ErrorTypeAscNullsLast = 'errorType_ASC_NULLS_LAST', - ErrorTypeDesc = 'errorType_DESC', - ErrorTypeDescNullsFirst = 'errorType_DESC_NULLS_FIRST', - ErrorTypeDescNullsLast = 'errorType_DESC_NULLS_LAST', - EventExtrinsicHashAsc = 'event_extrinsicHash_ASC', - EventExtrinsicHashAscNullsFirst = 'event_extrinsicHash_ASC_NULLS_FIRST', - EventExtrinsicHashAscNullsLast = 'event_extrinsicHash_ASC_NULLS_LAST', - EventExtrinsicHashDesc = 'event_extrinsicHash_DESC', - EventExtrinsicHashDescNullsFirst = 'event_extrinsicHash_DESC_NULLS_FIRST', - EventExtrinsicHashDescNullsLast = 'event_extrinsicHash_DESC_NULLS_LAST', - EventIdAsc = 'event_id_ASC', - EventIdAscNullsFirst = 'event_id_ASC_NULLS_FIRST', - EventIdAscNullsLast = 'event_id_ASC_NULLS_LAST', - EventIdDesc = 'event_id_DESC', - EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', - EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', - EventIsScheduledAsc = 'event_isScheduled_ASC', - EventIsScheduledAscNullsFirst = 'event_isScheduled_ASC_NULLS_FIRST', - EventIsScheduledAscNullsLast = 'event_isScheduled_ASC_NULLS_LAST', - EventIsScheduledDesc = 'event_isScheduled_DESC', - EventIsScheduledDescNullsFirst = 'event_isScheduled_DESC_NULLS_FIRST', - EventIsScheduledDescNullsLast = 'event_isScheduled_DESC_NULLS_LAST', - EventTimestampAsc = 'event_timestamp_ASC', + CancelledByFreeAsc = 'cancelledBy_free_ASC', + CancelledByFreeAscNullsFirst = 'cancelledBy_free_ASC_NULLS_FIRST', + CancelledByFreeAscNullsLast = 'cancelledBy_free_ASC_NULLS_LAST', + CancelledByFreeDesc = 'cancelledBy_free_DESC', + CancelledByFreeDescNullsFirst = 'cancelledBy_free_DESC_NULLS_FIRST', + CancelledByFreeDescNullsLast = 'cancelledBy_free_DESC_NULLS_LAST', + CancelledByFrozenAsc = 'cancelledBy_frozen_ASC', + CancelledByFrozenAscNullsFirst = 'cancelledBy_frozen_ASC_NULLS_FIRST', + CancelledByFrozenAscNullsLast = 'cancelledBy_frozen_ASC_NULLS_LAST', + CancelledByFrozenDesc = 'cancelledBy_frozen_DESC', + CancelledByFrozenDescNullsFirst = 'cancelledBy_frozen_DESC_NULLS_FIRST', + CancelledByFrozenDescNullsLast = 'cancelledBy_frozen_DESC_NULLS_LAST', + CancelledByIdAsc = 'cancelledBy_id_ASC', + CancelledByIdAscNullsFirst = 'cancelledBy_id_ASC_NULLS_FIRST', + CancelledByIdAscNullsLast = 'cancelledBy_id_ASC_NULLS_LAST', + CancelledByIdDesc = 'cancelledBy_id_DESC', + CancelledByIdDescNullsFirst = 'cancelledBy_id_DESC_NULLS_FIRST', + CancelledByIdDescNullsLast = 'cancelledBy_id_DESC_NULLS_LAST', + CancelledByLastUpdatedAsc = 'cancelledBy_lastUpdated_ASC', + CancelledByLastUpdatedAscNullsFirst = 'cancelledBy_lastUpdated_ASC_NULLS_FIRST', + CancelledByLastUpdatedAscNullsLast = 'cancelledBy_lastUpdated_ASC_NULLS_LAST', + CancelledByLastUpdatedDesc = 'cancelledBy_lastUpdated_DESC', + CancelledByLastUpdatedDescNullsFirst = 'cancelledBy_lastUpdated_DESC_NULLS_FIRST', + CancelledByLastUpdatedDescNullsLast = 'cancelledBy_lastUpdated_DESC_NULLS_LAST', + CancelledByReservedAsc = 'cancelledBy_reserved_ASC', + CancelledByReservedAscNullsFirst = 'cancelledBy_reserved_ASC_NULLS_FIRST', + CancelledByReservedAscNullsLast = 'cancelledBy_reserved_ASC_NULLS_LAST', + CancelledByReservedDesc = 'cancelledBy_reserved_DESC', + CancelledByReservedDescNullsFirst = 'cancelledBy_reserved_DESC_NULLS_FIRST', + CancelledByReservedDescNullsLast = 'cancelledBy_reserved_DESC_NULLS_LAST', + EventExtrinsicHashAsc = 'event_extrinsicHash_ASC', + EventExtrinsicHashAscNullsFirst = 'event_extrinsicHash_ASC_NULLS_FIRST', + EventExtrinsicHashAscNullsLast = 'event_extrinsicHash_ASC_NULLS_LAST', + EventExtrinsicHashDesc = 'event_extrinsicHash_DESC', + EventExtrinsicHashDescNullsFirst = 'event_extrinsicHash_DESC_NULLS_FIRST', + EventExtrinsicHashDescNullsLast = 'event_extrinsicHash_DESC_NULLS_LAST', + EventIdAsc = 'event_id_ASC', + EventIdAscNullsFirst = 'event_id_ASC_NULLS_FIRST', + EventIdAscNullsLast = 'event_id_ASC_NULLS_LAST', + EventIdDesc = 'event_id_DESC', + EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', + EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', + EventTimestampAsc = 'event_timestamp_ASC', + EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', + EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', + EventTimestampDesc = 'event_timestamp_DESC', + EventTimestampDescNullsFirst = 'event_timestamp_DESC_NULLS_FIRST', + EventTimestampDescNullsLast = 'event_timestamp_DESC_NULLS_LAST', + EventTypeAsc = 'event_type_ASC', + EventTypeAscNullsFirst = 'event_type_ASC_NULLS_FIRST', + EventTypeAscNullsLast = 'event_type_ASC_NULLS_LAST', + EventTypeDesc = 'event_type_DESC', + EventTypeDescNullsFirst = 'event_type_DESC_NULLS_FIRST', + EventTypeDescNullsLast = 'event_type_DESC_NULLS_LAST', + ExtrinsicHashAsc = 'extrinsicHash_ASC', + ExtrinsicHashAscNullsFirst = 'extrinsicHash_ASC_NULLS_FIRST', + ExtrinsicHashAscNullsLast = 'extrinsicHash_ASC_NULLS_LAST', + ExtrinsicHashDesc = 'extrinsicHash_DESC', + ExtrinsicHashDescNullsFirst = 'extrinsicHash_DESC_NULLS_FIRST', + ExtrinsicHashDescNullsLast = 'extrinsicHash_DESC_NULLS_LAST', + IdAsc = 'id_ASC', + IdAscNullsFirst = 'id_ASC_NULLS_FIRST', + IdAscNullsLast = 'id_ASC_NULLS_LAST', + IdDesc = 'id_DESC', + IdDescNullsFirst = 'id_DESC_NULLS_FIRST', + IdDescNullsLast = 'id_DESC_NULLS_LAST', + ScheduledTransferAmountAsc = 'scheduledTransfer_amount_ASC', + ScheduledTransferAmountAscNullsFirst = 'scheduledTransfer_amount_ASC_NULLS_FIRST', + ScheduledTransferAmountAscNullsLast = 'scheduledTransfer_amount_ASC_NULLS_LAST', + ScheduledTransferAmountDesc = 'scheduledTransfer_amount_DESC', + ScheduledTransferAmountDescNullsFirst = 'scheduledTransfer_amount_DESC_NULLS_FIRST', + ScheduledTransferAmountDescNullsLast = 'scheduledTransfer_amount_DESC_NULLS_LAST', + ScheduledTransferExtrinsicHashAsc = 'scheduledTransfer_extrinsicHash_ASC', + ScheduledTransferExtrinsicHashAscNullsFirst = 'scheduledTransfer_extrinsicHash_ASC_NULLS_FIRST', + ScheduledTransferExtrinsicHashAscNullsLast = 'scheduledTransfer_extrinsicHash_ASC_NULLS_LAST', + ScheduledTransferExtrinsicHashDesc = 'scheduledTransfer_extrinsicHash_DESC', + ScheduledTransferExtrinsicHashDescNullsFirst = 'scheduledTransfer_extrinsicHash_DESC_NULLS_FIRST', + ScheduledTransferExtrinsicHashDescNullsLast = 'scheduledTransfer_extrinsicHash_DESC_NULLS_LAST', + ScheduledTransferFeeAsc = 'scheduledTransfer_fee_ASC', + ScheduledTransferFeeAscNullsFirst = 'scheduledTransfer_fee_ASC_NULLS_FIRST', + ScheduledTransferFeeAscNullsLast = 'scheduledTransfer_fee_ASC_NULLS_LAST', + ScheduledTransferFeeDesc = 'scheduledTransfer_fee_DESC', + ScheduledTransferFeeDescNullsFirst = 'scheduledTransfer_fee_DESC_NULLS_FIRST', + ScheduledTransferFeeDescNullsLast = 'scheduledTransfer_fee_DESC_NULLS_LAST', + ScheduledTransferIdAsc = 'scheduledTransfer_id_ASC', + ScheduledTransferIdAscNullsFirst = 'scheduledTransfer_id_ASC_NULLS_FIRST', + ScheduledTransferIdAscNullsLast = 'scheduledTransfer_id_ASC_NULLS_LAST', + ScheduledTransferIdDesc = 'scheduledTransfer_id_DESC', + ScheduledTransferIdDescNullsFirst = 'scheduledTransfer_id_DESC_NULLS_FIRST', + ScheduledTransferIdDescNullsLast = 'scheduledTransfer_id_DESC_NULLS_LAST', + ScheduledTransferScheduledAtAsc = 'scheduledTransfer_scheduledAt_ASC', + ScheduledTransferScheduledAtAscNullsFirst = 'scheduledTransfer_scheduledAt_ASC_NULLS_FIRST', + ScheduledTransferScheduledAtAscNullsLast = 'scheduledTransfer_scheduledAt_ASC_NULLS_LAST', + ScheduledTransferScheduledAtDesc = 'scheduledTransfer_scheduledAt_DESC', + ScheduledTransferScheduledAtDescNullsFirst = 'scheduledTransfer_scheduledAt_DESC_NULLS_FIRST', + ScheduledTransferScheduledAtDescNullsLast = 'scheduledTransfer_scheduledAt_DESC_NULLS_LAST', + ScheduledTransferTimestampAsc = 'scheduledTransfer_timestamp_ASC', + ScheduledTransferTimestampAscNullsFirst = 'scheduledTransfer_timestamp_ASC_NULLS_FIRST', + ScheduledTransferTimestampAscNullsLast = 'scheduledTransfer_timestamp_ASC_NULLS_LAST', + ScheduledTransferTimestampDesc = 'scheduledTransfer_timestamp_DESC', + ScheduledTransferTimestampDescNullsFirst = 'scheduledTransfer_timestamp_DESC_NULLS_FIRST', + ScheduledTransferTimestampDescNullsLast = 'scheduledTransfer_timestamp_DESC_NULLS_LAST', + ScheduledTransferTxIdAsc = 'scheduledTransfer_txId_ASC', + ScheduledTransferTxIdAscNullsFirst = 'scheduledTransfer_txId_ASC_NULLS_FIRST', + ScheduledTransferTxIdAscNullsLast = 'scheduledTransfer_txId_ASC_NULLS_LAST', + ScheduledTransferTxIdDesc = 'scheduledTransfer_txId_DESC', + ScheduledTransferTxIdDescNullsFirst = 'scheduledTransfer_txId_DESC_NULLS_FIRST', + ScheduledTransferTxIdDescNullsLast = 'scheduledTransfer_txId_DESC_NULLS_LAST', + TimestampAsc = 'timestamp_ASC', + TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', + TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', + TimestampDesc = 'timestamp_DESC', + TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', + TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST', + TxIdAsc = 'txId_ASC', + TxIdAscNullsFirst = 'txId_ASC_NULLS_FIRST', + TxIdAscNullsLast = 'txId_ASC_NULLS_LAST', + TxIdDesc = 'txId_DESC', + TxIdDescNullsFirst = 'txId_DESC_NULLS_FIRST', + TxIdDescNullsLast = 'txId_DESC_NULLS_LAST' +} + +export type CancelledReversibleTransferWhereInput = { + AND?: InputMaybe>; + OR?: InputMaybe>; + block?: InputMaybe; + block_isNull?: InputMaybe; + cancelledBy?: InputMaybe; + cancelledBy_isNull?: InputMaybe; + event?: InputMaybe; + event_isNull?: InputMaybe; + extrinsicHash_contains?: InputMaybe; + extrinsicHash_containsInsensitive?: InputMaybe; + extrinsicHash_endsWith?: InputMaybe; + extrinsicHash_eq?: InputMaybe; + extrinsicHash_gt?: InputMaybe; + extrinsicHash_gte?: InputMaybe; + extrinsicHash_in?: InputMaybe>; + extrinsicHash_isNull?: InputMaybe; + extrinsicHash_lt?: InputMaybe; + extrinsicHash_lte?: InputMaybe; + extrinsicHash_not_contains?: InputMaybe; + extrinsicHash_not_containsInsensitive?: InputMaybe< + Scalars['String']['input'] + >; + extrinsicHash_not_endsWith?: InputMaybe; + extrinsicHash_not_eq?: InputMaybe; + extrinsicHash_not_in?: InputMaybe>; + extrinsicHash_not_startsWith?: InputMaybe; + extrinsicHash_startsWith?: InputMaybe; + id_contains?: InputMaybe; + id_containsInsensitive?: InputMaybe; + id_endsWith?: InputMaybe; + id_eq?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_isNull?: InputMaybe; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_containsInsensitive?: InputMaybe; + id_not_endsWith?: InputMaybe; + id_not_eq?: InputMaybe; + id_not_in?: InputMaybe>; + id_not_startsWith?: InputMaybe; + id_startsWith?: InputMaybe; + scheduledTransfer?: InputMaybe; + scheduledTransfer_isNull?: InputMaybe; + timestamp_eq?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_isNull?: InputMaybe; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not_eq?: InputMaybe; + timestamp_not_in?: InputMaybe>; + txId_contains?: InputMaybe; + txId_containsInsensitive?: InputMaybe; + txId_endsWith?: InputMaybe; + txId_eq?: InputMaybe; + txId_gt?: InputMaybe; + txId_gte?: InputMaybe; + txId_in?: InputMaybe>; + txId_isNull?: InputMaybe; + txId_lt?: InputMaybe; + txId_lte?: InputMaybe; + txId_not_contains?: InputMaybe; + txId_not_containsInsensitive?: InputMaybe; + txId_not_endsWith?: InputMaybe; + txId_not_eq?: InputMaybe; + txId_not_in?: InputMaybe>; + txId_not_startsWith?: InputMaybe; + txId_startsWith?: InputMaybe; +}; + +export type CancelledReversibleTransfersConnection = { + __typename?: 'CancelledReversibleTransfersConnection'; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars['Int']['output']; +}; + +export type ErrorEvent = { + __typename?: 'ErrorEvent'; + block: Block; + errorDocs?: Maybe; + errorModule?: Maybe; + errorName?: Maybe; + errorType: Scalars['String']['output']; + event?: Maybe; + extrinsicHash?: Maybe; + id: Scalars['String']['output']; + timestamp: Scalars['DateTime']['output']; +}; + +export type ErrorEventEdge = { + __typename?: 'ErrorEventEdge'; + cursor: Scalars['String']['output']; + node: ErrorEvent; +}; + +export enum ErrorEventOrderByInput { + BlockHashAsc = 'block_hash_ASC', + BlockHashAscNullsFirst = 'block_hash_ASC_NULLS_FIRST', + BlockHashAscNullsLast = 'block_hash_ASC_NULLS_LAST', + BlockHashDesc = 'block_hash_DESC', + BlockHashDescNullsFirst = 'block_hash_DESC_NULLS_FIRST', + BlockHashDescNullsLast = 'block_hash_DESC_NULLS_LAST', + BlockHeightAsc = 'block_height_ASC', + BlockHeightAscNullsFirst = 'block_height_ASC_NULLS_FIRST', + BlockHeightAscNullsLast = 'block_height_ASC_NULLS_LAST', + BlockHeightDesc = 'block_height_DESC', + BlockHeightDescNullsFirst = 'block_height_DESC_NULLS_FIRST', + BlockHeightDescNullsLast = 'block_height_DESC_NULLS_LAST', + BlockIdAsc = 'block_id_ASC', + BlockIdAscNullsFirst = 'block_id_ASC_NULLS_FIRST', + BlockIdAscNullsLast = 'block_id_ASC_NULLS_LAST', + BlockIdDesc = 'block_id_DESC', + BlockIdDescNullsFirst = 'block_id_DESC_NULLS_FIRST', + BlockIdDescNullsLast = 'block_id_DESC_NULLS_LAST', + BlockRewardAsc = 'block_reward_ASC', + BlockRewardAscNullsFirst = 'block_reward_ASC_NULLS_FIRST', + BlockRewardAscNullsLast = 'block_reward_ASC_NULLS_LAST', + BlockRewardDesc = 'block_reward_DESC', + BlockRewardDescNullsFirst = 'block_reward_DESC_NULLS_FIRST', + BlockRewardDescNullsLast = 'block_reward_DESC_NULLS_LAST', + BlockTimestampAsc = 'block_timestamp_ASC', + BlockTimestampAscNullsFirst = 'block_timestamp_ASC_NULLS_FIRST', + BlockTimestampAscNullsLast = 'block_timestamp_ASC_NULLS_LAST', + BlockTimestampDesc = 'block_timestamp_DESC', + BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', + BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', + ErrorDocsAsc = 'errorDocs_ASC', + ErrorDocsAscNullsFirst = 'errorDocs_ASC_NULLS_FIRST', + ErrorDocsAscNullsLast = 'errorDocs_ASC_NULLS_LAST', + ErrorDocsDesc = 'errorDocs_DESC', + ErrorDocsDescNullsFirst = 'errorDocs_DESC_NULLS_FIRST', + ErrorDocsDescNullsLast = 'errorDocs_DESC_NULLS_LAST', + ErrorModuleAsc = 'errorModule_ASC', + ErrorModuleAscNullsFirst = 'errorModule_ASC_NULLS_FIRST', + ErrorModuleAscNullsLast = 'errorModule_ASC_NULLS_LAST', + ErrorModuleDesc = 'errorModule_DESC', + ErrorModuleDescNullsFirst = 'errorModule_DESC_NULLS_FIRST', + ErrorModuleDescNullsLast = 'errorModule_DESC_NULLS_LAST', + ErrorNameAsc = 'errorName_ASC', + ErrorNameAscNullsFirst = 'errorName_ASC_NULLS_FIRST', + ErrorNameAscNullsLast = 'errorName_ASC_NULLS_LAST', + ErrorNameDesc = 'errorName_DESC', + ErrorNameDescNullsFirst = 'errorName_DESC_NULLS_FIRST', + ErrorNameDescNullsLast = 'errorName_DESC_NULLS_LAST', + ErrorTypeAsc = 'errorType_ASC', + ErrorTypeAscNullsFirst = 'errorType_ASC_NULLS_FIRST', + ErrorTypeAscNullsLast = 'errorType_ASC_NULLS_LAST', + ErrorTypeDesc = 'errorType_DESC', + ErrorTypeDescNullsFirst = 'errorType_DESC_NULLS_FIRST', + ErrorTypeDescNullsLast = 'errorType_DESC_NULLS_LAST', + EventExtrinsicHashAsc = 'event_extrinsicHash_ASC', + EventExtrinsicHashAscNullsFirst = 'event_extrinsicHash_ASC_NULLS_FIRST', + EventExtrinsicHashAscNullsLast = 'event_extrinsicHash_ASC_NULLS_LAST', + EventExtrinsicHashDesc = 'event_extrinsicHash_DESC', + EventExtrinsicHashDescNullsFirst = 'event_extrinsicHash_DESC_NULLS_FIRST', + EventExtrinsicHashDescNullsLast = 'event_extrinsicHash_DESC_NULLS_LAST', + EventIdAsc = 'event_id_ASC', + EventIdAscNullsFirst = 'event_id_ASC_NULLS_FIRST', + EventIdAscNullsLast = 'event_id_ASC_NULLS_LAST', + EventIdDesc = 'event_id_DESC', + EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', + EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', + EventTimestampAsc = 'event_timestamp_ASC', EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', EventTimestampDesc = 'event_timestamp_DESC', @@ -799,13 +1378,14 @@ export type Event = { __typename?: 'Event'; balanceEvent?: Maybe; block: Block; + cancelledReversibleTransfer?: Maybe; errorEvent?: Maybe; + executedReversibleTransfer?: Maybe; extrinsicHash?: Maybe; highSecuritySet?: Maybe; id: Scalars['String']['output']; - isScheduled: Scalars['Boolean']['output']; minerReward?: Maybe; - reversibleTransfer?: Maybe; + scheduledReversibleTransfer?: Maybe; timestamp: Scalars['DateTime']['output']; transfer?: Maybe; type: EventType; @@ -830,6 +1410,12 @@ export enum EventOrderByInput { BalanceEventIdDesc = 'balanceEvent_id_DESC', BalanceEventIdDescNullsFirst = 'balanceEvent_id_DESC_NULLS_FIRST', BalanceEventIdDescNullsLast = 'balanceEvent_id_DESC_NULLS_LAST', + BalanceEventTimestampAsc = 'balanceEvent_timestamp_ASC', + BalanceEventTimestampAscNullsFirst = 'balanceEvent_timestamp_ASC_NULLS_FIRST', + BalanceEventTimestampAscNullsLast = 'balanceEvent_timestamp_ASC_NULLS_LAST', + BalanceEventTimestampDesc = 'balanceEvent_timestamp_DESC', + BalanceEventTimestampDescNullsFirst = 'balanceEvent_timestamp_DESC_NULLS_FIRST', + BalanceEventTimestampDescNullsLast = 'balanceEvent_timestamp_DESC_NULLS_LAST', BalanceEventTypeAsc = 'balanceEvent_type_ASC', BalanceEventTypeAscNullsFirst = 'balanceEvent_type_ASC_NULLS_FIRST', BalanceEventTypeAscNullsLast = 'balanceEvent_type_ASC_NULLS_LAST', @@ -866,6 +1452,30 @@ export enum EventOrderByInput { BlockTimestampDesc = 'block_timestamp_DESC', BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', + CancelledReversibleTransferExtrinsicHashAsc = 'cancelledReversibleTransfer_extrinsicHash_ASC', + CancelledReversibleTransferExtrinsicHashAscNullsFirst = 'cancelledReversibleTransfer_extrinsicHash_ASC_NULLS_FIRST', + CancelledReversibleTransferExtrinsicHashAscNullsLast = 'cancelledReversibleTransfer_extrinsicHash_ASC_NULLS_LAST', + CancelledReversibleTransferExtrinsicHashDesc = 'cancelledReversibleTransfer_extrinsicHash_DESC', + CancelledReversibleTransferExtrinsicHashDescNullsFirst = 'cancelledReversibleTransfer_extrinsicHash_DESC_NULLS_FIRST', + CancelledReversibleTransferExtrinsicHashDescNullsLast = 'cancelledReversibleTransfer_extrinsicHash_DESC_NULLS_LAST', + CancelledReversibleTransferIdAsc = 'cancelledReversibleTransfer_id_ASC', + CancelledReversibleTransferIdAscNullsFirst = 'cancelledReversibleTransfer_id_ASC_NULLS_FIRST', + CancelledReversibleTransferIdAscNullsLast = 'cancelledReversibleTransfer_id_ASC_NULLS_LAST', + CancelledReversibleTransferIdDesc = 'cancelledReversibleTransfer_id_DESC', + CancelledReversibleTransferIdDescNullsFirst = 'cancelledReversibleTransfer_id_DESC_NULLS_FIRST', + CancelledReversibleTransferIdDescNullsLast = 'cancelledReversibleTransfer_id_DESC_NULLS_LAST', + CancelledReversibleTransferTimestampAsc = 'cancelledReversibleTransfer_timestamp_ASC', + CancelledReversibleTransferTimestampAscNullsFirst = 'cancelledReversibleTransfer_timestamp_ASC_NULLS_FIRST', + CancelledReversibleTransferTimestampAscNullsLast = 'cancelledReversibleTransfer_timestamp_ASC_NULLS_LAST', + CancelledReversibleTransferTimestampDesc = 'cancelledReversibleTransfer_timestamp_DESC', + CancelledReversibleTransferTimestampDescNullsFirst = 'cancelledReversibleTransfer_timestamp_DESC_NULLS_FIRST', + CancelledReversibleTransferTimestampDescNullsLast = 'cancelledReversibleTransfer_timestamp_DESC_NULLS_LAST', + CancelledReversibleTransferTxIdAsc = 'cancelledReversibleTransfer_txId_ASC', + CancelledReversibleTransferTxIdAscNullsFirst = 'cancelledReversibleTransfer_txId_ASC_NULLS_FIRST', + CancelledReversibleTransferTxIdAscNullsLast = 'cancelledReversibleTransfer_txId_ASC_NULLS_LAST', + CancelledReversibleTransferTxIdDesc = 'cancelledReversibleTransfer_txId_DESC', + CancelledReversibleTransferTxIdDescNullsFirst = 'cancelledReversibleTransfer_txId_DESC_NULLS_FIRST', + CancelledReversibleTransferTxIdDescNullsLast = 'cancelledReversibleTransfer_txId_DESC_NULLS_LAST', ErrorEventErrorDocsAsc = 'errorEvent_errorDocs_ASC', ErrorEventErrorDocsAscNullsFirst = 'errorEvent_errorDocs_ASC_NULLS_FIRST', ErrorEventErrorDocsAscNullsLast = 'errorEvent_errorDocs_ASC_NULLS_LAST', @@ -908,6 +1518,24 @@ export enum EventOrderByInput { ErrorEventTimestampDesc = 'errorEvent_timestamp_DESC', ErrorEventTimestampDescNullsFirst = 'errorEvent_timestamp_DESC_NULLS_FIRST', ErrorEventTimestampDescNullsLast = 'errorEvent_timestamp_DESC_NULLS_LAST', + ExecutedReversibleTransferIdAsc = 'executedReversibleTransfer_id_ASC', + ExecutedReversibleTransferIdAscNullsFirst = 'executedReversibleTransfer_id_ASC_NULLS_FIRST', + ExecutedReversibleTransferIdAscNullsLast = 'executedReversibleTransfer_id_ASC_NULLS_LAST', + ExecutedReversibleTransferIdDesc = 'executedReversibleTransfer_id_DESC', + ExecutedReversibleTransferIdDescNullsFirst = 'executedReversibleTransfer_id_DESC_NULLS_FIRST', + ExecutedReversibleTransferIdDescNullsLast = 'executedReversibleTransfer_id_DESC_NULLS_LAST', + ExecutedReversibleTransferTimestampAsc = 'executedReversibleTransfer_timestamp_ASC', + ExecutedReversibleTransferTimestampAscNullsFirst = 'executedReversibleTransfer_timestamp_ASC_NULLS_FIRST', + ExecutedReversibleTransferTimestampAscNullsLast = 'executedReversibleTransfer_timestamp_ASC_NULLS_LAST', + ExecutedReversibleTransferTimestampDesc = 'executedReversibleTransfer_timestamp_DESC', + ExecutedReversibleTransferTimestampDescNullsFirst = 'executedReversibleTransfer_timestamp_DESC_NULLS_FIRST', + ExecutedReversibleTransferTimestampDescNullsLast = 'executedReversibleTransfer_timestamp_DESC_NULLS_LAST', + ExecutedReversibleTransferTxIdAsc = 'executedReversibleTransfer_txId_ASC', + ExecutedReversibleTransferTxIdAscNullsFirst = 'executedReversibleTransfer_txId_ASC_NULLS_FIRST', + ExecutedReversibleTransferTxIdAscNullsLast = 'executedReversibleTransfer_txId_ASC_NULLS_LAST', + ExecutedReversibleTransferTxIdDesc = 'executedReversibleTransfer_txId_DESC', + ExecutedReversibleTransferTxIdDescNullsFirst = 'executedReversibleTransfer_txId_DESC_NULLS_FIRST', + ExecutedReversibleTransferTxIdDescNullsLast = 'executedReversibleTransfer_txId_DESC_NULLS_LAST', ExtrinsicHashAsc = 'extrinsicHash_ASC', ExtrinsicHashAscNullsFirst = 'extrinsicHash_ASC_NULLS_FIRST', ExtrinsicHashAscNullsLast = 'extrinsicHash_ASC_NULLS_LAST', @@ -944,12 +1572,6 @@ export enum EventOrderByInput { IdDesc = 'id_DESC', IdDescNullsFirst = 'id_DESC_NULLS_FIRST', IdDescNullsLast = 'id_DESC_NULLS_LAST', - IsScheduledAsc = 'isScheduled_ASC', - IsScheduledAscNullsFirst = 'isScheduled_ASC_NULLS_FIRST', - IsScheduledAscNullsLast = 'isScheduled_ASC_NULLS_LAST', - IsScheduledDesc = 'isScheduled_DESC', - IsScheduledDescNullsFirst = 'isScheduled_DESC_NULLS_FIRST', - IsScheduledDescNullsLast = 'isScheduled_DESC_NULLS_LAST', MinerRewardIdAsc = 'minerReward_id_ASC', MinerRewardIdAscNullsFirst = 'minerReward_id_ASC_NULLS_FIRST', MinerRewardIdAscNullsLast = 'minerReward_id_ASC_NULLS_LAST', @@ -968,54 +1590,48 @@ export enum EventOrderByInput { MinerRewardTimestampDesc = 'minerReward_timestamp_DESC', MinerRewardTimestampDescNullsFirst = 'minerReward_timestamp_DESC_NULLS_FIRST', MinerRewardTimestampDescNullsLast = 'minerReward_timestamp_DESC_NULLS_LAST', - ReversibleTransferAmountAsc = 'reversibleTransfer_amount_ASC', - ReversibleTransferAmountAscNullsFirst = 'reversibleTransfer_amount_ASC_NULLS_FIRST', - ReversibleTransferAmountAscNullsLast = 'reversibleTransfer_amount_ASC_NULLS_LAST', - ReversibleTransferAmountDesc = 'reversibleTransfer_amount_DESC', - ReversibleTransferAmountDescNullsFirst = 'reversibleTransfer_amount_DESC_NULLS_FIRST', - ReversibleTransferAmountDescNullsLast = 'reversibleTransfer_amount_DESC_NULLS_LAST', - ReversibleTransferExtrinsicHashAsc = 'reversibleTransfer_extrinsicHash_ASC', - ReversibleTransferExtrinsicHashAscNullsFirst = 'reversibleTransfer_extrinsicHash_ASC_NULLS_FIRST', - ReversibleTransferExtrinsicHashAscNullsLast = 'reversibleTransfer_extrinsicHash_ASC_NULLS_LAST', - ReversibleTransferExtrinsicHashDesc = 'reversibleTransfer_extrinsicHash_DESC', - ReversibleTransferExtrinsicHashDescNullsFirst = 'reversibleTransfer_extrinsicHash_DESC_NULLS_FIRST', - ReversibleTransferExtrinsicHashDescNullsLast = 'reversibleTransfer_extrinsicHash_DESC_NULLS_LAST', - ReversibleTransferFeeAsc = 'reversibleTransfer_fee_ASC', - ReversibleTransferFeeAscNullsFirst = 'reversibleTransfer_fee_ASC_NULLS_FIRST', - ReversibleTransferFeeAscNullsLast = 'reversibleTransfer_fee_ASC_NULLS_LAST', - ReversibleTransferFeeDesc = 'reversibleTransfer_fee_DESC', - ReversibleTransferFeeDescNullsFirst = 'reversibleTransfer_fee_DESC_NULLS_FIRST', - ReversibleTransferFeeDescNullsLast = 'reversibleTransfer_fee_DESC_NULLS_LAST', - ReversibleTransferIdAsc = 'reversibleTransfer_id_ASC', - ReversibleTransferIdAscNullsFirst = 'reversibleTransfer_id_ASC_NULLS_FIRST', - ReversibleTransferIdAscNullsLast = 'reversibleTransfer_id_ASC_NULLS_LAST', - ReversibleTransferIdDesc = 'reversibleTransfer_id_DESC', - ReversibleTransferIdDescNullsFirst = 'reversibleTransfer_id_DESC_NULLS_FIRST', - ReversibleTransferIdDescNullsLast = 'reversibleTransfer_id_DESC_NULLS_LAST', - ReversibleTransferScheduledAtAsc = 'reversibleTransfer_scheduledAt_ASC', - ReversibleTransferScheduledAtAscNullsFirst = 'reversibleTransfer_scheduledAt_ASC_NULLS_FIRST', - ReversibleTransferScheduledAtAscNullsLast = 'reversibleTransfer_scheduledAt_ASC_NULLS_LAST', - ReversibleTransferScheduledAtDesc = 'reversibleTransfer_scheduledAt_DESC', - ReversibleTransferScheduledAtDescNullsFirst = 'reversibleTransfer_scheduledAt_DESC_NULLS_FIRST', - ReversibleTransferScheduledAtDescNullsLast = 'reversibleTransfer_scheduledAt_DESC_NULLS_LAST', - ReversibleTransferStatusAsc = 'reversibleTransfer_status_ASC', - ReversibleTransferStatusAscNullsFirst = 'reversibleTransfer_status_ASC_NULLS_FIRST', - ReversibleTransferStatusAscNullsLast = 'reversibleTransfer_status_ASC_NULLS_LAST', - ReversibleTransferStatusDesc = 'reversibleTransfer_status_DESC', - ReversibleTransferStatusDescNullsFirst = 'reversibleTransfer_status_DESC_NULLS_FIRST', - ReversibleTransferStatusDescNullsLast = 'reversibleTransfer_status_DESC_NULLS_LAST', - ReversibleTransferTimestampAsc = 'reversibleTransfer_timestamp_ASC', - ReversibleTransferTimestampAscNullsFirst = 'reversibleTransfer_timestamp_ASC_NULLS_FIRST', - ReversibleTransferTimestampAscNullsLast = 'reversibleTransfer_timestamp_ASC_NULLS_LAST', - ReversibleTransferTimestampDesc = 'reversibleTransfer_timestamp_DESC', - ReversibleTransferTimestampDescNullsFirst = 'reversibleTransfer_timestamp_DESC_NULLS_FIRST', - ReversibleTransferTimestampDescNullsLast = 'reversibleTransfer_timestamp_DESC_NULLS_LAST', - ReversibleTransferTxIdAsc = 'reversibleTransfer_txId_ASC', - ReversibleTransferTxIdAscNullsFirst = 'reversibleTransfer_txId_ASC_NULLS_FIRST', - ReversibleTransferTxIdAscNullsLast = 'reversibleTransfer_txId_ASC_NULLS_LAST', - ReversibleTransferTxIdDesc = 'reversibleTransfer_txId_DESC', - ReversibleTransferTxIdDescNullsFirst = 'reversibleTransfer_txId_DESC_NULLS_FIRST', - ReversibleTransferTxIdDescNullsLast = 'reversibleTransfer_txId_DESC_NULLS_LAST', + ScheduledReversibleTransferAmountAsc = 'scheduledReversibleTransfer_amount_ASC', + ScheduledReversibleTransferAmountAscNullsFirst = 'scheduledReversibleTransfer_amount_ASC_NULLS_FIRST', + ScheduledReversibleTransferAmountAscNullsLast = 'scheduledReversibleTransfer_amount_ASC_NULLS_LAST', + ScheduledReversibleTransferAmountDesc = 'scheduledReversibleTransfer_amount_DESC', + ScheduledReversibleTransferAmountDescNullsFirst = 'scheduledReversibleTransfer_amount_DESC_NULLS_FIRST', + ScheduledReversibleTransferAmountDescNullsLast = 'scheduledReversibleTransfer_amount_DESC_NULLS_LAST', + ScheduledReversibleTransferExtrinsicHashAsc = 'scheduledReversibleTransfer_extrinsicHash_ASC', + ScheduledReversibleTransferExtrinsicHashAscNullsFirst = 'scheduledReversibleTransfer_extrinsicHash_ASC_NULLS_FIRST', + ScheduledReversibleTransferExtrinsicHashAscNullsLast = 'scheduledReversibleTransfer_extrinsicHash_ASC_NULLS_LAST', + ScheduledReversibleTransferExtrinsicHashDesc = 'scheduledReversibleTransfer_extrinsicHash_DESC', + ScheduledReversibleTransferExtrinsicHashDescNullsFirst = 'scheduledReversibleTransfer_extrinsicHash_DESC_NULLS_FIRST', + ScheduledReversibleTransferExtrinsicHashDescNullsLast = 'scheduledReversibleTransfer_extrinsicHash_DESC_NULLS_LAST', + ScheduledReversibleTransferFeeAsc = 'scheduledReversibleTransfer_fee_ASC', + ScheduledReversibleTransferFeeAscNullsFirst = 'scheduledReversibleTransfer_fee_ASC_NULLS_FIRST', + ScheduledReversibleTransferFeeAscNullsLast = 'scheduledReversibleTransfer_fee_ASC_NULLS_LAST', + ScheduledReversibleTransferFeeDesc = 'scheduledReversibleTransfer_fee_DESC', + ScheduledReversibleTransferFeeDescNullsFirst = 'scheduledReversibleTransfer_fee_DESC_NULLS_FIRST', + ScheduledReversibleTransferFeeDescNullsLast = 'scheduledReversibleTransfer_fee_DESC_NULLS_LAST', + ScheduledReversibleTransferIdAsc = 'scheduledReversibleTransfer_id_ASC', + ScheduledReversibleTransferIdAscNullsFirst = 'scheduledReversibleTransfer_id_ASC_NULLS_FIRST', + ScheduledReversibleTransferIdAscNullsLast = 'scheduledReversibleTransfer_id_ASC_NULLS_LAST', + ScheduledReversibleTransferIdDesc = 'scheduledReversibleTransfer_id_DESC', + ScheduledReversibleTransferIdDescNullsFirst = 'scheduledReversibleTransfer_id_DESC_NULLS_FIRST', + ScheduledReversibleTransferIdDescNullsLast = 'scheduledReversibleTransfer_id_DESC_NULLS_LAST', + ScheduledReversibleTransferScheduledAtAsc = 'scheduledReversibleTransfer_scheduledAt_ASC', + ScheduledReversibleTransferScheduledAtAscNullsFirst = 'scheduledReversibleTransfer_scheduledAt_ASC_NULLS_FIRST', + ScheduledReversibleTransferScheduledAtAscNullsLast = 'scheduledReversibleTransfer_scheduledAt_ASC_NULLS_LAST', + ScheduledReversibleTransferScheduledAtDesc = 'scheduledReversibleTransfer_scheduledAt_DESC', + ScheduledReversibleTransferScheduledAtDescNullsFirst = 'scheduledReversibleTransfer_scheduledAt_DESC_NULLS_FIRST', + ScheduledReversibleTransferScheduledAtDescNullsLast = 'scheduledReversibleTransfer_scheduledAt_DESC_NULLS_LAST', + ScheduledReversibleTransferTimestampAsc = 'scheduledReversibleTransfer_timestamp_ASC', + ScheduledReversibleTransferTimestampAscNullsFirst = 'scheduledReversibleTransfer_timestamp_ASC_NULLS_FIRST', + ScheduledReversibleTransferTimestampAscNullsLast = 'scheduledReversibleTransfer_timestamp_ASC_NULLS_LAST', + ScheduledReversibleTransferTimestampDesc = 'scheduledReversibleTransfer_timestamp_DESC', + ScheduledReversibleTransferTimestampDescNullsFirst = 'scheduledReversibleTransfer_timestamp_DESC_NULLS_FIRST', + ScheduledReversibleTransferTimestampDescNullsLast = 'scheduledReversibleTransfer_timestamp_DESC_NULLS_LAST', + ScheduledReversibleTransferTxIdAsc = 'scheduledReversibleTransfer_txId_ASC', + ScheduledReversibleTransferTxIdAscNullsFirst = 'scheduledReversibleTransfer_txId_ASC_NULLS_FIRST', + ScheduledReversibleTransferTxIdAscNullsLast = 'scheduledReversibleTransfer_txId_ASC_NULLS_LAST', + ScheduledReversibleTransferTxIdDesc = 'scheduledReversibleTransfer_txId_DESC', + ScheduledReversibleTransferTxIdDescNullsFirst = 'scheduledReversibleTransfer_txId_DESC_NULLS_FIRST', + ScheduledReversibleTransferTxIdDescNullsLast = 'scheduledReversibleTransfer_txId_DESC_NULLS_LAST', TimestampAsc = 'timestamp_ASC', TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', @@ -1040,6 +1656,12 @@ export enum EventOrderByInput { TransferFeeDesc = 'transfer_fee_DESC', TransferFeeDescNullsFirst = 'transfer_fee_DESC_NULLS_FIRST', TransferFeeDescNullsLast = 'transfer_fee_DESC_NULLS_LAST', + TransferFromHashAsc = 'transfer_fromHash_ASC', + TransferFromHashAscNullsFirst = 'transfer_fromHash_ASC_NULLS_FIRST', + TransferFromHashAscNullsLast = 'transfer_fromHash_ASC_NULLS_LAST', + TransferFromHashDesc = 'transfer_fromHash_DESC', + TransferFromHashDescNullsFirst = 'transfer_fromHash_DESC_NULLS_FIRST', + TransferFromHashDescNullsLast = 'transfer_fromHash_DESC_NULLS_LAST', TransferIdAsc = 'transfer_id_ASC', TransferIdAscNullsFirst = 'transfer_id_ASC_NULLS_FIRST', TransferIdAscNullsLast = 'transfer_id_ASC_NULLS_LAST', @@ -1052,6 +1674,12 @@ export enum EventOrderByInput { TransferTimestampDesc = 'transfer_timestamp_DESC', TransferTimestampDescNullsFirst = 'transfer_timestamp_DESC_NULLS_FIRST', TransferTimestampDescNullsLast = 'transfer_timestamp_DESC_NULLS_LAST', + TransferToHashAsc = 'transfer_toHash_ASC', + TransferToHashAscNullsFirst = 'transfer_toHash_ASC_NULLS_FIRST', + TransferToHashAscNullsLast = 'transfer_toHash_ASC_NULLS_LAST', + TransferToHashDesc = 'transfer_toHash_DESC', + TransferToHashDescNullsFirst = 'transfer_toHash_DESC_NULLS_FIRST', + TransferToHashDescNullsLast = 'transfer_toHash_DESC_NULLS_LAST', TypeAsc = 'type_ASC', TypeAscNullsFirst = 'type_ASC_NULLS_FIRST', TypeAscNullsLast = 'type_ASC_NULLS_LAST', @@ -1062,10 +1690,12 @@ export enum EventOrderByInput { export enum EventType { Balance = 'BALANCE', + CancelledReversibleTransfer = 'CANCELLED_REVERSIBLE_TRANSFER', Error = 'ERROR', + ExecutedReversibleTransfer = 'EXECUTED_REVERSIBLE_TRANSFER', HighSecuritySet = 'HIGH_SECURITY_SET', MinerReward = 'MINER_REWARD', - ReversibleTransfer = 'REVERSIBLE_TRANSFER', + ScheduledReversibleTransfer = 'SCHEDULED_REVERSIBLE_TRANSFER', Transfer = 'TRANSFER' } @@ -1076,8 +1706,12 @@ export type EventWhereInput = { balanceEvent_isNull?: InputMaybe; block?: InputMaybe; block_isNull?: InputMaybe; + cancelledReversibleTransfer?: InputMaybe; + cancelledReversibleTransfer_isNull?: InputMaybe; errorEvent?: InputMaybe; errorEvent_isNull?: InputMaybe; + executedReversibleTransfer?: InputMaybe; + executedReversibleTransfer_isNull?: InputMaybe; extrinsicHash_contains?: InputMaybe; extrinsicHash_containsInsensitive?: InputMaybe; extrinsicHash_endsWith?: InputMaybe; @@ -1116,13 +1750,10 @@ export type EventWhereInput = { id_not_in?: InputMaybe>; id_not_startsWith?: InputMaybe; id_startsWith?: InputMaybe; - isScheduled_eq?: InputMaybe; - isScheduled_isNull?: InputMaybe; - isScheduled_not_eq?: InputMaybe; minerReward?: InputMaybe; minerReward_isNull?: InputMaybe; - reversibleTransfer?: InputMaybe; - reversibleTransfer_isNull?: InputMaybe; + scheduledReversibleTransfer?: InputMaybe; + scheduledReversibleTransfer_isNull?: InputMaybe; timestamp_eq?: InputMaybe; timestamp_gt?: InputMaybe; timestamp_gte?: InputMaybe; @@ -1148,25 +1779,24 @@ export type EventsConnection = { totalCount: Scalars['Int']['output']; }; -export type HighSecuritySet = { - __typename?: 'HighSecuritySet'; +export type ExecutedReversibleTransfer = { + __typename?: 'ExecutedReversibleTransfer'; block: Block; - delay: Scalars['BigInt']['output']; event?: Maybe; - extrinsicHash?: Maybe; + executedTransfer?: Maybe; id: Scalars['String']['output']; - interceptor: Account; + scheduledTransfer: ScheduledReversibleTransfer; timestamp: Scalars['DateTime']['output']; - who: Account; + txId: Scalars['String']['output']; }; -export type HighSecuritySetEdge = { - __typename?: 'HighSecuritySetEdge'; +export type ExecutedReversibleTransferEdge = { + __typename?: 'ExecutedReversibleTransferEdge'; cursor: Scalars['String']['output']; - node: HighSecuritySet; + node: ExecutedReversibleTransfer; }; -export enum HighSecuritySetOrderByInput { +export enum ExecutedReversibleTransferOrderByInput { BlockHashAsc = 'block_hash_ASC', BlockHashAscNullsFirst = 'block_hash_ASC_NULLS_FIRST', BlockHashAscNullsLast = 'block_hash_ASC_NULLS_LAST', @@ -1197,9 +1827,249 @@ export enum HighSecuritySetOrderByInput { BlockTimestampDesc = 'block_timestamp_DESC', BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', - DelayAsc = 'delay_ASC', - DelayAscNullsFirst = 'delay_ASC_NULLS_FIRST', - DelayAscNullsLast = 'delay_ASC_NULLS_LAST', + EventExtrinsicHashAsc = 'event_extrinsicHash_ASC', + EventExtrinsicHashAscNullsFirst = 'event_extrinsicHash_ASC_NULLS_FIRST', + EventExtrinsicHashAscNullsLast = 'event_extrinsicHash_ASC_NULLS_LAST', + EventExtrinsicHashDesc = 'event_extrinsicHash_DESC', + EventExtrinsicHashDescNullsFirst = 'event_extrinsicHash_DESC_NULLS_FIRST', + EventExtrinsicHashDescNullsLast = 'event_extrinsicHash_DESC_NULLS_LAST', + EventIdAsc = 'event_id_ASC', + EventIdAscNullsFirst = 'event_id_ASC_NULLS_FIRST', + EventIdAscNullsLast = 'event_id_ASC_NULLS_LAST', + EventIdDesc = 'event_id_DESC', + EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', + EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', + EventTimestampAsc = 'event_timestamp_ASC', + EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', + EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', + EventTimestampDesc = 'event_timestamp_DESC', + EventTimestampDescNullsFirst = 'event_timestamp_DESC_NULLS_FIRST', + EventTimestampDescNullsLast = 'event_timestamp_DESC_NULLS_LAST', + EventTypeAsc = 'event_type_ASC', + EventTypeAscNullsFirst = 'event_type_ASC_NULLS_FIRST', + EventTypeAscNullsLast = 'event_type_ASC_NULLS_LAST', + EventTypeDesc = 'event_type_DESC', + EventTypeDescNullsFirst = 'event_type_DESC_NULLS_FIRST', + EventTypeDescNullsLast = 'event_type_DESC_NULLS_LAST', + ExecutedTransferAmountAsc = 'executedTransfer_amount_ASC', + ExecutedTransferAmountAscNullsFirst = 'executedTransfer_amount_ASC_NULLS_FIRST', + ExecutedTransferAmountAscNullsLast = 'executedTransfer_amount_ASC_NULLS_LAST', + ExecutedTransferAmountDesc = 'executedTransfer_amount_DESC', + ExecutedTransferAmountDescNullsFirst = 'executedTransfer_amount_DESC_NULLS_FIRST', + ExecutedTransferAmountDescNullsLast = 'executedTransfer_amount_DESC_NULLS_LAST', + ExecutedTransferExtrinsicHashAsc = 'executedTransfer_extrinsicHash_ASC', + ExecutedTransferExtrinsicHashAscNullsFirst = 'executedTransfer_extrinsicHash_ASC_NULLS_FIRST', + ExecutedTransferExtrinsicHashAscNullsLast = 'executedTransfer_extrinsicHash_ASC_NULLS_LAST', + ExecutedTransferExtrinsicHashDesc = 'executedTransfer_extrinsicHash_DESC', + ExecutedTransferExtrinsicHashDescNullsFirst = 'executedTransfer_extrinsicHash_DESC_NULLS_FIRST', + ExecutedTransferExtrinsicHashDescNullsLast = 'executedTransfer_extrinsicHash_DESC_NULLS_LAST', + ExecutedTransferFeeAsc = 'executedTransfer_fee_ASC', + ExecutedTransferFeeAscNullsFirst = 'executedTransfer_fee_ASC_NULLS_FIRST', + ExecutedTransferFeeAscNullsLast = 'executedTransfer_fee_ASC_NULLS_LAST', + ExecutedTransferFeeDesc = 'executedTransfer_fee_DESC', + ExecutedTransferFeeDescNullsFirst = 'executedTransfer_fee_DESC_NULLS_FIRST', + ExecutedTransferFeeDescNullsLast = 'executedTransfer_fee_DESC_NULLS_LAST', + ExecutedTransferFromHashAsc = 'executedTransfer_fromHash_ASC', + ExecutedTransferFromHashAscNullsFirst = 'executedTransfer_fromHash_ASC_NULLS_FIRST', + ExecutedTransferFromHashAscNullsLast = 'executedTransfer_fromHash_ASC_NULLS_LAST', + ExecutedTransferFromHashDesc = 'executedTransfer_fromHash_DESC', + ExecutedTransferFromHashDescNullsFirst = 'executedTransfer_fromHash_DESC_NULLS_FIRST', + ExecutedTransferFromHashDescNullsLast = 'executedTransfer_fromHash_DESC_NULLS_LAST', + ExecutedTransferIdAsc = 'executedTransfer_id_ASC', + ExecutedTransferIdAscNullsFirst = 'executedTransfer_id_ASC_NULLS_FIRST', + ExecutedTransferIdAscNullsLast = 'executedTransfer_id_ASC_NULLS_LAST', + ExecutedTransferIdDesc = 'executedTransfer_id_DESC', + ExecutedTransferIdDescNullsFirst = 'executedTransfer_id_DESC_NULLS_FIRST', + ExecutedTransferIdDescNullsLast = 'executedTransfer_id_DESC_NULLS_LAST', + ExecutedTransferTimestampAsc = 'executedTransfer_timestamp_ASC', + ExecutedTransferTimestampAscNullsFirst = 'executedTransfer_timestamp_ASC_NULLS_FIRST', + ExecutedTransferTimestampAscNullsLast = 'executedTransfer_timestamp_ASC_NULLS_LAST', + ExecutedTransferTimestampDesc = 'executedTransfer_timestamp_DESC', + ExecutedTransferTimestampDescNullsFirst = 'executedTransfer_timestamp_DESC_NULLS_FIRST', + ExecutedTransferTimestampDescNullsLast = 'executedTransfer_timestamp_DESC_NULLS_LAST', + ExecutedTransferToHashAsc = 'executedTransfer_toHash_ASC', + ExecutedTransferToHashAscNullsFirst = 'executedTransfer_toHash_ASC_NULLS_FIRST', + ExecutedTransferToHashAscNullsLast = 'executedTransfer_toHash_ASC_NULLS_LAST', + ExecutedTransferToHashDesc = 'executedTransfer_toHash_DESC', + ExecutedTransferToHashDescNullsFirst = 'executedTransfer_toHash_DESC_NULLS_FIRST', + ExecutedTransferToHashDescNullsLast = 'executedTransfer_toHash_DESC_NULLS_LAST', + IdAsc = 'id_ASC', + IdAscNullsFirst = 'id_ASC_NULLS_FIRST', + IdAscNullsLast = 'id_ASC_NULLS_LAST', + IdDesc = 'id_DESC', + IdDescNullsFirst = 'id_DESC_NULLS_FIRST', + IdDescNullsLast = 'id_DESC_NULLS_LAST', + ScheduledTransferAmountAsc = 'scheduledTransfer_amount_ASC', + ScheduledTransferAmountAscNullsFirst = 'scheduledTransfer_amount_ASC_NULLS_FIRST', + ScheduledTransferAmountAscNullsLast = 'scheduledTransfer_amount_ASC_NULLS_LAST', + ScheduledTransferAmountDesc = 'scheduledTransfer_amount_DESC', + ScheduledTransferAmountDescNullsFirst = 'scheduledTransfer_amount_DESC_NULLS_FIRST', + ScheduledTransferAmountDescNullsLast = 'scheduledTransfer_amount_DESC_NULLS_LAST', + ScheduledTransferExtrinsicHashAsc = 'scheduledTransfer_extrinsicHash_ASC', + ScheduledTransferExtrinsicHashAscNullsFirst = 'scheduledTransfer_extrinsicHash_ASC_NULLS_FIRST', + ScheduledTransferExtrinsicHashAscNullsLast = 'scheduledTransfer_extrinsicHash_ASC_NULLS_LAST', + ScheduledTransferExtrinsicHashDesc = 'scheduledTransfer_extrinsicHash_DESC', + ScheduledTransferExtrinsicHashDescNullsFirst = 'scheduledTransfer_extrinsicHash_DESC_NULLS_FIRST', + ScheduledTransferExtrinsicHashDescNullsLast = 'scheduledTransfer_extrinsicHash_DESC_NULLS_LAST', + ScheduledTransferFeeAsc = 'scheduledTransfer_fee_ASC', + ScheduledTransferFeeAscNullsFirst = 'scheduledTransfer_fee_ASC_NULLS_FIRST', + ScheduledTransferFeeAscNullsLast = 'scheduledTransfer_fee_ASC_NULLS_LAST', + ScheduledTransferFeeDesc = 'scheduledTransfer_fee_DESC', + ScheduledTransferFeeDescNullsFirst = 'scheduledTransfer_fee_DESC_NULLS_FIRST', + ScheduledTransferFeeDescNullsLast = 'scheduledTransfer_fee_DESC_NULLS_LAST', + ScheduledTransferIdAsc = 'scheduledTransfer_id_ASC', + ScheduledTransferIdAscNullsFirst = 'scheduledTransfer_id_ASC_NULLS_FIRST', + ScheduledTransferIdAscNullsLast = 'scheduledTransfer_id_ASC_NULLS_LAST', + ScheduledTransferIdDesc = 'scheduledTransfer_id_DESC', + ScheduledTransferIdDescNullsFirst = 'scheduledTransfer_id_DESC_NULLS_FIRST', + ScheduledTransferIdDescNullsLast = 'scheduledTransfer_id_DESC_NULLS_LAST', + ScheduledTransferScheduledAtAsc = 'scheduledTransfer_scheduledAt_ASC', + ScheduledTransferScheduledAtAscNullsFirst = 'scheduledTransfer_scheduledAt_ASC_NULLS_FIRST', + ScheduledTransferScheduledAtAscNullsLast = 'scheduledTransfer_scheduledAt_ASC_NULLS_LAST', + ScheduledTransferScheduledAtDesc = 'scheduledTransfer_scheduledAt_DESC', + ScheduledTransferScheduledAtDescNullsFirst = 'scheduledTransfer_scheduledAt_DESC_NULLS_FIRST', + ScheduledTransferScheduledAtDescNullsLast = 'scheduledTransfer_scheduledAt_DESC_NULLS_LAST', + ScheduledTransferTimestampAsc = 'scheduledTransfer_timestamp_ASC', + ScheduledTransferTimestampAscNullsFirst = 'scheduledTransfer_timestamp_ASC_NULLS_FIRST', + ScheduledTransferTimestampAscNullsLast = 'scheduledTransfer_timestamp_ASC_NULLS_LAST', + ScheduledTransferTimestampDesc = 'scheduledTransfer_timestamp_DESC', + ScheduledTransferTimestampDescNullsFirst = 'scheduledTransfer_timestamp_DESC_NULLS_FIRST', + ScheduledTransferTimestampDescNullsLast = 'scheduledTransfer_timestamp_DESC_NULLS_LAST', + ScheduledTransferTxIdAsc = 'scheduledTransfer_txId_ASC', + ScheduledTransferTxIdAscNullsFirst = 'scheduledTransfer_txId_ASC_NULLS_FIRST', + ScheduledTransferTxIdAscNullsLast = 'scheduledTransfer_txId_ASC_NULLS_LAST', + ScheduledTransferTxIdDesc = 'scheduledTransfer_txId_DESC', + ScheduledTransferTxIdDescNullsFirst = 'scheduledTransfer_txId_DESC_NULLS_FIRST', + ScheduledTransferTxIdDescNullsLast = 'scheduledTransfer_txId_DESC_NULLS_LAST', + TimestampAsc = 'timestamp_ASC', + TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', + TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', + TimestampDesc = 'timestamp_DESC', + TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', + TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST', + TxIdAsc = 'txId_ASC', + TxIdAscNullsFirst = 'txId_ASC_NULLS_FIRST', + TxIdAscNullsLast = 'txId_ASC_NULLS_LAST', + TxIdDesc = 'txId_DESC', + TxIdDescNullsFirst = 'txId_DESC_NULLS_FIRST', + TxIdDescNullsLast = 'txId_DESC_NULLS_LAST' +} + +export type ExecutedReversibleTransferWhereInput = { + AND?: InputMaybe>; + OR?: InputMaybe>; + block?: InputMaybe; + block_isNull?: InputMaybe; + event?: InputMaybe; + event_isNull?: InputMaybe; + executedTransfer?: InputMaybe; + executedTransfer_isNull?: InputMaybe; + id_contains?: InputMaybe; + id_containsInsensitive?: InputMaybe; + id_endsWith?: InputMaybe; + id_eq?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_isNull?: InputMaybe; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_containsInsensitive?: InputMaybe; + id_not_endsWith?: InputMaybe; + id_not_eq?: InputMaybe; + id_not_in?: InputMaybe>; + id_not_startsWith?: InputMaybe; + id_startsWith?: InputMaybe; + scheduledTransfer?: InputMaybe; + scheduledTransfer_isNull?: InputMaybe; + timestamp_eq?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_isNull?: InputMaybe; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not_eq?: InputMaybe; + timestamp_not_in?: InputMaybe>; + txId_contains?: InputMaybe; + txId_containsInsensitive?: InputMaybe; + txId_endsWith?: InputMaybe; + txId_eq?: InputMaybe; + txId_gt?: InputMaybe; + txId_gte?: InputMaybe; + txId_in?: InputMaybe>; + txId_isNull?: InputMaybe; + txId_lt?: InputMaybe; + txId_lte?: InputMaybe; + txId_not_contains?: InputMaybe; + txId_not_containsInsensitive?: InputMaybe; + txId_not_endsWith?: InputMaybe; + txId_not_eq?: InputMaybe; + txId_not_in?: InputMaybe>; + txId_not_startsWith?: InputMaybe; + txId_startsWith?: InputMaybe; +}; + +export type ExecutedReversibleTransfersConnection = { + __typename?: 'ExecutedReversibleTransfersConnection'; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars['Int']['output']; +}; + +export type HighSecuritySet = { + __typename?: 'HighSecuritySet'; + block: Block; + delay: Scalars['BigInt']['output']; + event?: Maybe; + extrinsicHash?: Maybe; + id: Scalars['String']['output']; + interceptor: Account; + timestamp: Scalars['DateTime']['output']; + who: Account; +}; + +export type HighSecuritySetEdge = { + __typename?: 'HighSecuritySetEdge'; + cursor: Scalars['String']['output']; + node: HighSecuritySet; +}; + +export enum HighSecuritySetOrderByInput { + BlockHashAsc = 'block_hash_ASC', + BlockHashAscNullsFirst = 'block_hash_ASC_NULLS_FIRST', + BlockHashAscNullsLast = 'block_hash_ASC_NULLS_LAST', + BlockHashDesc = 'block_hash_DESC', + BlockHashDescNullsFirst = 'block_hash_DESC_NULLS_FIRST', + BlockHashDescNullsLast = 'block_hash_DESC_NULLS_LAST', + BlockHeightAsc = 'block_height_ASC', + BlockHeightAscNullsFirst = 'block_height_ASC_NULLS_FIRST', + BlockHeightAscNullsLast = 'block_height_ASC_NULLS_LAST', + BlockHeightDesc = 'block_height_DESC', + BlockHeightDescNullsFirst = 'block_height_DESC_NULLS_FIRST', + BlockHeightDescNullsLast = 'block_height_DESC_NULLS_LAST', + BlockIdAsc = 'block_id_ASC', + BlockIdAscNullsFirst = 'block_id_ASC_NULLS_FIRST', + BlockIdAscNullsLast = 'block_id_ASC_NULLS_LAST', + BlockIdDesc = 'block_id_DESC', + BlockIdDescNullsFirst = 'block_id_DESC_NULLS_FIRST', + BlockIdDescNullsLast = 'block_id_DESC_NULLS_LAST', + BlockRewardAsc = 'block_reward_ASC', + BlockRewardAscNullsFirst = 'block_reward_ASC_NULLS_FIRST', + BlockRewardAscNullsLast = 'block_reward_ASC_NULLS_LAST', + BlockRewardDesc = 'block_reward_DESC', + BlockRewardDescNullsFirst = 'block_reward_DESC_NULLS_FIRST', + BlockRewardDescNullsLast = 'block_reward_DESC_NULLS_LAST', + BlockTimestampAsc = 'block_timestamp_ASC', + BlockTimestampAscNullsFirst = 'block_timestamp_ASC_NULLS_FIRST', + BlockTimestampAscNullsLast = 'block_timestamp_ASC_NULLS_LAST', + BlockTimestampDesc = 'block_timestamp_DESC', + BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', + BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', + DelayAsc = 'delay_ASC', + DelayAscNullsFirst = 'delay_ASC_NULLS_FIRST', + DelayAscNullsLast = 'delay_ASC_NULLS_LAST', DelayDesc = 'delay_DESC', DelayDescNullsFirst = 'delay_DESC_NULLS_FIRST', DelayDescNullsLast = 'delay_DESC_NULLS_LAST', @@ -1215,12 +2085,6 @@ export enum HighSecuritySetOrderByInput { EventIdDesc = 'event_id_DESC', EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', - EventIsScheduledAsc = 'event_isScheduled_ASC', - EventIsScheduledAscNullsFirst = 'event_isScheduled_ASC_NULLS_FIRST', - EventIsScheduledAscNullsLast = 'event_isScheduled_ASC_NULLS_LAST', - EventIsScheduledDesc = 'event_isScheduled_DESC', - EventIsScheduledDescNullsFirst = 'event_isScheduled_DESC_NULLS_FIRST', - EventIsScheduledDescNullsLast = 'event_isScheduled_DESC_NULLS_LAST', EventTimestampAsc = 'event_timestamp_ASC', EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', @@ -1446,12 +2310,6 @@ export enum MinerRewardOrderByInput { EventIdDesc = 'event_id_DESC', EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', - EventIsScheduledAsc = 'event_isScheduled_ASC', - EventIsScheduledAscNullsFirst = 'event_isScheduled_ASC_NULLS_FIRST', - EventIsScheduledAscNullsLast = 'event_isScheduled_ASC_NULLS_LAST', - EventIsScheduledDesc = 'event_isScheduled_DESC', - EventIsScheduledDescNullsFirst = 'event_isScheduled_DESC_NULLS_FIRST', - EventIsScheduledDescNullsLast = 'event_isScheduled_DESC_NULLS_LAST', EventTimestampAsc = 'event_timestamp_ASC', EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', @@ -1660,6 +2518,9 @@ export type PageInfo = { export type Query = { __typename?: 'Query'; accountById?: Maybe; + accountEventById?: Maybe; + accountEvents: Array; + accountEventsConnection: AccountEventsConnection; accounts: Array; accountsConnection: AccountsConnection; balanceEventById?: Maybe; @@ -1668,12 +2529,18 @@ export type Query = { blockById?: Maybe; blocks: Array; blocksConnection: BlocksConnection; + cancelledReversibleTransferById?: Maybe; + cancelledReversibleTransfers: Array; + cancelledReversibleTransfersConnection: CancelledReversibleTransfersConnection; errorEventById?: Maybe; errorEvents: Array; errorEventsConnection: ErrorEventsConnection; eventById?: Maybe; events: Array; eventsConnection: EventsConnection; + executedReversibleTransferById?: Maybe; + executedReversibleTransfers: Array; + executedReversibleTransfersConnection: ExecutedReversibleTransfersConnection; highSecuritySetById?: Maybe; highSecuritySets: Array; highSecuritySetsConnection: HighSecuritySetsConnection; @@ -1683,12 +2550,13 @@ export type Query = { minerStats: Array; minerStatsById?: Maybe; minerStatsConnection: MinerStatsConnection; - reversibleTransferById?: Maybe; - reversibleTransfers: Array; - reversibleTransfersConnection: ReversibleTransfersConnection; + scheduledReversibleTransferById?: Maybe; + scheduledReversibleTransfers: Array; + scheduledReversibleTransfersConnection: ScheduledReversibleTransfersConnection; squidStatus?: Maybe; transferById?: Maybe; transfers: Array; + transfersByHashPrefix: TransfersByPrefixResult; transfersConnection: TransfersConnection; }; @@ -1696,6 +2564,24 @@ export type QueryAccountByIdArgs = { id: Scalars['String']['input']; }; +export type QueryAccountEventByIdArgs = { + id: Scalars['String']['input']; +}; + +export type QueryAccountEventsArgs = { + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type QueryAccountEventsConnectionArgs = { + after?: InputMaybe; + first?: InputMaybe; + orderBy: Array; + where?: InputMaybe; +}; + export type QueryAccountsArgs = { limit?: InputMaybe; offset?: InputMaybe; @@ -1746,6 +2632,24 @@ export type QueryBlocksConnectionArgs = { where?: InputMaybe; }; +export type QueryCancelledReversibleTransferByIdArgs = { + id: Scalars['String']['input']; +}; + +export type QueryCancelledReversibleTransfersArgs = { + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type QueryCancelledReversibleTransfersConnectionArgs = { + after?: InputMaybe; + first?: InputMaybe; + orderBy: Array; + where?: InputMaybe; +}; + export type QueryErrorEventByIdArgs = { id: Scalars['String']['input']; }; @@ -1782,6 +2686,24 @@ export type QueryEventsConnectionArgs = { where?: InputMaybe; }; +export type QueryExecutedReversibleTransferByIdArgs = { + id: Scalars['String']['input']; +}; + +export type QueryExecutedReversibleTransfersArgs = { + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type QueryExecutedReversibleTransfersConnectionArgs = { + after?: InputMaybe; + first?: InputMaybe; + orderBy: Array; + where?: InputMaybe; +}; + export type QueryHighSecuritySetByIdArgs = { id: Scalars['String']['input']; }; @@ -1836,22 +2758,22 @@ export type QueryMinerStatsConnectionArgs = { where?: InputMaybe; }; -export type QueryReversibleTransferByIdArgs = { +export type QueryScheduledReversibleTransferByIdArgs = { id: Scalars['String']['input']; }; -export type QueryReversibleTransfersArgs = { +export type QueryScheduledReversibleTransfersArgs = { limit?: InputMaybe; offset?: InputMaybe; - orderBy?: InputMaybe>; - where?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; }; -export type QueryReversibleTransfersConnectionArgs = { +export type QueryScheduledReversibleTransfersConnectionArgs = { after?: InputMaybe; first?: InputMaybe; - orderBy: Array; - where?: InputMaybe; + orderBy: Array; + where?: InputMaybe; }; export type QueryTransferByIdArgs = { @@ -1865,6 +2787,10 @@ export type QueryTransfersArgs = { where?: InputMaybe; }; +export type QueryTransfersByHashPrefixArgs = { + input: TransfersByPrefixInput; +}; + export type QueryTransfersConnectionArgs = { after?: InputMaybe; first?: InputMaybe; @@ -1872,31 +2798,28 @@ export type QueryTransfersConnectionArgs = { where?: InputMaybe; }; -export type ReversibleTransfer = { - __typename?: 'ReversibleTransfer'; +export type ScheduledReversibleTransfer = { + __typename?: 'ScheduledReversibleTransfer'; amount: Scalars['BigInt']['output']; block: Block; - cancelledBy?: Maybe; event?: Maybe; - executedTransfer?: Maybe; extrinsicHash?: Maybe; fee: Scalars['BigInt']['output']; from: Account; id: Scalars['String']['output']; scheduledAt: Scalars['DateTime']['output']; - status: ReversibleTransferStatus; timestamp: Scalars['DateTime']['output']; to: Account; txId: Scalars['String']['output']; }; -export type ReversibleTransferEdge = { - __typename?: 'ReversibleTransferEdge'; +export type ScheduledReversibleTransferEdge = { + __typename?: 'ScheduledReversibleTransferEdge'; cursor: Scalars['String']['output']; - node: ReversibleTransfer; + node: ScheduledReversibleTransfer; }; -export enum ReversibleTransferOrderByInput { +export enum ScheduledReversibleTransferOrderByInput { AmountAsc = 'amount_ASC', AmountAscNullsFirst = 'amount_ASC_NULLS_FIRST', AmountAscNullsLast = 'amount_ASC_NULLS_LAST', @@ -1933,36 +2856,6 @@ export enum ReversibleTransferOrderByInput { BlockTimestampDesc = 'block_timestamp_DESC', BlockTimestampDescNullsFirst = 'block_timestamp_DESC_NULLS_FIRST', BlockTimestampDescNullsLast = 'block_timestamp_DESC_NULLS_LAST', - CancelledByFreeAsc = 'cancelledBy_free_ASC', - CancelledByFreeAscNullsFirst = 'cancelledBy_free_ASC_NULLS_FIRST', - CancelledByFreeAscNullsLast = 'cancelledBy_free_ASC_NULLS_LAST', - CancelledByFreeDesc = 'cancelledBy_free_DESC', - CancelledByFreeDescNullsFirst = 'cancelledBy_free_DESC_NULLS_FIRST', - CancelledByFreeDescNullsLast = 'cancelledBy_free_DESC_NULLS_LAST', - CancelledByFrozenAsc = 'cancelledBy_frozen_ASC', - CancelledByFrozenAscNullsFirst = 'cancelledBy_frozen_ASC_NULLS_FIRST', - CancelledByFrozenAscNullsLast = 'cancelledBy_frozen_ASC_NULLS_LAST', - CancelledByFrozenDesc = 'cancelledBy_frozen_DESC', - CancelledByFrozenDescNullsFirst = 'cancelledBy_frozen_DESC_NULLS_FIRST', - CancelledByFrozenDescNullsLast = 'cancelledBy_frozen_DESC_NULLS_LAST', - CancelledByIdAsc = 'cancelledBy_id_ASC', - CancelledByIdAscNullsFirst = 'cancelledBy_id_ASC_NULLS_FIRST', - CancelledByIdAscNullsLast = 'cancelledBy_id_ASC_NULLS_LAST', - CancelledByIdDesc = 'cancelledBy_id_DESC', - CancelledByIdDescNullsFirst = 'cancelledBy_id_DESC_NULLS_FIRST', - CancelledByIdDescNullsLast = 'cancelledBy_id_DESC_NULLS_LAST', - CancelledByLastUpdatedAsc = 'cancelledBy_lastUpdated_ASC', - CancelledByLastUpdatedAscNullsFirst = 'cancelledBy_lastUpdated_ASC_NULLS_FIRST', - CancelledByLastUpdatedAscNullsLast = 'cancelledBy_lastUpdated_ASC_NULLS_LAST', - CancelledByLastUpdatedDesc = 'cancelledBy_lastUpdated_DESC', - CancelledByLastUpdatedDescNullsFirst = 'cancelledBy_lastUpdated_DESC_NULLS_FIRST', - CancelledByLastUpdatedDescNullsLast = 'cancelledBy_lastUpdated_DESC_NULLS_LAST', - CancelledByReservedAsc = 'cancelledBy_reserved_ASC', - CancelledByReservedAscNullsFirst = 'cancelledBy_reserved_ASC_NULLS_FIRST', - CancelledByReservedAscNullsLast = 'cancelledBy_reserved_ASC_NULLS_LAST', - CancelledByReservedDesc = 'cancelledBy_reserved_DESC', - CancelledByReservedDescNullsFirst = 'cancelledBy_reserved_DESC_NULLS_FIRST', - CancelledByReservedDescNullsLast = 'cancelledBy_reserved_DESC_NULLS_LAST', EventExtrinsicHashAsc = 'event_extrinsicHash_ASC', EventExtrinsicHashAscNullsFirst = 'event_extrinsicHash_ASC_NULLS_FIRST', EventExtrinsicHashAscNullsLast = 'event_extrinsicHash_ASC_NULLS_LAST', @@ -1975,12 +2868,6 @@ export enum ReversibleTransferOrderByInput { EventIdDesc = 'event_id_DESC', EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', - EventIsScheduledAsc = 'event_isScheduled_ASC', - EventIsScheduledAscNullsFirst = 'event_isScheduled_ASC_NULLS_FIRST', - EventIsScheduledAscNullsLast = 'event_isScheduled_ASC_NULLS_LAST', - EventIsScheduledDesc = 'event_isScheduled_DESC', - EventIsScheduledDescNullsFirst = 'event_isScheduled_DESC_NULLS_FIRST', - EventIsScheduledDescNullsLast = 'event_isScheduled_DESC_NULLS_LAST', EventTimestampAsc = 'event_timestamp_ASC', EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', @@ -1993,36 +2880,6 @@ export enum ReversibleTransferOrderByInput { EventTypeDesc = 'event_type_DESC', EventTypeDescNullsFirst = 'event_type_DESC_NULLS_FIRST', EventTypeDescNullsLast = 'event_type_DESC_NULLS_LAST', - ExecutedTransferAmountAsc = 'executedTransfer_amount_ASC', - ExecutedTransferAmountAscNullsFirst = 'executedTransfer_amount_ASC_NULLS_FIRST', - ExecutedTransferAmountAscNullsLast = 'executedTransfer_amount_ASC_NULLS_LAST', - ExecutedTransferAmountDesc = 'executedTransfer_amount_DESC', - ExecutedTransferAmountDescNullsFirst = 'executedTransfer_amount_DESC_NULLS_FIRST', - ExecutedTransferAmountDescNullsLast = 'executedTransfer_amount_DESC_NULLS_LAST', - ExecutedTransferExtrinsicHashAsc = 'executedTransfer_extrinsicHash_ASC', - ExecutedTransferExtrinsicHashAscNullsFirst = 'executedTransfer_extrinsicHash_ASC_NULLS_FIRST', - ExecutedTransferExtrinsicHashAscNullsLast = 'executedTransfer_extrinsicHash_ASC_NULLS_LAST', - ExecutedTransferExtrinsicHashDesc = 'executedTransfer_extrinsicHash_DESC', - ExecutedTransferExtrinsicHashDescNullsFirst = 'executedTransfer_extrinsicHash_DESC_NULLS_FIRST', - ExecutedTransferExtrinsicHashDescNullsLast = 'executedTransfer_extrinsicHash_DESC_NULLS_LAST', - ExecutedTransferFeeAsc = 'executedTransfer_fee_ASC', - ExecutedTransferFeeAscNullsFirst = 'executedTransfer_fee_ASC_NULLS_FIRST', - ExecutedTransferFeeAscNullsLast = 'executedTransfer_fee_ASC_NULLS_LAST', - ExecutedTransferFeeDesc = 'executedTransfer_fee_DESC', - ExecutedTransferFeeDescNullsFirst = 'executedTransfer_fee_DESC_NULLS_FIRST', - ExecutedTransferFeeDescNullsLast = 'executedTransfer_fee_DESC_NULLS_LAST', - ExecutedTransferIdAsc = 'executedTransfer_id_ASC', - ExecutedTransferIdAscNullsFirst = 'executedTransfer_id_ASC_NULLS_FIRST', - ExecutedTransferIdAscNullsLast = 'executedTransfer_id_ASC_NULLS_LAST', - ExecutedTransferIdDesc = 'executedTransfer_id_DESC', - ExecutedTransferIdDescNullsFirst = 'executedTransfer_id_DESC_NULLS_FIRST', - ExecutedTransferIdDescNullsLast = 'executedTransfer_id_DESC_NULLS_LAST', - ExecutedTransferTimestampAsc = 'executedTransfer_timestamp_ASC', - ExecutedTransferTimestampAscNullsFirst = 'executedTransfer_timestamp_ASC_NULLS_FIRST', - ExecutedTransferTimestampAscNullsLast = 'executedTransfer_timestamp_ASC_NULLS_LAST', - ExecutedTransferTimestampDesc = 'executedTransfer_timestamp_DESC', - ExecutedTransferTimestampDescNullsFirst = 'executedTransfer_timestamp_DESC_NULLS_FIRST', - ExecutedTransferTimestampDescNullsLast = 'executedTransfer_timestamp_DESC_NULLS_LAST', ExtrinsicHashAsc = 'extrinsicHash_ASC', ExtrinsicHashAscNullsFirst = 'extrinsicHash_ASC_NULLS_FIRST', ExtrinsicHashAscNullsLast = 'extrinsicHash_ASC_NULLS_LAST', @@ -2077,12 +2934,6 @@ export enum ReversibleTransferOrderByInput { ScheduledAtDesc = 'scheduledAt_DESC', ScheduledAtDescNullsFirst = 'scheduledAt_DESC_NULLS_FIRST', ScheduledAtDescNullsLast = 'scheduledAt_DESC_NULLS_LAST', - StatusAsc = 'status_ASC', - StatusAscNullsFirst = 'status_ASC_NULLS_FIRST', - StatusAscNullsLast = 'status_ASC_NULLS_LAST', - StatusDesc = 'status_DESC', - StatusDescNullsFirst = 'status_DESC_NULLS_FIRST', - StatusDescNullsLast = 'status_DESC_NULLS_LAST', TimestampAsc = 'timestamp_ASC', TimestampAscNullsFirst = 'timestamp_ASC_NULLS_FIRST', TimestampAscNullsLast = 'timestamp_ASC_NULLS_LAST', @@ -2127,15 +2978,9 @@ export enum ReversibleTransferOrderByInput { TxIdDescNullsLast = 'txId_DESC_NULLS_LAST' } -export enum ReversibleTransferStatus { - Cancelled = 'CANCELLED', - Executed = 'EXECUTED', - Scheduled = 'SCHEDULED' -} - -export type ReversibleTransferWhereInput = { - AND?: InputMaybe>; - OR?: InputMaybe>; +export type ScheduledReversibleTransferWhereInput = { + AND?: InputMaybe>; + OR?: InputMaybe>; amount_eq?: InputMaybe; amount_gt?: InputMaybe; amount_gte?: InputMaybe; @@ -2147,12 +2992,8 @@ export type ReversibleTransferWhereInput = { amount_not_in?: InputMaybe>; block?: InputMaybe; block_isNull?: InputMaybe; - cancelledBy?: InputMaybe; - cancelledBy_isNull?: InputMaybe; event?: InputMaybe; event_isNull?: InputMaybe; - executedTransfer?: InputMaybe; - executedTransfer_isNull?: InputMaybe; extrinsicHash_contains?: InputMaybe; extrinsicHash_containsInsensitive?: InputMaybe; extrinsicHash_endsWith?: InputMaybe; @@ -2209,11 +3050,6 @@ export type ReversibleTransferWhereInput = { scheduledAt_lte?: InputMaybe; scheduledAt_not_eq?: InputMaybe; scheduledAt_not_in?: InputMaybe>; - status_eq?: InputMaybe; - status_in?: InputMaybe>; - status_isNull?: InputMaybe; - status_not_eq?: InputMaybe; - status_not_in?: InputMaybe>; timestamp_eq?: InputMaybe; timestamp_gt?: InputMaybe; timestamp_gte?: InputMaybe; @@ -2244,9 +3080,9 @@ export type ReversibleTransferWhereInput = { txId_startsWith?: InputMaybe; }; -export type ReversibleTransfersConnection = { - __typename?: 'ReversibleTransfersConnection'; - edges: Array; +export type ScheduledReversibleTransfersConnection = { + __typename?: 'ScheduledReversibleTransfersConnection'; + edges: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; @@ -2268,13 +3104,17 @@ export type Transfer = { amount: Scalars['BigInt']['output']; block: Block; event?: Maybe; - executedBy?: Maybe; + executedBy?: Maybe; extrinsicHash?: Maybe; fee: Scalars['BigInt']['output']; from: Account; + /** Blake3 hash of raw 'from' address bytes (hex string) for privacy-preserving prefix queries */ + fromHash: Scalars['String']['output']; id: Scalars['String']['output']; timestamp: Scalars['DateTime']['output']; to: Account; + /** Blake3 hash of raw 'to' address bytes (hex string) for privacy-preserving prefix queries */ + toHash: Scalars['String']['output']; }; export type TransferEdge = { @@ -2332,12 +3172,6 @@ export enum TransferOrderByInput { EventIdDesc = 'event_id_DESC', EventIdDescNullsFirst = 'event_id_DESC_NULLS_FIRST', EventIdDescNullsLast = 'event_id_DESC_NULLS_LAST', - EventIsScheduledAsc = 'event_isScheduled_ASC', - EventIsScheduledAscNullsFirst = 'event_isScheduled_ASC_NULLS_FIRST', - EventIsScheduledAscNullsLast = 'event_isScheduled_ASC_NULLS_LAST', - EventIsScheduledDesc = 'event_isScheduled_DESC', - EventIsScheduledDescNullsFirst = 'event_isScheduled_DESC_NULLS_FIRST', - EventIsScheduledDescNullsLast = 'event_isScheduled_DESC_NULLS_LAST', EventTimestampAsc = 'event_timestamp_ASC', EventTimestampAscNullsFirst = 'event_timestamp_ASC_NULLS_FIRST', EventTimestampAscNullsLast = 'event_timestamp_ASC_NULLS_LAST', @@ -2350,42 +3184,12 @@ export enum TransferOrderByInput { EventTypeDesc = 'event_type_DESC', EventTypeDescNullsFirst = 'event_type_DESC_NULLS_FIRST', EventTypeDescNullsLast = 'event_type_DESC_NULLS_LAST', - ExecutedByAmountAsc = 'executedBy_amount_ASC', - ExecutedByAmountAscNullsFirst = 'executedBy_amount_ASC_NULLS_FIRST', - ExecutedByAmountAscNullsLast = 'executedBy_amount_ASC_NULLS_LAST', - ExecutedByAmountDesc = 'executedBy_amount_DESC', - ExecutedByAmountDescNullsFirst = 'executedBy_amount_DESC_NULLS_FIRST', - ExecutedByAmountDescNullsLast = 'executedBy_amount_DESC_NULLS_LAST', - ExecutedByExtrinsicHashAsc = 'executedBy_extrinsicHash_ASC', - ExecutedByExtrinsicHashAscNullsFirst = 'executedBy_extrinsicHash_ASC_NULLS_FIRST', - ExecutedByExtrinsicHashAscNullsLast = 'executedBy_extrinsicHash_ASC_NULLS_LAST', - ExecutedByExtrinsicHashDesc = 'executedBy_extrinsicHash_DESC', - ExecutedByExtrinsicHashDescNullsFirst = 'executedBy_extrinsicHash_DESC_NULLS_FIRST', - ExecutedByExtrinsicHashDescNullsLast = 'executedBy_extrinsicHash_DESC_NULLS_LAST', - ExecutedByFeeAsc = 'executedBy_fee_ASC', - ExecutedByFeeAscNullsFirst = 'executedBy_fee_ASC_NULLS_FIRST', - ExecutedByFeeAscNullsLast = 'executedBy_fee_ASC_NULLS_LAST', - ExecutedByFeeDesc = 'executedBy_fee_DESC', - ExecutedByFeeDescNullsFirst = 'executedBy_fee_DESC_NULLS_FIRST', - ExecutedByFeeDescNullsLast = 'executedBy_fee_DESC_NULLS_LAST', ExecutedByIdAsc = 'executedBy_id_ASC', ExecutedByIdAscNullsFirst = 'executedBy_id_ASC_NULLS_FIRST', ExecutedByIdAscNullsLast = 'executedBy_id_ASC_NULLS_LAST', ExecutedByIdDesc = 'executedBy_id_DESC', ExecutedByIdDescNullsFirst = 'executedBy_id_DESC_NULLS_FIRST', ExecutedByIdDescNullsLast = 'executedBy_id_DESC_NULLS_LAST', - ExecutedByScheduledAtAsc = 'executedBy_scheduledAt_ASC', - ExecutedByScheduledAtAscNullsFirst = 'executedBy_scheduledAt_ASC_NULLS_FIRST', - ExecutedByScheduledAtAscNullsLast = 'executedBy_scheduledAt_ASC_NULLS_LAST', - ExecutedByScheduledAtDesc = 'executedBy_scheduledAt_DESC', - ExecutedByScheduledAtDescNullsFirst = 'executedBy_scheduledAt_DESC_NULLS_FIRST', - ExecutedByScheduledAtDescNullsLast = 'executedBy_scheduledAt_DESC_NULLS_LAST', - ExecutedByStatusAsc = 'executedBy_status_ASC', - ExecutedByStatusAscNullsFirst = 'executedBy_status_ASC_NULLS_FIRST', - ExecutedByStatusAscNullsLast = 'executedBy_status_ASC_NULLS_LAST', - ExecutedByStatusDesc = 'executedBy_status_DESC', - ExecutedByStatusDescNullsFirst = 'executedBy_status_DESC_NULLS_FIRST', - ExecutedByStatusDescNullsLast = 'executedBy_status_DESC_NULLS_LAST', ExecutedByTimestampAsc = 'executedBy_timestamp_ASC', ExecutedByTimestampAscNullsFirst = 'executedBy_timestamp_ASC_NULLS_FIRST', ExecutedByTimestampAscNullsLast = 'executedBy_timestamp_ASC_NULLS_LAST', @@ -2410,6 +3214,12 @@ export enum TransferOrderByInput { FeeDesc = 'fee_DESC', FeeDescNullsFirst = 'fee_DESC_NULLS_FIRST', FeeDescNullsLast = 'fee_DESC_NULLS_LAST', + FromHashAsc = 'fromHash_ASC', + FromHashAscNullsFirst = 'fromHash_ASC_NULLS_FIRST', + FromHashAscNullsLast = 'fromHash_ASC_NULLS_LAST', + FromHashDesc = 'fromHash_DESC', + FromHashDescNullsFirst = 'fromHash_DESC_NULLS_FIRST', + FromHashDescNullsLast = 'fromHash_DESC_NULLS_LAST', FromFreeAsc = 'from_free_ASC', FromFreeAscNullsFirst = 'from_free_ASC_NULLS_FIRST', FromFreeAscNullsLast = 'from_free_ASC_NULLS_LAST', @@ -2452,6 +3262,12 @@ export enum TransferOrderByInput { TimestampDesc = 'timestamp_DESC', TimestampDescNullsFirst = 'timestamp_DESC_NULLS_FIRST', TimestampDescNullsLast = 'timestamp_DESC_NULLS_LAST', + ToHashAsc = 'toHash_ASC', + ToHashAscNullsFirst = 'toHash_ASC_NULLS_FIRST', + ToHashAscNullsLast = 'toHash_ASC_NULLS_LAST', + ToHashDesc = 'toHash_DESC', + ToHashDescNullsFirst = 'toHash_DESC_NULLS_FIRST', + ToHashDescNullsLast = 'toHash_DESC_NULLS_LAST', ToFreeAsc = 'to_free_ASC', ToFreeAscNullsFirst = 'to_free_ASC_NULLS_FIRST', ToFreeAscNullsLast = 'to_free_ASC_NULLS_LAST', @@ -2500,7 +3316,7 @@ export type TransferWhereInput = { block_isNull?: InputMaybe; event?: InputMaybe; event_isNull?: InputMaybe; - executedBy?: InputMaybe; + executedBy?: InputMaybe; executedBy_isNull?: InputMaybe; extrinsicHash_contains?: InputMaybe; extrinsicHash_containsInsensitive?: InputMaybe; @@ -2531,6 +3347,23 @@ export type TransferWhereInput = { fee_not_eq?: InputMaybe; fee_not_in?: InputMaybe>; from?: InputMaybe; + fromHash_contains?: InputMaybe; + fromHash_containsInsensitive?: InputMaybe; + fromHash_endsWith?: InputMaybe; + fromHash_eq?: InputMaybe; + fromHash_gt?: InputMaybe; + fromHash_gte?: InputMaybe; + fromHash_in?: InputMaybe>; + fromHash_isNull?: InputMaybe; + fromHash_lt?: InputMaybe; + fromHash_lte?: InputMaybe; + fromHash_not_contains?: InputMaybe; + fromHash_not_containsInsensitive?: InputMaybe; + fromHash_not_endsWith?: InputMaybe; + fromHash_not_eq?: InputMaybe; + fromHash_not_in?: InputMaybe>; + fromHash_not_startsWith?: InputMaybe; + fromHash_startsWith?: InputMaybe; from_isNull?: InputMaybe; id_contains?: InputMaybe; id_containsInsensitive?: InputMaybe; @@ -2559,294 +3392,63 @@ export type TransferWhereInput = { timestamp_not_eq?: InputMaybe; timestamp_not_in?: InputMaybe>; to?: InputMaybe; + toHash_contains?: InputMaybe; + toHash_containsInsensitive?: InputMaybe; + toHash_endsWith?: InputMaybe; + toHash_eq?: InputMaybe; + toHash_gt?: InputMaybe; + toHash_gte?: InputMaybe; + toHash_in?: InputMaybe>; + toHash_isNull?: InputMaybe; + toHash_lt?: InputMaybe; + toHash_lte?: InputMaybe; + toHash_not_contains?: InputMaybe; + toHash_not_containsInsensitive?: InputMaybe; + toHash_not_endsWith?: InputMaybe; + toHash_not_eq?: InputMaybe; + toHash_not_in?: InputMaybe>; + toHash_not_startsWith?: InputMaybe; + toHash_startsWith?: InputMaybe; to_isNull?: InputMaybe; }; -export type TransfersConnection = { - __typename?: 'TransfersConnection'; - edges: Array; - pageInfo: PageInfo; - totalCount: Scalars['Int']['output']; -}; - -export type GetAccountsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe | AccountOrderByInput>; -}>; - -export type GetAccountsQuery = { - __typename?: 'Query'; - accounts: Array<{ - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - }>; - meta: { __typename?: 'AccountsConnection'; totalCount: number }; -}; - -export type GetAccountByIdQueryVariables = Exact<{ - id: Scalars['String']['input']; - limit: Scalars['Int']['input']; -}>; - -export type GetAccountByIdQuery = { - __typename?: 'Query'; - account?: { - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - } | null; - transactions: { - __typename?: 'TransfersConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'TransferEdge'; - node: { - __typename?: 'Transfer'; - fee: any; - extrinsicHash?: string | null; - amount: any; - timestamp: any; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }; - }>; - }; - reversibleTransactions: { - __typename?: 'ReversibleTransfersConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'ReversibleTransferEdge'; - node: { - __typename?: 'ReversibleTransfer'; - extrinsicHash?: string | null; - timestamp: any; - status: ReversibleTransferStatus; - amount: any; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }; - }>; - }; - minerRewards: { - __typename?: 'MinerRewardsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'MinerRewardEdge'; - node: { - __typename?: 'MinerReward'; - reward: any; - timestamp: any; - block: { __typename?: 'Block'; height: number; hash: string }; - miner: { __typename?: 'Account'; id: string }; - }; - }>; - }; - guardian: { - __typename?: 'HighSecuritySetsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'HighSecuritySetEdge'; - node: { - __typename?: 'HighSecuritySet'; - interceptor: { - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - }; - }; - }>; - }; - beneficiaries: { - __typename?: 'HighSecuritySetsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'HighSecuritySetEdge'; - node: { - __typename?: 'HighSecuritySet'; - who: { - __typename?: 'Account'; - id: string; - free: any; - frozen: any; - reserved: any; - }; - }; - }>; - }; -}; - -export type GetAccountsStatsQueryVariables = Exact<{ - startDate: Scalars['DateTime']['input']; - endDate: Scalars['DateTime']['input']; -}>; - -export type GetAccountsStatsQuery = { - __typename?: 'Query'; - all: { __typename?: 'AccountsConnection'; totalCount: number }; - recentlyActive: { __typename?: 'AccountsConnection'; totalCount: number }; - recentlyDeposited: { __typename?: 'AccountsConnection'; totalCount: number }; -}; - -export type GetBlocksQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy: Array | BlockOrderByInput; - where?: InputMaybe; -}>; - -export type GetBlocksQuery = { - __typename?: 'Query'; - blocks: Array<{ - __typename?: 'Block'; - id: string; - hash: string; - height: number; - reward: any; - timestamp: any; - }>; - meta: { __typename?: 'BlocksConnection'; totalCount: number }; +export type TransferWithHash = { + __typename?: 'TransferWithHash'; + amount: Scalars['BigInt']['output']; + blockHeight: Scalars['Int']['output']; + blockId: Scalars['String']['output']; + extrinsicHash?: Maybe; + fee: Scalars['BigInt']['output']; + fromHash: Scalars['String']['output']; + fromId: Scalars['String']['output']; + id: Scalars['String']['output']; + timestamp: Scalars['DateTime']['output']; + toHash: Scalars['String']['output']; + toId: Scalars['String']['output']; }; -export type GetRecentBlocksQueryVariables = Exact<{ +export type TransfersByPrefixInput = { + afterBlock?: InputMaybe; + beforeBlock?: InputMaybe; + fromHashPrefixes?: InputMaybe>; limit?: InputMaybe; + maxAmount?: InputMaybe; + minAmount?: InputMaybe; offset?: InputMaybe; - orderBy?: InputMaybe | BlockOrderByInput>; -}>; - -export type GetRecentBlocksQuery = { - __typename?: 'Query'; - blocks: Array<{ - __typename?: 'Block'; - id: string; - hash: string; - height: number; - reward: any; - timestamp: any; - }>; + toHashPrefixes?: InputMaybe>; }; -export type GetBlockByIdQueryVariables = Exact<{ - height: Scalars['Int']['input']; - hash: Scalars['String']['input']; - limit: Scalars['Int']['input']; -}>; - -export type GetBlockByIdQuery = { - __typename?: 'Query'; - blocks: Array<{ - __typename?: 'Block'; - id: string; - hash: string; - height: number; - reward: any; - timestamp: any; - }>; - miners: Array<{ - __typename?: 'MinerReward'; - miner: { __typename?: 'Account'; id: string }; - }>; - transactions: { - __typename?: 'TransfersConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'TransferEdge'; - node: { - __typename?: 'Transfer'; - fee: any; - extrinsicHash?: string | null; - amount: any; - timestamp: any; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }; - }>; - }; - reversibleTransactions: { - __typename?: 'ReversibleTransfersConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'ReversibleTransferEdge'; - node: { - __typename?: 'ReversibleTransfer'; - extrinsicHash?: string | null; - timestamp: any; - status: ReversibleTransferStatus; - amount: any; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }; - }>; - }; - highSecuritySets: { - __typename?: 'HighSecuritySetsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'HighSecuritySetEdge'; - node: { - __typename?: 'HighSecuritySet'; - extrinsicHash?: string | null; - timestamp: any; - delay: any; - block: { __typename?: 'Block'; height: number }; - who: { __typename?: 'Account'; id: string }; - interceptor: { __typename?: 'Account'; id: string }; - }; - }>; - }; - errorEvents: { - __typename?: 'ErrorEventsConnection'; - totalCount: number; - edges: Array<{ - __typename?: 'ErrorEventEdge'; - node: { - __typename?: 'ErrorEvent'; - errorDocs?: string | null; - errorModule?: string | null; - errorName?: string | null; - errorType: string; - extrinsicHash?: string | null; - timestamp: any; - block: { __typename?: 'Block'; height: number }; - }; - }>; - }; +export type TransfersByPrefixResult = { + __typename?: 'TransfersByPrefixResult'; + totalCount: Scalars['Int']['output']; + transfers: Array; }; -export type GetStatusQueryVariables = Exact<{ - beginningDate: Scalars['DateTime']['input']; - todayDate: Scalars['DateTime']['input']; - endDate: Scalars['DateTime']['input']; -}>; - -export type GetStatusQuery = { - __typename?: 'Query'; - transactions: { __typename?: 'TransfersConnection'; totalCount: number }; - reversibleTransactions: { - __typename?: 'ReversibleTransfersConnection'; - totalCount: number; - }; - status?: { - __typename?: 'SquidStatus'; - hash?: string | null; - height?: number | null; - finalizedHeight?: number | null; - finalizedHash?: string | null; - } | null; - minedBlocks24Hours: { __typename?: 'BlocksConnection'; totalCount: number }; - allActiveAccounts: { __typename?: 'AccountsConnection'; totalCount: number }; - allDepositAccounts: { __typename?: 'AccountsConnection'; totalCount: number }; +export type TransfersConnection = { + __typename?: 'TransfersConnection'; + edges: Array; + pageInfo: PageInfo; + totalCount: Scalars['Int']['output']; }; export type GetErrorEventsQueryVariables = Exact<{ @@ -3083,134 +3685,6 @@ export type GetMinerRewardByHashQuery = { }>; }; -export type GetReversibleTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - Array | ReversibleTransferOrderByInput - >; - where?: InputMaybe; -}>; - -export type GetReversibleTransactionsQuery = { - __typename?: 'Query'; - reversibleTransactions: Array<{ - __typename?: 'ReversibleTransfer'; - extrinsicHash?: string | null; - amount: any; - timestamp: any; - status: ReversibleTransferStatus; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }>; - meta: { __typename?: 'ReversibleTransfersConnection'; totalCount: number }; -}; - -export type GetRecentReversibleTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - Array | ReversibleTransferOrderByInput - >; -}>; - -export type GetRecentReversibleTransactionsQuery = { - __typename?: 'Query'; - reversibleTransactions: Array<{ - __typename?: 'ReversibleTransfer'; - extrinsicHash?: string | null; - amount: any; - timestamp: any; - status: ReversibleTransferStatus; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }>; -}; - -export type GetReversibleTransactionsStatsQueryVariables = Exact<{ - startDate: Scalars['DateTime']['input']; - endDate: Scalars['DateTime']['input']; -}>; - -export type GetReversibleTransactionsStatsQuery = { - __typename?: 'Query'; - last24Hour: { - __typename?: 'ReversibleTransfersConnection'; - totalCount: number; - }; - allTime: { __typename?: 'ReversibleTransfersConnection'; totalCount: number }; -}; - -export type GetReversibleTransactionByHashQueryVariables = Exact<{ - hash: Scalars['String']['input']; -}>; - -export type GetReversibleTransactionByHashQuery = { - __typename?: 'Query'; - reversibleTransactions: Array<{ - __typename?: 'ReversibleTransfer'; - fee: any; - amount: any; - extrinsicHash?: string | null; - txId: string; - scheduledAt: any; - timestamp: any; - status: ReversibleTransferStatus; - block: { __typename?: 'Block'; height: number }; - from: { __typename?: 'Account'; id: string }; - to: { __typename?: 'Account'; id: string }; - }>; -}; - -export type GetReversibleTransactionStatusByHashQueryVariables = Exact<{ - hash: Scalars['String']['input']; -}>; - -export type GetReversibleTransactionStatusByHashQuery = { - __typename?: 'Query'; - reversibleTransactions: Array<{ - __typename?: 'ReversibleTransfer'; - status: ReversibleTransferStatus; - }>; -}; - -export type SearchAllQueryVariables = Exact<{ - keyword?: InputMaybe; - keyword_number?: InputMaybe; - limit?: InputMaybe; -}>; - -export type SearchAllQuery = { - __typename?: 'Query'; - transactions: Array<{ - __typename?: 'Transfer'; - extrinsicHash?: string | null; - }>; - reversibleTransactions: Array<{ - __typename?: 'ReversibleTransfer'; - extrinsicHash?: string | null; - }>; - accounts: Array<{ __typename?: 'Account'; id: string }>; - blocks: Array<{ __typename?: 'Block'; height: number }>; - highSecuritySets: Array<{ - __typename?: 'HighSecuritySet'; - extrinsicHash?: string | null; - }>; - minerRewards: Array<{ - __typename?: 'MinerReward'; - reward: any; - timestamp: any; - block: { __typename?: 'Block'; height: number; hash: string }; - miner: { __typename?: 'Account'; id: string }; - }>; - errorEvents: Array<{ - __typename?: 'ErrorEvent'; - extrinsicHash?: string | null; - }>; -}; - export type GetTransactionsQueryVariables = Exact<{ limit?: InputMaybe; offset?: InputMaybe; @@ -3283,13 +3757,13 @@ export type GetTransactionByHashQuery = { }>; }; -export const GetAccountsDocument = { +export const GetErrorEventsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetAccounts' }, + name: { kind: 'Name', value: 'GetErrorEvents' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -3319,10 +3793,21 @@ export const GetAccountsDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'AccountOrderByInput' } + name: { kind: 'Name', value: 'ErrorEventOrderByInput' } } } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ErrorEventWhereInput' } + } } ], selectionSet: { @@ -3330,7 +3815,7 @@ export const GetAccountsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'accounts' }, + name: { kind: 'Name', value: 'errorEvents' }, arguments: [ { kind: 'Argument', @@ -3355,27 +3840,59 @@ export const GetAccountsDocument = { kind: 'Variable', name: { kind: 'Name', value: 'orderBy' } } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + } } ], selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'errorDocs' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorModule' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorType' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsicHash' } + }, { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'free' } }, - { kind: 'Field', name: { kind: 'Name', value: 'frozen' } }, - { kind: 'Field', name: { kind: 'Name', value: 'reserved' } } + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + } ] } }, { kind: 'Field', alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'accountsConnection' }, + name: { kind: 'Name', value: 'errorEventsConnection' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'orderBy' }, value: { kind: 'EnumValue', value: 'id_ASC' } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + } } ], selectionSet: { @@ -3389,3369 +3906,28 @@ export const GetAccountsDocument = { } } ] -} as unknown as DocumentNode; -export const GetAccountByIdDocument = { +} as unknown as DocumentNode; +export const GetRecentErrorEventsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetAccountById' }, + name: { kind: 'Name', value: 'GetRecentErrorEvents' }, variableDefinitions: [ { kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } }, { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'account' }, - name: { kind: 'Name', value: 'accountById' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'free' } }, - { kind: 'Field', name: { kind: 'Name', value: 'frozen' } }, - { kind: 'Field', name: { kind: 'Name', value: 'reserved' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_isNull' }, - value: { kind: 'BooleanValue', value: false } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'AND' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'to' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'fee' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'from' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'to' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'status' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'minerRewards' }, - name: { kind: 'Name', value: 'minerRewardsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'miner' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'hash' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'reward' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'miner' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'guardian' }, - name: { kind: 'Name', value: 'highSecuritySetsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'who' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'interceptor' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'free' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'frozen' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'reserved' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'beneficiaries' }, - name: { kind: 'Name', value: 'highSecuritySetsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'interceptor' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'who' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'free' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'frozen' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'reserved' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetAccountsStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetAccountsStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'all' }, - name: { kind: 'Name', value: 'accountsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'recentlyActive' }, - name: { kind: 'Name', value: 'accountsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'transfersFrom_some' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'recentlyDeposited' }, - name: { kind: 'Name', value: 'accountsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'transfersTo_some' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetAccountsStatsQuery, - GetAccountsStatsQueryVariables ->; -export const GetBlocksDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetBlocks' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'BlockOrderByInput' } - } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'BlockWhereInput' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'blocks' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'height' } }, - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'blocksConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetRecentBlocksDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentBlocks' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'BlockOrderByInput' } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'blocks' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'height' } }, - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetRecentBlocksQuery, - GetRecentBlocksQueryVariables ->; -export const GetBlockByIdDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetBlockById' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - } - }, - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'blocks' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'height' } }, - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'miners' }, - name: { kind: 'Name', value: 'minerRewards' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'miner' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_isNull' }, - value: { kind: 'BooleanValue', value: false } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'AND' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { - kind: 'Name', - value: 'hash_eq' - }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'fee' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'status' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'highSecuritySets' }, - name: { kind: 'Name', value: 'highSecuritySetsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'delay' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'who' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'interceptor' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'errorEvents' }, - name: { kind: 'Name', value: 'errorEventsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'timestamp_DESC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'first' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - } - } - ] - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'edges' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'node' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'errorDocs' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'errorModule' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'errorName' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'errorType' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetStatusDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetStatus' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'beginningDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'todayDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_isNull' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfersConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'status' }, - name: { kind: 'Name', value: 'squidStatus' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'height' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'finalizedHeight' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'finalizedHash' } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'minedBlocks24Hours' }, - name: { kind: 'Name', value: 'blocksConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'todayDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allActiveAccounts' }, - name: { kind: 'Name', value: 'accountsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'transfersFrom_some' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'beginningDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allDepositAccounts' }, - name: { kind: 'Name', value: 'accountsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'transfersTo_some' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'beginningDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetErrorEventsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetErrorEvents' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ErrorEventOrderByInput' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ErrorEventWhereInput' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'errorEvents' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'errorDocs' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorModule' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorName' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorType' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'errorEventsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetRecentErrorEventsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentErrorEvents' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ErrorEventOrderByInput' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ErrorEventWhereInput' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'errorEvents' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'errorDocs' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorModule' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorName' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorType' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetRecentErrorEventsQuery, - GetRecentErrorEventsQueryVariables ->; -export const GetErrorEventsStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetErrorEventsStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'errorEventsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'errorEventsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetErrorEventsStatsQuery, - GetErrorEventsStatsQueryVariables ->; -export const GetErrorEventByHashDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetErrorEventByHash' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'errorEvents' }, - name: { kind: 'Name', value: 'errorEvents' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'errorDocs' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorModule' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorName' } }, - { kind: 'Field', name: { kind: 'Name', value: 'errorType' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetErrorEventByHashQuery, - GetErrorEventByHashQueryVariables ->; -export const GetHighSecuritySetsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetHighSecuritySets' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'HighSecuritySetOrderByInput' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'HighSecuritySetWhereInput' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'highSecuritySets' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'who' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'interceptor' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'delay' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'highSecuritySetsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetHighSecuritySetsQuery, - GetHighSecuritySetsQueryVariables ->; -export const GetRecentHighSecuritySetsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentHighSecuritySets' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'HighSecuritySetOrderByInput' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'HighSecuritySetWhereInput' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'highSecuritySets' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'who' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'interceptor' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'delay' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetRecentHighSecuritySetsQuery, - GetRecentHighSecuritySetsQueryVariables ->; -export const GetHighSecuritySetsStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetHighSecuritySetsStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'DateTime' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'highSecuritySetsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'highSecuritySetsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetHighSecuritySetsStatsQuery, - GetHighSecuritySetsStatsQueryVariables ->; -export const GetHighSecuritySetByHashDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetHighSecuritySetByHash' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'highSecuritySets' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'who' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'interceptor' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'delay' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetHighSecuritySetByHashQuery, - GetHighSecuritySetByHashQueryVariables ->; -export const GetMinerLeaderboardDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetMinerLeaderboard' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'leaderboardEntries' }, - name: { kind: 'Name', value: 'minerStats' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'totalMinedBlocks_DESC' } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'totalMinedBlocks' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'totalRewards' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'minerStatsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMinerLeaderboardQuery, - GetMinerLeaderboardQueryVariables ->; -export const GetMinerRewardsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetMinerRewards' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'MinerRewardOrderByInput' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'MinerRewardWhereInput' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'minerRewards' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'miner' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'minerRewardsConnection' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'orderBy' }, - value: { kind: 'EnumValue', value: 'id_ASC' } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMinerRewardsQuery, - GetMinerRewardsQueryVariables ->; -export const GetRecentMinerRewardsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentMinerRewards' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } + name: { kind: 'Name', value: 'offset' } }, type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } }, @@ -6767,7 +3943,7 @@ export const GetRecentMinerRewardsDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'MinerRewardOrderByInput' } + name: { kind: 'Name', value: 'ErrorEventOrderByInput' } } } } @@ -6780,7 +3956,7 @@ export const GetRecentMinerRewardsDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'MinerRewardWhereInput' } + name: { kind: 'Name', value: 'ErrorEventWhereInput' } } } ], @@ -6789,7 +3965,7 @@ export const GetRecentMinerRewardsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'minerRewards' }, + name: { kind: 'Name', value: 'errorEvents' }, arguments: [ { kind: 'Argument', @@ -6827,32 +4003,26 @@ export const GetRecentMinerRewardsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'errorDocs' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorModule' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorType' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } } - ] - } + name: { kind: 'Name', value: 'extrinsicHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'miner' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } + } ] } } @@ -6861,16 +4031,16 @@ export const GetRecentMinerRewardsDocument = { } ] } as unknown as DocumentNode< - GetRecentMinerRewardsQuery, - GetRecentMinerRewardsQueryVariables + GetRecentErrorEventsQuery, + GetRecentErrorEventsQueryVariables >; -export const GetMinerRewardsStatsDocument = { +export const GetErrorEventsStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMinerRewardsStats' }, + name: { kind: 'Name', value: 'GetErrorEventsStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -6907,7 +4077,7 @@ export const GetMinerRewardsStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'minerRewardsConnection' }, + name: { kind: 'Name', value: 'errorEventsConnection' }, arguments: [ { kind: 'Argument', @@ -6950,7 +4120,7 @@ export const GetMinerRewardsStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'minerRewardsConnection' }, + name: { kind: 'Name', value: 'errorEventsConnection' }, arguments: [ { kind: 'Argument', @@ -6970,16 +4140,16 @@ export const GetMinerRewardsStatsDocument = { } ] } as unknown as DocumentNode< - GetMinerRewardsStatsQuery, - GetMinerRewardsStatsQueryVariables + GetErrorEventsStatsQuery, + GetErrorEventsStatsQueryVariables >; -export const GetMinerRewardByHashDocument = { +export const GetErrorEventByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMinerRewardByHash' }, + name: { kind: 'Name', value: 'GetErrorEventByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -6995,7 +4165,8 @@ export const GetMinerRewardByHashDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'minerRewards' }, + alias: { kind: 'Name', value: 'errorEvents' }, + name: { kind: 'Name', value: 'errorEvents' }, arguments: [ { kind: 'Argument', @@ -7005,19 +4176,10 @@ export const GetMinerRewardByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'extrinsicHash_eq' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } } } ] @@ -7027,32 +4189,26 @@ export const GetMinerRewardByHashDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'errorDocs' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorModule' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'errorType' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } } - ] - } + name: { kind: 'Name', value: 'extrinsicHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'miner' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } + } ] } } @@ -7061,16 +4217,16 @@ export const GetMinerRewardByHashDocument = { } ] } as unknown as DocumentNode< - GetMinerRewardByHashQuery, - GetMinerRewardByHashQueryVariables + GetErrorEventByHashQuery, + GetErrorEventByHashQueryVariables >; -export const GetReversibleTransactionsDocument = { +export const GetHighSecuritySetsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetReversibleTransactions' }, + name: { kind: 'Name', value: 'GetHighSecuritySets' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -7100,7 +4256,7 @@ export const GetReversibleTransactionsDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'ReversibleTransferOrderByInput' } + name: { kind: 'Name', value: 'HighSecuritySetOrderByInput' } } } } @@ -7113,7 +4269,7 @@ export const GetReversibleTransactionsDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'ReversibleTransferWhereInput' } + name: { kind: 'Name', value: 'HighSecuritySetWhereInput' } } } ], @@ -7122,8 +4278,7 @@ export const GetReversibleTransactionsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfers' }, + name: { kind: 'Name', value: 'highSecuritySets' }, arguments: [ { kind: 'Argument', @@ -7161,26 +4316,24 @@ export const GetReversibleTransactionsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'extrinsicHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'who' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'from' }, + name: { kind: 'Name', value: 'interceptor' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -7188,13 +4341,15 @@ export const GetReversibleTransactionsDocument = { ] } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'delay' } }, { kind: 'Field', - name: { kind: 'Name', value: 'to' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } } @@ -7204,7 +4359,7 @@ export const GetReversibleTransactionsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'reversibleTransfersConnection' }, + name: { kind: 'Name', value: 'highSecuritySetsConnection' }, arguments: [ { kind: 'Argument', @@ -7232,16 +4387,16 @@ export const GetReversibleTransactionsDocument = { } ] } as unknown as DocumentNode< - GetReversibleTransactionsQuery, - GetReversibleTransactionsQueryVariables + GetHighSecuritySetsQuery, + GetHighSecuritySetsQueryVariables >; -export const GetRecentReversibleTransactionsDocument = { +export const GetRecentHighSecuritySetsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentReversibleTransactions' }, + name: { kind: 'Name', value: 'GetRecentHighSecuritySets' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -7271,10 +4426,21 @@ export const GetRecentReversibleTransactionsDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'ReversibleTransferOrderByInput' } + name: { kind: 'Name', value: 'HighSecuritySetOrderByInput' } } } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'HighSecuritySetWhereInput' } + } } ], selectionSet: { @@ -7282,8 +4448,7 @@ export const GetRecentReversibleTransactionsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfers' }, + name: { kind: 'Name', value: 'highSecuritySets' }, arguments: [ { kind: 'Argument', @@ -7308,31 +4473,37 @@ export const GetRecentReversibleTransactionsDocument = { kind: 'Variable', name: { kind: 'Name', value: 'orderBy' } } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + } } ], selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'extrinsicHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'who' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'from' }, + name: { kind: 'Name', value: 'interceptor' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -7340,13 +4511,15 @@ export const GetRecentReversibleTransactionsDocument = { ] } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'delay' } }, { kind: 'Field', - name: { kind: 'Name', value: 'to' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } } @@ -7358,16 +4531,16 @@ export const GetRecentReversibleTransactionsDocument = { } ] } as unknown as DocumentNode< - GetRecentReversibleTransactionsQuery, - GetRecentReversibleTransactionsQueryVariables + GetRecentHighSecuritySetsQuery, + GetRecentHighSecuritySetsQueryVariables >; -export const GetReversibleTransactionsStatsDocument = { +export const GetHighSecuritySetsStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetReversibleTransactionsStats' }, + name: { kind: 'Name', value: 'GetHighSecuritySetsStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -7404,7 +4577,7 @@ export const GetReversibleTransactionsStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'reversibleTransfersConnection' }, + name: { kind: 'Name', value: 'highSecuritySetsConnection' }, arguments: [ { kind: 'Argument', @@ -7447,7 +4620,7 @@ export const GetReversibleTransactionsStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'reversibleTransfersConnection' }, + name: { kind: 'Name', value: 'highSecuritySetsConnection' }, arguments: [ { kind: 'Argument', @@ -7467,16 +4640,16 @@ export const GetReversibleTransactionsStatsDocument = { } ] } as unknown as DocumentNode< - GetReversibleTransactionsStatsQuery, - GetReversibleTransactionsStatsQueryVariables + GetHighSecuritySetsStatsQuery, + GetHighSecuritySetsStatsQueryVariables >; -export const GetReversibleTransactionByHashDocument = { +export const GetHighSecuritySetByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetReversibleTransactionByHash' }, + name: { kind: 'Name', value: 'GetHighSecuritySetByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -7492,8 +4665,7 @@ export const GetReversibleTransactionByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfers' }, + name: { kind: 'Name', value: 'highSecuritySets' }, arguments: [ { kind: 'Argument', @@ -7516,29 +4688,24 @@ export const GetReversibleTransactionByHashDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'extrinsicHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'txId' } }, - { kind: 'Field', name: { kind: 'Name', value: 'scheduledAt' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'who' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'from' }, + name: { kind: 'Name', value: 'interceptor' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -7546,13 +4713,15 @@ export const GetReversibleTransactionByHashDocument = { ] } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'delay' } }, { kind: 'Field', - name: { kind: 'Name', value: 'to' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } } @@ -7564,24 +4733,32 @@ export const GetReversibleTransactionByHashDocument = { } ] } as unknown as DocumentNode< - GetReversibleTransactionByHashQuery, - GetReversibleTransactionByHashQueryVariables + GetHighSecuritySetByHashQuery, + GetHighSecuritySetByHashQueryVariables >; -export const GetReversibleTransactionStatusByHashDocument = { +export const GetMinerLeaderboardDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetReversibleTransactionStatusByHash' }, + name: { kind: 'Name', value: 'GetMinerLeaderboard' }, variableDefinitions: [ { kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'offset' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } } ], selectionSet: { @@ -7589,31 +4766,58 @@ export const GetReversibleTransactionStatusByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfers' }, + alias: { kind: 'Name', value: 'leaderboardEntries' }, + name: { kind: 'Name', value: 'minerStats' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'where' }, + name: { kind: 'Name', value: 'limit' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'offset' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'offset' } } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { kind: 'EnumValue', value: 'totalMinedBlocks_DESC' } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'totalMinedBlocks' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'totalRewards' } } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'minerStatsConnection' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { kind: 'EnumValue', value: 'id_ASC' } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'status' } } + { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } ] } } @@ -7622,30 +4826,30 @@ export const GetReversibleTransactionStatusByHashDocument = { } ] } as unknown as DocumentNode< - GetReversibleTransactionStatusByHashQuery, - GetReversibleTransactionStatusByHashQueryVariables + GetMinerLeaderboardQuery, + GetMinerLeaderboardQueryVariables >; -export const SearchAllDocument = { +export const GetMinerRewardsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'SearchAll' }, + name: { kind: 'Name', value: 'GetMinerRewards' }, variableDefinitions: [ { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } + name: { kind: 'Name', value: 'limit' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } }, { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'keyword_number' } + name: { kind: 'Name', value: 'offset' } }, type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } }, @@ -7653,9 +4857,29 @@ export const SearchAllDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'limit' } + name: { kind: 'Name', value: 'orderBy' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + type: { + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'MinerRewardOrderByInput' } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'MinerRewardWhereInput' } + } } ], selectionSet: { @@ -7663,8 +4887,7 @@ export const SearchAllDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfers' }, + name: { kind: 'Name', value: 'minerRewards' }, arguments: [ { kind: 'Argument', @@ -7674,21 +4897,28 @@ export const SearchAllDocument = { name: { kind: 'Name', value: 'limit' } } }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'offset' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'offset' } + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' } + } + }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_startsWith' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'where' } } } ], @@ -7697,55 +4927,126 @@ export const SearchAllDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - } + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'height' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'hash' } } + ] + } + }, + { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'miner' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'reversibleTransactions' }, - name: { kind: 'Name', value: 'reversibleTransfers' }, + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'minerRewardsConnection' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } + name: { kind: 'Name', value: 'orderBy' }, + value: { kind: 'EnumValue', value: 'id_ASC' } }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_startsWith' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'where' } } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - } + { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } ] } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMinerRewardsQuery, + GetMinerRewardsQueryVariables +>; +export const GetRecentMinerRewardsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetRecentMinerRewards' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'offset' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' } + }, + type: { + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'MinerRewardOrderByInput' } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'MinerRewardWhereInput' } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'accounts' }, + name: { kind: 'Name', value: 'minerRewards' }, arguments: [ { kind: 'Argument', @@ -7755,42 +5056,120 @@ export const SearchAllDocument = { name: { kind: 'Name', value: 'limit' } } }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'offset' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'offset' } + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'orderBy' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' } + } + }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id_startsWith' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'where' } } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'height' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'hash' } } + ] + } + }, + { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'miner' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } ] } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetRecentMinerRewardsQuery, + GetRecentMinerRewardsQueryVariables +>; +export const GetMinerRewardsStatsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMinerRewardsStats' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'DateTime' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'DateTime' } + } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'blocks' }, + alias: { kind: 'Name', value: 'last24Hour' }, + name: { kind: 'Name', value: 'minerRewardsConnection' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } + name: { kind: 'Name', value: 'orderBy' }, + value: { kind: 'EnumValue', value: 'id_ASC' } }, { kind: 'Argument', @@ -7800,27 +5179,18 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_startsWith' }, + name: { kind: 'Name', value: 'timestamp_gte' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } + name: { kind: 'Name', value: 'startDate' } } }, { kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, + name: { kind: 'Name', value: 'timestamp_lte' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword_number' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } } } ] @@ -7830,62 +5200,60 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'highSecuritySets' }, + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'minerRewardsConnection' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsicHash_startsWith' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } + name: { kind: 'Name', value: 'orderBy' }, + value: { kind: 'EnumValue', value: 'id_ASC' } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - } + { kind: 'Field', name: { kind: 'Name', value: 'totalCount' } } ] } - }, + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMinerRewardsStatsQuery, + GetMinerRewardsStatsQueryVariables +>; +export const GetMinerRewardByHashDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMinerRewardByHash' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', name: { kind: 'Name', value: 'minerRewards' }, arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -7900,10 +5268,10 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'hash_startsWith' }, + name: { kind: 'Name', value: 'hash_eq' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } + name: { kind: 'Name', value: 'hash' } } } ] @@ -7944,75 +5312,15 @@ export const SearchAllDocument = { { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } ] } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'errorEvents' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { - kind: 'Name', - value: 'errorType_containsInsensitive' - }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'OR' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { - kind: 'Name', - value: 'errorName_containsInsensitive' - }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsicHash' } - } - ] - } } ] } } ] -} as unknown as DocumentNode; +} as unknown as DocumentNode< + GetMinerRewardByHashQuery, + GetMinerRewardByHashQueryVariables +>; export const GetTransactionsDocument = { kind: 'Document', definitions: [ diff --git a/src/api/cancelled-reversible-transactions.tsx b/src/api/cancelled-reversible-transactions.tsx new file mode 100644 index 0000000..390f750 --- /dev/null +++ b/src/api/cancelled-reversible-transactions.tsx @@ -0,0 +1,148 @@ +import type { QueryHookOptions } from '@apollo/client'; +import { gql, useQuery } from '@apollo/client'; + +import type { CancelledReversibleTransferWhereInput } from '@/__generated__/graphql'; +import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; +import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; +import type { CancelledReversibleTransactionSorts } from '@/constants/query-sorts'; +import { CANCELLED_REVERSIBLE_TRANSACTION_SORTS } from '@/constants/query-sorts'; +import type { + CancelledReversibleTransactionListResponse, + RecentCancelledReversibleTransactionsResponse +} from '@/schemas'; +import type { PaginatedQueryVariables } from '@/types/query'; + +export const cancelledReversibleTransactions = { + useGetAll: ( + config?: QueryHookOptions< + CancelledReversibleTransactionListResponse, + PaginatedQueryVariables< + CancelledReversibleTransactionSorts, + CancelledReversibleTransferWhereInput + > + > + ) => { + const GET_CANCELLED_REVERSIBLE_TRANSACTIONS = gql` + query GetCancelledReversibleTransactions( + $limit: Int + $offset: Int + $orderBy: [CancelledReversibleTransferOrderByInput!] + $where: CancelledReversibleTransferWhereInput + ) { + cancelledReversibleTransactions: cancelledReversibleTransfers( + limit: $limit + offset: $offset + orderBy: $orderBy + where: $where + ) { + timestamp + txId + block { + height + } + cancelledBy { + id + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + meta: cancelledReversibleTransfersConnection( + orderBy: id_ASC + where: $where + ) { + totalCount + } + } + `; + + return useQuery< + CancelledReversibleTransactionListResponse, + PaginatedQueryVariables< + CancelledReversibleTransactionSorts, + CancelledReversibleTransferWhereInput + > + >(GET_CANCELLED_REVERSIBLE_TRANSACTIONS, { + ...config, + variables: { + orderBy: + config?.variables?.orderBy ?? + CANCELLED_REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, + limit: config?.variables?.limit ?? QUERY_DEFAULT_LIMIT, + offset: config?.variables?.offset ?? 0, + where: config?.variables?.where + } + }); + }, + useGetRecent: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const GET_RECENT_CANCELLED_REVERSIBLE_TRANSACTIONS = gql` + query GetRecentCancelledReversibleTransactions( + $limit: Int + $offset: Int + $orderBy: [CancelledReversibleTransferOrderByInput!] + ) { + cancelledReversibleTransactions: cancelledReversibleTransfers( + limit: $limit + offset: $offset + orderBy: $orderBy + ) { + timestamp + txId + block { + height + } + cancelledBy { + id + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } + `; + + return useQuery< + RecentCancelledReversibleTransactionsResponse, + PaginatedQueryVariables + >(GET_RECENT_CANCELLED_REVERSIBLE_TRANSACTIONS, { + ...config, + variables: { + orderBy: CANCELLED_REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, + limit: QUERY_RECENT_LIMIT + } + }); + } +}; diff --git a/src/api/executed-reversible-transactions.tsx b/src/api/executed-reversible-transactions.tsx new file mode 100644 index 0000000..bb021b3 --- /dev/null +++ b/src/api/executed-reversible-transactions.tsx @@ -0,0 +1,142 @@ +import type { QueryHookOptions } from '@apollo/client'; +import { gql, useQuery } from '@apollo/client'; + +import type { ExecutedReversibleTransferWhereInput } from '@/__generated__/graphql'; +import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; +import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; +import type { ExecutedReversibleTransactionSorts } from '@/constants/query-sorts'; +import { EXECUTED_REVERSIBLE_TRANSACTION_SORTS } from '@/constants/query-sorts'; +import type { + ExecutedReversibleTransactionListResponse, + RecentExecutedReversibleTransactionsResponse +} from '@/schemas'; +import type { PaginatedQueryVariables } from '@/types/query'; + +export const executedReversibleTransactions = { + useGetAll: ( + config?: QueryHookOptions< + ExecutedReversibleTransactionListResponse, + PaginatedQueryVariables< + ExecutedReversibleTransactionSorts, + ExecutedReversibleTransferWhereInput + > + > + ) => { + const GET_EXECUTED_REVERSIBLE_TRANSACTIONS = gql` + query GetExecutedReversibleTransactions( + $limit: Int + $offset: Int + $orderBy: [ExecutedReversibleTransferOrderByInput!] + $where: ExecutedReversibleTransferWhereInput + ) { + executedReversibleTransactions: executedReversibleTransfers( + limit: $limit + offset: $offset + orderBy: $orderBy + where: $where + ) { + timestamp + txId + block { + height + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + meta: executedReversibleTransfersConnection( + orderBy: id_ASC + where: $where + ) { + totalCount + } + } + `; + + return useQuery< + ExecutedReversibleTransactionListResponse, + PaginatedQueryVariables< + ExecutedReversibleTransactionSorts, + ExecutedReversibleTransferWhereInput + > + >(GET_EXECUTED_REVERSIBLE_TRANSACTIONS, { + ...config, + variables: { + orderBy: + config?.variables?.orderBy ?? + EXECUTED_REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, + limit: config?.variables?.limit ?? QUERY_DEFAULT_LIMIT, + offset: config?.variables?.offset ?? 0, + where: config?.variables?.where + } + }); + }, + useGetRecent: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const GET_RECENT_EXECUTED_REVERSIBLE_TRANSACTIONS = gql` + query GetRecentExecutedReversibleTransactions( + $limit: Int + $offset: Int + $orderBy: [ExecutedReversibleTransferOrderByInput!] + ) { + executedReversibleTransactions: executedReversibleTransfers( + limit: $limit + offset: $offset + orderBy: $orderBy + ) { + timestamp + txId + block { + height + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } + `; + + return useQuery< + RecentExecutedReversibleTransactionsResponse, + PaginatedQueryVariables + >(GET_RECENT_EXECUTED_REVERSIBLE_TRANSACTIONS, { + ...config, + variables: { + orderBy: EXECUTED_REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, + limit: QUERY_RECENT_LIMIT + } + }); + } +}; diff --git a/src/api/index.tsx b/src/api/index.tsx index 1a12375..3d45ee3 100644 --- a/src/api/index.tsx +++ b/src/api/index.tsx @@ -2,12 +2,15 @@ import { useFetchClient } from '@/hooks/useFetchClient'; import { accounts } from './accounts'; import { blocks } from './blocks'; +import { cancelledReversibleTransactions } from './cancelled-reversible-transactions'; import { chainStatus } from './chain-status'; import { errors } from './errors'; +import { executedReversibleTransactions } from './executed-reversible-transactions'; import { highSecuritySets } from './high-security-sets'; import { minerLeaderboard } from './miner-leaderboard'; import { minerRewards } from './miner-rewards'; import { reversibleTransactions } from './reversible-transactions'; +import { scheduledReversibleTransactions } from './scheduled-reversible-transactions'; import { search } from './search'; import { transactions } from './transactions'; // import { wormhole } from './wormhole'; @@ -21,6 +24,9 @@ const useApiClient = () => { errors, transactions, reversibleTransactions, + scheduledReversibleTransactions, + executedReversibleTransactions, + cancelledReversibleTransactions, search: search(fetcher), blocks, minerRewards, diff --git a/src/api/scheduled-reversible-transactions.tsx b/src/api/scheduled-reversible-transactions.tsx new file mode 100644 index 0000000..4e5a7e2 --- /dev/null +++ b/src/api/scheduled-reversible-transactions.tsx @@ -0,0 +1,128 @@ +import type { QueryHookOptions } from '@apollo/client'; +import { gql, useQuery } from '@apollo/client'; + +import type { ScheduledReversibleTransferWhereInput } from '@/__generated__/graphql'; +import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; +import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; +import type { ScheduledReversibleTransactionSorts } from '@/constants/query-sorts'; +import { SCHEDULED_REVERSIBLE_TRANSACTION_SORTS } from '@/constants/query-sorts'; +import type { + RecentScheduledReversibleTransactionsResponse, + ScheduledReversibleTransactionListResponse +} from '@/schemas'; +import type { PaginatedQueryVariables } from '@/types/query'; + +export const scheduledReversibleTransactions = { + useGetAll: ( + config?: QueryHookOptions< + ScheduledReversibleTransactionListResponse, + PaginatedQueryVariables< + ScheduledReversibleTransactionSorts, + ScheduledReversibleTransferWhereInput + > + > + ) => { + const GET_SCHEDULED_REVERSIBLE_TRANSACTIONS = gql` + query GetScheduledReversibleTransactions( + $limit: Int + $offset: Int + $orderBy: [ScheduledReversibleTransferOrderByInput!] + $where: ScheduledReversibleTransferWhereInput + ) { + scheduledReversibleTransactions: scheduledReversibleTransfers( + limit: $limit + offset: $offset + orderBy: $orderBy + where: $where + ) { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + meta: scheduledReversibleTransfersConnection( + orderBy: id_ASC + where: $where + ) { + totalCount + } + } + `; + + return useQuery< + ScheduledReversibleTransactionListResponse, + PaginatedQueryVariables< + ScheduledReversibleTransactionSorts, + ScheduledReversibleTransferWhereInput + > + >(GET_SCHEDULED_REVERSIBLE_TRANSACTIONS, { + ...config, + variables: { + orderBy: + config?.variables?.orderBy ?? + SCHEDULED_REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, + limit: config?.variables?.limit ?? QUERY_DEFAULT_LIMIT, + offset: config?.variables?.offset ?? 0, + where: config?.variables?.where + } + }); + }, + useGetRecent: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const GET_RECENT_SCHEDULED_REVERSIBLE_TRANSACTIONS = gql` + query GetRecentScheduledReversibleTransactions( + $limit: Int + $offset: Int + $orderBy: [ScheduledReversibleTransferOrderByInput!] + ) { + scheduledReversibleTransactions: scheduledReversibleTransfers( + limit: $limit + offset: $offset + orderBy: $orderBy + ) { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + `; + + return useQuery< + RecentScheduledReversibleTransactionsResponse, + PaginatedQueryVariables + >(GET_RECENT_SCHEDULED_REVERSIBLE_TRANSACTIONS, { + ...config, + variables: { + orderBy: SCHEDULED_REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, + limit: QUERY_RECENT_LIMIT + } + }); + } +}; diff --git a/src/constants/query-sorts/reversible-transactions.ts b/src/constants/query-sorts/reversible-transactions.ts index 6bfdb6d..fb83178 100644 --- a/src/constants/query-sorts/reversible-transactions.ts +++ b/src/constants/query-sorts/reversible-transactions.ts @@ -45,3 +45,56 @@ export const REVERSIBLE_TRANSACTION_SORTS_KEY = Object.keys( export type ReversibleTransactionSorts = | (typeof REVERSIBLE_TRANSACTION_SORTS_LITERALS)[number] | null; + +export const SCHEDULED_REVERSIBLE_TRANSACTION_SORTS = { + timestamp: { + ASC: 'timestamp_ASC', + DESC: 'timestamp_DESC' + }, + scheduledAt: { + ASC: 'scheduledAt_ASC', + DESC: 'scheduledAt_DESC' + }, + amount: { + ASC: 'amount_ASC', + DESC: 'amount_DESC' + } +} as const; + +export const SCHEDULED_REVERSIBLE_TRANSACTION_SORTS_LITERALS = Object.values( + SCHEDULED_REVERSIBLE_TRANSACTION_SORTS +).flatMap((sort) => Object.values(sort)); + +export type ScheduledReversibleTransactionSorts = + | (typeof SCHEDULED_REVERSIBLE_TRANSACTION_SORTS_LITERALS)[number] + | null; + +export const EXECUTED_REVERSIBLE_TRANSACTION_SORTS = { + timestamp: { + ASC: 'timestamp_ASC', + DESC: 'timestamp_DESC' + } +} as const; + +export const EXECUTED_REVERSIBLE_TRANSACTION_SORTS_LITERALS = Object.values( + EXECUTED_REVERSIBLE_TRANSACTION_SORTS +).flatMap((sort) => Object.values(sort)); + +export type ExecutedReversibleTransactionSorts = + | (typeof EXECUTED_REVERSIBLE_TRANSACTION_SORTS_LITERALS)[number] + | null; + +export const CANCELLED_REVERSIBLE_TRANSACTION_SORTS = { + timestamp: { + ASC: 'timestamp_ASC', + DESC: 'timestamp_DESC' + } +} as const; + +export const CANCELLED_REVERSIBLE_TRANSACTION_SORTS_LITERALS = Object.values( + CANCELLED_REVERSIBLE_TRANSACTION_SORTS +).flatMap((sort) => Object.values(sort)); + +export type CancelledReversibleTransactionSorts = + | (typeof CANCELLED_REVERSIBLE_TRANSACTION_SORTS_LITERALS)[number] + | null; diff --git a/src/schemas/reversible-transaction.ts b/src/schemas/reversible-transaction.ts index 43f34c2..c613ca4 100644 --- a/src/schemas/reversible-transaction.ts +++ b/src/schemas/reversible-transaction.ts @@ -1,39 +1,66 @@ import type * as gql from '../__generated__/graphql'; -export interface ReversibleTransaction +// Scheduled Reversible Transactions +export interface ScheduledReversibleTransaction extends Omit< - gql.ReversibleTransfer, - 'id' | 'to' | 'from' | 'block' | 'event' + gql.ScheduledReversibleTransfer, + 'id' | 'block' | 'event' | 'from' | 'to' > { - to: Pick; - from: Pick; block: Pick; + from: Pick; + to: Pick; } -export interface ReversibleTransactionResponse { - reversibleTransactions: [ReversibleTransaction]; +export interface ScheduledReversibleTransactionListResponse { + scheduledReversibleTransactions: ScheduledReversibleTransaction[]; + meta: { + totalCount: number; + }; +} + +export interface RecentScheduledReversibleTransactionsResponse { + scheduledReversibleTransactions: ScheduledReversibleTransaction[]; } -export interface ReversibleTransactionStatusResponse { - reversibleTransactions: [Pick]; +// Executed Reversible Transactions +export interface ExecutedReversibleTransaction + extends Omit< + gql.ExecutedReversibleTransfer, + 'id' | 'block' | 'event' | 'executedTransfer' | 'scheduledTransfer' + > { + block: Pick; + scheduledTransfer: ScheduledReversibleTransaction; } -export interface ReversibleTransactionListResponse { - reversibleTransactions: ReversibleTransaction[]; +export interface ExecutedReversibleTransactionListResponse { + executedReversibleTransactions: ExecutedReversibleTransaction[]; meta: { totalCount: number; }; } -export interface RecentReversibleTransactionsResponse { - reversibleTransactions: ReversibleTransaction[]; +export interface RecentExecutedReversibleTransactionsResponse { + executedReversibleTransactions: ExecutedReversibleTransaction[]; } -export interface ReversibleTransactionsStatsResponse { - allTime: { - totalCount: number; - }; - last24Hour: { +// Cancelled Reversible Transactions +export interface CancelledReversibleTransaction + extends Omit< + gql.CancelledReversibleTransfer, + 'id' | 'block' | 'event' | 'cancelledBy' | 'scheduledTransfer' + > { + block: Pick; + cancelledBy: Pick; + scheduledTransfer: ScheduledReversibleTransaction; +} + +export interface CancelledReversibleTransactionListResponse { + cancelledReversibleTransactions: CancelledReversibleTransaction[]; + meta: { totalCount: number; }; } + +export interface RecentCancelledReversibleTransactionsResponse { + cancelledReversibleTransactions: CancelledReversibleTransaction[]; +} From 936927b9a4490146a809d8bd14be9a52ee1de83e Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 13:52:07 +0800 Subject: [PATCH 03/12] wip: remove reverisble transaction, split into three types --- src/api/index.tsx | 2 - src/api/reversible-transactions.tsx | 226 ------------------ .../cancelled-reversible-transaction.ts | 23 ++ .../executed-reversible-transaction.ts | 22 ++ src/schemas/index.ts | 3 + src/schemas/reversible-transaction.ts | 66 ----- .../scheduled-reversible-transaction.ts | 22 ++ 7 files changed, 70 insertions(+), 294 deletions(-) delete mode 100644 src/api/reversible-transactions.tsx create mode 100644 src/schemas/cancelled-reversible-transaction.ts create mode 100644 src/schemas/executed-reversible-transaction.ts delete mode 100644 src/schemas/reversible-transaction.ts create mode 100644 src/schemas/scheduled-reversible-transaction.ts diff --git a/src/api/index.tsx b/src/api/index.tsx index 3d45ee3..5262639 100644 --- a/src/api/index.tsx +++ b/src/api/index.tsx @@ -9,7 +9,6 @@ import { executedReversibleTransactions } from './executed-reversible-transactio import { highSecuritySets } from './high-security-sets'; import { minerLeaderboard } from './miner-leaderboard'; import { minerRewards } from './miner-rewards'; -import { reversibleTransactions } from './reversible-transactions'; import { scheduledReversibleTransactions } from './scheduled-reversible-transactions'; import { search } from './search'; import { transactions } from './transactions'; @@ -23,7 +22,6 @@ const useApiClient = () => { chainStatus, errors, transactions, - reversibleTransactions, scheduledReversibleTransactions, executedReversibleTransactions, cancelledReversibleTransactions, diff --git a/src/api/reversible-transactions.tsx b/src/api/reversible-transactions.tsx deleted file mode 100644 index 2e37055..0000000 --- a/src/api/reversible-transactions.tsx +++ /dev/null @@ -1,226 +0,0 @@ -import type { QueryHookOptions } from '@apollo/client'; -import { gql, useQuery } from '@apollo/client'; -import { endOfToday } from 'date-fns/endOfToday'; -import { startOfToday } from 'date-fns/startOfToday'; - -import type { ReversibleTransferWhereInput } from '@/__generated__/graphql'; -import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; -import type { ReversibleTransactionSorts } from '@/constants/query-sorts'; -import { REVERSIBLE_TRANSACTION_SORTS } from '@/constants/query-sorts'; -import type { - RecentReversibleTransactionsResponse, - ReversibleTransactionListResponse, - ReversibleTransactionResponse, - ReversibleTransactionsStatsResponse, - ReversibleTransactionStatusResponse -} from '@/schemas'; -import type { PaginatedQueryVariables } from '@/types/query'; - -export const reversibleTransactions = { - useGetAll: ( - config?: QueryHookOptions< - ReversibleTransactionListResponse, - PaginatedQueryVariables< - ReversibleTransactionSorts, - ReversibleTransferWhereInput - > - > - ) => { - const GET_REVERSIBLE_TRANSACTIONS = gql` - query GetReversibleTransactions( - $limit: Int - $offset: Int - $orderBy: [ReversibleTransferOrderByInput!] - $where: ReversibleTransferWhereInput - ) { - reversibleTransactions: reversibleTransfers( - limit: $limit - offset: $offset - orderBy: $orderBy - where: $where - ) { - extrinsicHash - amount - timestamp - status - block { - height - } - from { - id - } - to { - id - } - } - meta: reversibleTransfersConnection(orderBy: id_ASC, where: $where) { - totalCount - } - } - `; - - return useQuery< - ReversibleTransactionListResponse, - PaginatedQueryVariables< - ReversibleTransactionSorts, - ReversibleTransferWhereInput - > - >(GET_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: - config?.variables?.orderBy ?? - REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, - limit: config?.variables?.limit ?? QUERY_DEFAULT_LIMIT, - offset: config?.variables?.offset ?? 0, - where: config?.variables?.where - } - }); - }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const GET_RECENT_REVERSIBLE_TRANSACTIONS = gql` - query GetRecentReversibleTransactions( - $limit: Int - $offset: Int - $orderBy: [ReversibleTransferOrderByInput!] - ) { - reversibleTransactions: reversibleTransfers( - limit: $limit - offset: $offset - orderBy: $orderBy - ) { - extrinsicHash - amount - timestamp - status - block { - height - } - from { - id - } - to { - id - } - } - } - `; - - return useQuery< - RecentReversibleTransactionsResponse, - PaginatedQueryVariables - >(GET_RECENT_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: REVERSIBLE_TRANSACTION_SORTS.timestamp.DESC, - limit: QUERY_RECENT_LIMIT - } - }); - }, - useGetStats: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const startDate = startOfToday().toISOString(); - const endDate = endOfToday().toISOString(); - - const GET_REVERSIBLE_TRANSACTIONS_STATS = gql` - query GetReversibleTransactionsStats( - $startDate: DateTime! - $endDate: DateTime! - ) { - last24Hour: reversibleTransfersConnection( - orderBy: id_ASC - where: { timestamp_gte: $startDate, timestamp_lte: $endDate } - ) { - totalCount - } - allTime: reversibleTransfersConnection(orderBy: id_ASC) { - totalCount - } - } - `; - - return useQuery( - GET_REVERSIBLE_TRANSACTIONS_STATS, - { - ...config, - variables: { - startDate, - endDate - } - } - ); - }, - getByHash: () => { - const QUERY = gql` - query GetReversibleTransactionByHash($hash: String!) { - reversibleTransactions: reversibleTransfers( - where: { extrinsicHash_eq: $hash } - ) { - fee - amount - extrinsicHash - txId - scheduledAt - timestamp - status - block { - height - } - from { - id - } - to { - id - } - } - } - `; - - return { - useQuery: ( - hash: string, - config?: QueryHookOptions - ) => - useQuery(QUERY, { - ...config, - variables: { - hash - } - }) - }; - }, - getStatusByHash: () => { - const QUERY = gql` - query GetReversibleTransactionStatusByHash($hash: String!) { - reversibleTransactions: reversibleTransfers( - where: { extrinsicHash_eq: $hash } - ) { - status - } - } - `; - - return { - useQuery: ( - hash: string, - config?: QueryHookOptions - ) => - useQuery(QUERY, { - ...config, - variables: { - hash - } - }) - }; - } -}; diff --git a/src/schemas/cancelled-reversible-transaction.ts b/src/schemas/cancelled-reversible-transaction.ts new file mode 100644 index 0000000..c64fef9 --- /dev/null +++ b/src/schemas/cancelled-reversible-transaction.ts @@ -0,0 +1,23 @@ +import type * as gql from '../__generated__/graphql'; +import type { ScheduledReversibleTransaction } from './scheduled-reversible-transaction'; + +export interface CancelledReversibleTransaction + extends Omit< + gql.CancelledReversibleTransfer, + 'id' | 'block' | 'event' | 'cancelledBy' | 'scheduledTransfer' + > { + block: Pick; + cancelledBy: Pick; + scheduledTransfer: ScheduledReversibleTransaction; +} + +export interface CancelledReversibleTransactionListResponse { + cancelledReversibleTransactions: CancelledReversibleTransaction[]; + meta: { + totalCount: number; + }; +} + +export interface RecentCancelledReversibleTransactionsResponse { + cancelledReversibleTransactions: CancelledReversibleTransaction[]; +} diff --git a/src/schemas/executed-reversible-transaction.ts b/src/schemas/executed-reversible-transaction.ts new file mode 100644 index 0000000..fb5acf6 --- /dev/null +++ b/src/schemas/executed-reversible-transaction.ts @@ -0,0 +1,22 @@ +import type * as gql from '../__generated__/graphql'; +import type { ScheduledReversibleTransaction } from './scheduled-reversible-transaction'; + +export interface ExecutedReversibleTransaction + extends Omit< + gql.ExecutedReversibleTransfer, + 'id' | 'block' | 'event' | 'executedTransfer' | 'scheduledTransfer' + > { + block: Pick; + scheduledTransfer: ScheduledReversibleTransaction; +} + +export interface ExecutedReversibleTransactionListResponse { + executedReversibleTransactions: ExecutedReversibleTransaction[]; + meta: { + totalCount: number; + }; +} + +export interface RecentExecutedReversibleTransactionsResponse { + executedReversibleTransactions: ExecutedReversibleTransaction[]; +} diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 8b8fbd9..27c68f5 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -6,6 +6,9 @@ export * from './high-security-set'; export * from './miner-leaderboard'; export * from './miner-reward'; export * from './reversible-transaction'; +export * from './scheduled-reversible-transaction'; +export * from './executed-reversible-transaction'; +export * from './cancelled-reversible-transaction'; export * from './searchs'; export * from './transcation'; export * from './wormhole'; diff --git a/src/schemas/reversible-transaction.ts b/src/schemas/reversible-transaction.ts deleted file mode 100644 index c613ca4..0000000 --- a/src/schemas/reversible-transaction.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type * as gql from '../__generated__/graphql'; - -// Scheduled Reversible Transactions -export interface ScheduledReversibleTransaction - extends Omit< - gql.ScheduledReversibleTransfer, - 'id' | 'block' | 'event' | 'from' | 'to' - > { - block: Pick; - from: Pick; - to: Pick; -} - -export interface ScheduledReversibleTransactionListResponse { - scheduledReversibleTransactions: ScheduledReversibleTransaction[]; - meta: { - totalCount: number; - }; -} - -export interface RecentScheduledReversibleTransactionsResponse { - scheduledReversibleTransactions: ScheduledReversibleTransaction[]; -} - -// Executed Reversible Transactions -export interface ExecutedReversibleTransaction - extends Omit< - gql.ExecutedReversibleTransfer, - 'id' | 'block' | 'event' | 'executedTransfer' | 'scheduledTransfer' - > { - block: Pick; - scheduledTransfer: ScheduledReversibleTransaction; -} - -export interface ExecutedReversibleTransactionListResponse { - executedReversibleTransactions: ExecutedReversibleTransaction[]; - meta: { - totalCount: number; - }; -} - -export interface RecentExecutedReversibleTransactionsResponse { - executedReversibleTransactions: ExecutedReversibleTransaction[]; -} - -// Cancelled Reversible Transactions -export interface CancelledReversibleTransaction - extends Omit< - gql.CancelledReversibleTransfer, - 'id' | 'block' | 'event' | 'cancelledBy' | 'scheduledTransfer' - > { - block: Pick; - cancelledBy: Pick; - scheduledTransfer: ScheduledReversibleTransaction; -} - -export interface CancelledReversibleTransactionListResponse { - cancelledReversibleTransactions: CancelledReversibleTransaction[]; - meta: { - totalCount: number; - }; -} - -export interface RecentCancelledReversibleTransactionsResponse { - cancelledReversibleTransactions: CancelledReversibleTransaction[]; -} diff --git a/src/schemas/scheduled-reversible-transaction.ts b/src/schemas/scheduled-reversible-transaction.ts new file mode 100644 index 0000000..db81c97 --- /dev/null +++ b/src/schemas/scheduled-reversible-transaction.ts @@ -0,0 +1,22 @@ +import type * as gql from '../__generated__/graphql'; + +export interface ScheduledReversibleTransaction + extends Omit< + gql.ScheduledReversibleTransfer, + 'id' | 'block' | 'event' | 'from' | 'to' + > { + block: Pick; + from: Pick; + to: Pick; +} + +export interface ScheduledReversibleTransactionListResponse { + scheduledReversibleTransactions: ScheduledReversibleTransaction[]; + meta: { + totalCount: number; + }; +} + +export interface RecentScheduledReversibleTransactionsResponse { + scheduledReversibleTransactions: ScheduledReversibleTransaction[]; +} From dbfd1e1ffcf13a28ab7d7f111d77daa781fafa47 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 13:55:08 +0800 Subject: [PATCH 04/12] wip: update schemas to follow existing pattern --- src/schemas/cancelled-reversible-transaction.ts | 13 +++++++++++++ src/schemas/executed-reversible-transaction.ts | 13 +++++++++++++ src/schemas/scheduled-reversible-transaction.ts | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/src/schemas/cancelled-reversible-transaction.ts b/src/schemas/cancelled-reversible-transaction.ts index c64fef9..5143927 100644 --- a/src/schemas/cancelled-reversible-transaction.ts +++ b/src/schemas/cancelled-reversible-transaction.ts @@ -11,6 +11,10 @@ export interface CancelledReversibleTransaction scheduledTransfer: ScheduledReversibleTransaction; } +export interface CancelledReversibleTransactionResponse { + cancelledReversibleTransactions: [CancelledReversibleTransaction]; +} + export interface CancelledReversibleTransactionListResponse { cancelledReversibleTransactions: CancelledReversibleTransaction[]; meta: { @@ -21,3 +25,12 @@ export interface CancelledReversibleTransactionListResponse { export interface RecentCancelledReversibleTransactionsResponse { cancelledReversibleTransactions: CancelledReversibleTransaction[]; } + +export interface CancelledReversibleTransactionsStatsResponse { + allTime: { + totalCount: number; + }; + last24Hour: { + totalCount: number; + }; +} diff --git a/src/schemas/executed-reversible-transaction.ts b/src/schemas/executed-reversible-transaction.ts index fb5acf6..c5e92c2 100644 --- a/src/schemas/executed-reversible-transaction.ts +++ b/src/schemas/executed-reversible-transaction.ts @@ -10,6 +10,10 @@ export interface ExecutedReversibleTransaction scheduledTransfer: ScheduledReversibleTransaction; } +export interface ExecutedReversibleTransactionResponse { + executedReversibleTransactions: [ExecutedReversibleTransaction]; +} + export interface ExecutedReversibleTransactionListResponse { executedReversibleTransactions: ExecutedReversibleTransaction[]; meta: { @@ -20,3 +24,12 @@ export interface ExecutedReversibleTransactionListResponse { export interface RecentExecutedReversibleTransactionsResponse { executedReversibleTransactions: ExecutedReversibleTransaction[]; } + +export interface ExecutedReversibleTransactionsStatsResponse { + allTime: { + totalCount: number; + }; + last24Hour: { + totalCount: number; + }; +} diff --git a/src/schemas/scheduled-reversible-transaction.ts b/src/schemas/scheduled-reversible-transaction.ts index db81c97..06e2e48 100644 --- a/src/schemas/scheduled-reversible-transaction.ts +++ b/src/schemas/scheduled-reversible-transaction.ts @@ -10,6 +10,10 @@ export interface ScheduledReversibleTransaction to: Pick; } +export interface ScheduledReversibleTransactionResponse { + scheduledReversibleTransactions: [ScheduledReversibleTransaction]; +} + export interface ScheduledReversibleTransactionListResponse { scheduledReversibleTransactions: ScheduledReversibleTransaction[]; meta: { @@ -20,3 +24,12 @@ export interface ScheduledReversibleTransactionListResponse { export interface RecentScheduledReversibleTransactionsResponse { scheduledReversibleTransactions: ScheduledReversibleTransaction[]; } + +export interface ScheduledReversibleTransactionsStatsResponse { + allTime: { + totalCount: number; + }; + last24Hour: { + totalCount: number; + }; +} From bebe4a4542c16e0ca2ee4cf87e90a11689bbf9f4 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 14:04:42 +0800 Subject: [PATCH 05/12] wip: update reversible api --- src/api/cancelled-reversible-transactions.tsx | 89 +++++++++++++++++++ src/api/executed-reversible-transactions.tsx | 86 ++++++++++++++++++ src/api/scheduled-reversible-transactions.tsx | 81 ++++++++++++++++- 3 files changed, 255 insertions(+), 1 deletion(-) diff --git a/src/api/cancelled-reversible-transactions.tsx b/src/api/cancelled-reversible-transactions.tsx index 390f750..810c498 100644 --- a/src/api/cancelled-reversible-transactions.tsx +++ b/src/api/cancelled-reversible-transactions.tsx @@ -1,5 +1,7 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; +import { endOfToday } from 'date-fns/endOfToday'; +import { startOfToday } from 'date-fns/startOfToday'; import type { CancelledReversibleTransferWhereInput } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; @@ -8,6 +10,8 @@ import type { CancelledReversibleTransactionSorts } from '@/constants/query-sort import { CANCELLED_REVERSIBLE_TRANSACTION_SORTS } from '@/constants/query-sorts'; import type { CancelledReversibleTransactionListResponse, + CancelledReversibleTransactionResponse, + CancelledReversibleTransactionsStatsResponse, RecentCancelledReversibleTransactionsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; @@ -144,5 +148,90 @@ export const cancelledReversibleTransactions = { limit: QUERY_RECENT_LIMIT } }); + }, + useGetStats: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const startDate = startOfToday().toISOString(); + const endDate = endOfToday().toISOString(); + + const GET_CANCELLED_REVERSIBLE_TRANSACTIONS_STATS = gql` + query GetCancelledReversibleTransactionsStats( + $startDate: DateTime! + $endDate: DateTime! + ) { + last24Hour: cancelledReversibleTransfersConnection( + orderBy: id_ASC + where: { timestamp_gte: $startDate, timestamp_lte: $endDate } + ) { + totalCount + } + allTime: cancelledReversibleTransfersConnection(orderBy: id_ASC) { + totalCount + } + } + `; + + return useQuery( + GET_CANCELLED_REVERSIBLE_TRANSACTIONS_STATS, + { + ...config, + variables: { + startDate, + endDate + } + } + ); + }, + getByTxId: () => { + const QUERY = gql` + query GetCancelledReversibleTransactionByTxId($txId: String!) { + cancelledReversibleTransactions: cancelledReversibleTransfers( + where: { txId_eq: $txId } + ) { + timestamp + txId + block { + height + } + cancelledBy { + id + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } + `; + + return { + useQuery: ( + txId: string, + config?: QueryHookOptions + ) => + useQuery(QUERY, { + ...config, + variables: { + txId + } + }) + }; } }; diff --git a/src/api/executed-reversible-transactions.tsx b/src/api/executed-reversible-transactions.tsx index bb021b3..a9cc009 100644 --- a/src/api/executed-reversible-transactions.tsx +++ b/src/api/executed-reversible-transactions.tsx @@ -1,5 +1,7 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; +import { endOfToday } from 'date-fns/endOfToday'; +import { startOfToday } from 'date-fns/startOfToday'; import type { ExecutedReversibleTransferWhereInput } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; @@ -8,6 +10,8 @@ import type { ExecutedReversibleTransactionSorts } from '@/constants/query-sorts import { EXECUTED_REVERSIBLE_TRANSACTION_SORTS } from '@/constants/query-sorts'; import type { ExecutedReversibleTransactionListResponse, + ExecutedReversibleTransactionResponse, + ExecutedReversibleTransactionsStatsResponse, RecentExecutedReversibleTransactionsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; @@ -138,5 +142,87 @@ export const executedReversibleTransactions = { limit: QUERY_RECENT_LIMIT } }); + }, + useGetStats: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const startDate = startOfToday().toISOString(); + const endDate = endOfToday().toISOString(); + + const GET_EXECUTED_REVERSIBLE_TRANSACTIONS_STATS = gql` + query GetExecutedReversibleTransactionsStats( + $startDate: DateTime! + $endDate: DateTime! + ) { + last24Hour: executedReversibleTransfersConnection( + orderBy: id_ASC + where: { timestamp_gte: $startDate, timestamp_lte: $endDate } + ) { + totalCount + } + allTime: executedReversibleTransfersConnection(orderBy: id_ASC) { + totalCount + } + } + `; + + return useQuery( + GET_EXECUTED_REVERSIBLE_TRANSACTIONS_STATS, + { + ...config, + variables: { + startDate, + endDate + } + } + ); + }, + getByTxId: () => { + const QUERY = gql` + query GetExecutedReversibleTransactionByTxId($txId: String!) { + executedReversibleTransactions: executedReversibleTransfers( + where: { txId_eq: $txId } + ) { + timestamp + txId + block { + height + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } + `; + + return { + useQuery: ( + txId: string, + config?: QueryHookOptions + ) => + useQuery(QUERY, { + ...config, + variables: { + txId + } + }) + }; } }; diff --git a/src/api/scheduled-reversible-transactions.tsx b/src/api/scheduled-reversible-transactions.tsx index 4e5a7e2..4dd5c47 100644 --- a/src/api/scheduled-reversible-transactions.tsx +++ b/src/api/scheduled-reversible-transactions.tsx @@ -1,5 +1,7 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; +import { endOfToday } from 'date-fns/endOfToday'; +import { startOfToday } from 'date-fns/startOfToday'; import type { ScheduledReversibleTransferWhereInput } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; @@ -8,7 +10,9 @@ import type { ScheduledReversibleTransactionSorts } from '@/constants/query-sort import { SCHEDULED_REVERSIBLE_TRANSACTION_SORTS } from '@/constants/query-sorts'; import type { RecentScheduledReversibleTransactionsResponse, - ScheduledReversibleTransactionListResponse + ScheduledReversibleTransactionListResponse, + ScheduledReversibleTransactionResponse, + ScheduledReversibleTransactionsStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; @@ -124,5 +128,80 @@ export const scheduledReversibleTransactions = { limit: QUERY_RECENT_LIMIT } }); + }, + useGetStats: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const startDate = startOfToday().toISOString(); + const endDate = endOfToday().toISOString(); + + const GET_SCHEDULED_REVERSIBLE_TRANSACTIONS_STATS = gql` + query GetScheduledReversibleTransactionsStats( + $startDate: DateTime! + $endDate: DateTime! + ) { + last24Hour: scheduledReversibleTransfersConnection( + orderBy: id_ASC + where: { timestamp_gte: $startDate, timestamp_lte: $endDate } + ) { + totalCount + } + allTime: scheduledReversibleTransfersConnection(orderBy: id_ASC) { + totalCount + } + } + `; + + return useQuery( + GET_SCHEDULED_REVERSIBLE_TRANSACTIONS_STATS, + { + ...config, + variables: { + startDate, + endDate + } + } + ); + }, + getByTxId: () => { + const QUERY = gql` + query GetScheduledReversibleTransactionByTxId($txId: String!) { + scheduledReversibleTransactions: scheduledReversibleTransfers( + where: { txId_eq: $txId } + ) { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + `; + + return { + useQuery: ( + txId: string, + config?: QueryHookOptions + ) => + useQuery(QUERY, { + ...config, + variables: { + txId + } + }) + }; } }; From 4a5fc2dca297ef3e5fe58d4b9906b4307e246bba Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 14:09:16 +0800 Subject: [PATCH 06/12] wip: update landing page --- ...NCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 83 +++++++++++++++++++ ...XECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 71 ++++++++++++++++ ...EDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx} | 22 +++-- .../CancelledReversibleTransactionsTable.tsx | 17 ++++ .../hook.tsx | 51 ++++++++++++ .../features/landing/data-tabs/DataTabs.tsx | 18 +++- .../ExecutedReversibleTransactionsTable.tsx} | 6 +- .../hook.tsx | 18 ++-- .../RecentCancelledReversibleTransactions.tsx | 23 +++++ .../RecentExecutedReversibleTransactions.tsx} | 12 +-- .../RecentScheduledReversibleTransactions.tsx | 23 +++++ .../ScheduledReversibleTransactionsTable.tsx | 17 ++++ .../hook.tsx | 51 ++++++++++++ src/constants/resources.ts | 3 + 14 files changed, 381 insertions(+), 34 deletions(-) create mode 100644 src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx create mode 100644 src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx rename src/components/common/table-columns/{REVERSIBLE_TRANSACTION_COLUMNS.tsx => SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx} (80%) create mode 100644 src/components/features/landing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx create mode 100644 src/components/features/landing/cancelled-reversible-transactions-table/hook.tsx rename src/components/features/landing/{reversible-transactions-table/ReversibleTransactionsTable.tsx => executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx} (55%) rename src/components/features/landing/{reversible-transactions-table => executed-reversible-transactions-table}/hook.tsx (58%) create mode 100644 src/components/features/landing/recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions.tsx rename src/components/features/landing/{recent-reversible-transactions/RecentReversibleTransactions.tsx => recent-executed-reversible-transactions/RecentExecutedReversibleTransactions.tsx} (50%) create mode 100644 src/components/features/landing/recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions.tsx create mode 100644 src/components/features/landing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx create mode 100644 src/components/features/landing/scheduled-reversible-transactions-table/hook.tsx diff --git a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx new file mode 100644 index 0000000..b95b911 --- /dev/null +++ b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -0,0 +1,83 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { CancelledReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = createColumnHelper(); + +export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [ + columnHelper.accessor('scheduledTransfer.extrinsicHash', { + id: 'tx-hash', + header: 'Hash', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('block.height', { + id: 'block_height', + header: 'Block', + cell: (props) => ( + + ), + enableSorting: true + }), + columnHelper.accessor('timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('cancelledBy.id', { + id: 'cancelledBy', + header: 'Cancelled By', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('scheduledTransfer.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('scheduledTransfer.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('scheduledTransfer.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx new file mode 100644 index 0000000..a23eade --- /dev/null +++ b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -0,0 +1,71 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { ExecutedReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = createColumnHelper(); + +export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [ + columnHelper.accessor('scheduledTransfer.extrinsicHash', { + id: 'tx-hash', + header: 'Hash', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('block.height', { + id: 'block_height', + header: 'Block', + cell: (props) => ( + + ), + enableSorting: true + }), + columnHelper.accessor('timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('scheduledTransfer.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('scheduledTransfer.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('scheduledTransfer.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx similarity index 80% rename from src/components/common/table-columns/REVERSIBLE_TRANSACTION_COLUMNS.tsx rename to src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx index df435d1..5ec8e71 100644 --- a/src/components/common/table-columns/REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -2,20 +2,19 @@ import { createColumnHelper } from '@tanstack/react-table'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TimestampDisplay } from '@/components/ui/timestamp-display'; -import { TransactionStatus } from '@/components/ui/transaction-status'; import { RESOURCES } from '@/constants/resources'; -import type { ReversibleTransaction } from '@/schemas'; +import type { ScheduledReversibleTransaction } from '@/schemas'; import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; -const columnHelper = createColumnHelper(); +const columnHelper = createColumnHelper(); -export const REVERSIBLE_TRANSACTION_COLUMNS = [ +export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [ columnHelper.accessor('extrinsicHash', { id: 'tx-hash', header: 'Hash', cell: (props) => ( @@ -39,7 +38,12 @@ export const REVERSIBLE_TRANSACTION_COLUMNS = [ cell: (props) => , enableSorting: true }), - + columnHelper.accessor('scheduledAt', { + id: 'scheduledAt', + header: 'Scheduled At', + cell: (props) => , + enableSorting: true + }), columnHelper.accessor('from.id', { id: 'from', header: 'From', @@ -69,11 +73,5 @@ export const REVERSIBLE_TRANSACTION_COLUMNS = [ header: 'Amount', cell: (props) => formatMonetaryValue(props.getValue(), 5), enableSorting: true - }), - columnHelper.accessor('status', { - id: 'status', - header: 'Status', - cell: (props) => , - enableSorting: true }) ]; diff --git a/src/components/features/landing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx b/src/components/features/landing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx new file mode 100644 index 0000000..3aa771e --- /dev/null +++ b/src/components/features/landing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx @@ -0,0 +1,17 @@ +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; + +import { useCancelledReversibleTransactionsTable } from './hook'; + +export const CancelledReversibleTransactionsTable = () => { + const { getStatus, table, error } = useCancelledReversibleTransactionsTable(); + + return ( + Error : {error && error.message}

+ }} + /> + ); +}; diff --git a/src/components/features/landing/cancelled-reversible-transactions-table/hook.tsx b/src/components/features/landing/cancelled-reversible-transactions-table/hook.tsx new file mode 100644 index 0000000..44864f9 --- /dev/null +++ b/src/components/features/landing/cancelled-reversible-transactions-table/hook.tsx @@ -0,0 +1,51 @@ +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { useMemo } from 'react'; + +import useApiClient from '@/api'; +import { CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +import type { CancelledReversibleTransaction } from '@/schemas'; + +export const useCancelledReversibleTransactionsTable = () => { + const api = useApiClient(); + const { + loading, + data, + error: fetchError + } = api.cancelledReversibleTransactions.useGetRecent({ + pollInterval: DATA_POOL_INTERVAL + }); + const columns = useMemo(() => CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS, []); + + const table = useReactTable({ + data: data?.cancelledReversibleTransactions ?? [], + columns, + getCoreRowModel: getCoreRowModel(), + enableSorting: false, + rowCount: data?.cancelledReversibleTransactions?.length ?? 0, + manualPagination: true, + manualSorting: true + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = () => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }; + + return { + table, + getStatus, + error + }; +}; diff --git a/src/components/features/landing/data-tabs/DataTabs.tsx b/src/components/features/landing/data-tabs/DataTabs.tsx index a7b9307..81a1d15 100644 --- a/src/components/features/landing/data-tabs/DataTabs.tsx +++ b/src/components/features/landing/data-tabs/DataTabs.tsx @@ -14,17 +14,21 @@ import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { formatOption } from '@/utils/formatter'; import { RecentBlocks } from '../recent-blocks/RecentBlocks'; +import { RecentCancelledReversibleTransactions } from '../recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions'; import { RecentErrorEvents } from '../recent-error-events/RecentErrorEvents'; +import { RecentExecutedReversibleTransactions } from '../recent-executed-reversible-transactions/RecentExecutedReversibleTransactions'; import { RecentHighSecuritySets } from '../recent-high-security-sets/RecentHighSecuritySets'; import { RecentMinerRewards } from '../recent-miner-rewards/RecentMinerRewards'; -import { RecentReversibleTransactions } from '../recent-reversible-transactions/RecentReversibleTransactions'; +import { RecentScheduledReversibleTransactions } from '../recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions'; import { RecentTransactions } from '../recent-transactions/RecentTransactions'; export interface DataTabsProps {} const TAB_OPTIONS = { immediate: 'immediate-transactions', - reversible: 'reversible-transactions', + scheduledReversible: 'scheduled-reversible-transactions', + executedReversible: 'executed-reversible-transactions', + cancelledReversible: 'cancelled-reversible-transactions', blocks: 'blocks', miners: 'miner-rewards', highSecuritySets: 'high-security-sets', @@ -68,8 +72,14 @@ export const DataTabs: React.FC = () => { - - + + + + + + + + diff --git a/src/components/features/landing/reversible-transactions-table/ReversibleTransactionsTable.tsx b/src/components/features/landing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx similarity index 55% rename from src/components/features/landing/reversible-transactions-table/ReversibleTransactionsTable.tsx rename to src/components/features/landing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx index c622ec0..f7267ad 100644 --- a/src/components/features/landing/reversible-transactions-table/ReversibleTransactionsTable.tsx +++ b/src/components/features/landing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx @@ -1,9 +1,9 @@ import { DataTable } from '@/components/ui/composites/data-table/DataTable'; -import { useReversibleTransactionsTable } from './hook'; +import { useExecutedReversibleTransactionsTable } from './hook'; -export const ReversibleTransactionsTable = () => { - const { getStatus, table, error } = useReversibleTransactionsTable(); +export const ExecutedReversibleTransactionsTable = () => { + const { getStatus, table, error } = useExecutedReversibleTransactionsTable(); return ( { +export const useExecutedReversibleTransactionsTable = () => { const api = useApiClient(); const { loading, data, error: fetchError - } = api.reversibleTransactions.useGetRecent({ + } = api.executedReversibleTransactions.useGetRecent({ pollInterval: DATA_POOL_INTERVAL }); - const transactionColumns = useMemo(() => REVERSIBLE_TRANSACTION_COLUMNS, []); + const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); - const table = useReactTable({ - data: data?.reversibleTransactions ?? [], - columns: transactionColumns, + const table = useReactTable({ + data: data?.executedReversibleTransactions ?? [], + columns, getCoreRowModel: getCoreRowModel(), enableSorting: false, - rowCount: data?.reversibleTransactions?.length ?? 0, + rowCount: data?.executedReversibleTransactions?.length ?? 0, manualPagination: true, manualSorting: true }); diff --git a/src/components/features/landing/recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions.tsx b/src/components/features/landing/recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions.tsx new file mode 100644 index 0000000..8689d5a --- /dev/null +++ b/src/components/features/landing/recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions.tsx @@ -0,0 +1,23 @@ +import { Link } from '@tanstack/react-router'; + +import { Button } from '@/components/ui/button'; +import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; + +import { CancelledReversibleTransactionsTable } from '../cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable'; + +export const RecentCancelledReversibleTransactions = () => { + return ( + +

Recent Cancelled Reversible Transactions

+ + + + +
+ ); +}; diff --git a/src/components/features/landing/recent-reversible-transactions/RecentReversibleTransactions.tsx b/src/components/features/landing/recent-executed-reversible-transactions/RecentExecutedReversibleTransactions.tsx similarity index 50% rename from src/components/features/landing/recent-reversible-transactions/RecentReversibleTransactions.tsx rename to src/components/features/landing/recent-executed-reversible-transactions/RecentExecutedReversibleTransactions.tsx index d8e6ee1..b3f214f 100644 --- a/src/components/features/landing/recent-reversible-transactions/RecentReversibleTransactions.tsx +++ b/src/components/features/landing/recent-executed-reversible-transactions/RecentExecutedReversibleTransactions.tsx @@ -4,18 +4,18 @@ import { Button } from '@/components/ui/button'; import { ContentContainer } from '@/components/ui/content-container'; import { RESOURCES } from '@/constants/resources'; -import { ReversibleTransactionsTable } from '../reversible-transactions-table/ReversibleTransactionsTable'; +import { ExecutedReversibleTransactionsTable } from '../executed-reversible-transactions-table/ExecutedReversibleTransactionsTable'; -export const RecentReversibleTransactions = () => { +export const RecentExecutedReversibleTransactions = () => { return ( -

Recent Reversible Transactions

+

Recent Executed Reversible Transactions

- +
diff --git a/src/components/features/landing/recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions.tsx b/src/components/features/landing/recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions.tsx new file mode 100644 index 0000000..6023c41 --- /dev/null +++ b/src/components/features/landing/recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions.tsx @@ -0,0 +1,23 @@ +import { Link } from '@tanstack/react-router'; + +import { Button } from '@/components/ui/button'; +import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; + +import { ScheduledReversibleTransactionsTable } from '../scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable'; + +export const RecentScheduledReversibleTransactions = () => { + return ( + +

Recent Scheduled Reversible Transactions

+ + + + +
+ ); +}; diff --git a/src/components/features/landing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx b/src/components/features/landing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx new file mode 100644 index 0000000..d265ceb --- /dev/null +++ b/src/components/features/landing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx @@ -0,0 +1,17 @@ +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; + +import { useScheduledReversibleTransactionsTable } from './hook'; + +export const ScheduledReversibleTransactionsTable = () => { + const { getStatus, table, error } = useScheduledReversibleTransactionsTable(); + + return ( + Error : {error && error.message}

+ }} + /> + ); +}; diff --git a/src/components/features/landing/scheduled-reversible-transactions-table/hook.tsx b/src/components/features/landing/scheduled-reversible-transactions-table/hook.tsx new file mode 100644 index 0000000..d7cfdaf --- /dev/null +++ b/src/components/features/landing/scheduled-reversible-transactions-table/hook.tsx @@ -0,0 +1,51 @@ +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { useMemo } from 'react'; + +import useApiClient from '@/api'; +import { SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +import type { ScheduledReversibleTransaction } from '@/schemas'; + +export const useScheduledReversibleTransactionsTable = () => { + const api = useApiClient(); + const { + loading, + data, + error: fetchError + } = api.scheduledReversibleTransactions.useGetRecent({ + pollInterval: DATA_POOL_INTERVAL + }); + const columns = useMemo(() => SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS, []); + + const table = useReactTable({ + data: data?.scheduledReversibleTransactions ?? [], + columns, + getCoreRowModel: getCoreRowModel(), + enableSorting: false, + rowCount: data?.scheduledReversibleTransactions?.length ?? 0, + manualPagination: true, + manualSorting: true + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = () => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }; + + return { + table, + getStatus, + error + }; +}; diff --git a/src/constants/resources.ts b/src/constants/resources.ts index a00e1f4..917aa8b 100644 --- a/src/constants/resources.ts +++ b/src/constants/resources.ts @@ -1,6 +1,9 @@ export const RESOURCES = { transactions: '/immediate-transactions', reversibleTransactions: '/reversible-transactions', + scheduledReversibleTransactions: '/scheduled-reversible-transactions', + executedReversibleTransactions: '/executed-reversible-transactions', + cancelledReversibleTransactions: '/cancelled-reversible-transactions', accounts: '/accounts', blocks: '/blocks', minerRewards: '/miner-rewards', From a5f11d65beec4e9303d6012e6b26b595255a17f5 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 14:20:13 +0800 Subject: [PATCH 07/12] wip: update reversible UI --- ...celledReversibleTransactionInformation.tsx | 124 ++++++++++++++ .../CancelledReversibleTransactionHeading.tsx | 36 +++++ .../CancelledReversibleTransactionsStats.tsx | 57 +++++++ .../CancelledReversibleTransactionsTable.tsx | 20 +++ .../hook.tsx | 152 ++++++++++++++++++ ...ecutedReversibleTransactionInformation.tsx | 112 +++++++++++++ .../ExecutedReversibleTransactionHeading.tsx} | 8 +- .../ExecutedReversibleTransactionsStats.tsx} | 17 +- .../ExecutedReversibleTransactionsTable.tsx} | 6 +- .../hook.tsx | 150 +++++++++++++++++ ...duledReversibleTransactionInformation.tsx} | 43 ++--- .../ScheduledReversibleTransactionHeading.tsx | 36 +++++ .../ScheduledReversibleTransactionsStats.tsx | 57 +++++++ .../ScheduledReversibleTransactionsTable.tsx | 20 +++ .../hook.tsx | 31 ++-- 15 files changed, 811 insertions(+), 58 deletions(-) create mode 100644 src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx create mode 100644 src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transaction-heading/CancelledReversibleTransactionHeading.tsx create mode 100644 src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-stats/CancelledReversibleTransactionsStats.tsx create mode 100644 src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx create mode 100644 src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/hook.tsx create mode 100644 src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx rename src/components/features/{reversible-transaction-listing/reversible-transaction-heading/ReversibleTransactionHeading.tsx => executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading.tsx} (74%) rename src/components/features/{reversible-transaction-listing/reversible-transactions-stats/ReversibleTransactionsStats.tsx => executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats.tsx} (75%) rename src/components/features/{reversible-transaction-listing/reversible-transactions-table/ReversibleTransactionsTable.tsx => executed-reversible-transaction-listing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx} (59%) create mode 100644 src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/hook.tsx rename src/components/features/{reversible-transaction-details/reversible-transaction-information/ReversibleTransactionInformation.tsx => scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx} (72%) create mode 100644 src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transaction-heading/ScheduledReversibleTransactionHeading.tsx create mode 100644 src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-stats/ScheduledReversibleTransactionsStats.tsx create mode 100644 src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx rename src/components/features/{reversible-transaction-listing/reversible-transactions-table => scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table}/hook.tsx (77%) diff --git a/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx b/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx new file mode 100644 index 0000000..5b2a588 --- /dev/null +++ b/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx @@ -0,0 +1,124 @@ +import { notFound } from '@tanstack/react-router'; +import * as React from 'react'; + +import useApiClient from '@/api'; +import { DataList } from '@/components/ui/composites/data-list/DataList'; +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { RESOURCES } from '@/constants/resources'; +import type { CancelledReversibleTransactionResponse } from '@/schemas'; +import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; + +export interface CancelledReversibleTransactionInformationProps { + txId: string; +} + +type CancelledReversibleTransaction = + CancelledReversibleTransactionResponse['cancelledReversibleTransactions'][0]; + +export const CancelledReversibleTransactionInformation: React.FC< + CancelledReversibleTransactionInformationProps +> = ({ txId }) => { + const api = useApiClient(); + const { data, loading } = api.cancelledReversibleTransactions + .getByTxId() + .useQuery(txId); + + if (!loading && (!data || data.cancelledReversibleTransactions.length !== 1)) + throw notFound(); + + const tx = data?.cancelledReversibleTransactions[0]; + + const information: Partial[] = [ + { + txId: tx?.txId, + block: tx?.block, + timestamp: tx?.timestamp, + cancelledBy: tx?.cancelledBy, + scheduledTransfer: tx?.scheduledTransfer + } + ]; + + return ( + > + loading={loading} + data={information} + fields={[ + { + label: 'ID', + key: 'txId', + render: (value) => {value} + }, + { + label: 'Extrinsic Hash (Scheduled)', + key: 'scheduledTransfer', + render: (value) => ( + + ) + }, + { + label: 'Block', + key: 'block', + render: (value) => ( + + ) + }, + { + label: 'Timestamp', + key: 'timestamp', + render: (value) => formatTimestamp(value, true) + }, + { + label: 'Cancelled By', + key: 'cancelledBy', + render: (value) => ( + + ) + }, + { + label: 'From', + key: 'scheduledTransfer', + render: (value) => ( + + ) + }, + { + label: 'To', + key: 'scheduledTransfer', + render: (value) => ( + + ) + }, + { + label: 'Amount', + key: 'scheduledTransfer', + render: (value) => formatMonetaryValue(value.amount) + }, + { + label: 'Fee', + key: 'scheduledTransfer', + render: (value) => formatMonetaryValue(value.fee) + } + ]} + /> + ); +}; diff --git a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transaction-heading/CancelledReversibleTransactionHeading.tsx b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transaction-heading/CancelledReversibleTransactionHeading.tsx new file mode 100644 index 0000000..6627813 --- /dev/null +++ b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transaction-heading/CancelledReversibleTransactionHeading.tsx @@ -0,0 +1,36 @@ +import { Link, useSearch } from '@tanstack/react-router'; +import * as React from 'react'; + +export interface CancelledReversibleTransactionHeadingProps {} + +export const CancelledReversibleTransactionHeading: React.FC< + CancelledReversibleTransactionHeadingProps +> = () => { + const { accountId, block } = useSearch({ + strict: false + }) as any; + + return ( +
+

Cancelled Reversible Transactions

+ + {block && ( +
+ In block + + {block} + +
+ )} + + {accountId && ( +
+ By + + {accountId} + +
+ )} +
+ ); +}; diff --git a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-stats/CancelledReversibleTransactionsStats.tsx b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-stats/CancelledReversibleTransactionsStats.tsx new file mode 100644 index 0000000..99e93ab --- /dev/null +++ b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-stats/CancelledReversibleTransactionsStats.tsx @@ -0,0 +1,57 @@ +import { useSearch } from '@tanstack/react-router'; +import React from 'react'; + +import useApiClient from '@/api'; +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Skeleton } from '@/components/ui/skeleton'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; + +export interface CancelledReversibleTransactionsStatsProps {} + +export const CancelledReversibleTransactionsStats: React.FC< + CancelledReversibleTransactionsStatsProps +> = () => { + const api = useApiClient(); + const { accountId, block } = useSearch({ + strict: false + }) as any; + + if (accountId || block) return null; + + const { loading, data, error } = + api.cancelledReversibleTransactions.useGetStats({ + pollInterval: DATA_POOL_INTERVAL + }); + + const success = !loading && !error; + + return ( +
+ + + +

Total Cancelled Transactions

+
+
+ + {success &&

{data?.allTime.totalCount}

} + {loading && } + {error &&

Error: {error.message}

} +
+
+ + + + +

Recent Cancelled Transactions (24H)

+
+
+ + {success &&

{data?.last24Hour.totalCount}

} + {loading && } + {error &&

Error: {error.message}

} +
+
+
+ ); +}; diff --git a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx new file mode 100644 index 0000000..5d479d6 --- /dev/null +++ b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx @@ -0,0 +1,20 @@ +import React from 'react'; + +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; + +import { useCancelledReversibleTransactionsTable } from './hook'; + +export const CancelledReversibleTransactionsTable = () => { + const { getStatus, table, error } = useCancelledReversibleTransactionsTable(); + + return ( + Error: {error && error.message}

+ }} + withControls + /> + ); +}; diff --git a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/hook.tsx b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/hook.tsx new file mode 100644 index 0000000..1e5717c --- /dev/null +++ b/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/hook.tsx @@ -0,0 +1,152 @@ +import { useSearch } from '@tanstack/react-router'; +import type { + OnChangeFn, + PaginationState, + SortingState +} from '@tanstack/react-table'; +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { parseAsInteger, parseAsStringLiteral, useQueryState } from 'nuqs'; +import { useEffect, useMemo, useState } from 'react'; + +import useApiClient from '@/api'; +import { CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; +import type { CancelledReversibleTransactionSorts } from '@/constants/query-sorts'; +import { CANCELLED_REVERSIBLE_TRANSACTION_SORTS_LITERALS } from '@/constants/query-sorts'; +import type { CancelledReversibleTransaction } from '@/schemas'; +import { transformSortLiteral } from '@/utils/transform-sort'; + +export const useCancelledReversibleTransactionsTable = () => { + const api = useApiClient(); + const { accountId, block } = useSearch({ + strict: false + }) as any; + + const [page, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); + const [limit, setLimit] = useQueryState( + 'limit', + parseAsInteger.withDefault(QUERY_DEFAULT_LIMIT) + ); + const [sortBy, setSortBy] = useQueryState( + 'sortBy', + parseAsStringLiteral(CANCELLED_REVERSIBLE_TRANSACTION_SORTS_LITERALS) + ); + + const currentPageIndex = page - 1; + + const sortingValue: SortingState = transformSortLiteral(sortBy); + const paginationValue: PaginationState = { + pageSize: limit, + pageIndex: currentPageIndex + }; + + const handleChangeSorting: OnChangeFn = (sorting) => { + if (typeof sorting === 'function') { + const newValue = sorting(sortingValue); + + if (newValue[0]?.id) { + const key = newValue[0].id; + const order = newValue[0].desc ? 'DESC' : 'ASC'; + + const newSortBy = + `${key}_${order}` as CancelledReversibleTransactionSorts; + + setSortBy(newSortBy); + } else { + setSortBy(null); + } + } else if (sorting[0]?.id) { + const key = sorting[0].id; + const order = sorting[0].desc ? 'DESC' : 'ASC'; + + const newSortBy = + `${key}_${order}` as CancelledReversibleTransactionSorts; + + setSortBy(newSortBy); + } + }; + + const handleChangePagination: OnChangeFn = (pagination) => { + if (typeof pagination === 'function') { + const newPagination = pagination(paginationValue); + + setPage(newPagination.pageIndex + 1); + setLimit(newPagination.pageSize); + } else { + setPage(pagination.pageIndex + 1); + setLimit(pagination.pageSize); + } + }; + + const { + loading, + data, + error: fetchError + } = api.cancelledReversibleTransactions.useGetAll({ + pollInterval: DATA_POOL_INTERVAL, + variables: { + orderBy: sortBy, + limit, + offset: currentPageIndex * limit, + ...(accountId && { + where: { + OR: [ + { scheduledTransfer: { from: { id_eq: accountId } } }, + { scheduledTransfer: { to: { id_eq: accountId } } }, + { cancelledBy: { id_eq: accountId } } + ] + } + }), + ...(block && { + where: { + block: { height_eq: Number(block) } + } + }) + } + }); + + const columns = useMemo(() => CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const [rowCount, setRowCount] = useState(data?.meta.totalCount ?? 0); + + const table = useReactTable({ + data: data?.cancelledReversibleTransactions ?? [], + columns, + getCoreRowModel: getCoreRowModel(), + state: { + sorting: sortingValue, + pagination: paginationValue + }, + rowCount, + onSortingChange: handleChangeSorting, + onPaginationChange: handleChangePagination, + manualSorting: true, + manualPagination: true + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = () => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }; + + useEffect(() => { + if (!loading && data?.meta.totalCount) setRowCount(data.meta.totalCount); + }, [loading, data?.meta.totalCount]); + + return { + table, + getStatus, + error: fetchError + }; +}; diff --git a/src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx b/src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx new file mode 100644 index 0000000..88bddf9 --- /dev/null +++ b/src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx @@ -0,0 +1,112 @@ +import { notFound } from '@tanstack/react-router'; +import * as React from 'react'; + +import useApiClient from '@/api'; +import { DataList } from '@/components/ui/composites/data-list/DataList'; +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { RESOURCES } from '@/constants/resources'; +import type { ExecutedReversibleTransactionResponse } from '@/schemas'; +import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; + +export interface ExecutedReversibleTransactionInformationProps { + txId: string; +} + +type ExecutedReversibleTransaction = + ExecutedReversibleTransactionResponse['executedReversibleTransactions'][0]; + +export const ExecutedReversibleTransactionInformation: React.FC< + ExecutedReversibleTransactionInformationProps +> = ({ txId }) => { + const api = useApiClient(); + const { data, loading } = api.executedReversibleTransactions + .getByTxId() + .useQuery(txId); + + if (!loading && (!data || data.executedReversibleTransactions.length !== 1)) + throw notFound(); + + const tx = data?.executedReversibleTransactions[0]; + + const information: Partial[] = [ + { + txId: tx?.txId, + block: tx?.block, + timestamp: tx?.timestamp, + scheduledTransfer: tx?.scheduledTransfer + } + ]; + + return ( + > + loading={loading} + data={information} + fields={[ + { + label: 'ID', + key: 'txId', + render: (value) => {value} + }, + { + label: 'Extrinsic Hash (Scheduled)', + key: 'scheduledTransfer', + render: (value) => ( + + ) + }, + { + label: 'Block', + key: 'block', + render: (value) => ( + + ) + }, + { + label: 'Timestamp', + key: 'timestamp', + render: (value) => formatTimestamp(value, true) + }, + { + label: 'From', + key: 'scheduledTransfer', + render: (value) => ( + + ) + }, + { + label: 'To', + key: 'scheduledTransfer', + render: (value) => ( + + ) + }, + { + label: 'Amount', + key: 'scheduledTransfer', + render: (value) => formatMonetaryValue(value.amount) + }, + { + label: 'Fee', + key: 'scheduledTransfer', + render: (value) => formatMonetaryValue(value.fee) + } + ]} + /> + ); +}; diff --git a/src/components/features/reversible-transaction-listing/reversible-transaction-heading/ReversibleTransactionHeading.tsx b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading.tsx similarity index 74% rename from src/components/features/reversible-transaction-listing/reversible-transaction-heading/ReversibleTransactionHeading.tsx rename to src/components/features/executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading.tsx index b54acda..ae880e5 100644 --- a/src/components/features/reversible-transaction-listing/reversible-transaction-heading/ReversibleTransactionHeading.tsx +++ b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading.tsx @@ -1,10 +1,10 @@ import { Link, useSearch } from '@tanstack/react-router'; import * as React from 'react'; -export interface ReversibleTransactionHeadingProps {} +export interface ExecutedReversibleTransactionHeadingProps {} -export const ReversibleTransactionHeading: React.FC< - ReversibleTransactionHeadingProps +export const ExecutedReversibleTransactionHeading: React.FC< + ExecutedReversibleTransactionHeadingProps > = () => { const { accountId, block } = useSearch({ strict: false @@ -12,7 +12,7 @@ export const ReversibleTransactionHeading: React.FC< return (
-

Reversible Transactions

+

Executed Reversible Transactions

{block && (
diff --git a/src/components/features/reversible-transaction-listing/reversible-transactions-stats/ReversibleTransactionsStats.tsx b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats.tsx similarity index 75% rename from src/components/features/reversible-transaction-listing/reversible-transactions-stats/ReversibleTransactionsStats.tsx rename to src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats.tsx index 347dae4..684c786 100644 --- a/src/components/features/reversible-transaction-listing/reversible-transactions-stats/ReversibleTransactionsStats.tsx +++ b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats.tsx @@ -6,10 +6,10 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -export interface ReversibleTransactionsStatsProps {} +export interface ExecutedReversibleTransactionsStatsProps {} -export const ReversibleTransactionsStats: React.FC< - ReversibleTransactionsStatsProps +export const ExecutedReversibleTransactionsStats: React.FC< + ExecutedReversibleTransactionsStatsProps > = () => { const api = useApiClient(); const { accountId, block } = useSearch({ @@ -18,9 +18,10 @@ export const ReversibleTransactionsStats: React.FC< if (accountId || block) return null; - const { loading, data, error } = api.reversibleTransactions.useGetStats({ - pollInterval: DATA_POOL_INTERVAL - }); + const { loading, data, error } = + api.executedReversibleTransactions.useGetStats({ + pollInterval: DATA_POOL_INTERVAL + }); const success = !loading && !error; @@ -29,7 +30,7 @@ export const ReversibleTransactionsStats: React.FC< -

Total Transactions

+

Total Executed Transactions

@@ -42,7 +43,7 @@ export const ReversibleTransactionsStats: React.FC< -

Recent Transactions (24H)

+

Recent Executed Transactions (24H)

diff --git a/src/components/features/reversible-transaction-listing/reversible-transactions-table/ReversibleTransactionsTable.tsx b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx similarity index 59% rename from src/components/features/reversible-transaction-listing/reversible-transactions-table/ReversibleTransactionsTable.tsx rename to src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx index f618f76..09ac828 100644 --- a/src/components/features/reversible-transaction-listing/reversible-transactions-table/ReversibleTransactionsTable.tsx +++ b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx @@ -2,10 +2,10 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; -import { useReversibleTransactionsTable } from './hook'; +import { useExecutedReversibleTransactionsTable } from './hook'; -export const ReversibleTransactionsTable = () => { - const { getStatus, table, error } = useReversibleTransactionsTable(); +export const ExecutedReversibleTransactionsTable = () => { + const { getStatus, table, error } = useExecutedReversibleTransactionsTable(); return ( { + const api = useApiClient(); + const { accountId, block } = useSearch({ + strict: false + }) as any; + + const [page, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); + const [limit, setLimit] = useQueryState( + 'limit', + parseAsInteger.withDefault(QUERY_DEFAULT_LIMIT) + ); + const [sortBy, setSortBy] = useQueryState( + 'sortBy', + parseAsStringLiteral(EXECUTED_REVERSIBLE_TRANSACTION_SORTS_LITERALS) + ); + + const currentPageIndex = page - 1; + + const sortingValue: SortingState = transformSortLiteral(sortBy); + const paginationValue: PaginationState = { + pageSize: limit, + pageIndex: currentPageIndex + }; + + const handleChangeSorting: OnChangeFn = (sorting) => { + if (typeof sorting === 'function') { + const newValue = sorting(sortingValue); + + if (newValue[0]?.id) { + const key = newValue[0].id; + const order = newValue[0].desc ? 'DESC' : 'ASC'; + + const newSortBy = + `${key}_${order}` as ExecutedReversibleTransactionSorts; + + setSortBy(newSortBy); + } else { + setSortBy(null); + } + } else if (sorting[0]?.id) { + const key = sorting[0].id; + const order = sorting[0].desc ? 'DESC' : 'ASC'; + + const newSortBy = `${key}_${order}` as ExecutedReversibleTransactionSorts; + + setSortBy(newSortBy); + } + }; + + const handleChangePagination: OnChangeFn = (pagination) => { + if (typeof pagination === 'function') { + const newPagination = pagination(paginationValue); + + setPage(newPagination.pageIndex + 1); + setLimit(newPagination.pageSize); + } else { + setPage(pagination.pageIndex + 1); + setLimit(pagination.pageSize); + } + }; + + const { + loading, + data, + error: fetchError + } = api.executedReversibleTransactions.useGetAll({ + pollInterval: DATA_POOL_INTERVAL, + variables: { + orderBy: sortBy, + limit, + offset: currentPageIndex * limit, + ...(accountId && { + where: { + OR: [ + { scheduledTransfer: { from: { id_eq: accountId } } }, + { scheduledTransfer: { to: { id_eq: accountId } } } + ] + } + }), + ...(block && { + where: { + block: { height_eq: Number(block) } + } + }) + } + }); + + const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const [rowCount, setRowCount] = useState(data?.meta.totalCount ?? 0); + + const table = useReactTable({ + data: data?.executedReversibleTransactions ?? [], + columns, + getCoreRowModel: getCoreRowModel(), + state: { + sorting: sortingValue, + pagination: paginationValue + }, + rowCount, + onSortingChange: handleChangeSorting, + onPaginationChange: handleChangePagination, + manualSorting: true, + manualPagination: true + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = () => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }; + + useEffect(() => { + if (!loading && data?.meta.totalCount) setRowCount(data.meta.totalCount); + }, [loading, data?.meta.totalCount]); + + return { + table, + getStatus, + error: fetchError + }; +}; diff --git a/src/components/features/reversible-transaction-details/reversible-transaction-information/ReversibleTransactionInformation.tsx b/src/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx similarity index 72% rename from src/components/features/reversible-transaction-details/reversible-transaction-information/ReversibleTransactionInformation.tsx rename to src/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx index 04d59cd..267d8f9 100644 --- a/src/components/features/reversible-transaction-details/reversible-transaction-information/ReversibleTransactionInformation.tsx +++ b/src/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx @@ -5,32 +5,31 @@ import useApiClient from '@/api'; import { DataList } from '@/components/ui/composites/data-list/DataList'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; -import { TransactionStatus } from '@/components/ui/transaction-status'; import { RESOURCES } from '@/constants/resources'; -import type { ReversibleTransactionResponse } from '@/schemas'; +import type { ScheduledReversibleTransactionResponse } from '@/schemas'; import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; -export interface ReversibleTransactionInformationProps { - hash: string; +export interface ScheduledReversibleTransactionInformationProps { + txId: string; } -type ReversibleTransaction = - ReversibleTransactionResponse['reversibleTransactions'][0]; +type ScheduledReversibleTransaction = + ScheduledReversibleTransactionResponse['scheduledReversibleTransactions'][0]; -export const ReversibleTransactionInformation: React.FC< - ReversibleTransactionInformationProps -> = ({ hash }) => { +export const ScheduledReversibleTransactionInformation: React.FC< + ScheduledReversibleTransactionInformationProps +> = ({ txId }) => { const api = useApiClient(); - const { data, loading } = api.reversibleTransactions - .getByHash() - .useQuery(hash); + const { data, loading } = api.scheduledReversibleTransactions + .getByTxId() + .useQuery(txId); - if (!loading && (!data || data.reversibleTransactions.length !== 1)) + if (!loading && (!data || data.scheduledReversibleTransactions.length !== 1)) throw notFound(); - const tx = data?.reversibleTransactions[0]; + const tx = data?.scheduledReversibleTransactions[0]; - const information: Partial[] = [ + const information: Partial[] = [ { txId: tx?.txId, amount: tx?.amount, @@ -40,13 +39,12 @@ export const ReversibleTransactionInformation: React.FC< scheduledAt: tx?.scheduledAt, from: tx?.from, to: tx?.to, - fee: tx?.fee, - status: tx?.status + fee: tx?.fee } ]; return ( - > + > loading={loading} data={information} fields={[ @@ -114,15 +112,6 @@ export const ReversibleTransactionInformation: React.FC< label: 'Fee', key: 'fee', render: (value) => formatMonetaryValue(value) - }, - { - label: 'Status', - key: 'status', - render: (value) => ( - - ) } ]} /> diff --git a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transaction-heading/ScheduledReversibleTransactionHeading.tsx b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transaction-heading/ScheduledReversibleTransactionHeading.tsx new file mode 100644 index 0000000..12b4e20 --- /dev/null +++ b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transaction-heading/ScheduledReversibleTransactionHeading.tsx @@ -0,0 +1,36 @@ +import { Link, useSearch } from '@tanstack/react-router'; +import * as React from 'react'; + +export interface ScheduledReversibleTransactionHeadingProps {} + +export const ScheduledReversibleTransactionHeading: React.FC< + ScheduledReversibleTransactionHeadingProps +> = () => { + const { accountId, block } = useSearch({ + strict: false + }) as any; + + return ( +
+

Scheduled Reversible Transactions

+ + {block && ( +
+ In block + + {block} + +
+ )} + + {accountId && ( +
+ By + + {accountId} + +
+ )} +
+ ); +}; diff --git a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-stats/ScheduledReversibleTransactionsStats.tsx b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-stats/ScheduledReversibleTransactionsStats.tsx new file mode 100644 index 0000000..59894df --- /dev/null +++ b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-stats/ScheduledReversibleTransactionsStats.tsx @@ -0,0 +1,57 @@ +import { useSearch } from '@tanstack/react-router'; +import React from 'react'; + +import useApiClient from '@/api'; +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Skeleton } from '@/components/ui/skeleton'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; + +export interface ScheduledReversibleTransactionsStatsProps {} + +export const ScheduledReversibleTransactionsStats: React.FC< + ScheduledReversibleTransactionsStatsProps +> = () => { + const api = useApiClient(); + const { accountId, block } = useSearch({ + strict: false + }) as any; + + if (accountId || block) return null; + + const { loading, data, error } = + api.scheduledReversibleTransactions.useGetStats({ + pollInterval: DATA_POOL_INTERVAL + }); + + const success = !loading && !error; + + return ( +
+ + + +

Total Scheduled Transactions

+
+
+ + {success &&

{data?.allTime.totalCount}

} + {loading && } + {error &&

Error: {error.message}

} +
+
+ + + + +

Recent Scheduled Transactions (24H)

+
+
+ + {success &&

{data?.last24Hour.totalCount}

} + {loading && } + {error &&

Error: {error.message}

} +
+
+
+ ); +}; diff --git a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx new file mode 100644 index 0000000..373479a --- /dev/null +++ b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx @@ -0,0 +1,20 @@ +import React from 'react'; + +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; + +import { useScheduledReversibleTransactionsTable } from './hook'; + +export const ScheduledReversibleTransactionsTable = () => { + const { getStatus, table, error } = useScheduledReversibleTransactionsTable(); + + return ( + Error: {error && error.message}

+ }} + withControls + /> + ); +}; diff --git a/src/components/features/reversible-transaction-listing/reversible-transactions-table/hook.tsx b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/hook.tsx similarity index 77% rename from src/components/features/reversible-transaction-listing/reversible-transactions-table/hook.tsx rename to src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/hook.tsx index 7ed0946..5b229aa 100644 --- a/src/components/features/reversible-transaction-listing/reversible-transactions-table/hook.tsx +++ b/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/hook.tsx @@ -9,15 +9,15 @@ import { parseAsInteger, parseAsStringLiteral, useQueryState } from 'nuqs'; import { useEffect, useMemo, useState } from 'react'; import useApiClient from '@/api'; -import { REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/REVERSIBLE_TRANSACTION_COLUMNS'; +import { SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import type { ReversibleTransactionSorts } from '@/constants/query-sorts'; -import { REVERSIBLE_TRANSACTION_SORTS_LITERALS } from '@/constants/query-sorts'; -import type { ReversibleTransaction } from '@/schemas'; +import type { ScheduledReversibleTransactionSorts } from '@/constants/query-sorts'; +import { SCHEDULED_REVERSIBLE_TRANSACTION_SORTS_LITERALS } from '@/constants/query-sorts'; +import type { ScheduledReversibleTransaction } from '@/schemas'; import { transformSortLiteral } from '@/utils/transform-sort'; -export const useReversibleTransactionsTable = () => { +export const useScheduledReversibleTransactionsTable = () => { const api = useApiClient(); const { accountId, block } = useSearch({ strict: false @@ -30,7 +30,7 @@ export const useReversibleTransactionsTable = () => { ); const [sortBy, setSortBy] = useQueryState( 'sortBy', - parseAsStringLiteral(REVERSIBLE_TRANSACTION_SORTS_LITERALS) + parseAsStringLiteral(SCHEDULED_REVERSIBLE_TRANSACTION_SORTS_LITERALS) ); const currentPageIndex = page - 1; @@ -49,7 +49,8 @@ export const useReversibleTransactionsTable = () => { const key = newValue[0].id; const order = newValue[0].desc ? 'DESC' : 'ASC'; - const newSortBy = `${key}_${order}` as ReversibleTransactionSorts; + const newSortBy = + `${key}_${order}` as ScheduledReversibleTransactionSorts; setSortBy(newSortBy); } else { @@ -59,7 +60,8 @@ export const useReversibleTransactionsTable = () => { const key = sorting[0].id; const order = sorting[0].desc ? 'DESC' : 'ASC'; - const newSortBy = `${key}_${order}` as ReversibleTransactionSorts; + const newSortBy = + `${key}_${order}` as ScheduledReversibleTransactionSorts; setSortBy(newSortBy); } @@ -81,7 +83,7 @@ export const useReversibleTransactionsTable = () => { loading, data, error: fetchError - } = api.reversibleTransactions.useGetAll({ + } = api.scheduledReversibleTransactions.useGetAll({ pollInterval: DATA_POOL_INTERVAL, variables: { orderBy: sortBy, @@ -100,15 +102,12 @@ export const useReversibleTransactionsTable = () => { } }); - const reversibleTransactionColumns = useMemo( - () => REVERSIBLE_TRANSACTION_COLUMNS, - [] - ); + const columns = useMemo(() => SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS, []); const [rowCount, setRowCount] = useState(data?.meta.totalCount ?? 0); - const table = useReactTable({ - data: data?.reversibleTransactions ?? [], - columns: reversibleTransactionColumns, + const table = useReactTable({ + data: data?.scheduledReversibleTransactions ?? [], + columns, getCoreRowModel: getCoreRowModel(), state: { sorting: sortingValue, From 6a9c5a462263eb74f83bd59e04e328f78f515475 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 14:29:58 +0800 Subject: [PATCH 08/12] wip: adding new pages --- src/api/search.tsx | 2 + ...ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 22 ++++++++++- .../BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 22 ++++++++++- .../search-preview/SearchPreview.tsx | 19 ++++++++- src/config/site-navigations.ts | 16 ++++++-- src/constants/resources.ts | 1 - .../$txId.tsx | 28 +++++++++++++ .../index.tsx | 25 ++++++++++++ .../$txId.tsx | 28 +++++++++++++ .../index.tsx | 25 ++++++++++++ src/routes/reversible-transactions/$hash.tsx | 26 ------------- src/routes/reversible-transactions/index.tsx | 25 ------------ .../$txId.tsx | 28 +++++++++++++ .../index.tsx | 25 ++++++++++++ src/schemas/reversible-transaction.ts | 39 +++++++++++++++++++ src/schemas/searchs.ts | 5 ++- 16 files changed, 277 insertions(+), 59 deletions(-) create mode 100644 src/routes/cancelled-reversible-transactions/$txId.tsx create mode 100644 src/routes/cancelled-reversible-transactions/index.tsx create mode 100644 src/routes/executed-reversible-transactions/$txId.tsx create mode 100644 src/routes/executed-reversible-transactions/index.tsx delete mode 100644 src/routes/reversible-transactions/$hash.tsx delete mode 100644 src/routes/reversible-transactions/index.tsx create mode 100644 src/routes/scheduled-reversible-transactions/$txId.tsx create mode 100644 src/routes/scheduled-reversible-transactions/index.tsx create mode 100644 src/schemas/reversible-transaction.ts diff --git a/src/api/search.tsx b/src/api/search.tsx index 47552a2..76e4e1c 100644 --- a/src/api/search.tsx +++ b/src/api/search.tsx @@ -21,6 +21,8 @@ export const search = (fetcher: DataFetcher) => ({ where: { extrinsicHash_startsWith: $keyword } ) { extrinsicHash + status + txId } accounts(limit: $limit, where: { id_startsWith: $keyword }) { id diff --git a/src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx index 7e762e9..4267874 100644 --- a/src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -1,5 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table'; +import { ReversibleTransferStatus } from '@/__generated__/graphql'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { TransactionStatus } from '@/components/ui/transaction-status'; @@ -9,13 +10,32 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); +const getReversibleTransactionHref = ( + status: ReversibleTransferStatus, + txId: string +) => { + switch (status) { + case ReversibleTransferStatus.Scheduled: + return `${RESOURCES.scheduledReversibleTransactions}/${txId}`; + case ReversibleTransferStatus.Executed: + return `${RESOURCES.executedReversibleTransactions}/${txId}`; + case ReversibleTransferStatus.Cancelled: + return `${RESOURCES.cancelledReversibleTransactions}/${txId}`; + default: + return '#'; + } +}; + export const ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS = [ columnHelper.accessor('node.extrinsicHash', { id: 'tx-hash', header: 'Hash', cell: (props) => ( diff --git a/src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx index 4aa6d0d..11fba59 100644 --- a/src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -1,5 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table'; +import { ReversibleTransferStatus } from '@/__generated__/graphql'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { TransactionStatus } from '@/components/ui/transaction-status'; @@ -9,13 +10,32 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); +const getReversibleTransactionHref = ( + status: ReversibleTransferStatus, + txId: string +) => { + switch (status) { + case ReversibleTransferStatus.Scheduled: + return `${RESOURCES.scheduledReversibleTransactions}/${txId}`; + case ReversibleTransferStatus.Executed: + return `${RESOURCES.executedReversibleTransactions}/${txId}`; + case ReversibleTransferStatus.Cancelled: + return `${RESOURCES.cancelledReversibleTransactions}/${txId}`; + default: + return '#'; + } +}; + export const BLOCK_REVERSIBLE_TRANSACTION_COLUMNS = [ columnHelper.accessor('node.extrinsicHash', { id: 'tx-hash', header: 'Hash', cell: (props) => ( diff --git a/src/components/ui/composites/search-preview/SearchPreview.tsx b/src/components/ui/composites/search-preview/SearchPreview.tsx index 2755007..56df0a3 100644 --- a/src/components/ui/composites/search-preview/SearchPreview.tsx +++ b/src/components/ui/composites/search-preview/SearchPreview.tsx @@ -2,6 +2,7 @@ import { Link } from '@tanstack/react-router'; import type { HTMLAttributes } from 'react'; import React, { forwardRef } from 'react'; +import { ReversibleTransferStatus } from '@/__generated__/graphql'; import { Skeleton } from '@/components/ui/skeleton'; import { RESOURCES } from '@/constants/resources'; import type { SearchAllResponse } from '@/schemas/searchs'; @@ -36,6 +37,22 @@ function PreviewLink({ ); } +const getReversibleTransactionHref = ( + status: ReversibleTransferStatus, + txId: string +) => { + switch (status) { + case ReversibleTransferStatus.Scheduled: + return `${RESOURCES.scheduledReversibleTransactions}/${txId}`; + case ReversibleTransferStatus.Executed: + return `${RESOURCES.executedReversibleTransactions}/${txId}`; + case ReversibleTransferStatus.Cancelled: + return `${RESOURCES.cancelledReversibleTransactions}/${txId}`; + default: + return '#'; + } +}; + interface SectionProps { title: string; loading: boolean; @@ -143,7 +160,7 @@ export const SearchPreview = forwardRef( items: reversibleTransactions, renderItem: (tx: any) => ( diff --git a/src/config/site-navigations.ts b/src/config/site-navigations.ts index 22875a6..8232081 100644 --- a/src/config/site-navigations.ts +++ b/src/config/site-navigations.ts @@ -20,9 +20,19 @@ export const SITE_NAVIGATIONS: (SiteNavigation | ParentNavigation)[] = [ longLabel: 'Immediate Transactions' }, { - label: 'Reversible Transactions', - path: '/reversible-transactions', - longLabel: 'Reversible Transactions' + label: 'Scheduled Reversible', + path: '/scheduled-reversible-transactions', + longLabel: 'Scheduled Reversible Transactions' + }, + { + label: 'Executed Reversible', + path: '/executed-reversible-transactions', + longLabel: 'Executed Reversible Transactions' + }, + { + label: 'Cancelled Reversible', + path: '/cancelled-reversible-transactions', + longLabel: 'Cancelled Reversible Transactions' } ] }, diff --git a/src/constants/resources.ts b/src/constants/resources.ts index 917aa8b..80fde4f 100644 --- a/src/constants/resources.ts +++ b/src/constants/resources.ts @@ -1,6 +1,5 @@ export const RESOURCES = { transactions: '/immediate-transactions', - reversibleTransactions: '/reversible-transactions', scheduledReversibleTransactions: '/scheduled-reversible-transactions', executedReversibleTransactions: '/executed-reversible-transactions', cancelledReversibleTransactions: '/cancelled-reversible-transactions', diff --git a/src/routes/cancelled-reversible-transactions/$txId.tsx b/src/routes/cancelled-reversible-transactions/$txId.tsx new file mode 100644 index 0000000..a84559c --- /dev/null +++ b/src/routes/cancelled-reversible-transactions/$txId.tsx @@ -0,0 +1,28 @@ +import { createFileRoute } from '@tanstack/react-router'; +import * as React from 'react'; + +import { CancelledReversibleTransactionInformation } from '@/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; + +export const Route = createFileRoute( + '/cancelled-reversible-transactions/$txId' +)({ + component: CancelledReversibleTransactionDetails +}); + +function CancelledReversibleTransactionDetails() { + const { txId } = Route.useParams(); + + return ( + + +

Cancelled Reversible Transaction Details

+ + +
+
+ ); +} + +export default CancelledReversibleTransactionDetails; diff --git a/src/routes/cancelled-reversible-transactions/index.tsx b/src/routes/cancelled-reversible-transactions/index.tsx new file mode 100644 index 0000000..fa88849 --- /dev/null +++ b/src/routes/cancelled-reversible-transactions/index.tsx @@ -0,0 +1,25 @@ +import { createFileRoute } from '@tanstack/react-router'; + +import { CancelledReversibleTransactionHeading } from '@/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transaction-heading/CancelledReversibleTransactionHeading'; +import { CancelledReversibleTransactionsStats } from '@/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-stats/CancelledReversibleTransactionsStats'; +import { CancelledReversibleTransactionsTable } from '@/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; + +export const Route = createFileRoute('/cancelled-reversible-transactions/')({ + component: CancelledReversibleTransactions +}); + +function CancelledReversibleTransactions() { + return ( + + + + + + + + + + ); +} diff --git a/src/routes/executed-reversible-transactions/$txId.tsx b/src/routes/executed-reversible-transactions/$txId.tsx new file mode 100644 index 0000000..fc3f9d6 --- /dev/null +++ b/src/routes/executed-reversible-transactions/$txId.tsx @@ -0,0 +1,28 @@ +import { createFileRoute } from '@tanstack/react-router'; +import * as React from 'react'; + +import { ExecutedReversibleTransactionInformation } from '@/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; + +export const Route = createFileRoute('/executed-reversible-transactions/$txId')( + { + component: ExecutedReversibleTransactionDetails + } +); + +function ExecutedReversibleTransactionDetails() { + const { txId } = Route.useParams(); + + return ( + + +

Executed Reversible Transaction Details

+ + +
+
+ ); +} + +export default ExecutedReversibleTransactionDetails; diff --git a/src/routes/executed-reversible-transactions/index.tsx b/src/routes/executed-reversible-transactions/index.tsx new file mode 100644 index 0000000..cc0bcdb --- /dev/null +++ b/src/routes/executed-reversible-transactions/index.tsx @@ -0,0 +1,25 @@ +import { createFileRoute } from '@tanstack/react-router'; + +import { ExecutedReversibleTransactionHeading } from '@/components/features/executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading'; +import { ExecutedReversibleTransactionsStats } from '@/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats'; +import { ExecutedReversibleTransactionsTable } from '@/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; + +export const Route = createFileRoute('/executed-reversible-transactions/')({ + component: ExecutedReversibleTransactions +}); + +function ExecutedReversibleTransactions() { + return ( + + + + + + + + + + ); +} diff --git a/src/routes/reversible-transactions/$hash.tsx b/src/routes/reversible-transactions/$hash.tsx deleted file mode 100644 index d5c2227..0000000 --- a/src/routes/reversible-transactions/$hash.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router'; -import * as React from 'react'; - -import { ReversibleTransactionInformation } from '@/components/features/reversible-transaction-details/reversible-transaction-information/ReversibleTransactionInformation'; -import { ContentContainer } from '@/components/ui/content-container'; -import { SectionContainer } from '@/components/ui/section-container'; - -export const Route = createFileRoute('/reversible-transactions/$hash')({ - component: ReversibleTransactionDetails -}); - -function ReversibleTransactionDetails() { - const { hash } = Route.useParams(); - - return ( - - -

Reversible Transaction Details

- - -
-
- ); -} - -export default ReversibleTransactionDetails; diff --git a/src/routes/reversible-transactions/index.tsx b/src/routes/reversible-transactions/index.tsx deleted file mode 100644 index 7a27648..0000000 --- a/src/routes/reversible-transactions/index.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router'; - -import { ReversibleTransactionHeading } from '@/components/features/reversible-transaction-listing/reversible-transaction-heading/ReversibleTransactionHeading'; -import { ReversibleTransactionsStats } from '@/components/features/reversible-transaction-listing/reversible-transactions-stats/ReversibleTransactionsStats'; -import { ReversibleTransactionsTable } from '@/components/features/reversible-transaction-listing/reversible-transactions-table/ReversibleTransactionsTable'; -import { ContentContainer } from '@/components/ui/content-container'; -import { SectionContainer } from '@/components/ui/section-container'; - -export const Route = createFileRoute('/reversible-transactions/')({ - component: ReversibleTransactions -}); - -function ReversibleTransactions() { - return ( - - - - - - - - - - ); -} diff --git a/src/routes/scheduled-reversible-transactions/$txId.tsx b/src/routes/scheduled-reversible-transactions/$txId.tsx new file mode 100644 index 0000000..2870930 --- /dev/null +++ b/src/routes/scheduled-reversible-transactions/$txId.tsx @@ -0,0 +1,28 @@ +import { createFileRoute } from '@tanstack/react-router'; +import * as React from 'react'; + +import { ScheduledReversibleTransactionInformation } from '@/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; + +export const Route = createFileRoute( + '/scheduled-reversible-transactions/$txId' +)({ + component: ScheduledReversibleTransactionDetails +}); + +function ScheduledReversibleTransactionDetails() { + const { txId } = Route.useParams(); + + return ( + + +

Scheduled Reversible Transaction Details

+ + +
+
+ ); +} + +export default ScheduledReversibleTransactionDetails; diff --git a/src/routes/scheduled-reversible-transactions/index.tsx b/src/routes/scheduled-reversible-transactions/index.tsx new file mode 100644 index 0000000..1aacfcb --- /dev/null +++ b/src/routes/scheduled-reversible-transactions/index.tsx @@ -0,0 +1,25 @@ +import { createFileRoute } from '@tanstack/react-router'; + +import { ScheduledReversibleTransactionHeading } from '@/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transaction-heading/ScheduledReversibleTransactionHeading'; +import { ScheduledReversibleTransactionsStats } from '@/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-stats/ScheduledReversibleTransactionsStats'; +import { ScheduledReversibleTransactionsTable } from '@/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; + +export const Route = createFileRoute('/scheduled-reversible-transactions/')({ + component: ScheduledReversibleTransactions +}); + +function ScheduledReversibleTransactions() { + return ( + + + + + + + + + + ); +} diff --git a/src/schemas/reversible-transaction.ts b/src/schemas/reversible-transaction.ts new file mode 100644 index 0000000..43f34c2 --- /dev/null +++ b/src/schemas/reversible-transaction.ts @@ -0,0 +1,39 @@ +import type * as gql from '../__generated__/graphql'; + +export interface ReversibleTransaction + extends Omit< + gql.ReversibleTransfer, + 'id' | 'to' | 'from' | 'block' | 'event' + > { + to: Pick; + from: Pick; + block: Pick; +} + +export interface ReversibleTransactionResponse { + reversibleTransactions: [ReversibleTransaction]; +} + +export interface ReversibleTransactionStatusResponse { + reversibleTransactions: [Pick]; +} + +export interface ReversibleTransactionListResponse { + reversibleTransactions: ReversibleTransaction[]; + meta: { + totalCount: number; + }; +} + +export interface RecentReversibleTransactionsResponse { + reversibleTransactions: ReversibleTransaction[]; +} + +export interface ReversibleTransactionsStatsResponse { + allTime: { + totalCount: number; + }; + last24Hour: { + totalCount: number; + }; +} diff --git a/src/schemas/searchs.ts b/src/schemas/searchs.ts index 68e75b5..b87bc99 100644 --- a/src/schemas/searchs.ts +++ b/src/schemas/searchs.ts @@ -8,7 +8,10 @@ import type { Transaction } from './transcation'; export interface SearchAllResponse { transactions: Pick[]; - reversibleTransactions: Pick[]; + reversibleTransactions: Pick< + ReversibleTransaction, + 'extrinsicHash' | 'status' | 'txId' + >[]; accounts: Pick[]; blocks: Pick[]; highSecuritySets: Pick[]; From 451aaa88a56a4768baa47afeef90db08d343c936 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 14:48:41 +0800 Subject: [PATCH 09/12] wip: update all related UI --- src/api/accounts.tsx | 89 +++++++++- src/api/blocks.tsx | 84 ++++++++- src/api/chain-status.tsx | 14 +- src/api/search.tsx | 15 +- ...ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 99 ----------- .../BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 99 ----------- .../table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx | 132 +++++++------- ...AccountCancelledReversibleTransactions.tsx | 50 ++++++ .../hook.tsx | 50 ++++++ .../account-data-tabs/AccountDataTabs.tsx | 24 ++- ...AccountExecutedReversibleTransactions.tsx} | 19 +- .../hook.tsx | 19 +- .../AccountInformation.tsx | 27 ++- ...AccountScheduledReversibleTransactions.tsx | 50 ++++++ .../hook.tsx | 55 ++++++ .../BlockCancelledReversibleTransactions.tsx | 48 +++++ .../hook.tsx | 47 +++++ .../block-data-tabs/BlockDataTabs.tsx | 18 +- .../BlockExecutedReversibleTransactions.tsx} | 18 +- .../hook.tsx | 19 +- .../block-information/BlockInformation.tsx | 31 +++- .../BlockScheduledReversibleTransactions.tsx | 48 +++++ .../hook.tsx | 53 ++++++ .../landing/hero/chain-stats/ChainStats.tsx | 4 +- .../search-preview/SearchPreview.tsx | 57 +++--- src/routeTree.gen.ts | 166 ++++++++++++++---- src/schemas/account.ts | 30 +++- src/schemas/blocks.ts | 30 +++- src/schemas/chain-status.ts | 8 +- src/schemas/reversible-transaction.ts | 39 ---- src/schemas/searchs.ts | 17 +- 31 files changed, 1019 insertions(+), 440 deletions(-) delete mode 100644 src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx delete mode 100644 src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx create mode 100644 src/components/features/account-details/account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions.tsx create mode 100644 src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx rename src/components/features/account-details/{account-reversible-transactions/AccountReversibleTransactions.tsx => account-executed-reversible-transactions/AccountExecutedReversibleTransactions.tsx} (60%) rename src/components/features/account-details/{account-reversible-transactions => account-executed-reversible-transactions}/hook.tsx (59%) create mode 100644 src/components/features/account-details/account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions.tsx create mode 100644 src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx create mode 100644 src/components/features/block-details/block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions.tsx create mode 100644 src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx rename src/components/features/block-details/{block-reversible-transactions/BlockReversibleTransactions.tsx => block-executed-reversible-transactions/BlockExecutedReversibleTransactions.tsx} (63%) rename src/components/features/block-details/{block-reversible-transactions => block-executed-reversible-transactions}/hook.tsx (53%) create mode 100644 src/components/features/block-details/block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions.tsx create mode 100644 src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx delete mode 100644 src/schemas/reversible-transaction.ts diff --git a/src/api/accounts.tsx b/src/api/accounts.tsx index 01cc229..6aa368b 100644 --- a/src/api/accounts.tsx +++ b/src/api/accounts.tsx @@ -88,7 +88,7 @@ export const accounts = { totalCount } - reversibleTransactions: reversibleTransfersConnection( + scheduledReversibleTransactions: scheduledReversibleTransfersConnection( orderBy: timestamp_DESC first: $limit where: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } } @@ -96,9 +96,11 @@ export const accounts = { edges { node { extrinsicHash - timestamp - status amount + timestamp + scheduledAt + txId + fee block { height } @@ -110,7 +112,86 @@ export const accounts = { } } } - + totalCount + } + executedReversibleTransactions: executedReversibleTransfersConnection( + orderBy: timestamp_DESC + first: $limit + where: { + scheduledTransfer: { + from: { id_eq: $id } + OR: { to: { id_eq: $id } } + } + } + ) { + edges { + node { + timestamp + txId + block { + height + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } + totalCount + } + cancelledReversibleTransactions: cancelledReversibleTransfersConnection( + orderBy: timestamp_DESC + first: $limit + where: { + scheduledTransfer: { + from: { id_eq: $id } + OR: { to: { id_eq: $id } } + } + OR: { cancelledBy: { id_eq: $id } } + } + ) { + edges { + node { + timestamp + txId + block { + height + } + cancelledBy { + id + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } totalCount } minerRewards: minerRewardsConnection( diff --git a/src/api/blocks.tsx b/src/api/blocks.tsx index 8801666..83d2631 100644 --- a/src/api/blocks.tsx +++ b/src/api/blocks.tsx @@ -139,7 +139,7 @@ export const blocks = { totalCount } - reversibleTransactions: reversibleTransfersConnection( + scheduledReversibleTransactions: scheduledReversibleTransfersConnection( orderBy: timestamp_DESC first: $limit where: { @@ -150,9 +150,11 @@ export const blocks = { edges { node { extrinsicHash - timestamp - status amount + timestamp + scheduledAt + txId + fee block { height } @@ -164,7 +166,81 @@ export const blocks = { } } } - + totalCount + } + executedReversibleTransactions: executedReversibleTransfersConnection( + orderBy: timestamp_DESC + first: $limit + where: { + block: { height_eq: $height } + OR: { block: { hash_eq: $hash } } + } + ) { + edges { + node { + timestamp + txId + block { + height + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } + totalCount + } + cancelledReversibleTransactions: cancelledReversibleTransfersConnection( + orderBy: timestamp_DESC + first: $limit + where: { + block: { height_eq: $height } + OR: { block: { hash_eq: $hash } } + } + ) { + edges { + node { + timestamp + txId + block { + height + } + cancelledBy { + id + } + scheduledTransfer { + extrinsicHash + amount + timestamp + scheduledAt + txId + fee + block { + height + } + from { + id + } + to { + id + } + } + } + } totalCount } highSecuritySets: highSecuritySetsConnection( diff --git a/src/api/chain-status.tsx b/src/api/chain-status.tsx index a51eb97..e676637 100644 --- a/src/api/chain-status.tsx +++ b/src/api/chain-status.tsx @@ -23,7 +23,19 @@ export const chainStatus = { ) { totalCount } - reversibleTransactions: reversibleTransfersConnection(orderBy: id_ASC) { + scheduledReversibleTransactions: scheduledReversibleTransfersConnection( + orderBy: id_ASC + ) { + totalCount + } + executedReversibleTransactions: executedReversibleTransfersConnection( + orderBy: id_ASC + ) { + totalCount + } + cancelledReversibleTransactions: cancelledReversibleTransfersConnection( + orderBy: id_ASC + ) { totalCount } status: squidStatus { diff --git a/src/api/search.tsx b/src/api/search.tsx index 76e4e1c..75dc8be 100644 --- a/src/api/search.tsx +++ b/src/api/search.tsx @@ -16,12 +16,23 @@ export const search = (fetcher: DataFetcher) => ({ ) { extrinsicHash } - reversibleTransactions: reversibleTransfers( + scheduledReversibleTransactions: scheduledReversibleTransfers( limit: $limit where: { extrinsicHash_startsWith: $keyword } ) { extrinsicHash - status + txId + } + executedReversibleTransactions: executedReversibleTransfers( + limit: $limit + where: { txId_startsWith: $keyword } + ) { + txId + } + cancelledReversibleTransactions: cancelledReversibleTransfers( + limit: $limit + where: { txId_startsWith: $keyword } + ) { txId } accounts(limit: $limit, where: { id_startsWith: $keyword }) { diff --git a/src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx deleted file mode 100644 index 4267874..0000000 --- a/src/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { createColumnHelper } from '@tanstack/react-table'; - -import { ReversibleTransferStatus } from '@/__generated__/graphql'; -import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; -import { TimestampDisplay } from '@/components/ui/timestamp-display'; -import { TransactionStatus } from '@/components/ui/transaction-status'; -import { RESOURCES } from '@/constants/resources'; -import type { AccountReversibleTransaction } from '@/schemas'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; - -const columnHelper = createColumnHelper(); - -const getReversibleTransactionHref = ( - status: ReversibleTransferStatus, - txId: string -) => { - switch (status) { - case ReversibleTransferStatus.Scheduled: - return `${RESOURCES.scheduledReversibleTransactions}/${txId}`; - case ReversibleTransferStatus.Executed: - return `${RESOURCES.executedReversibleTransactions}/${txId}`; - case ReversibleTransferStatus.Cancelled: - return `${RESOURCES.cancelledReversibleTransactions}/${txId}`; - default: - return '#'; - } -}; - -export const ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS = [ - columnHelper.accessor('node.extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('node.block.height', { - id: 'blockNumber', - header: 'Block', - cell: (props) => ( - - ), - enableSorting: true - }), - columnHelper.accessor('node.timestamp', { - id: 'timestamp', - header: 'Timestamp', - cell: (props) => , - enableSorting: true - }), - columnHelper.accessor('node.from.id', { - id: 'from', - header: 'From', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('node.to.id', { - id: 'to', - header: 'To', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('node.amount', { - id: 'amount', - header: 'Amount', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }), - columnHelper.accessor('node.status', { - id: 'status', - header: 'Status', - cell: (props) => , - enableSorting: true - }) -]; diff --git a/src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx deleted file mode 100644 index 11fba59..0000000 --- a/src/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { createColumnHelper } from '@tanstack/react-table'; - -import { ReversibleTransferStatus } from '@/__generated__/graphql'; -import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; -import { TimestampDisplay } from '@/components/ui/timestamp-display'; -import { TransactionStatus } from '@/components/ui/transaction-status'; -import { RESOURCES } from '@/constants/resources'; -import type { BlockReversibleTransaction } from '@/schemas'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; - -const columnHelper = createColumnHelper(); - -const getReversibleTransactionHref = ( - status: ReversibleTransferStatus, - txId: string -) => { - switch (status) { - case ReversibleTransferStatus.Scheduled: - return `${RESOURCES.scheduledReversibleTransactions}/${txId}`; - case ReversibleTransferStatus.Executed: - return `${RESOURCES.executedReversibleTransactions}/${txId}`; - case ReversibleTransferStatus.Cancelled: - return `${RESOURCES.cancelledReversibleTransactions}/${txId}`; - default: - return '#'; - } -}; - -export const BLOCK_REVERSIBLE_TRANSACTION_COLUMNS = [ - columnHelper.accessor('node.extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('node.block.height', { - id: 'blockNumber', - header: 'Block', - cell: (props) => ( - - ), - enableSorting: true - }), - columnHelper.accessor('node.timestamp', { - id: 'timestamp', - header: 'Timestamp', - cell: (props) => , - enableSorting: true - }), - columnHelper.accessor('node.from.id', { - id: 'from', - header: 'From', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('node.to.id', { - id: 'to', - header: 'To', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('node.amount', { - id: 'amount', - header: 'Amount', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }), - columnHelper.accessor('node.status', { - id: 'status', - header: 'Status', - cell: (props) => , - enableSorting: true - }) -]; diff --git a/src/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx b/src/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx index 210a405..e1dbccb 100644 --- a/src/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx +++ b/src/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx @@ -1,70 +1,70 @@ -import { createColumnHelper } from '@tanstack/react-table'; +// import { createColumnHelper } from '@tanstack/react-table'; -import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; -import { TimestampDisplay } from '@/components/ui/timestamp-display'; -import { RESOURCES } from '@/constants/resources'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; -import { PrivacyScoreBadge } from '@/components/features/wormhole/PrivacyScoreBadge'; -import type { WormholeExtrinsic } from '@/schemas/wormhole'; +// import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +// import { TimestampDisplay } from '@/components/ui/timestamp-display'; +// import { RESOURCES } from '@/constants/resources'; +// import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; +// import { PrivacyScoreBadge } from '@/components/features/wormhole/PrivacyScoreBadge'; +// import type { WormholeExtrinsic } from '@/schemas/wormhole'; -export type WormholeExtrinsicRow = WormholeExtrinsic; +// export type WormholeExtrinsicRow = WormholeExtrinsic; -const columnHelper = createColumnHelper(); +// const columnHelper = createColumnHelper(); -export const WORMHOLE_EXTRINSIC_COLUMNS = [ - columnHelper.accessor('extrinsicHash', { - id: 'extrinsic_hash', - header: 'Extrinsic', - cell: (props) => { - const hash = props.getValue(); - const id = props.row.original.id; - return ( - - ); - }, - enableSorting: false - }), - columnHelper.accessor('totalAmount', { - id: 'total_amount', - header: 'Total Amount', - cell: (props) => formatMonetaryValue(Number(props.getValue())), - enableSorting: true - }), - columnHelper.accessor('outputCount', { - id: 'output_count', - header: 'Outputs', - cell: (props) => props.getValue(), - enableSorting: false - }), - columnHelper.accessor('privacyScore', { - id: 'privacy_score', - header: 'Privacy', - cell: (props) => ( - - ), - enableSorting: true - }), - columnHelper.accessor('block.height', { - id: 'block_height', - header: 'Block', - cell: (props) => ( - - ), - enableSorting: true - }), - columnHelper.accessor('timestamp', { - id: 'timestamp', - header: 'Timestamp', - cell: (props) => , - enableSorting: true - }) -]; +// export const WORMHOLE_EXTRINSIC_COLUMNS = [ +// columnHelper.accessor('extrinsicHash', { +// id: 'extrinsic_hash', +// header: 'Extrinsic', +// cell: (props) => { +// const hash = props.getValue(); +// const id = props.row.original.id; +// return ( +// +// ); +// }, +// enableSorting: false +// }), +// columnHelper.accessor('totalAmount', { +// id: 'total_amount', +// header: 'Total Amount', +// cell: (props) => formatMonetaryValue(Number(props.getValue())), +// enableSorting: true +// }), +// columnHelper.accessor('outputCount', { +// id: 'output_count', +// header: 'Outputs', +// cell: (props) => props.getValue(), +// enableSorting: false +// }), +// columnHelper.accessor('privacyScore', { +// id: 'privacy_score', +// header: 'Privacy', +// cell: (props) => ( +// +// ), +// enableSorting: true +// }), +// columnHelper.accessor('block.height', { +// id: 'block_height', +// header: 'Block', +// cell: (props) => ( +// +// ), +// enableSorting: true +// }), +// columnHelper.accessor('timestamp', { +// id: 'timestamp', +// header: 'Timestamp', +// cell: (props) => , +// enableSorting: true +// }) +// ]; diff --git a/src/components/features/account-details/account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions.tsx b/src/components/features/account-details/account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions.tsx new file mode 100644 index 0000000..9d01730 --- /dev/null +++ b/src/components/features/account-details/account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions.tsx @@ -0,0 +1,50 @@ +import type { QueryResult } from '@apollo/client'; +import { Link } from '@tanstack/react-router'; +import type { FC } from 'react'; + +import { Button } from '@/components/ui/button'; +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; +import type { AccountResponse } from '@/schemas'; + +import { useAccountCancelledReversibleTransactions } from './hook'; + +interface Props { + query: QueryResult; + accountId: string; +} + +export const AccountCancelledReversibleTransactions: FC = ({ + query, + accountId +}) => { + const { getStatus, table, error } = + useAccountCancelledReversibleTransactions(query); + + return ( + +

Recent Cancelled Reversible Transactions

+ + Error : {error && error.message}

+ }} + /> + + {!query.loading && + query.data?.cancelledReversibleTransactions.totalCount !== 0 && ( + + )} +
+ ); +}; diff --git a/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx b/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx new file mode 100644 index 0000000..0f3f672 --- /dev/null +++ b/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx @@ -0,0 +1,50 @@ +import type { QueryResult } from '@apollo/client'; +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { useCallback, useMemo } from 'react'; + +import { CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS'; +import type { + AccountResponse, + CancelledReversibleTransaction +} from '@/schemas'; + +export const useAccountCancelledReversibleTransactions = ( + query: QueryResult +) => { + const { data, error: fetchError, loading } = query; + const columns = useMemo(() => CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS, []); + + const tableData = useMemo( + () => data?.cancelledReversibleTransactions?.edges.map((e) => e.node) ?? [], + [data?.cancelledReversibleTransactions?.edges] + ); + + const table = useReactTable({ + data: tableData, + columns, + getCoreRowModel: getCoreRowModel(), + enableSorting: false + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = useCallback(() => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }, [success, error, loading]); + + return { + table, + getStatus, + error + }; +}; diff --git a/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx b/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx index 9bb6e3d..f5d172d 100644 --- a/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx +++ b/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx @@ -15,9 +15,11 @@ import type { AccountResponse } from '@/schemas'; import { formatOption } from '@/utils/formatter'; import { AccountBeneficiaries } from '../account-beneficiaries/AccountBeneficiaries'; +import { AccountCancelledReversibleTransactions } from '../account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions'; +import { AccountExecutedReversibleTransactions } from '../account-executed-reversible-transactions/AccountExecutedReversibleTransactions'; import { AccountGuardian } from '../account-guardian/AccountGuardian'; import { AccountMinerRewards } from '../account-miner-rewards/AccountMinerRewards'; -import { AccountReversibleTransactions } from '../account-reversible-transactions/AccountReversibleTransactions'; +import { AccountScheduledReversibleTransactions } from '../account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions'; import { AccountTransactions } from '../account-transactions/AccountTransactions'; export interface AccountDataTabsProps { @@ -27,7 +29,9 @@ export interface AccountDataTabsProps { const TAB_OPTIONS = { immediate: 'immediate-transactions', - reversible: 'reversible-transactions', + scheduledReversible: 'scheduled-reversible-transactions', + executedReversible: 'executed-reversible-transactions', + cancelledReversible: 'cancelled-reversible-transactions', miners: 'miner-rewards', guardian: 'guardian', beneficiaries: 'beneficiaries' @@ -73,8 +77,20 @@ export const AccountDataTabs: React.FC = ({ - - + + + + + + + diff --git a/src/components/features/account-details/account-reversible-transactions/AccountReversibleTransactions.tsx b/src/components/features/account-details/account-executed-reversible-transactions/AccountExecutedReversibleTransactions.tsx similarity index 60% rename from src/components/features/account-details/account-reversible-transactions/AccountReversibleTransactions.tsx rename to src/components/features/account-details/account-executed-reversible-transactions/AccountExecutedReversibleTransactions.tsx index e0cb339..ce16a15 100644 --- a/src/components/features/account-details/account-reversible-transactions/AccountReversibleTransactions.tsx +++ b/src/components/features/account-details/account-executed-reversible-transactions/AccountExecutedReversibleTransactions.tsx @@ -5,24 +5,26 @@ import type { FC } from 'react'; import { Button } from '@/components/ui/button'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; import type { AccountResponse } from '@/schemas'; -import { useAccountReversibleTransactions } from './hook'; +import { useAccountExecutedReversibleTransactions } from './hook'; interface Props { query: QueryResult; accountId: string; } -export const AccountReversibleTransactions: FC = ({ +export const AccountExecutedReversibleTransactions: FC = ({ query, accountId }) => { - const { getStatus, table, error } = useAccountReversibleTransactions(query); + const { getStatus, table, error } = + useAccountExecutedReversibleTransactions(query); return ( -

Recent Reversible Transactions

+

Recent Executed Reversible Transactions

= ({ /> {!query.loading && - query.data?.reversibleTransactions.totalCount !== 0 && ( + query.data?.executedReversibleTransactions.totalCount !== 0 && ( )} diff --git a/src/components/features/account-details/account-reversible-transactions/hook.tsx b/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx similarity index 59% rename from src/components/features/account-details/account-reversible-transactions/hook.tsx rename to src/components/features/account-details/account-executed-reversible-transactions/hook.tsx index d617457..9caf35d 100644 --- a/src/components/features/account-details/account-reversible-transactions/hook.tsx +++ b/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx @@ -2,26 +2,23 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useCallback, useMemo } from 'react'; -import { ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS'; -import type { AccountResponse, AccountReversibleTransaction } from '@/schemas'; +import { EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS'; +import type { AccountResponse, ExecutedReversibleTransaction } from '@/schemas'; -export const useAccountReversibleTransactions = ( +export const useAccountExecutedReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const transactionColumns = useMemo( - () => ACCOUNT_REVERSIBLE_TRANSACTION_COLUMNS, - [] - ); + const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); const tableData = useMemo( - () => data?.reversibleTransactions?.edges ?? [], - [data?.reversibleTransactions?.edges] + () => data?.executedReversibleTransactions?.edges.map((e) => e.node) ?? [], + [data?.executedReversibleTransactions?.edges] ); - const table = useReactTable({ + const table = useReactTable({ data: tableData, - columns: transactionColumns, + columns, getCoreRowModel: getCoreRowModel(), enableSorting: false }); diff --git a/src/components/features/account-details/account-information/AccountInformation.tsx b/src/components/features/account-details/account-information/AccountInformation.tsx index 26cf912..b75bfb5 100644 --- a/src/components/features/account-details/account-information/AccountInformation.tsx +++ b/src/components/features/account-details/account-information/AccountInformation.tsx @@ -26,7 +26,12 @@ export const AccountInformation: React.FC = ({ accountId ); const transactions = data?.transactions.totalCount; - const reversibleTransactions = data?.reversibleTransactions.totalCount; + const scheduledReversibleTransactions = + data?.scheduledReversibleTransactions.totalCount; + const executedReversibleTransactions = + data?.executedReversibleTransactions.totalCount; + const cancelledReversibleTransactions = + data?.cancelledReversibleTransactions.totalCount; const miningRewards = data?.minerRewards.totalCount; const beneficiaries = data?.beneficiaries.totalCount; const guardians = data?.guardian.totalCount; @@ -38,7 +43,9 @@ export const AccountInformation: React.FC = ({ frozen: account?.frozen ?? 0, reserved: account?.reserved ?? 0, transactions, - reversibleTransactions, + scheduledReversibleTransactions, + executedReversibleTransactions, + cancelledReversibleTransactions, miningRewards, checksum, isHighSecurity: guardians && guardians > 0, @@ -109,8 +116,20 @@ export const AccountInformation: React.FC = ({ value > 1 ? `${value} transactions` : `${value} transaction` }, { - label: 'Reversible Transactions', - key: 'reversibleTransactions', + label: 'Scheduled Reversible Transactions', + key: 'scheduledReversibleTransactions', + render: (value) => + value > 1 ? `${value} transactions` : `${value} transaction` + }, + { + label: 'Executed Reversible Transactions', + key: 'executedReversibleTransactions', + render: (value) => + value > 1 ? `${value} transactions` : `${value} transaction` + }, + { + label: 'Cancelled Reversible Transactions', + key: 'cancelledReversibleTransactions', render: (value) => value > 1 ? `${value} transactions` : `${value} transaction` }, diff --git a/src/components/features/account-details/account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions.tsx b/src/components/features/account-details/account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions.tsx new file mode 100644 index 0000000..bcf7334 --- /dev/null +++ b/src/components/features/account-details/account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions.tsx @@ -0,0 +1,50 @@ +import type { QueryResult } from '@apollo/client'; +import { Link } from '@tanstack/react-router'; +import type { FC } from 'react'; + +import { Button } from '@/components/ui/button'; +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; +import type { AccountResponse } from '@/schemas'; + +import { useAccountScheduledReversibleTransactions } from './hook'; + +interface Props { + query: QueryResult; + accountId: string; +} + +export const AccountScheduledReversibleTransactions: FC = ({ + query, + accountId +}) => { + const { getStatus, table, error } = + useAccountScheduledReversibleTransactions(query); + + return ( + +

Recent Scheduled Reversible Transactions

+ + Error : {error && error.message}

+ }} + /> + + {!query.loading && + query.data?.scheduledReversibleTransactions.totalCount !== 0 && ( + + )} +
+ ); +}; diff --git a/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx b/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx new file mode 100644 index 0000000..9f1bf88 --- /dev/null +++ b/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx @@ -0,0 +1,55 @@ +import type { QueryResult } from '@apollo/client'; +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { useCallback, useMemo } from 'react'; + +import { SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS'; +import type { + AccountResponse, + ScheduledReversibleTransaction +} from '@/schemas'; + +export const useAccountScheduledReversibleTransactions = ( + query: QueryResult +) => { + const { data, error: fetchError, loading } = query; + const columns = useMemo(() => { + return SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.map((col) => ({ + ...col, + accessorKey: col.id === 'tx-hash' ? 'extrinsicHash' : col.id + })); + }, []); + + const tableData = useMemo( + () => data?.scheduledReversibleTransactions?.edges.map((e) => e.node) ?? [], + [data?.scheduledReversibleTransactions?.edges] + ); + + const table = useReactTable({ + data: tableData, + columns: columns as any, + getCoreRowModel: getCoreRowModel(), + enableSorting: false + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = useCallback(() => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }, [success, error, loading]); + + return { + table, + getStatus, + error + }; +}; diff --git a/src/components/features/block-details/block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions.tsx b/src/components/features/block-details/block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions.tsx new file mode 100644 index 0000000..464f478 --- /dev/null +++ b/src/components/features/block-details/block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions.tsx @@ -0,0 +1,48 @@ +import type { QueryResult } from '@apollo/client'; +import { Link } from '@tanstack/react-router'; +import React from 'react'; + +import { Button } from '@/components/ui/button'; +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; +import type { BlockResponse } from '@/schemas'; + +import { useBlockCancelledReversibleTransactions } from './hook'; + +interface Props { + query: QueryResult; +} + +export const BlockCancelledReversibleTransactions: React.FC = ({ + query +}) => { + const { getStatus, table, error } = + useBlockCancelledReversibleTransactions(query); + + return ( + +

Recent Cancelled Reversible Transactions

+ + Error: {error && error.message}

+ }} + /> + + {!query.loading && + query.data?.cancelledReversibleTransactions.totalCount !== 0 && ( + + )} +
+ ); +}; diff --git a/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx b/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx new file mode 100644 index 0000000..d98f354 --- /dev/null +++ b/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx @@ -0,0 +1,47 @@ +import type { QueryResult } from '@apollo/client'; +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { useMemo } from 'react'; + +import { CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS'; +import type { BlockResponse, CancelledReversibleTransaction } from '@/schemas'; + +export const useBlockCancelledReversibleTransactions = ( + query: QueryResult +) => { + const { data, error: fetchError, loading } = query; + const columns = useMemo(() => CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS, []); + + const tableData = useMemo( + () => data?.cancelledReversibleTransactions?.edges.map((e) => e.node) ?? [], + [data?.cancelledReversibleTransactions?.edges] + ); + + const table = useReactTable({ + data: tableData, + columns, + getCoreRowModel: getCoreRowModel(), + enableSorting: false + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = () => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }; + + return { + table, + getStatus, + error + }; +}; diff --git a/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx b/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx index c65b2e7..b542c36 100644 --- a/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx +++ b/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx @@ -14,9 +14,11 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import type { BlockResponse } from '@/schemas'; import { formatOption } from '@/utils/formatter'; +import { BlockCancelledReversibleTransactions } from '../block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions'; import { BlockErrorEvents } from '../block-error-events/BlockErrorEvents'; +import { BlockExecutedReversibleTransactions } from '../block-executed-reversible-transactions/BlockExecutedReversibleTransactions'; import { BlockHighSecuritySets } from '../block-high-security-sets/BlockHighSecuritySets'; -import { BlockReversibleTransactions } from '../block-reversible-transactions/BlockReversibleTransactions'; +import { BlockScheduledReversibleTransactions } from '../block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions'; import { BlockTransactions } from '../block-transactions/BlockTransactions'; export interface BlockDataTabsProps { @@ -25,7 +27,9 @@ export interface BlockDataTabsProps { const TAB_OPTIONS = { immediate: 'immediate-transactions', - reversible: 'reversible-transactions', + scheduledReversible: 'scheduled-reversible-transactions', + executedReversible: 'executed-reversible-transactions', + cancelledReversible: 'cancelled-reversible-transactions', highSecuritySets: 'high-security-sets', errorEvents: 'error-events' } as const; @@ -67,8 +71,14 @@ export const BlockDataTabs: React.FC = ({ query }) => { - - + + + + + + + + diff --git a/src/components/features/block-details/block-reversible-transactions/BlockReversibleTransactions.tsx b/src/components/features/block-details/block-executed-reversible-transactions/BlockExecutedReversibleTransactions.tsx similarity index 63% rename from src/components/features/block-details/block-reversible-transactions/BlockReversibleTransactions.tsx rename to src/components/features/block-details/block-executed-reversible-transactions/BlockExecutedReversibleTransactions.tsx index 1d5e593..890f25d 100644 --- a/src/components/features/block-details/block-reversible-transactions/BlockReversibleTransactions.tsx +++ b/src/components/features/block-details/block-executed-reversible-transactions/BlockExecutedReversibleTransactions.tsx @@ -5,20 +5,24 @@ import React from 'react'; import { Button } from '@/components/ui/button'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; import type { BlockResponse } from '@/schemas'; -import { useBlockReversibleTransactions } from './hook'; +import { useBlockExecutedReversibleTransactions } from './hook'; interface Props { query: QueryResult; } -export const BlockReversibleTransactions: React.FC = ({ query }) => { - const { getStatus, table, error } = useBlockReversibleTransactions(query); +export const BlockExecutedReversibleTransactions: React.FC = ({ + query +}) => { + const { getStatus, table, error } = + useBlockExecutedReversibleTransactions(query); return ( -

Recent Reversible Transactions

+

Recent Executed Reversible Transactions

= ({ query }) => { /> {!query.loading && - query.data?.reversibleTransactions.totalCount !== 0 && ( + query.data?.executedReversibleTransactions.totalCount !== 0 && ( )} diff --git a/src/components/features/block-details/block-reversible-transactions/hook.tsx b/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx similarity index 53% rename from src/components/features/block-details/block-reversible-transactions/hook.tsx rename to src/components/features/block-details/block-executed-reversible-transactions/hook.tsx index c6d9f76..c4abc8c 100644 --- a/src/components/features/block-details/block-reversible-transactions/hook.tsx +++ b/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx @@ -2,18 +2,23 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useMemo } from 'react'; -import { BLOCK_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/BLOCK_REVERSIBLE_TRANSACTION_COLUMNS'; -import type { BlockResponse, BlockReversibleTransaction } from '@/schemas'; +import { EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS'; +import type { BlockResponse, ExecutedReversibleTransaction } from '@/schemas'; -export const useBlockReversibleTransactions = ( +export const useBlockExecutedReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const blockColumns = useMemo(() => BLOCK_REVERSIBLE_TRANSACTION_COLUMNS, []); + const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); - const table = useReactTable({ - data: data?.reversibleTransactions?.edges ?? [], - columns: blockColumns, + const tableData = useMemo( + () => data?.executedReversibleTransactions?.edges.map((e) => e.node) ?? [], + [data?.executedReversibleTransactions?.edges] + ); + + const table = useReactTable({ + data: tableData, + columns, getCoreRowModel: getCoreRowModel(), enableSorting: false }); diff --git a/src/components/features/block-details/block-information/BlockInformation.tsx b/src/components/features/block-details/block-information/BlockInformation.tsx index a287e61..b33cbd8 100644 --- a/src/components/features/block-details/block-information/BlockInformation.tsx +++ b/src/components/features/block-details/block-information/BlockInformation.tsx @@ -19,7 +19,9 @@ interface BlockDetails { reward: number; miner: string; transactions: number; - reversibleTransactions: number; + scheduledReversibleTransactions: number; + executedReversibleTransactions: number; + cancelledReversibleTransactions: number; } export const BlockInformation: React.FC = ({ @@ -29,7 +31,12 @@ export const BlockInformation: React.FC = ({ const block = data?.blocks?.[0]; const transactions = data?.transactions.totalCount; - const reversibleTransactions = data?.reversibleTransactions.totalCount; + const scheduledReversibleTransactions = + data?.scheduledReversibleTransactions.totalCount; + const executedReversibleTransactions = + data?.executedReversibleTransactions.totalCount; + const cancelledReversibleTransactions = + data?.cancelledReversibleTransactions.totalCount; const miner = data?.miners[0]?.miner.id; const information: Partial[] = [ @@ -40,7 +47,9 @@ export const BlockInformation: React.FC = ({ timestamp: block?.timestamp, transactions, miner, - reversibleTransactions + scheduledReversibleTransactions, + executedReversibleTransactions, + cancelledReversibleTransactions } ]; @@ -89,8 +98,20 @@ export const BlockInformation: React.FC = ({ value > 1 ? `${value} transactions` : `${value} transaction` }, { - label: 'Reversible Transactions', - key: 'reversibleTransactions', + label: 'Scheduled Reversible Transactions', + key: 'scheduledReversibleTransactions', + render: (value) => + value > 1 ? `${value} transactions` : `${value} transaction` + }, + { + label: 'Executed Reversible Transactions', + key: 'executedReversibleTransactions', + render: (value) => + value > 1 ? `${value} transactions` : `${value} transaction` + }, + { + label: 'Cancelled Reversible Transactions', + key: 'cancelledReversibleTransactions', render: (value) => value > 1 ? `${value} transactions` : `${value} transaction` } diff --git a/src/components/features/block-details/block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions.tsx b/src/components/features/block-details/block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions.tsx new file mode 100644 index 0000000..f359baf --- /dev/null +++ b/src/components/features/block-details/block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions.tsx @@ -0,0 +1,48 @@ +import type { QueryResult } from '@apollo/client'; +import { Link } from '@tanstack/react-router'; +import React from 'react'; + +import { Button } from '@/components/ui/button'; +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { ContentContainer } from '@/components/ui/content-container'; +import { RESOURCES } from '@/constants/resources'; +import type { BlockResponse } from '@/schemas'; + +import { useBlockScheduledReversibleTransactions } from './hook'; + +interface Props { + query: QueryResult; +} + +export const BlockScheduledReversibleTransactions: React.FC = ({ + query +}) => { + const { getStatus, table, error } = + useBlockScheduledReversibleTransactions(query); + + return ( + +

Recent Scheduled Reversible Transactions

+ + Error: {error && error.message}

+ }} + /> + + {!query.loading && + query.data?.scheduledReversibleTransactions.totalCount !== 0 && ( + + )} +
+ ); +}; diff --git a/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx b/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx new file mode 100644 index 0000000..4c06077 --- /dev/null +++ b/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx @@ -0,0 +1,53 @@ +import type { QueryResult } from '@apollo/client'; +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { useMemo } from 'react'; + +import { SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS'; +import type { BlockResponse, ScheduledReversibleTransaction } from '@/schemas'; + +export const useBlockScheduledReversibleTransactions = ( + query: QueryResult +) => { + const { data, error: fetchError, loading } = query; + const columns = useMemo(() => { + return SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.map((col) => ({ + ...col, + accessorKey: col.id === 'tx-hash' ? 'extrinsicHash' : col.id + })); + }, []); + + // Map BlockScheduledReversibleTransaction[] to ScheduledReversibleTransaction[] + const tableData = useMemo( + () => data?.scheduledReversibleTransactions?.edges.map((e) => e.node) ?? [], + [data?.scheduledReversibleTransactions?.edges] + ); + + const table = useReactTable({ + data: tableData, + columns: columns as any, + getCoreRowModel: getCoreRowModel(), + enableSorting: false + }); + + const success = !loading && !fetchError; + const error = !loading && fetchError; + + const getStatus = () => { + switch (true) { + case success: + return 'success'; + case !!error: + return 'error'; + case !!loading: + return 'loading'; + default: + return 'idle'; + } + }; + + return { + table, + getStatus, + error + }; +}; diff --git a/src/components/features/landing/hero/chain-stats/ChainStats.tsx b/src/components/features/landing/hero/chain-stats/ChainStats.tsx index 1e44b33..e05fada 100644 --- a/src/components/features/landing/hero/chain-stats/ChainStats.tsx +++ b/src/components/features/landing/hero/chain-stats/ChainStats.tsx @@ -17,7 +17,9 @@ export const ChainStats: React.FC = () => { const success = !loading && !error; const totalTransactions = (data?.transactions?.totalCount ?? 0) + - (data?.reversibleTransactions?.totalCount ?? 0); + (data?.scheduledReversibleTransactions?.totalCount ?? 0) + + (data?.executedReversibleTransactions?.totalCount ?? 0) + + (data?.cancelledReversibleTransactions?.totalCount ?? 0); return (
diff --git a/src/components/ui/composites/search-preview/SearchPreview.tsx b/src/components/ui/composites/search-preview/SearchPreview.tsx index 56df0a3..b9691f3 100644 --- a/src/components/ui/composites/search-preview/SearchPreview.tsx +++ b/src/components/ui/composites/search-preview/SearchPreview.tsx @@ -2,7 +2,6 @@ import { Link } from '@tanstack/react-router'; import type { HTMLAttributes } from 'react'; import React, { forwardRef } from 'react'; -import { ReversibleTransferStatus } from '@/__generated__/graphql'; import { Skeleton } from '@/components/ui/skeleton'; import { RESOURCES } from '@/constants/resources'; import type { SearchAllResponse } from '@/schemas/searchs'; @@ -37,22 +36,6 @@ function PreviewLink({ ); } -const getReversibleTransactionHref = ( - status: ReversibleTransferStatus, - txId: string -) => { - switch (status) { - case ReversibleTransferStatus.Scheduled: - return `${RESOURCES.scheduledReversibleTransactions}/${txId}`; - case ReversibleTransferStatus.Executed: - return `${RESOURCES.executedReversibleTransactions}/${txId}`; - case ReversibleTransferStatus.Cancelled: - return `${RESOURCES.cancelledReversibleTransactions}/${txId}`; - default: - return '#'; - } -}; - interface SectionProps { title: string; loading: boolean; @@ -121,7 +104,9 @@ export const SearchPreview = forwardRef( accounts, transactions, blocks, - reversibleTransactions, + scheduledReversibleTransactions, + executedReversibleTransactions, + cancelledReversibleTransactions, minerRewards, highSecuritySets, errorEvents @@ -133,7 +118,9 @@ export const SearchPreview = forwardRef( !blocks && !minerRewards && !accounts && - !reversibleTransactions && + !scheduledReversibleTransactions && + !executedReversibleTransactions && + !cancelledReversibleTransactions && !highSecuritySets && !errorEvents ) { @@ -155,17 +142,41 @@ export const SearchPreview = forwardRef( ) }, { - title: 'Reversible Transactions', - emptyMsg: 'No reversible transactions found.', - items: reversibleTransactions, + title: 'Scheduled Reversible Transactions', + emptyMsg: 'No scheduled reversible transactions found.', + items: scheduledReversibleTransactions, renderItem: (tx: any) => ( ) }, + { + title: 'Executed Reversible Transactions', + emptyMsg: 'No executed reversible transactions found.', + items: executedReversibleTransactions, + renderItem: (tx: any) => ( + + ) + }, + { + title: 'Cancelled Reversible Transactions', + emptyMsg: 'No cancelled reversible transactions found.', + items: cancelledReversibleTransactions, + renderItem: (tx: any) => ( + + ) + }, { title: 'Accounts', emptyMsg: 'No accounts found.', diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 946eb31..ee0df04 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -11,20 +11,24 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' import { Route as WormholeIndexRouteImport } from './routes/wormhole/index' -import { Route as ReversibleTransactionsIndexRouteImport } from './routes/reversible-transactions/index' +import { Route as ScheduledReversibleTransactionsIndexRouteImport } from './routes/scheduled-reversible-transactions/index' import { Route as MinerRewardsIndexRouteImport } from './routes/miner-rewards/index' import { Route as MinerLeaderboardIndexRouteImport } from './routes/miner-leaderboard/index' import { Route as ImmediateTransactionsIndexRouteImport } from './routes/immediate-transactions/index' import { Route as HighSecuritySetsIndexRouteImport } from './routes/high-security-sets/index' +import { Route as ExecutedReversibleTransactionsIndexRouteImport } from './routes/executed-reversible-transactions/index' import { Route as ErrorsIndexRouteImport } from './routes/errors/index' +import { Route as CancelledReversibleTransactionsIndexRouteImport } from './routes/cancelled-reversible-transactions/index' import { Route as BlocksIndexRouteImport } from './routes/blocks/index' import { Route as AccountsIndexRouteImport } from './routes/accounts/index' import { Route as WormholeIdRouteImport } from './routes/wormhole/$id' -import { Route as ReversibleTransactionsHashRouteImport } from './routes/reversible-transactions/$hash' +import { Route as ScheduledReversibleTransactionsTxIdRouteImport } from './routes/scheduled-reversible-transactions/$txId' import { Route as MinerRewardsHashRouteImport } from './routes/miner-rewards/$hash' import { Route as ImmediateTransactionsHashRouteImport } from './routes/immediate-transactions/$hash' import { Route as HighSecuritySetsHashRouteImport } from './routes/high-security-sets/$hash' +import { Route as ExecutedReversibleTransactionsTxIdRouteImport } from './routes/executed-reversible-transactions/$txId' import { Route as ErrorsIdRouteImport } from './routes/errors/$id' +import { Route as CancelledReversibleTransactionsTxIdRouteImport } from './routes/cancelled-reversible-transactions/$txId' import { Route as BlocksIdRouteImport } from './routes/blocks/$id' import { Route as AccountsIdRouteImport } from './routes/accounts/$id' @@ -38,10 +42,10 @@ const WormholeIndexRoute = WormholeIndexRouteImport.update({ path: '/wormhole/', getParentRoute: () => rootRouteImport, } as any) -const ReversibleTransactionsIndexRoute = - ReversibleTransactionsIndexRouteImport.update({ - id: '/reversible-transactions/', - path: '/reversible-transactions/', +const ScheduledReversibleTransactionsIndexRoute = + ScheduledReversibleTransactionsIndexRouteImport.update({ + id: '/scheduled-reversible-transactions/', + path: '/scheduled-reversible-transactions/', getParentRoute: () => rootRouteImport, } as any) const MinerRewardsIndexRoute = MinerRewardsIndexRouteImport.update({ @@ -65,11 +69,23 @@ const HighSecuritySetsIndexRoute = HighSecuritySetsIndexRouteImport.update({ path: '/high-security-sets/', getParentRoute: () => rootRouteImport, } as any) +const ExecutedReversibleTransactionsIndexRoute = + ExecutedReversibleTransactionsIndexRouteImport.update({ + id: '/executed-reversible-transactions/', + path: '/executed-reversible-transactions/', + getParentRoute: () => rootRouteImport, + } as any) const ErrorsIndexRoute = ErrorsIndexRouteImport.update({ id: '/errors/', path: '/errors/', getParentRoute: () => rootRouteImport, } as any) +const CancelledReversibleTransactionsIndexRoute = + CancelledReversibleTransactionsIndexRouteImport.update({ + id: '/cancelled-reversible-transactions/', + path: '/cancelled-reversible-transactions/', + getParentRoute: () => rootRouteImport, + } as any) const BlocksIndexRoute = BlocksIndexRouteImport.update({ id: '/blocks/', path: '/blocks/', @@ -85,10 +101,10 @@ const WormholeIdRoute = WormholeIdRouteImport.update({ path: '/wormhole/$id', getParentRoute: () => rootRouteImport, } as any) -const ReversibleTransactionsHashRoute = - ReversibleTransactionsHashRouteImport.update({ - id: '/reversible-transactions/$hash', - path: '/reversible-transactions/$hash', +const ScheduledReversibleTransactionsTxIdRoute = + ScheduledReversibleTransactionsTxIdRouteImport.update({ + id: '/scheduled-reversible-transactions/$txId', + path: '/scheduled-reversible-transactions/$txId', getParentRoute: () => rootRouteImport, } as any) const MinerRewardsHashRoute = MinerRewardsHashRouteImport.update({ @@ -107,11 +123,23 @@ const HighSecuritySetsHashRoute = HighSecuritySetsHashRouteImport.update({ path: '/high-security-sets/$hash', getParentRoute: () => rootRouteImport, } as any) +const ExecutedReversibleTransactionsTxIdRoute = + ExecutedReversibleTransactionsTxIdRouteImport.update({ + id: '/executed-reversible-transactions/$txId', + path: '/executed-reversible-transactions/$txId', + getParentRoute: () => rootRouteImport, + } as any) const ErrorsIdRoute = ErrorsIdRouteImport.update({ id: '/errors/$id', path: '/errors/$id', getParentRoute: () => rootRouteImport, } as any) +const CancelledReversibleTransactionsTxIdRoute = + CancelledReversibleTransactionsTxIdRouteImport.update({ + id: '/cancelled-reversible-transactions/$txId', + path: '/cancelled-reversible-transactions/$txId', + getParentRoute: () => rootRouteImport, + } as any) const BlocksIdRoute = BlocksIdRouteImport.update({ id: '/blocks/$id', path: '/blocks/$id', @@ -127,40 +155,48 @@ export interface FileRoutesByFullPath { '/': typeof IndexRoute '/accounts/$id': typeof AccountsIdRoute '/blocks/$id': typeof BlocksIdRoute + '/cancelled-reversible-transactions/$txId': typeof CancelledReversibleTransactionsTxIdRoute '/errors/$id': typeof ErrorsIdRoute + '/executed-reversible-transactions/$txId': typeof ExecutedReversibleTransactionsTxIdRoute '/high-security-sets/$hash': typeof HighSecuritySetsHashRoute '/immediate-transactions/$hash': typeof ImmediateTransactionsHashRoute '/miner-rewards/$hash': typeof MinerRewardsHashRoute - '/reversible-transactions/$hash': typeof ReversibleTransactionsHashRoute + '/scheduled-reversible-transactions/$txId': typeof ScheduledReversibleTransactionsTxIdRoute '/wormhole/$id': typeof WormholeIdRoute '/accounts': typeof AccountsIndexRoute '/blocks': typeof BlocksIndexRoute + '/cancelled-reversible-transactions': typeof CancelledReversibleTransactionsIndexRoute '/errors': typeof ErrorsIndexRoute + '/executed-reversible-transactions': typeof ExecutedReversibleTransactionsIndexRoute '/high-security-sets': typeof HighSecuritySetsIndexRoute '/immediate-transactions': typeof ImmediateTransactionsIndexRoute '/miner-leaderboard': typeof MinerLeaderboardIndexRoute '/miner-rewards': typeof MinerRewardsIndexRoute - '/reversible-transactions': typeof ReversibleTransactionsIndexRoute + '/scheduled-reversible-transactions': typeof ScheduledReversibleTransactionsIndexRoute '/wormhole': typeof WormholeIndexRoute } export interface FileRoutesByTo { '/': typeof IndexRoute '/accounts/$id': typeof AccountsIdRoute '/blocks/$id': typeof BlocksIdRoute + '/cancelled-reversible-transactions/$txId': typeof CancelledReversibleTransactionsTxIdRoute '/errors/$id': typeof ErrorsIdRoute + '/executed-reversible-transactions/$txId': typeof ExecutedReversibleTransactionsTxIdRoute '/high-security-sets/$hash': typeof HighSecuritySetsHashRoute '/immediate-transactions/$hash': typeof ImmediateTransactionsHashRoute '/miner-rewards/$hash': typeof MinerRewardsHashRoute - '/reversible-transactions/$hash': typeof ReversibleTransactionsHashRoute + '/scheduled-reversible-transactions/$txId': typeof ScheduledReversibleTransactionsTxIdRoute '/wormhole/$id': typeof WormholeIdRoute '/accounts': typeof AccountsIndexRoute '/blocks': typeof BlocksIndexRoute + '/cancelled-reversible-transactions': typeof CancelledReversibleTransactionsIndexRoute '/errors': typeof ErrorsIndexRoute + '/executed-reversible-transactions': typeof ExecutedReversibleTransactionsIndexRoute '/high-security-sets': typeof HighSecuritySetsIndexRoute '/immediate-transactions': typeof ImmediateTransactionsIndexRoute '/miner-leaderboard': typeof MinerLeaderboardIndexRoute '/miner-rewards': typeof MinerRewardsIndexRoute - '/reversible-transactions': typeof ReversibleTransactionsIndexRoute + '/scheduled-reversible-transactions': typeof ScheduledReversibleTransactionsIndexRoute '/wormhole': typeof WormholeIndexRoute } export interface FileRoutesById { @@ -168,20 +204,24 @@ export interface FileRoutesById { '/': typeof IndexRoute '/accounts/$id': typeof AccountsIdRoute '/blocks/$id': typeof BlocksIdRoute + '/cancelled-reversible-transactions/$txId': typeof CancelledReversibleTransactionsTxIdRoute '/errors/$id': typeof ErrorsIdRoute + '/executed-reversible-transactions/$txId': typeof ExecutedReversibleTransactionsTxIdRoute '/high-security-sets/$hash': typeof HighSecuritySetsHashRoute '/immediate-transactions/$hash': typeof ImmediateTransactionsHashRoute '/miner-rewards/$hash': typeof MinerRewardsHashRoute - '/reversible-transactions/$hash': typeof ReversibleTransactionsHashRoute + '/scheduled-reversible-transactions/$txId': typeof ScheduledReversibleTransactionsTxIdRoute '/wormhole/$id': typeof WormholeIdRoute '/accounts/': typeof AccountsIndexRoute '/blocks/': typeof BlocksIndexRoute + '/cancelled-reversible-transactions/': typeof CancelledReversibleTransactionsIndexRoute '/errors/': typeof ErrorsIndexRoute + '/executed-reversible-transactions/': typeof ExecutedReversibleTransactionsIndexRoute '/high-security-sets/': typeof HighSecuritySetsIndexRoute '/immediate-transactions/': typeof ImmediateTransactionsIndexRoute '/miner-leaderboard/': typeof MinerLeaderboardIndexRoute '/miner-rewards/': typeof MinerRewardsIndexRoute - '/reversible-transactions/': typeof ReversibleTransactionsIndexRoute + '/scheduled-reversible-transactions/': typeof ScheduledReversibleTransactionsIndexRoute '/wormhole/': typeof WormholeIndexRoute } export interface FileRouteTypes { @@ -190,60 +230,72 @@ export interface FileRouteTypes { | '/' | '/accounts/$id' | '/blocks/$id' + | '/cancelled-reversible-transactions/$txId' | '/errors/$id' + | '/executed-reversible-transactions/$txId' | '/high-security-sets/$hash' | '/immediate-transactions/$hash' | '/miner-rewards/$hash' - | '/reversible-transactions/$hash' + | '/scheduled-reversible-transactions/$txId' | '/wormhole/$id' | '/accounts' | '/blocks' + | '/cancelled-reversible-transactions' | '/errors' + | '/executed-reversible-transactions' | '/high-security-sets' | '/immediate-transactions' | '/miner-leaderboard' | '/miner-rewards' - | '/reversible-transactions' + | '/scheduled-reversible-transactions' | '/wormhole' fileRoutesByTo: FileRoutesByTo to: | '/' | '/accounts/$id' | '/blocks/$id' + | '/cancelled-reversible-transactions/$txId' | '/errors/$id' + | '/executed-reversible-transactions/$txId' | '/high-security-sets/$hash' | '/immediate-transactions/$hash' | '/miner-rewards/$hash' - | '/reversible-transactions/$hash' + | '/scheduled-reversible-transactions/$txId' | '/wormhole/$id' | '/accounts' | '/blocks' + | '/cancelled-reversible-transactions' | '/errors' + | '/executed-reversible-transactions' | '/high-security-sets' | '/immediate-transactions' | '/miner-leaderboard' | '/miner-rewards' - | '/reversible-transactions' + | '/scheduled-reversible-transactions' | '/wormhole' id: | '__root__' | '/' | '/accounts/$id' | '/blocks/$id' + | '/cancelled-reversible-transactions/$txId' | '/errors/$id' + | '/executed-reversible-transactions/$txId' | '/high-security-sets/$hash' | '/immediate-transactions/$hash' | '/miner-rewards/$hash' - | '/reversible-transactions/$hash' + | '/scheduled-reversible-transactions/$txId' | '/wormhole/$id' | '/accounts/' | '/blocks/' + | '/cancelled-reversible-transactions/' | '/errors/' + | '/executed-reversible-transactions/' | '/high-security-sets/' | '/immediate-transactions/' | '/miner-leaderboard/' | '/miner-rewards/' - | '/reversible-transactions/' + | '/scheduled-reversible-transactions/' | '/wormhole/' fileRoutesById: FileRoutesById } @@ -251,20 +303,24 @@ export interface RootRouteChildren { IndexRoute: typeof IndexRoute AccountsIdRoute: typeof AccountsIdRoute BlocksIdRoute: typeof BlocksIdRoute + CancelledReversibleTransactionsTxIdRoute: typeof CancelledReversibleTransactionsTxIdRoute ErrorsIdRoute: typeof ErrorsIdRoute + ExecutedReversibleTransactionsTxIdRoute: typeof ExecutedReversibleTransactionsTxIdRoute HighSecuritySetsHashRoute: typeof HighSecuritySetsHashRoute ImmediateTransactionsHashRoute: typeof ImmediateTransactionsHashRoute MinerRewardsHashRoute: typeof MinerRewardsHashRoute - ReversibleTransactionsHashRoute: typeof ReversibleTransactionsHashRoute + ScheduledReversibleTransactionsTxIdRoute: typeof ScheduledReversibleTransactionsTxIdRoute WormholeIdRoute: typeof WormholeIdRoute AccountsIndexRoute: typeof AccountsIndexRoute BlocksIndexRoute: typeof BlocksIndexRoute + CancelledReversibleTransactionsIndexRoute: typeof CancelledReversibleTransactionsIndexRoute ErrorsIndexRoute: typeof ErrorsIndexRoute + ExecutedReversibleTransactionsIndexRoute: typeof ExecutedReversibleTransactionsIndexRoute HighSecuritySetsIndexRoute: typeof HighSecuritySetsIndexRoute ImmediateTransactionsIndexRoute: typeof ImmediateTransactionsIndexRoute MinerLeaderboardIndexRoute: typeof MinerLeaderboardIndexRoute MinerRewardsIndexRoute: typeof MinerRewardsIndexRoute - ReversibleTransactionsIndexRoute: typeof ReversibleTransactionsIndexRoute + ScheduledReversibleTransactionsIndexRoute: typeof ScheduledReversibleTransactionsIndexRoute WormholeIndexRoute: typeof WormholeIndexRoute } @@ -284,11 +340,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof WormholeIndexRouteImport parentRoute: typeof rootRouteImport } - '/reversible-transactions/': { - id: '/reversible-transactions/' - path: '/reversible-transactions' - fullPath: '/reversible-transactions' - preLoaderRoute: typeof ReversibleTransactionsIndexRouteImport + '/scheduled-reversible-transactions/': { + id: '/scheduled-reversible-transactions/' + path: '/scheduled-reversible-transactions' + fullPath: '/scheduled-reversible-transactions' + preLoaderRoute: typeof ScheduledReversibleTransactionsIndexRouteImport parentRoute: typeof rootRouteImport } '/miner-rewards/': { @@ -319,6 +375,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof HighSecuritySetsIndexRouteImport parentRoute: typeof rootRouteImport } + '/executed-reversible-transactions/': { + id: '/executed-reversible-transactions/' + path: '/executed-reversible-transactions' + fullPath: '/executed-reversible-transactions' + preLoaderRoute: typeof ExecutedReversibleTransactionsIndexRouteImport + parentRoute: typeof rootRouteImport + } '/errors/': { id: '/errors/' path: '/errors' @@ -326,6 +389,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ErrorsIndexRouteImport parentRoute: typeof rootRouteImport } + '/cancelled-reversible-transactions/': { + id: '/cancelled-reversible-transactions/' + path: '/cancelled-reversible-transactions' + fullPath: '/cancelled-reversible-transactions' + preLoaderRoute: typeof CancelledReversibleTransactionsIndexRouteImport + parentRoute: typeof rootRouteImport + } '/blocks/': { id: '/blocks/' path: '/blocks' @@ -347,11 +417,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof WormholeIdRouteImport parentRoute: typeof rootRouteImport } - '/reversible-transactions/$hash': { - id: '/reversible-transactions/$hash' - path: '/reversible-transactions/$hash' - fullPath: '/reversible-transactions/$hash' - preLoaderRoute: typeof ReversibleTransactionsHashRouteImport + '/scheduled-reversible-transactions/$txId': { + id: '/scheduled-reversible-transactions/$txId' + path: '/scheduled-reversible-transactions/$txId' + fullPath: '/scheduled-reversible-transactions/$txId' + preLoaderRoute: typeof ScheduledReversibleTransactionsTxIdRouteImport parentRoute: typeof rootRouteImport } '/miner-rewards/$hash': { @@ -375,6 +445,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof HighSecuritySetsHashRouteImport parentRoute: typeof rootRouteImport } + '/executed-reversible-transactions/$txId': { + id: '/executed-reversible-transactions/$txId' + path: '/executed-reversible-transactions/$txId' + fullPath: '/executed-reversible-transactions/$txId' + preLoaderRoute: typeof ExecutedReversibleTransactionsTxIdRouteImport + parentRoute: typeof rootRouteImport + } '/errors/$id': { id: '/errors/$id' path: '/errors/$id' @@ -382,6 +459,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ErrorsIdRouteImport parentRoute: typeof rootRouteImport } + '/cancelled-reversible-transactions/$txId': { + id: '/cancelled-reversible-transactions/$txId' + path: '/cancelled-reversible-transactions/$txId' + fullPath: '/cancelled-reversible-transactions/$txId' + preLoaderRoute: typeof CancelledReversibleTransactionsTxIdRouteImport + parentRoute: typeof rootRouteImport + } '/blocks/$id': { id: '/blocks/$id' path: '/blocks/$id' @@ -403,20 +487,30 @@ const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, AccountsIdRoute: AccountsIdRoute, BlocksIdRoute: BlocksIdRoute, + CancelledReversibleTransactionsTxIdRoute: + CancelledReversibleTransactionsTxIdRoute, ErrorsIdRoute: ErrorsIdRoute, + ExecutedReversibleTransactionsTxIdRoute: + ExecutedReversibleTransactionsTxIdRoute, HighSecuritySetsHashRoute: HighSecuritySetsHashRoute, ImmediateTransactionsHashRoute: ImmediateTransactionsHashRoute, MinerRewardsHashRoute: MinerRewardsHashRoute, - ReversibleTransactionsHashRoute: ReversibleTransactionsHashRoute, + ScheduledReversibleTransactionsTxIdRoute: + ScheduledReversibleTransactionsTxIdRoute, WormholeIdRoute: WormholeIdRoute, AccountsIndexRoute: AccountsIndexRoute, BlocksIndexRoute: BlocksIndexRoute, + CancelledReversibleTransactionsIndexRoute: + CancelledReversibleTransactionsIndexRoute, ErrorsIndexRoute: ErrorsIndexRoute, + ExecutedReversibleTransactionsIndexRoute: + ExecutedReversibleTransactionsIndexRoute, HighSecuritySetsIndexRoute: HighSecuritySetsIndexRoute, ImmediateTransactionsIndexRoute: ImmediateTransactionsIndexRoute, MinerLeaderboardIndexRoute: MinerLeaderboardIndexRoute, MinerRewardsIndexRoute: MinerRewardsIndexRoute, - ReversibleTransactionsIndexRoute: ReversibleTransactionsIndexRoute, + ScheduledReversibleTransactionsIndexRoute: + ScheduledReversibleTransactionsIndexRoute, WormholeIndexRoute: WormholeIndexRoute, } export const routeTree = rootRouteImport diff --git a/src/schemas/account.ts b/src/schemas/account.ts index fef84d8..421cd09 100644 --- a/src/schemas/account.ts +++ b/src/schemas/account.ts @@ -1,6 +1,8 @@ import type * as gql from '../__generated__/graphql'; +import type { CancelledReversibleTransaction } from './cancelled-reversible-transaction'; +import type { ExecutedReversibleTransaction } from './executed-reversible-transaction'; import type { MinerReward } from './miner-reward'; -import type { ReversibleTransaction } from './reversible-transaction'; +import type { ScheduledReversibleTransaction } from './scheduled-reversible-transaction'; import type { Transaction } from './transcation'; export interface Account @@ -13,8 +15,18 @@ export interface AccountResponse { /** @description the grand total of the transactions regardless of the return node limit using `first` parameter */ totalCount: number; }; - reversibleTransactions: { - edges: AccountReversibleTransaction[]; + scheduledReversibleTransactions: { + edges: AccountScheduledReversibleTransaction[]; + /** @description the grand total of the reversible transactions regardless of the return node limit using `first` parameter */ + totalCount: number; + }; + executedReversibleTransactions: { + edges: AccountExecutedReversibleTransaction[]; + /** @description the grand total of the reversible transactions regardless of the return node limit using `first` parameter */ + totalCount: number; + }; + cancelledReversibleTransactions: { + edges: AccountCancelledReversibleTransaction[]; /** @description the grand total of the reversible transactions regardless of the return node limit using `first` parameter */ totalCount: number; }; @@ -50,8 +62,16 @@ export interface AccountMinerRewards { node: MinerReward; } -export interface AccountReversibleTransaction { - node: ReversibleTransaction; +export interface AccountScheduledReversibleTransaction { + node: ScheduledReversibleTransaction; +} + +export interface AccountExecutedReversibleTransaction { + node: ExecutedReversibleTransaction; +} + +export interface AccountCancelledReversibleTransaction { + node: CancelledReversibleTransaction; } export interface AccountBeneficiary { diff --git a/src/schemas/blocks.ts b/src/schemas/blocks.ts index f36a8e7..a47281d 100644 --- a/src/schemas/blocks.ts +++ b/src/schemas/blocks.ts @@ -1,8 +1,10 @@ import type * as gql from '../__generated__/graphql'; +import type { CancelledReversibleTransaction } from './cancelled-reversible-transaction'; import type { ErrorEvent } from './errors'; +import type { ExecutedReversibleTransaction } from './executed-reversible-transaction'; import type { HighSecuritySet } from './high-security-set'; import type { MinerReward } from './miner-reward'; -import type { ReversibleTransaction } from './reversible-transaction'; +import type { ScheduledReversibleTransaction } from './scheduled-reversible-transaction'; import type { Transaction } from './transcation'; export interface Block @@ -16,8 +18,18 @@ export interface BlockResponse { /** @description the grand total of the transactions regardless of the return node limit using `first` parameter */ totalCount: number; }; - reversibleTransactions: { - edges: BlockReversibleTransaction[]; + scheduledReversibleTransactions: { + edges: BlockScheduledReversibleTransaction[]; + /** @description the grand total of the transactions regardless of the return node limit using `first` parameter */ + totalCount: number; + }; + executedReversibleTransactions: { + edges: BlockExecutedReversibleTransaction[]; + /** @description the grand total of the transactions regardless of the return node limit using `first` parameter */ + totalCount: number; + }; + cancelledReversibleTransactions: { + edges: BlockCancelledReversibleTransaction[]; /** @description the grand total of the transactions regardless of the return node limit using `first` parameter */ totalCount: number; }; @@ -48,8 +60,16 @@ export interface BlockTransaction { node: Transaction; } -export interface BlockReversibleTransaction { - node: ReversibleTransaction; +export interface BlockScheduledReversibleTransaction { + node: ScheduledReversibleTransaction; +} + +export interface BlockExecutedReversibleTransaction { + node: ExecutedReversibleTransaction; +} + +export interface BlockCancelledReversibleTransaction { + node: CancelledReversibleTransaction; } export interface BlockHighSecuritySet { diff --git a/src/schemas/chain-status.ts b/src/schemas/chain-status.ts index bd0b743..2901d91 100644 --- a/src/schemas/chain-status.ts +++ b/src/schemas/chain-status.ts @@ -10,7 +10,13 @@ export interface ChainStatusResponse { minedBlocks24Hours: { totalCount: number; }; - reversibleTransactions: { + scheduledReversibleTransactions: { + totalCount: number; + }; + executedReversibleTransactions: { + totalCount: number; + }; + cancelledReversibleTransactions: { totalCount: number; }; allActiveAccounts: { diff --git a/src/schemas/reversible-transaction.ts b/src/schemas/reversible-transaction.ts deleted file mode 100644 index 43f34c2..0000000 --- a/src/schemas/reversible-transaction.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type * as gql from '../__generated__/graphql'; - -export interface ReversibleTransaction - extends Omit< - gql.ReversibleTransfer, - 'id' | 'to' | 'from' | 'block' | 'event' - > { - to: Pick; - from: Pick; - block: Pick; -} - -export interface ReversibleTransactionResponse { - reversibleTransactions: [ReversibleTransaction]; -} - -export interface ReversibleTransactionStatusResponse { - reversibleTransactions: [Pick]; -} - -export interface ReversibleTransactionListResponse { - reversibleTransactions: ReversibleTransaction[]; - meta: { - totalCount: number; - }; -} - -export interface RecentReversibleTransactionsResponse { - reversibleTransactions: ReversibleTransaction[]; -} - -export interface ReversibleTransactionsStatsResponse { - allTime: { - totalCount: number; - }; - last24Hour: { - totalCount: number; - }; -} diff --git a/src/schemas/searchs.ts b/src/schemas/searchs.ts index b87bc99..155d566 100644 --- a/src/schemas/searchs.ts +++ b/src/schemas/searchs.ts @@ -1,16 +1,21 @@ -import type { Account } from './account'; -import type { Block } from './blocks'; +import type { CancelledReversibleTransaction } from './cancelled-reversible-transaction'; import type { ErrorEvent } from './errors'; +import type { ExecutedReversibleTransaction } from './executed-reversible-transaction'; import type { HighSecuritySet } from './high-security-set'; import type { MinerReward } from './miner-reward'; -import type { ReversibleTransaction } from './reversible-transaction'; +import type { ScheduledReversibleTransaction } from './scheduled-reversible-transaction'; import type { Transaction } from './transcation'; export interface SearchAllResponse { transactions: Pick[]; - reversibleTransactions: Pick< - ReversibleTransaction, - 'extrinsicHash' | 'status' | 'txId' + scheduledReversibleTransactions: Pick< + ScheduledReversibleTransaction, + 'extrinsicHash' | 'txId' + >[]; + executedReversibleTransactions: Pick[]; + cancelledReversibleTransactions: Pick< + CancelledReversibleTransaction, + 'txId' >[]; accounts: Pick[]; blocks: Pick[]; From dddcb213af7cb1f752346d42e30622824cf270f1 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 15:30:42 +0800 Subject: [PATCH 10/12] feat: finish updating related UI, also change extrinsic hash to tx id for consistency in reversible tx resources --- .../ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx | 85 +++++++++++++++++++ .../ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx | 72 ++++++++++++++++ .../ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx | 79 +++++++++++++++++ .../BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx | 84 ++++++++++++++++++ .../BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx | 72 ++++++++++++++++ .../BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx | 72 ++++++++++++++++ ...NCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 12 +++ ...XECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 12 +++ ...HEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 12 +++ .../hook.tsx | 14 +-- .../account-data-tabs/AccountDataTabs.tsx | 16 +--- .../hook.tsx | 15 ++-- .../hook.tsx | 15 ++-- .../hook.tsx | 15 ++-- .../block-data-tabs/BlockDataTabs.tsx | 16 +--- .../hook.tsx | 15 ++-- .../hook.tsx | 18 ++-- .../features/landing/data-tabs/DataTabs.tsx | 16 +--- src/schemas/index.ts | 7 +- 19 files changed, 556 insertions(+), 91 deletions(-) create mode 100644 src/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx create mode 100644 src/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx create mode 100644 src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx create mode 100644 src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx create mode 100644 src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx create mode 100644 src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx diff --git a/src/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx new file mode 100644 index 0000000..06bdd33 --- /dev/null +++ b/src/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx @@ -0,0 +1,85 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { AccountCancelledReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = + createColumnHelper(); + +export const ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS = [ + columnHelper.accessor('node.scheduledTransfer.txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.block.height', { + id: 'blockNumber', + header: 'Block', + cell: (props) => ( + + ), + enableSorting: true + }), + columnHelper.accessor('node.timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('node.cancelledBy.id', { + id: 'cancelledBy', + header: 'Cancelled By', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx new file mode 100644 index 0000000..03f3f2a --- /dev/null +++ b/src/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx @@ -0,0 +1,72 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { AccountExecutedReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = createColumnHelper(); + +export const ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS = [ + columnHelper.accessor('node.scheduledTransfer.txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.block.height', { + id: 'blockNumber', + header: 'Block', + cell: (props) => ( + + ), + enableSorting: true + }), + columnHelper.accessor('node.timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('node.scheduledTransfer.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx new file mode 100644 index 0000000..6824747 --- /dev/null +++ b/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx @@ -0,0 +1,79 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { AccountScheduledReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = + createColumnHelper(); + +export const ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS = [ + columnHelper.accessor('node.txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.block.height', { + id: 'blockNumber', + header: 'Block', + cell: (props) => ( + + ), + enableSorting: true + }), + columnHelper.accessor('node.timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('node.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }), + columnHelper.accessor('node.fee', { + id: 'fee', + header: 'Fee', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx new file mode 100644 index 0000000..b764f34 --- /dev/null +++ b/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx @@ -0,0 +1,84 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { BlockCancelledReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = createColumnHelper(); + +export const BLOCK_CANCELLED_REVERSIBLE_COLUMNS = [ + columnHelper.accessor('node.txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.extrinsicHash', { + id: 'tx-hash', + header: 'Hash', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('node.cancelledBy.id', { + id: 'cancelledBy', + header: 'Cancelled By', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx new file mode 100644 index 0000000..13c57d0 --- /dev/null +++ b/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx @@ -0,0 +1,72 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { BlockExecutedReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = createColumnHelper(); + +export const BLOCK_EXECUTED_REVERSIBLE_COLUMNS = [ + columnHelper.accessor('node.txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.extrinsicHash', { + id: 'tx-hash', + header: 'Hash', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('node.scheduledTransfer.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.scheduledTransfer.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx new file mode 100644 index 0000000..30b8b17 --- /dev/null +++ b/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx @@ -0,0 +1,72 @@ +import { createColumnHelper } from '@tanstack/react-table'; + +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { BlockScheduledReversibleTransaction } from '@/schemas'; +import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = createColumnHelper(); + +export const BLOCK_SCHEDULED_REVERSIBLE_COLUMNS = [ + columnHelper.accessor('node.txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.extrinsicHash', { + id: 'tx-hash', + header: 'Hash', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor('node.from.id', { + id: 'from', + header: 'From', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.to.id', { + id: 'to', + header: 'To', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('node.amount', { + id: 'amount', + header: 'Amount', + cell: (props) => formatMonetaryValue(props.getValue(), 5), + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx index b95b911..ba534ba 100644 --- a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -9,6 +9,18 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [ + columnHelper.accessor('txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), columnHelper.accessor('scheduledTransfer.extrinsicHash', { id: 'tx-hash', header: 'Hash', diff --git a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx index a23eade..53589b4 100644 --- a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -9,6 +9,18 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [ + columnHelper.accessor('txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), columnHelper.accessor('scheduledTransfer.extrinsicHash', { id: 'tx-hash', header: 'Hash', diff --git a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx index 5ec8e71..1c3739d 100644 --- a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -9,6 +9,18 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [ + columnHelper.accessor('txId', { + id: 'tx-id', + header: 'Tx ID', + cell: (props) => ( + + ), + enableSorting: false + }), columnHelper.accessor('extrinsicHash', { id: 'tx-hash', header: 'Hash', diff --git a/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx b/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx index 0f3f672..fb837e8 100644 --- a/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx +++ b/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx @@ -2,26 +2,26 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useCallback, useMemo } from 'react'; -import { CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS'; +import { ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS'; import type { - AccountResponse, - CancelledReversibleTransaction + AccountCancelledReversibleTransaction, + AccountResponse } from '@/schemas'; export const useAccountCancelledReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const columns = useMemo(() => CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const columns = useMemo(() => ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS, []); const tableData = useMemo( - () => data?.cancelledReversibleTransactions?.edges.map((e) => e.node) ?? [], + () => data?.cancelledReversibleTransactions?.edges ?? [], [data?.cancelledReversibleTransactions?.edges] ); - const table = useReactTable({ + const table = useReactTable({ data: tableData, - columns, + columns: columns as any, getCoreRowModel: getCoreRowModel(), enableSorting: false }); diff --git a/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx b/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx index f5d172d..46710f9 100644 --- a/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx +++ b/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx @@ -10,7 +10,7 @@ import { SelectTrigger, SelectValue } from '@/components/ui/select'; -import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { Tabs, TabsContent } from '@/components/ui/tabs'; import type { AccountResponse } from '@/schemas'; import { formatOption } from '@/utils/formatter'; @@ -49,7 +49,7 @@ export const AccountDataTabs: React.FC = ({ - - {TAB_LIST.map((val) => ( - setSelectedTab(val)} - value={val} - > - {formatOption(val)} - - ))} - - diff --git a/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx b/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx index 9caf35d..8e5436e 100644 --- a/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx +++ b/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx @@ -2,23 +2,26 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useCallback, useMemo } from 'react'; -import { EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS'; -import type { AccountResponse, ExecutedReversibleTransaction } from '@/schemas'; +import { ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS'; +import type { + AccountExecutedReversibleTransaction, + AccountResponse +} from '@/schemas'; export const useAccountExecutedReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const columns = useMemo(() => ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS, []); const tableData = useMemo( - () => data?.executedReversibleTransactions?.edges.map((e) => e.node) ?? [], + () => data?.executedReversibleTransactions?.edges ?? [], [data?.executedReversibleTransactions?.edges] ); - const table = useReactTable({ + const table = useReactTable({ data: tableData, - columns, + columns: columns as any, getCoreRowModel: getCoreRowModel(), enableSorting: false }); diff --git a/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx b/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx index 9f1bf88..452dfaf 100644 --- a/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx +++ b/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx @@ -2,29 +2,24 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useCallback, useMemo } from 'react'; -import { SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS'; +import { ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS'; import type { AccountResponse, - ScheduledReversibleTransaction + AccountScheduledReversibleTransaction } from '@/schemas'; export const useAccountScheduledReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const columns = useMemo(() => { - return SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.map((col) => ({ - ...col, - accessorKey: col.id === 'tx-hash' ? 'extrinsicHash' : col.id - })); - }, []); + const columns = useMemo(() => ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS, []); const tableData = useMemo( - () => data?.scheduledReversibleTransactions?.edges.map((e) => e.node) ?? [], + () => data?.scheduledReversibleTransactions?.edges ?? [], [data?.scheduledReversibleTransactions?.edges] ); - const table = useReactTable({ + const table = useReactTable({ data: tableData, columns: columns as any, getCoreRowModel: getCoreRowModel(), diff --git a/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx b/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx index d98f354..1368d69 100644 --- a/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx +++ b/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx @@ -2,23 +2,26 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useMemo } from 'react'; -import { CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS'; -import type { BlockResponse, CancelledReversibleTransaction } from '@/schemas'; +import { BLOCK_CANCELLED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS'; +import type { + BlockCancelledReversibleTransaction, + BlockResponse +} from '@/schemas'; export const useBlockCancelledReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const columns = useMemo(() => CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const columns = useMemo(() => BLOCK_CANCELLED_REVERSIBLE_COLUMNS, []); const tableData = useMemo( - () => data?.cancelledReversibleTransactions?.edges.map((e) => e.node) ?? [], + () => data?.cancelledReversibleTransactions?.edges ?? [], [data?.cancelledReversibleTransactions?.edges] ); - const table = useReactTable({ + const table = useReactTable({ data: tableData, - columns, + columns: columns as any, getCoreRowModel: getCoreRowModel(), enableSorting: false }); diff --git a/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx b/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx index b542c36..5e3e79e 100644 --- a/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx +++ b/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx @@ -10,7 +10,7 @@ import { SelectTrigger, SelectValue } from '@/components/ui/select'; -import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { Tabs, TabsContent } from '@/components/ui/tabs'; import type { BlockResponse } from '@/schemas'; import { formatOption } from '@/utils/formatter'; @@ -43,7 +43,7 @@ export const BlockDataTabs: React.FC = ({ query }) => { - - {TAB_LIST.map((val) => ( - setSelectedTab(val)} - value={val} - > - {formatOption(val)} - - ))} - - diff --git a/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx b/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx index c4abc8c..f1c1594 100644 --- a/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx +++ b/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx @@ -2,23 +2,26 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useMemo } from 'react'; -import { EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS'; -import type { BlockResponse, ExecutedReversibleTransaction } from '@/schemas'; +import { BLOCK_EXECUTED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS'; +import type { + BlockExecutedReversibleTransaction, + BlockResponse +} from '@/schemas'; export const useBlockExecutedReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const columns = useMemo(() => BLOCK_EXECUTED_REVERSIBLE_COLUMNS, []); const tableData = useMemo( - () => data?.executedReversibleTransactions?.edges.map((e) => e.node) ?? [], + () => data?.executedReversibleTransactions?.edges ?? [], [data?.executedReversibleTransactions?.edges] ); - const table = useReactTable({ + const table = useReactTable({ data: tableData, - columns, + columns: columns as any, getCoreRowModel: getCoreRowModel(), enableSorting: false }); diff --git a/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx b/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx index 4c06077..567ff3c 100644 --- a/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx +++ b/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx @@ -2,27 +2,25 @@ import type { QueryResult } from '@apollo/client'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useMemo } from 'react'; -import { SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS'; -import type { BlockResponse, ScheduledReversibleTransaction } from '@/schemas'; +import { BLOCK_SCHEDULED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS'; +import type { + BlockResponse, + BlockScheduledReversibleTransaction +} from '@/schemas'; export const useBlockScheduledReversibleTransactions = ( query: QueryResult ) => { const { data, error: fetchError, loading } = query; - const columns = useMemo(() => { - return SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.map((col) => ({ - ...col, - accessorKey: col.id === 'tx-hash' ? 'extrinsicHash' : col.id - })); - }, []); + const columns = useMemo(() => BLOCK_SCHEDULED_REVERSIBLE_COLUMNS, []); // Map BlockScheduledReversibleTransaction[] to ScheduledReversibleTransaction[] const tableData = useMemo( - () => data?.scheduledReversibleTransactions?.edges.map((e) => e.node) ?? [], + () => data?.scheduledReversibleTransactions?.edges ?? [], [data?.scheduledReversibleTransactions?.edges] ); - const table = useReactTable({ + const table = useReactTable({ data: tableData, columns: columns as any, getCoreRowModel: getCoreRowModel(), diff --git a/src/components/features/landing/data-tabs/DataTabs.tsx b/src/components/features/landing/data-tabs/DataTabs.tsx index 81a1d15..a101747 100644 --- a/src/components/features/landing/data-tabs/DataTabs.tsx +++ b/src/components/features/landing/data-tabs/DataTabs.tsx @@ -10,7 +10,7 @@ import { SelectTrigger, SelectValue } from '@/components/ui/select'; -import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { Tabs } from '@/components/ui/tabs'; import { formatOption } from '@/utils/formatter'; import { RecentBlocks } from '../recent-blocks/RecentBlocks'; @@ -44,7 +44,7 @@ export const DataTabs: React.FC = () => { - - {TAB_LIST.map((val) => ( - setSelectedTab(val)} - value={val} - > - {formatOption(val)} - - ))} - - diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 27c68f5..971bca0 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -1,14 +1,13 @@ export * from './account'; export * from './blocks'; +export * from './cancelled-reversible-transaction'; export * from './chain-status'; export * from './errors'; +export * from './executed-reversible-transaction'; export * from './high-security-set'; export * from './miner-leaderboard'; export * from './miner-reward'; -export * from './reversible-transaction'; export * from './scheduled-reversible-transaction'; -export * from './executed-reversible-transaction'; -export * from './cancelled-reversible-transaction'; export * from './searchs'; export * from './transcation'; -export * from './wormhole'; +// export * from './wormhole'; From f35be98235850e6f263918423d4dba314c720dd8 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 15:39:20 +0800 Subject: [PATCH 11/12] feat: finish sync table columns --- .../ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx | 12 ++++++------ .../BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx | 12 ------------ .../BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx | 12 ------------ .../BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx | 18 ++++++------------ ...ANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 12 ------------ ...EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 12 ------------ ...CHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx | 12 ------------ 7 files changed, 12 insertions(+), 78 deletions(-) diff --git a/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx index 6824747..3b4a9e3 100644 --- a/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx +++ b/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx @@ -40,6 +40,12 @@ export const ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS = [ cell: (props) => , enableSorting: true }), + columnHelper.accessor('node.scheduledAt', { + id: 'scheduledAt', + header: 'Scheduled At', + cell: (props) => , + enableSorting: true + }), columnHelper.accessor('node.from.id', { id: 'from', header: 'From', @@ -69,11 +75,5 @@ export const ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS = [ header: 'Amount', cell: (props) => formatMonetaryValue(props.getValue(), 5), enableSorting: true - }), - columnHelper.accessor('node.fee', { - id: 'fee', - header: 'Fee', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true }) ]; diff --git a/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx index b764f34..0476f16 100644 --- a/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx +++ b/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx @@ -21,18 +21,6 @@ export const BLOCK_CANCELLED_REVERSIBLE_COLUMNS = [ ), enableSorting: false }), - columnHelper.accessor('node.scheduledTransfer.extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), columnHelper.accessor('node.timestamp', { id: 'timestamp', header: 'Timestamp', diff --git a/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx index 13c57d0..c9343d7 100644 --- a/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx +++ b/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx @@ -21,18 +21,6 @@ export const BLOCK_EXECUTED_REVERSIBLE_COLUMNS = [ ), enableSorting: false }), - columnHelper.accessor('node.scheduledTransfer.extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), columnHelper.accessor('node.timestamp', { id: 'timestamp', header: 'Timestamp', diff --git a/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx index 30b8b17..c410bfe 100644 --- a/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx +++ b/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx @@ -21,24 +21,18 @@ export const BLOCK_SCHEDULED_REVERSIBLE_COLUMNS = [ ), enableSorting: false }), - columnHelper.accessor('node.extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), columnHelper.accessor('node.timestamp', { id: 'timestamp', header: 'Timestamp', cell: (props) => , enableSorting: true }), + columnHelper.accessor('node.scheduledAt', { + id: 'scheduledAt', + header: 'Scheduled At', + cell: (props) => , + enableSorting: true + }), columnHelper.accessor('node.from.id', { id: 'from', header: 'From', diff --git a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx index ba534ba..26d7ffa 100644 --- a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -21,18 +21,6 @@ export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [ ), enableSorting: false }), - columnHelper.accessor('scheduledTransfer.extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), columnHelper.accessor('block.height', { id: 'block_height', header: 'Block', diff --git a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx index 53589b4..f6c9b12 100644 --- a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -21,18 +21,6 @@ export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [ ), enableSorting: false }), - columnHelper.accessor('scheduledTransfer.extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), columnHelper.accessor('block.height', { id: 'block_height', header: 'Block', diff --git a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx index 1c3739d..b89d573 100644 --- a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx @@ -21,18 +21,6 @@ export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [ ), enableSorting: false }), - columnHelper.accessor('extrinsicHash', { - id: 'tx-hash', - header: 'Hash', - cell: (props) => ( - - ), - enableSorting: false - }), columnHelper.accessor('block.height', { id: 'block_height', header: 'Block', From 64a1db129b1863a481d82a4c04af09c96d236761 Mon Sep 17 00:00:00 2001 From: Beast Date: Fri, 13 Mar 2026 15:49:16 +0800 Subject: [PATCH 12/12] feat: finish updating search, cancelled and executed reversible details --- src/api/cancelled-reversible-transactions.tsx | 7 +------ src/api/executed-reversible-transactions.tsx | 6 ------ src/api/search.tsx | 2 +- .../CancelledReversibleTransactionInformation.tsx | 14 +++++++------- .../ExecutedReversibleTransactionInformation.tsx | 10 +--------- src/components/features/landing/hero/Hero.tsx | 2 +- .../ScheduledReversibleTransactionInformation.tsx | 4 +++- src/components/layout/header/Topbar.tsx | 2 +- .../ui/composites/search-preview/SearchPreview.tsx | 2 +- 9 files changed, 16 insertions(+), 33 deletions(-) diff --git a/src/api/cancelled-reversible-transactions.tsx b/src/api/cancelled-reversible-transactions.tsx index 810c498..dc6fede 100644 --- a/src/api/cancelled-reversible-transactions.tsx +++ b/src/api/cancelled-reversible-transactions.tsx @@ -200,16 +200,11 @@ export const cancelledReversibleTransactions = { cancelledBy { id } + extrinsicHash scheduledTransfer { - extrinsicHash amount - timestamp scheduledAt - txId fee - block { - height - } from { id } diff --git a/src/api/executed-reversible-transactions.tsx b/src/api/executed-reversible-transactions.tsx index a9cc009..3cb1edf 100644 --- a/src/api/executed-reversible-transactions.tsx +++ b/src/api/executed-reversible-transactions.tsx @@ -192,15 +192,9 @@ export const executedReversibleTransactions = { height } scheduledTransfer { - extrinsicHash amount - timestamp scheduledAt - txId fee - block { - height - } from { id } diff --git a/src/api/search.tsx b/src/api/search.tsx index 75dc8be..ea2321a 100644 --- a/src/api/search.tsx +++ b/src/api/search.tsx @@ -18,7 +18,7 @@ export const search = (fetcher: DataFetcher) => ({ } scheduledReversibleTransactions: scheduledReversibleTransfers( limit: $limit - where: { extrinsicHash_startsWith: $keyword } + where: { txId_startsWith: $keyword } ) { extrinsicHash txId diff --git a/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx b/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx index 5b2a588..729e5b4 100644 --- a/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx +++ b/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx @@ -35,6 +35,7 @@ export const CancelledReversibleTransactionInformation: React.FC< block: tx?.block, timestamp: tx?.timestamp, cancelledBy: tx?.cancelledBy, + extrinsicHash: tx?.extrinsicHash, scheduledTransfer: tx?.scheduledTransfer } ]; @@ -47,16 +48,15 @@ export const CancelledReversibleTransactionInformation: React.FC< { label: 'ID', key: 'txId', - render: (value) => {value} + render: (value) => ( + + ) }, { - label: 'Extrinsic Hash (Scheduled)', - key: 'scheduledTransfer', + label: 'Extrinsic Hash', + key: 'extrinsicHash', render: (value) => ( - + ) }, { diff --git a/src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx b/src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx index 88bddf9..45fbf55 100644 --- a/src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx +++ b/src/components/features/executed-reversible-transaction-details/executed-reversible-transaction-information/ExecutedReversibleTransactionInformation.tsx @@ -46,16 +46,8 @@ export const ExecutedReversibleTransactionInformation: React.FC< { label: 'ID', key: 'txId', - render: (value) => {value} - }, - { - label: 'Extrinsic Hash (Scheduled)', - key: 'scheduledTransfer', render: (value) => ( - + ) }, { diff --git a/src/components/features/landing/hero/Hero.tsx b/src/components/features/landing/hero/Hero.tsx index 14f2077..ed09180 100644 --- a/src/components/features/landing/hero/Hero.tsx +++ b/src/components/features/landing/hero/Hero.tsx @@ -41,7 +41,7 @@ export const Hero = (props: HeroProps) => { ref={inputRef} onFocus={handleInputFocus} onKeyDown={handleKeyDown} - placeholder="Search by hash, id, block height, or error name/type" + placeholder="Search by hash, id, tx id, block height, or error name/type" onKeywordChange={handleKeywordChange} /> diff --git a/src/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx b/src/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx index 267d8f9..886b871 100644 --- a/src/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx +++ b/src/components/features/scheduled-reversible-transaction-details/scheduled-reversible-transaction-information/ScheduledReversibleTransactionInformation.tsx @@ -51,7 +51,9 @@ export const ScheduledReversibleTransactionInformation: React.FC< { label: 'ID', key: 'txId', - render: (value) => {value} + render: (value) => ( + + ) }, { label: 'Extrinsic Hash', diff --git a/src/components/layout/header/Topbar.tsx b/src/components/layout/header/Topbar.tsx index 3c49321..7e6885c 100644 --- a/src/components/layout/header/Topbar.tsx +++ b/src/components/layout/header/Topbar.tsx @@ -58,7 +58,7 @@ export const Topbar: React.FC = ({ ref={inputRef} onFocus={handleInputFocus} onKeyDown={handleKeyDown} - placeholder="Search by hash, id, block height, or error name/type" + placeholder="Search by hash, id, tx id, block height, or error name/type" onKeywordChange={handleKeywordChange} inputClassName="h-8" buttonClassName="size-7" diff --git a/src/components/ui/composites/search-preview/SearchPreview.tsx b/src/components/ui/composites/search-preview/SearchPreview.tsx index b9691f3..d5341d6 100644 --- a/src/components/ui/composites/search-preview/SearchPreview.tsx +++ b/src/components/ui/composites/search-preview/SearchPreview.tsx @@ -148,7 +148,7 @@ export const SearchPreview = forwardRef( renderItem: (tx: any) => ( )