diff --git a/.cursor/rules/page-title.mdc b/.cursor/rules/page-title.mdc new file mode 100644 index 0000000..c88866d --- /dev/null +++ b/.cursor/rules/page-title.mdc @@ -0,0 +1,21 @@ +--- +description: Page titles must use the page-title class for consistent site-wide styling +globs: src/routes/**/*.tsx,src/components/**/*Heading*.tsx,src/components/common/status-page/**/*.tsx +alwaysApply: false +--- + +# Page titles + +Primary page headings must use the shared `page-title` class from `globals.css` so typography stays consistent across listing and detail pages. + +```tsx +// Prefer +

Miner Leaderboard

+ +// Avoid +

Miner Leaderboard

+``` + +- Use on the main route/feature `h1` (one per page). +- Do not restyle page titles with ad-hoc text size/weight/tracking classes unless intentionally overriding a special case (e.g. status codes use separate display styles). +- Optional supporting text under the title can use `page-subtitle`. diff --git a/.cursor/rules/use-bun.mdc b/.cursor/rules/use-bun.mdc new file mode 100644 index 0000000..53d87bd --- /dev/null +++ b/.cursor/rules/use-bun.mdc @@ -0,0 +1,14 @@ +--- +description: Use Bun as the package manager and script runner +alwaysApply: true +--- + +# Use Bun, not npm + +This project uses **Bun** (`bun.lock` / `bun.lockb`). Prefer Bun for all package and script work. + +- Install deps: `bun add ` / `bun add -d ` / `bun install` +- Run scripts: `bun run diff --git a/package.json b/package.json index df8a6da..e3aac11 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "test-storybook:ci": "start-server-and-test serve-storybook http://127.0.0.1:6006 test-storybook", "format": "prettier . --write", "prepare": "husky", - "gen-assets": "svgr --template svgr-template.cjs --index-template svgr-index-template.cjs --icon --title-prop --typescript --jsx-runtime automatic --replace-attr-values currentColor=currentColor,#FFEF00=currentColor --filename-case pascal -d src/assets assets", "gql:compile": "graphql-codegen", "bench:graphql": "bun scripts/graphql-bench.ts" }, @@ -24,14 +23,12 @@ "dependencies": { "@apollo/client": "^3.13.8", "@date-fns/utc": "^2.1.1", - "@fontsource/inter": "^5.2.6", - "@fontsource/jetbrains-mono": "^5.2.6", + "@fontsource/geist-mono": "^5.2.8", + "@fontsource/geist-sans": "^5.2.5", "@radix-ui/react-navigation-menu": "^1.2.13", "@radix-ui/react-popover": "^1.1.14", "@radix-ui/react-select": "^2.2.5", - "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", - "@radix-ui/react-switch": "^1.2.5", "@radix-ui/react-tabs": "^1.1.12", "@subsquid/ss58-codec": "^1.2.3", "@tanstack/react-router": "1.130.12", @@ -63,7 +60,6 @@ "@storybook/addon-onboarding": "^9.0.6", "@storybook/react-vite": "^9.0.6", "@storybook/test-runner": "^0.22.1", - "@svgr/cli": "^8.1.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", "@types/jest": "^29.5.11", diff --git a/src/__generated__/gql.ts b/src/__generated__/gql.ts index 78d2c47..088ebaa 100644 --- a/src/__generated__/gql.ts +++ b/src/__generated__/gql.ts @@ -14,73 +14,59 @@ 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: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\n }\n }\n ': typeof types.GetAccountsDocument; - '\n query GetAccountById($id: String!, $limit: Int!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n accountEvents: account_event(\n limit: $limit\n where: { account_id: { _eq: $id } }\n ) {\n transfer {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n scheduledReversibleTransfer {\n extrinsic {\n id\n pallet\n call\n }\n timestamp\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n executedReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n cancelledReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n minerReward {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n multisig {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n multisigProposalCreated {\n id\n timestamp\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigSignerApproved {\n id\n timestamp\n approvals_count\n approver {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigProposalReady {\n id\n timestamp\n approvals_count\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n executedMultisigProposal {\n id\n timestamp\n approvers\n result\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n cancelledMultisigProposal {\n id\n timestamp\n cancelledBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n removedMultisigProposal {\n id\n timestamp\n removedBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigDepositsClaimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n\n guardian: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { who: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n guardian {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n beneficiaries: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { guardian: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n who {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n wormholeOutputs: wormhole_output(\n order_by: { wormholeExtrinsic: { timestamp: desc } }\n limit: $limit\n where: { exitAccount: { id: { _eq: $id } } }\n ) {\n id\n amount\n exitAccount {\n id\n }\n wormholeExtrinsic {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n block {\n height\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n }\n }\n ': typeof types.GetAccountByIdDocument; + '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n flagEvents: accountEvents(\n where: {\n _or: [\n { high_security_set_id: { _is_null: false } }\n { multisig_id: { _is_null: false } }\n ]\n }\n limit: 20\n ) {\n highSecuritySet {\n who_id\n guardian_id\n }\n multisig_id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\n }\n }\n ': typeof types.GetAccountsDocument; + '\n query GetAccountById($id: String!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n }\n guardian: high_security_set_aggregate(\n where: { who: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n beneficiaries: high_security_set_aggregate(\n where: { guardian: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetAccountByIdDocument; '\n query GetAccountsStats($startDate: timestamptz!, $endDate: timestamptz!) {\n all: chain_stats_by_pk(id: "global") {\n total_accounts\n }\n\n recentlyActive: account_aggregate(\n where: {\n transfersFrom: { timestamp: { _gte: $startDate, _lte: $endDate } }\n }\n ) {\n aggregate {\n count\n }\n }\n\n recentlyDeposited: account_aggregate(\n where: {\n transfersTo: { timestamp: { _gte: $startDate, _lte: $endDate } }\n }\n ) {\n aggregate {\n count\n }\n }\n }\n ': typeof types.GetAccountsStatsDocument; - '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': typeof types.GetBlocksDocument; - '\n query GetRecentBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]\n ) {\n blocks: block(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n }\n ': typeof types.GetRecentBlocksDocument; - '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ': typeof types.GetBlockByIdDocument; + '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n mined_by_id\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': typeof types.GetBlocksDocument; + '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ': typeof types.GetBlockByIdDocument; '\n query GetBlockStats($startDate: timestamptz!, $endDate: timestamptz!) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n finalized_block_height\n }\n minedIn24Hours: block_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetBlockStatsDocument; - '\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: cancelled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetCancelledReversibleTransactionsDocument; - '\n query GetRecentCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': typeof types.GetRecentCancelledReversibleTransactionsDocument; - '\n query GetCancelledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: cancelled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_cancelled_transfers\n }\n }\n ': typeof types.GetCancelledReversibleTransactionsStatsDocument; '\n query GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': typeof types.GetCancelledReversibleTransactionByTxIdDocument; + '\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n': typeof types.GetHomeChainStatsDocument; '\n query GetStatus {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n }\n ': typeof types.GetStatusDocument; '\n query GetErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n meta: error_event_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetErrorEventsDocument; - '\n query GetRecentErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n }\n ': typeof types.GetRecentErrorEventsDocument; '\n query GetErrorEventsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: error_event_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_error_events\n }\n }\n ': typeof types.GetErrorEventsStatsDocument; '\n query GetErrorEventByHash($hash: String!) {\n errorEvents: error_event(where: { extrinsic: { id: { _eq: $hash } } }) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n }\n ': typeof types.GetErrorEventByHashDocument; - '\n query GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: executed_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetExecutedReversibleTransactionsDocument; - '\n query GetRecentExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': typeof types.GetRecentExecutedReversibleTransactionsDocument; - '\n query GetExecutedReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: executed_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_executed_transfers\n }\n }\n ': typeof types.GetExecutedReversibleTransactionsStatsDocument; '\n query GetExecutedReversibleTransactionByTxId($tx_id: String!) {\n executedReversibleTransactions: executed_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': typeof types.GetExecutedReversibleTransactionByTxIdDocument; '\n query GetHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n meta: high_security_set_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetHighSecuritySetsDocument; - '\n query GetRecentHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n }\n ': typeof types.GetRecentHighSecuritySetsDocument; '\n query GetHighSecuritySetsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: high_security_set_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_high_security_sets\n }\n }\n ': typeof types.GetHighSecuritySetsStatsDocument; '\n query GetHighSecuritySetByHash($hash: String!) {\n highSecuritySets: high_security_set(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n }\n ': typeof types.GetHighSecuritySetByHashDocument; + '\n query GetMinerLeaderboardStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n total_miners\n }\n last24Hour: miner_reward_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMinerLeaderboardStatsDocument; '\n query GetMinerLeaderboardChart($limit: Int) {\n topMiners: account_stats(\n limit: $limit\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n }\n blocks: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': typeof types.GetMinerLeaderboardChartDocument; - '\n query GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_rewards: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n }\n }\n ': typeof types.GetMinerLeaderboardDocument; + '\n query GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n block_height\n }\n topMiner: account_stats(\n limit: 1\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n total_mined_blocks\n }\n }\n ': typeof types.GetMinerLeaderboardDocument; '\n query GetMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n meta: miner_reward_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMinerRewardsDocument; - '\n query GetRecentMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $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(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: miner_reward_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_miner_rewards\n }\n }\n ': typeof types.GetMinerRewardsStatsDocument; '\n query GetMinerRewardByHash($hash: String!) {\n minerRewards: miner_reward(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 fragment MultisigCreatedFields on multisig {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigCreatedFieldsFragmentDoc; '\n \n query GetMultisigCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_order_by!]\n $where: multisig_bool_exp\n ) {\n multisigCreatedEvents: multisig(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigCreatedFields\n }\n meta: multisig_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigCreatedDocument; - '\n \n query GetRecentMultisigCreated(\n $limit: Int\n $orderBy: [multisig_order_by!]\n ) {\n multisigCreatedEvents: multisig(limit: $limit, order_by: $orderBy) {\n ...MultisigCreatedFields\n }\n }\n ': typeof types.GetRecentMultisigCreatedDocument; '\n query GetMultisigCreatedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisigs_created\n }\n }\n ': typeof types.GetMultisigCreatedStatsDocument; '\n \n query GetMultisigCreatedByHash($hash: String!) {\n multisigCreatedEvents: multisig(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigCreatedFields\n }\n }\n ': typeof types.GetMultisigCreatedByHashDocument; + '\n \n query GetMultisigById($id: String!) {\n multisig: multisig_by_pk(id: $id) {\n ...MultisigCreatedFields\n }\n }\n ': typeof types.GetMultisigByIdDocument; '\n fragment MultisigDepositsClaimedFields on multisig_deposits_claimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigDepositsClaimedFieldsFragmentDoc; '\n \n query GetMultisigDepositsClaimed(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n $where: multisig_deposits_claimed_bool_exp\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigDepositsClaimedFields\n }\n meta: multisig_deposits_claimed_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigDepositsClaimedDocument; - '\n \n query GetRecentMultisigDepositsClaimed(\n $limit: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigDepositsClaimedFields\n }\n }\n ': typeof types.GetRecentMultisigDepositsClaimedDocument; '\n query GetMultisigDepositsClaimedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_deposits_claimed_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_deposits_claimed\n }\n }\n ': typeof types.GetMultisigDepositsClaimedStatsDocument; '\n \n query GetMultisigDepositsClaimedByHash($hash: String!) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigDepositsClaimedFields\n }\n }\n ': typeof types.GetMultisigDepositsClaimedByHashDocument; '\n fragment MultisigProposalCancelledFields on cancelled_multisig_proposal {\n id\n timestamp\n cancelledBy {\n id\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigProposalCancelledFieldsFragmentDoc; '\n \n query GetMultisigProposalCancelled(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n $where: cancelled_multisig_proposal_bool_exp\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCancelledFields\n }\n meta: cancelled_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigProposalCancelledDocument; - '\n \n query GetRecentMultisigProposalCancelled(\n $limit: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCancelledFields\n }\n }\n ': typeof types.GetRecentMultisigProposalCancelledDocument; '\n query GetMultisigProposalCancelledStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: cancelled_multisig_proposal_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals_cancelled\n }\n }\n ': typeof types.GetMultisigProposalCancelledStatsDocument; '\n \n query GetMultisigProposalCancelledByHash($hash: String!) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalCancelledFields\n }\n }\n ': typeof types.GetMultisigProposalCancelledByHashDocument; '\n fragment MultisigProposalRefFields on multisig_proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n': typeof types.MultisigProposalRefFieldsFragmentDoc; '\n \n fragment MultisigProposalCreatedFields on multisig_proposal_created {\n id\n timestamp\n proposal {\n ...MultisigProposalRefFields\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigProposalCreatedFieldsFragmentDoc; '\n \n query GetMultisigProposalCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_created_order_by!]\n $where: multisig_proposal_created_bool_exp\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCreatedFields\n }\n meta: multisig_proposal_created_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigProposalCreatedDocument; - '\n \n query GetRecentMultisigProposalCreated(\n $limit: Int\n $orderBy: [multisig_proposal_created_order_by!]\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCreatedFields\n }\n }\n ': typeof types.GetRecentMultisigProposalCreatedDocument; '\n query GetMultisigProposalCreatedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_proposal_created_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals\n }\n }\n ': typeof types.GetMultisigProposalCreatedStatsDocument; '\n \n query GetMultisigProposalCreatedByHash($hash: String!) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalCreatedFields\n }\n }\n ': typeof types.GetMultisigProposalCreatedByHashDocument; '\n fragment MultisigProposalExecutedFields on executed_multisig_proposal {\n id\n timestamp\n approvers\n result\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigProposalExecutedFieldsFragmentDoc; '\n \n query GetMultisigProposalExecuted(\n $limit: Int\n $offset: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n $where: executed_multisig_proposal_bool_exp\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalExecutedFields\n }\n meta: executed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigProposalExecutedDocument; - '\n \n query GetRecentMultisigProposalExecuted(\n $limit: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalExecutedFields\n }\n }\n ': typeof types.GetRecentMultisigProposalExecutedDocument; '\n query GetMultisigProposalExecutedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: executed_multisig_proposal_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals_executed\n }\n }\n ': typeof types.GetMultisigProposalExecutedStatsDocument; '\n \n query GetMultisigProposalExecutedByHash($hash: String!) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalExecutedFields\n }\n }\n ': typeof types.GetMultisigProposalExecutedByHashDocument; '\n fragment MultisigProposalReadyFields on multisig_proposal_ready {\n id\n timestamp\n approvals_count\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigProposalReadyFieldsFragmentDoc; '\n \n query GetMultisigProposalReady(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n $where: multisig_proposal_ready_bool_exp\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalReadyFields\n }\n meta: multisig_proposal_ready_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigProposalReadyDocument; - '\n \n query GetRecentMultisigProposalReady(\n $limit: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalReadyFields\n }\n }\n ': typeof types.GetRecentMultisigProposalReadyDocument; '\n query GetMultisigProposalReadyStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_proposal_ready_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposal_ready\n }\n }\n ': typeof types.GetMultisigProposalReadyStatsDocument; '\n \n query GetMultisigProposalReadyByHash($hash: String!) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalReadyFields\n }\n }\n ': typeof types.GetMultisigProposalReadyByHashDocument; '\n fragment MultisigProposalRemovedFields on removed_multisig_proposal {\n id\n timestamp\n removedBy {\n id\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigProposalRemovedFieldsFragmentDoc; '\n \n query GetMultisigProposalRemoved(\n $limit: Int\n $offset: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n $where: removed_multisig_proposal_bool_exp\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalRemovedFields\n }\n meta: removed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigProposalRemovedDocument; - '\n \n query GetRecentMultisigProposalRemoved(\n $limit: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalRemovedFields\n }\n }\n ': typeof types.GetRecentMultisigProposalRemovedDocument; '\n query GetMultisigProposalRemovedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: removed_multisig_proposal_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals_removed\n }\n }\n ': typeof types.GetMultisigProposalRemovedStatsDocument; '\n \n query GetMultisigProposalRemovedByHash($hash: String!) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalRemovedFields\n }\n }\n ': typeof types.GetMultisigProposalRemovedByHashDocument; - '\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n': typeof types.MultisigProposalListFieldsFragmentDoc; + '\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n approvals\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n': typeof types.MultisigProposalListFieldsFragmentDoc; '\n fragment MultisigProposalDetailFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n approvals\n pallet\n call\n call_raw\n decode_error\n created_at\n tx_id\n transfer_amount\n schedule_amount\n delay_kind\n delay_value\n schedule_asset_id\n multisig {\n id\n }\n proposer {\n id\n }\n guardian {\n id\n }\n transferTo {\n id\n }\n scheduleTo {\n id\n }\n recoverAccount {\n id\n }\n createdExtrinsic {\n id\n pallet\n call\n }\n createdAtBlock {\n height\n }\n }\n': typeof types.MultisigProposalDetailFieldsFragmentDoc; '\n fragment MultisigProposalLifecycleEventFields on multisig_proposal_created {\n id\n timestamp\n extrinsic {\n id\n }\n block {\n height\n }\n }\n': typeof types.MultisigProposalLifecycleEventFieldsFragmentDoc; '\n \n query GetMultisigProposals(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_order_by!]\n $where: multisig_proposal_bool_exp\n ) {\n multisigProposals: multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalListFields\n }\n meta: multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigProposalsDocument; @@ -88,79 +74,62 @@ type Documents = { '\n \n \n query GetMultisigProposalById($id: String!) {\n multisigProposal: multisig_proposal_by_pk(id: $id) {\n ...MultisigProposalDetailFields\n }\n createdEvents: multisig_proposal_created(\n where: { proposal_id: { _eq: $id } }\n order_by: { timestamp: asc }\n ) {\n ...MultisigProposalLifecycleEventFields\n }\n signerApprovedEvents: multisig_signer_approved(\n where: { proposal_id: { _eq: $id } }\n order_by: { timestamp: asc }\n ) {\n id\n timestamp\n extrinsic {\n id\n }\n block {\n height\n }\n }\n readyEvents: multisig_proposal_ready(\n where: { proposal_id: { _eq: $id } }\n order_by: { timestamp: asc }\n ) {\n id\n timestamp\n extrinsic {\n id\n }\n block {\n height\n }\n }\n executedEvents: executed_multisig_proposal(\n where: { proposal_id: { _eq: $id } }\n order_by: { timestamp: asc }\n ) {\n id\n timestamp\n extrinsic {\n id\n }\n block {\n height\n }\n }\n cancelledEvents: cancelled_multisig_proposal(\n where: { proposal_id: { _eq: $id } }\n order_by: { timestamp: asc }\n ) {\n id\n timestamp\n extrinsic {\n id\n }\n block {\n height\n }\n }\n removedEvents: removed_multisig_proposal(\n where: { proposal_id: { _eq: $id } }\n order_by: { timestamp: asc }\n ) {\n id\n timestamp\n extrinsic {\n id\n }\n block {\n height\n }\n }\n }\n ': typeof types.GetMultisigProposalByIdDocument; '\n fragment MultisigSignerApprovedFields on multisig_signer_approved {\n id\n timestamp\n approvals_count\n approver {\n id\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': typeof types.MultisigSignerApprovedFieldsFragmentDoc; '\n \n query GetMultisigSignerApproved(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_signer_approved_order_by!]\n $where: multisig_signer_approved_bool_exp\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigSignerApprovedFields\n }\n meta: multisig_signer_approved_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetMultisigSignerApprovedDocument; - '\n \n query GetRecentMultisigSignerApproved(\n $limit: Int\n $orderBy: [multisig_signer_approved_order_by!]\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigSignerApprovedFields\n }\n }\n ': typeof types.GetRecentMultisigSignerApprovedDocument; '\n query GetMultisigSignerApprovedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_signer_approved_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_signer_approved\n }\n }\n ': typeof types.GetMultisigSignerApprovedStatsDocument; '\n \n query GetMultisigSignerApprovedByHash($hash: String!) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigSignerApprovedFields\n }\n }\n ': typeof types.GetMultisigSignerApprovedByHashDocument; - '\n query GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: scheduled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetScheduledReversibleTransactionsDocument; - '\n query GetRecentScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetRecentScheduledReversibleTransactionsDocument; - '\n query GetScheduledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: scheduled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_scheduled_transfers\n }\n }\n ': typeof types.GetScheduledReversibleTransactionsStatsDocument; '\n query GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetScheduledReversibleTransactionByTxIdDocument; - '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfer(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n tx_id\n }\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n minerRewards: miner_reward(\n limit: $limit\n where: { block: { hash: { _ilike: $keyword } } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ': typeof types.SearchAllDocument; - '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n meta: transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetTransactionsDocument; - '\n query GetRecentTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\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(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_immediate_transfers\n }\n }\n ': typeof types.GetTransactionsStatsDocument; - '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfers: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetExtrinsicByHashDocument; - '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_label\n block {\n height\n }\n }\n meta: wormhole_extrinsic_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n': typeof types.GetWormholeExtrinsicsDocument; + '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ': typeof types.SearchAllDocument; + '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ': typeof types.GetExtrinsicByHashDocument; + '\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetUnifiedTransactionsDocument; + '\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': typeof types.GetRecentUnifiedTransactionsDocument; + '\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\n }\n }\n }\n ': typeof types.GetUnifiedTransactionsStatsDocument; '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\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: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\n }\n }\n': typeof types.GetWormholeExtrinsicByIdDocument; - '\n query GetDepositPoolStats {\n depositPoolStatsById: deposit_pool_stats_by_pk(id: "global") {\n last_updated_block\n buckets\n }\n }\n': typeof types.GetDepositPoolStatsDocument; + '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n }\n }\n }\n': typeof types.GetTransactionsDocument; + '\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n': typeof types.GetCancelledReversibleTransactionsDocument; + '\n query GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n': typeof types.GetExecutedReversibleTransactionsDocument; + '\n query GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n': typeof types.GetScheduledReversibleTransactionsDocument; + '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n }\n }\n': typeof types.GetWormholeExtrinsicsDocument; }; const documents: Documents = { - '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\n }\n }\n ': + '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n flagEvents: accountEvents(\n where: {\n _or: [\n { high_security_set_id: { _is_null: false } }\n { multisig_id: { _is_null: false } }\n ]\n }\n limit: 20\n ) {\n highSecuritySet {\n who_id\n guardian_id\n }\n multisig_id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\n }\n }\n ': types.GetAccountsDocument, - '\n query GetAccountById($id: String!, $limit: Int!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n accountEvents: account_event(\n limit: $limit\n where: { account_id: { _eq: $id } }\n ) {\n transfer {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n scheduledReversibleTransfer {\n extrinsic {\n id\n pallet\n call\n }\n timestamp\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n executedReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n cancelledReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n minerReward {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n multisig {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n multisigProposalCreated {\n id\n timestamp\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigSignerApproved {\n id\n timestamp\n approvals_count\n approver {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigProposalReady {\n id\n timestamp\n approvals_count\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n executedMultisigProposal {\n id\n timestamp\n approvers\n result\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n cancelledMultisigProposal {\n id\n timestamp\n cancelledBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n removedMultisigProposal {\n id\n timestamp\n removedBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigDepositsClaimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n\n guardian: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { who: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n guardian {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n beneficiaries: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { guardian: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n who {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n wormholeOutputs: wormhole_output(\n order_by: { wormholeExtrinsic: { timestamp: desc } }\n limit: $limit\n where: { exitAccount: { id: { _eq: $id } } }\n ) {\n id\n amount\n exitAccount {\n id\n }\n wormholeExtrinsic {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n block {\n height\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n }\n }\n ': + '\n query GetAccountById($id: String!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n }\n guardian: high_security_set_aggregate(\n where: { who: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n beneficiaries: high_security_set_aggregate(\n where: { guardian: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetAccountByIdDocument, '\n query GetAccountsStats($startDate: timestamptz!, $endDate: timestamptz!) {\n all: chain_stats_by_pk(id: "global") {\n total_accounts\n }\n\n recentlyActive: account_aggregate(\n where: {\n transfersFrom: { timestamp: { _gte: $startDate, _lte: $endDate } }\n }\n ) {\n aggregate {\n count\n }\n }\n\n recentlyDeposited: account_aggregate(\n where: {\n transfersTo: { timestamp: { _gte: $startDate, _lte: $endDate } }\n }\n ) {\n aggregate {\n count\n }\n }\n }\n ': types.GetAccountsStatsDocument, - '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': + '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n mined_by_id\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': types.GetBlocksDocument, - '\n query GetRecentBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]\n ) {\n blocks: block(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n }\n ': - types.GetRecentBlocksDocument, - '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ': + '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ': types.GetBlockByIdDocument, '\n query GetBlockStats($startDate: timestamptz!, $endDate: timestamptz!) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n finalized_block_height\n }\n minedIn24Hours: block_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetBlockStatsDocument, - '\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: cancelled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': - types.GetCancelledReversibleTransactionsDocument, - '\n query GetRecentCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': - types.GetRecentCancelledReversibleTransactionsDocument, - '\n query GetCancelledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: cancelled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_cancelled_transfers\n }\n }\n ': - types.GetCancelledReversibleTransactionsStatsDocument, '\n query GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': types.GetCancelledReversibleTransactionByTxIdDocument, + '\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n': + types.GetHomeChainStatsDocument, '\n query GetStatus {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n }\n ': types.GetStatusDocument, '\n query GetErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n meta: error_event_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetErrorEventsDocument, - '\n query GetRecentErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n }\n ': - types.GetRecentErrorEventsDocument, '\n query GetErrorEventsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: error_event_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_error_events\n }\n }\n ': types.GetErrorEventsStatsDocument, '\n query GetErrorEventByHash($hash: String!) {\n errorEvents: error_event(where: { extrinsic: { id: { _eq: $hash } } }) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n }\n ': types.GetErrorEventByHashDocument, - '\n query GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: executed_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': - types.GetExecutedReversibleTransactionsDocument, - '\n query GetRecentExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': - types.GetRecentExecutedReversibleTransactionsDocument, - '\n query GetExecutedReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: executed_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_executed_transfers\n }\n }\n ': - types.GetExecutedReversibleTransactionsStatsDocument, '\n query GetExecutedReversibleTransactionByTxId($tx_id: String!) {\n executedReversibleTransactions: executed_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ': types.GetExecutedReversibleTransactionByTxIdDocument, '\n query GetHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n meta: high_security_set_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetHighSecuritySetsDocument, - '\n query GetRecentHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n }\n ': - types.GetRecentHighSecuritySetsDocument, '\n query GetHighSecuritySetsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: high_security_set_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_high_security_sets\n }\n }\n ': types.GetHighSecuritySetsStatsDocument, '\n query GetHighSecuritySetByHash($hash: String!) {\n highSecuritySets: high_security_set(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n }\n ': types.GetHighSecuritySetByHashDocument, + '\n query GetMinerLeaderboardStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n total_miners\n }\n last24Hour: miner_reward_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': + types.GetMinerLeaderboardStatsDocument, '\n query GetMinerLeaderboardChart($limit: Int) {\n topMiners: account_stats(\n limit: $limit\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n }\n blocks: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ': types.GetMinerLeaderboardChartDocument, - '\n query GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_rewards: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n }\n }\n ': + '\n query GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n block_height\n }\n topMiner: account_stats(\n limit: 1\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n total_mined_blocks\n }\n }\n ': types.GetMinerLeaderboardDocument, '\n query GetMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n meta: miner_reward_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMinerRewardsDocument, - '\n query GetRecentMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ': - types.GetRecentMinerRewardsDocument, '\n query GetMinerRewardsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: miner_reward_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_miner_rewards\n }\n }\n ': types.GetMinerRewardsStatsDocument, '\n query GetMinerRewardByHash($hash: String!) {\n minerRewards: miner_reward(where: { block: { hash: { _eq: $hash } } }) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ': @@ -169,18 +138,16 @@ const documents: Documents = { types.MultisigCreatedFieldsFragmentDoc, '\n \n query GetMultisigCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_order_by!]\n $where: multisig_bool_exp\n ) {\n multisigCreatedEvents: multisig(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigCreatedFields\n }\n meta: multisig_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigCreatedDocument, - '\n \n query GetRecentMultisigCreated(\n $limit: Int\n $orderBy: [multisig_order_by!]\n ) {\n multisigCreatedEvents: multisig(limit: $limit, order_by: $orderBy) {\n ...MultisigCreatedFields\n }\n }\n ': - types.GetRecentMultisigCreatedDocument, '\n query GetMultisigCreatedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisigs_created\n }\n }\n ': types.GetMultisigCreatedStatsDocument, '\n \n query GetMultisigCreatedByHash($hash: String!) {\n multisigCreatedEvents: multisig(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigCreatedFields\n }\n }\n ': types.GetMultisigCreatedByHashDocument, + '\n \n query GetMultisigById($id: String!) {\n multisig: multisig_by_pk(id: $id) {\n ...MultisigCreatedFields\n }\n }\n ': + types.GetMultisigByIdDocument, '\n fragment MultisigDepositsClaimedFields on multisig_deposits_claimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n': types.MultisigDepositsClaimedFieldsFragmentDoc, '\n \n query GetMultisigDepositsClaimed(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n $where: multisig_deposits_claimed_bool_exp\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigDepositsClaimedFields\n }\n meta: multisig_deposits_claimed_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigDepositsClaimedDocument, - '\n \n query GetRecentMultisigDepositsClaimed(\n $limit: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigDepositsClaimedFields\n }\n }\n ': - types.GetRecentMultisigDepositsClaimedDocument, '\n query GetMultisigDepositsClaimedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_deposits_claimed_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_deposits_claimed\n }\n }\n ': types.GetMultisigDepositsClaimedStatsDocument, '\n \n query GetMultisigDepositsClaimedByHash($hash: String!) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigDepositsClaimedFields\n }\n }\n ': @@ -189,8 +156,6 @@ const documents: Documents = { types.MultisigProposalCancelledFieldsFragmentDoc, '\n \n query GetMultisigProposalCancelled(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n $where: cancelled_multisig_proposal_bool_exp\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCancelledFields\n }\n meta: cancelled_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigProposalCancelledDocument, - '\n \n query GetRecentMultisigProposalCancelled(\n $limit: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCancelledFields\n }\n }\n ': - types.GetRecentMultisigProposalCancelledDocument, '\n query GetMultisigProposalCancelledStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: cancelled_multisig_proposal_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals_cancelled\n }\n }\n ': types.GetMultisigProposalCancelledStatsDocument, '\n \n query GetMultisigProposalCancelledByHash($hash: String!) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalCancelledFields\n }\n }\n ': @@ -201,8 +166,6 @@ const documents: Documents = { types.MultisigProposalCreatedFieldsFragmentDoc, '\n \n query GetMultisigProposalCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_created_order_by!]\n $where: multisig_proposal_created_bool_exp\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCreatedFields\n }\n meta: multisig_proposal_created_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigProposalCreatedDocument, - '\n \n query GetRecentMultisigProposalCreated(\n $limit: Int\n $orderBy: [multisig_proposal_created_order_by!]\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCreatedFields\n }\n }\n ': - types.GetRecentMultisigProposalCreatedDocument, '\n query GetMultisigProposalCreatedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_proposal_created_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals\n }\n }\n ': types.GetMultisigProposalCreatedStatsDocument, '\n \n query GetMultisigProposalCreatedByHash($hash: String!) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalCreatedFields\n }\n }\n ': @@ -211,8 +174,6 @@ const documents: Documents = { types.MultisigProposalExecutedFieldsFragmentDoc, '\n \n query GetMultisigProposalExecuted(\n $limit: Int\n $offset: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n $where: executed_multisig_proposal_bool_exp\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalExecutedFields\n }\n meta: executed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigProposalExecutedDocument, - '\n \n query GetRecentMultisigProposalExecuted(\n $limit: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalExecutedFields\n }\n }\n ': - types.GetRecentMultisigProposalExecutedDocument, '\n query GetMultisigProposalExecutedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: executed_multisig_proposal_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals_executed\n }\n }\n ': types.GetMultisigProposalExecutedStatsDocument, '\n \n query GetMultisigProposalExecutedByHash($hash: String!) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalExecutedFields\n }\n }\n ': @@ -221,8 +182,6 @@ const documents: Documents = { types.MultisigProposalReadyFieldsFragmentDoc, '\n \n query GetMultisigProposalReady(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n $where: multisig_proposal_ready_bool_exp\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalReadyFields\n }\n meta: multisig_proposal_ready_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigProposalReadyDocument, - '\n \n query GetRecentMultisigProposalReady(\n $limit: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalReadyFields\n }\n }\n ': - types.GetRecentMultisigProposalReadyDocument, '\n query GetMultisigProposalReadyStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_proposal_ready_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposal_ready\n }\n }\n ': types.GetMultisigProposalReadyStatsDocument, '\n \n query GetMultisigProposalReadyByHash($hash: String!) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalReadyFields\n }\n }\n ': @@ -231,13 +190,11 @@ const documents: Documents = { types.MultisigProposalRemovedFieldsFragmentDoc, '\n \n query GetMultisigProposalRemoved(\n $limit: Int\n $offset: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n $where: removed_multisig_proposal_bool_exp\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalRemovedFields\n }\n meta: removed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigProposalRemovedDocument, - '\n \n query GetRecentMultisigProposalRemoved(\n $limit: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalRemovedFields\n }\n }\n ': - types.GetRecentMultisigProposalRemovedDocument, '\n query GetMultisigProposalRemovedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: removed_multisig_proposal_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_proposals_removed\n }\n }\n ': types.GetMultisigProposalRemovedStatsDocument, '\n \n query GetMultisigProposalRemovedByHash($hash: String!) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigProposalRemovedFields\n }\n }\n ': types.GetMultisigProposalRemovedByHashDocument, - '\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n': + '\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n approvals\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n': types.MultisigProposalListFieldsFragmentDoc, '\n fragment MultisigProposalDetailFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n approvals\n pallet\n call\n call_raw\n decode_error\n created_at\n tx_id\n transfer_amount\n schedule_amount\n delay_kind\n delay_value\n schedule_asset_id\n multisig {\n id\n }\n proposer {\n id\n }\n guardian {\n id\n }\n transferTo {\n id\n }\n scheduleTo {\n id\n }\n recoverAccount {\n id\n }\n createdExtrinsic {\n id\n pallet\n call\n }\n createdAtBlock {\n height\n }\n }\n': types.MultisigProposalDetailFieldsFragmentDoc, @@ -253,36 +210,34 @@ const documents: Documents = { types.MultisigSignerApprovedFieldsFragmentDoc, '\n \n query GetMultisigSignerApproved(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_signer_approved_order_by!]\n $where: multisig_signer_approved_bool_exp\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigSignerApprovedFields\n }\n meta: multisig_signer_approved_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': types.GetMultisigSignerApprovedDocument, - '\n \n query GetRecentMultisigSignerApproved(\n $limit: Int\n $orderBy: [multisig_signer_approved_order_by!]\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigSignerApprovedFields\n }\n }\n ': - types.GetRecentMultisigSignerApprovedDocument, '\n query GetMultisigSignerApprovedStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: multisig_signer_approved_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_multisig_signer_approved\n }\n }\n ': types.GetMultisigSignerApprovedStatsDocument, '\n \n query GetMultisigSignerApprovedByHash($hash: String!) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n where: { extrinsic: { id: { _eq: $hash } } }\n ) {\n ...MultisigSignerApprovedFields\n }\n }\n ': types.GetMultisigSignerApprovedByHashDocument, - '\n query GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: scheduled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': - types.GetScheduledReversibleTransactionsDocument, - '\n query GetRecentScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': - types.GetRecentScheduledReversibleTransactionsDocument, - '\n query GetScheduledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: scheduled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_scheduled_transfers\n }\n }\n ': - types.GetScheduledReversibleTransactionsStatsDocument, '\n query GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': types.GetScheduledReversibleTransactionByTxIdDocument, - '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfer(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n tx_id\n }\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n minerRewards: miner_reward(\n limit: $limit\n where: { block: { hash: { _ilike: $keyword } } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ': + '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ': types.SearchAllDocument, - '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n meta: transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': - types.GetTransactionsDocument, - '\n query GetRecentTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': - types.GetRecentTransactionsDocument, - '\n query GetTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_immediate_transfers\n }\n }\n ': - types.GetTransactionsStatsDocument, - '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfers: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': + '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ': types.GetExtrinsicByHashDocument, - '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_label\n block {\n height\n }\n }\n meta: wormhole_extrinsic_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n': - types.GetWormholeExtrinsicsDocument, + '\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ': + types.GetUnifiedTransactionsDocument, + '\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ': + types.GetRecentUnifiedTransactionsDocument, + '\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\n }\n }\n }\n ': + types.GetUnifiedTransactionsStatsDocument, '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\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: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\n }\n }\n': types.GetWormholeExtrinsicByIdDocument, - '\n query GetDepositPoolStats {\n depositPoolStatsById: deposit_pool_stats_by_pk(id: "global") {\n last_updated_block\n buckets\n }\n }\n': - types.GetDepositPoolStatsDocument + '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n }\n }\n }\n': + types.GetTransactionsDocument, + '\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n': + types.GetCancelledReversibleTransactionsDocument, + '\n query GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n': + types.GetExecutedReversibleTransactionsDocument, + '\n query GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n': + types.GetScheduledReversibleTransactionsDocument, + '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n }\n }\n': + types.GetWormholeExtrinsicsDocument }; /** @@ -303,14 +258,14 @@ 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: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\n }\n }\n ' -): (typeof documents)['\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\n }\n }\n ']; + source: '\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n flagEvents: accountEvents(\n where: {\n _or: [\n { high_security_set_id: { _is_null: false } }\n { multisig_id: { _is_null: false } }\n ]\n }\n limit: 20\n ) {\n highSecuritySet {\n who_id\n guardian_id\n }\n multisig_id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\n }\n }\n ' +): (typeof documents)['\n query GetAccounts(\n $limit: Int\n $offset: Int\n $orderBy: [account_order_by!]\n ) {\n accounts: account(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n free\n frozen\n reserved\n flagEvents: accountEvents(\n where: {\n _or: [\n { high_security_set_id: { _is_null: false } }\n { multisig_id: { _is_null: false } }\n ]\n }\n limit: 20\n ) {\n highSecuritySet {\n who_id\n guardian_id\n }\n multisig_id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_accounts\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: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n accountEvents: account_event(\n limit: $limit\n where: { account_id: { _eq: $id } }\n ) {\n transfer {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n scheduledReversibleTransfer {\n extrinsic {\n id\n pallet\n call\n }\n timestamp\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n executedReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n cancelledReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n minerReward {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n multisig {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n multisigProposalCreated {\n id\n timestamp\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigSignerApproved {\n id\n timestamp\n approvals_count\n approver {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigProposalReady {\n id\n timestamp\n approvals_count\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n executedMultisigProposal {\n id\n timestamp\n approvers\n result\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n cancelledMultisigProposal {\n id\n timestamp\n cancelledBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n removedMultisigProposal {\n id\n timestamp\n removedBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigDepositsClaimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n\n guardian: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { who: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n guardian {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n beneficiaries: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { guardian: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n who {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n wormholeOutputs: wormhole_output(\n order_by: { wormholeExtrinsic: { timestamp: desc } }\n limit: $limit\n where: { exitAccount: { id: { _eq: $id } } }\n ) {\n id\n amount\n exitAccount {\n id\n }\n wormholeExtrinsic {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n block {\n height\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n }\n }\n ' -): (typeof documents)['\n query GetAccountById($id: String!, $limit: Int!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n accountEvents: account_event(\n limit: $limit\n where: { account_id: { _eq: $id } }\n ) {\n transfer {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n scheduledReversibleTransfer {\n extrinsic {\n id\n pallet\n call\n }\n timestamp\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n executedReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n cancelledReversibleTransfer {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n minerReward {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n multisig {\n id\n timestamp\n threshold\n nonce\n signers\n creator {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n multisigProposalCreated {\n id\n timestamp\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigSignerApproved {\n id\n timestamp\n approvals_count\n approver {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigProposalReady {\n id\n timestamp\n approvals_count\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n executedMultisigProposal {\n id\n timestamp\n approvers\n result\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n cancelledMultisigProposal {\n id\n timestamp\n cancelledBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n removedMultisigProposal {\n id\n timestamp\n removedBy {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n proposal {\n id\n multisig {\n id\n }\n proposer {\n id\n }\n }\n }\n multisigDepositsClaimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n\n guardian: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { who: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n guardian {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n beneficiaries: high_security_set_aggregate(\n order_by: { timestamp: desc }\n limit: $limit\n where: { guardian: { id: { _eq: $id } } }\n ) {\n nodes {\n timestamp\n block {\n height\n }\n who {\n id\n free\n frozen\n reserved\n }\n }\n aggregate {\n totalCount: count\n }\n }\n\n wormholeOutputs: wormhole_output(\n order_by: { wormholeExtrinsic: { timestamp: desc } }\n limit: $limit\n where: { exitAccount: { id: { _eq: $id } } }\n ) {\n id\n amount\n exitAccount {\n id\n }\n wormholeExtrinsic {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n block {\n height\n }\n outputs {\n id\n exitAccount {\n id\n }\n amount\n }\n }\n }\n }\n ']; + source: '\n query GetAccountById($id: String!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n }\n guardian: high_security_set_aggregate(\n where: { who: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n beneficiaries: high_security_set_aggregate(\n where: { guardian: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' +): (typeof documents)['\n query GetAccountById($id: String!) {\n account: account_by_pk(id: $id) {\n id\n free\n frozen\n reserved\n }\n accountStats: account_stats_by_pk(id: $id) {\n total_cancelled_transfers\n total_executed_transfers\n total_immediate_transfers\n total_mined_blocks\n total_rewards\n total_scheduled_transfers\n }\n multisig: multisig_by_pk(id: $id) {\n id\n }\n guardian: high_security_set_aggregate(\n where: { who: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n beneficiaries: high_security_set_aggregate(\n where: { guardian: { id: { _eq: $id } } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -321,20 +276,14 @@ export function gql( * 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: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ' -): (typeof documents)['\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\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: [block_order_by!]\n ) {\n blocks: block(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]\n ) {\n blocks: block(limit: $limit, offset: $offset, order_by: $orderBy) {\n id\n hash\n height\n reward\n timestamp\n extrinsics {\n id\n }\n }\n }\n ']; + source: '\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n mined_by_id\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ' +): (typeof documents)['\n query GetBlocks(\n $limit: Int\n $offset: Int\n $orderBy: [block_order_by!]!\n $where: block_bool_exp\n ) {\n blocks: block(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n hash\n height\n reward\n timestamp\n mined_by_id\n extrinsics {\n id\n }\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: block_height\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!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ' -): (typeof documents)['\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ']; + source: '\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ' +): (typeof documents)['\n query GetBlockById($height: Int!, $hash: String!) {\n blocks: block(\n where: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n ) {\n id\n hash\n height\n reward\n timestamp\n extrinsics(order_by: { index_in_block: asc }) {\n id\n pallet\n call\n success\n fee\n timestamp\n indexInBlock: index_in_block\n signer {\n id\n }\n }\n }\n minerRewards: miner_reward(\n where: {\n block: {\n _or: [{ height: { _eq: $height } }, { hash: { _eq: $hash } }]\n }\n }\n ) {\n reward\n timestamp\n miner {\n id\n }\n block {\n height\n hash\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -345,26 +294,14 @@ export function gql( * 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 GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: cancelled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: cancelled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 GetRecentCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\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 GetCancelledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: cancelled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_cancelled_transfers\n }\n }\n ' -): (typeof documents)['\n query GetCancelledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: cancelled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_cancelled_transfers\n }\n }\n ']; + source: '\n query GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ' +): (typeof documents)['\n query GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\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 GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ' -): (typeof documents)['\n query GetCancelledReversibleTransactionByTxId($tx_id: String!) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n timestamp\n tx_id\n block {\n height\n }\n cancelledBy {\n id\n }\n extrinsic {\n id\n pallet\n call\n }\n scheduledTransfer {\n amount\n scheduled_at\n fee\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ']; + source: '\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n' +): (typeof documents)['\n query GetHomeChainStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n $day0Start: timestamptz!\n $day0End: timestamptz!\n $day1Start: timestamptz!\n $day1End: timestamptz!\n $day2Start: timestamptz!\n $day2End: timestamptz!\n $day3Start: timestamptz!\n $day3End: timestamptz!\n $day4Start: timestamptz!\n $day4End: timestamptz!\n $day5Start: timestamptz!\n $day5End: timestamptz!\n $day6Start: timestamptz!\n $day6End: timestamptz!\n ) {\n status: chain_stats_by_pk(id: "global") {\n block_height\n total_accounts\n total_deposit_accounts\n total_executed_transfers\n total_immediate_transfers\n total_scheduled_transfers\n total_cancelled_transfers\n }\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n blocksDay0: block_aggregate(\n where: { timestamp: { _gte: $day0Start, _lte: $day0End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay0: transfer_aggregate(\n where: {\n timestamp: { _gte: $day0Start, _lte: $day0End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay1: block_aggregate(\n where: { timestamp: { _gte: $day1Start, _lte: $day1End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay1: transfer_aggregate(\n where: {\n timestamp: { _gte: $day1Start, _lte: $day1End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay2: block_aggregate(\n where: { timestamp: { _gte: $day2Start, _lte: $day2End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay2: transfer_aggregate(\n where: {\n timestamp: { _gte: $day2Start, _lte: $day2End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay3: block_aggregate(\n where: { timestamp: { _gte: $day3Start, _lte: $day3End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay3: transfer_aggregate(\n where: {\n timestamp: { _gte: $day3Start, _lte: $day3End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay4: block_aggregate(\n where: { timestamp: { _gte: $day4Start, _lte: $day4End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay4: transfer_aggregate(\n where: {\n timestamp: { _gte: $day4Start, _lte: $day4End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay5: block_aggregate(\n where: { timestamp: { _gte: $day5Start, _lte: $day5End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay5: transfer_aggregate(\n where: {\n timestamp: { _gte: $day5Start, _lte: $day5End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n blocksDay6: block_aggregate(\n where: { timestamp: { _gte: $day6Start, _lte: $day6End } }\n ) {\n aggregate {\n count\n }\n }\n transfersDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n count\n }\n }\n activeAccountsDay6: transfer_aggregate(\n where: {\n timestamp: { _gte: $day6Start, _lte: $day6End }\n from_id: { _is_null: false }\n }\n ) {\n aggregate {\n count(columns: [from_id], distinct: true)\n }\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -377,12 +314,6 @@ export function gql( export function gql( source: '\n query GetErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n meta: error_event_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n query GetErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n meta: error_event_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 GetRecentErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentErrorEvents(\n $limit: Int\n $offset: Int\n $orderBy: [error_event_order_by!]\n $where: error_event_bool_exp\n ) {\n errorEvents: error_event(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -395,24 +326,6 @@ export function gql( export function gql( source: '\n query GetErrorEventByHash($hash: String!) {\n errorEvents: error_event(where: { extrinsic: { id: { _eq: $hash } } }) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\n }\n }\n }\n ' ): (typeof documents)['\n query GetErrorEventByHash($hash: String!) {\n errorEvents: error_event(where: { extrinsic: { id: { _eq: $hash } } }) {\n error_docs\n error_module\n error_name\n error_type\n extrinsic {\n id\n pallet\n call\n }\n id\n timestamp\n block {\n height\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 GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: executed_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n query GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n meta: executed_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 GetRecentExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n timestamp\n tx_id\n block {\n height\n }\n scheduledTransfer {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\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 GetExecutedReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: executed_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_executed_transfers\n }\n }\n ' -): (typeof documents)['\n query GetExecutedReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: executed_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_executed_transfers\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -425,12 +338,6 @@ export function gql( export function gql( source: '\n query GetHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n meta: high_security_set_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n query GetHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n meta: high_security_set_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 GetRecentHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentHighSecuritySets(\n $limit: Int\n $offset: Int\n $orderBy: [high_security_set_order_by!]\n $where: high_security_set_bool_exp\n ) {\n highSecuritySets: high_security_set(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n who {\n id\n }\n guardian {\n id\n }\n timestamp\n delay\n block {\n height\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -447,26 +354,26 @@ export function gql( * 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 GetMinerLeaderboardChart($limit: Int) {\n topMiners: account_stats(\n limit: $limit\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n }\n blocks: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ' -): (typeof documents)['\n query GetMinerLeaderboardChart($limit: Int) {\n topMiners: account_stats(\n limit: $limit\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n }\n blocks: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ']; + source: '\n query GetMinerLeaderboardStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n total_miners\n }\n last24Hour: miner_reward_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' +): (typeof documents)['\n query GetMinerLeaderboardStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n chain: chain_stats_by_pk(id: "global") {\n block_height\n total_miners\n }\n last24Hour: miner_reward_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\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 GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_rewards: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n }\n }\n ' -): (typeof documents)['\n query GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_rewards: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n }\n }\n ']; + source: '\n query GetMinerLeaderboardChart($limit: Int) {\n topMiners: account_stats(\n limit: $limit\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n }\n blocks: chain_stats_by_pk(id: "global") {\n totalCount: block_height\n }\n }\n ' +): (typeof documents)['\n query GetMinerLeaderboardChart($limit: Int) {\n topMiners: account_stats(\n limit: $limit\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n }\n blocks: chain_stats_by_pk(id: "global") {\n totalCount: block_height\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 GetMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n meta: miner_reward_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n query GetMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n meta: miner_reward_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; + source: '\n query GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n block_height\n }\n topMiner: account_stats(\n limit: 1\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n total_mined_blocks\n }\n }\n ' +): (typeof documents)['\n query GetMinerLeaderboard($limit: Int, $offset: Int) {\n leaderboardEntries: account_stats(\n limit: $limit\n offset: $offset\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n id\n total_mined_blocks\n total_rewards\n }\n meta: chain_stats_by_pk(id: "global") {\n totalCount: total_miners\n block_height\n }\n topMiner: account_stats(\n limit: 1\n order_by: { total_mined_blocks: desc }\n where: { total_mined_blocks: { _gt: 0 } }\n ) {\n total_mined_blocks\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 GetRecentMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $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 documents)['\n query GetRecentMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n }\n ']; + source: '\n query GetMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n meta: miner_reward_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' +): (typeof documents)['\n query GetMinerRewards(\n $limit: Int\n $offset: Int\n $orderBy: [miner_reward_order_by!]\n $where: miner_reward_bool_exp\n ) {\n minerRewards: miner_reward(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n meta: miner_reward_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -491,12 +398,6 @@ export function gql( export function gql( source: '\n \n query GetMultisigCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_order_by!]\n $where: multisig_bool_exp\n ) {\n multisigCreatedEvents: multisig(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigCreatedFields\n }\n meta: multisig_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n \n query GetMultisigCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_order_by!]\n $where: multisig_bool_exp\n ) {\n multisigCreatedEvents: multisig(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigCreatedFields\n }\n meta: multisig_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 \n query GetRecentMultisigCreated(\n $limit: Int\n $orderBy: [multisig_order_by!]\n ) {\n multisigCreatedEvents: multisig(limit: $limit, order_by: $orderBy) {\n ...MultisigCreatedFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigCreated(\n $limit: Int\n $orderBy: [multisig_order_by!]\n ) {\n multisigCreatedEvents: multisig(limit: $limit, order_by: $orderBy) {\n ...MultisigCreatedFields\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -513,20 +414,20 @@ export function gql( * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n fragment MultisigDepositsClaimedFields on multisig_deposits_claimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n' -): (typeof documents)['\n fragment MultisigDepositsClaimedFields on multisig_deposits_claimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n']; + source: '\n \n query GetMultisigById($id: String!) {\n multisig: multisig_by_pk(id: $id) {\n ...MultisigCreatedFields\n }\n }\n ' +): (typeof documents)['\n \n query GetMultisigById($id: String!) {\n multisig: multisig_by_pk(id: $id) {\n ...MultisigCreatedFields\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 \n query GetMultisigDepositsClaimed(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n $where: multisig_deposits_claimed_bool_exp\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigDepositsClaimedFields\n }\n meta: multisig_deposits_claimed_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n \n query GetMultisigDepositsClaimed(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n $where: multisig_deposits_claimed_bool_exp\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigDepositsClaimedFields\n }\n meta: multisig_deposits_claimed_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; + source: '\n fragment MultisigDepositsClaimedFields on multisig_deposits_claimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n }\n }\n' +): (typeof documents)['\n fragment MultisigDepositsClaimedFields on multisig_deposits_claimed {\n id\n timestamp\n total_returned\n proposals_removed\n claimer {\n id\n }\n multisig {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\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 \n query GetRecentMultisigDepositsClaimed(\n $limit: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigDepositsClaimedFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigDepositsClaimed(\n $limit: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigDepositsClaimedFields\n }\n }\n ']; + source: '\n \n query GetMultisigDepositsClaimed(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n $where: multisig_deposits_claimed_bool_exp\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigDepositsClaimedFields\n }\n meta: multisig_deposits_claimed_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' +): (typeof documents)['\n \n query GetMultisigDepositsClaimed(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_deposits_claimed_order_by!]\n $where: multisig_deposits_claimed_bool_exp\n ) {\n multisigDepositsClaimedEvents: multisig_deposits_claimed(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigDepositsClaimedFields\n }\n meta: multisig_deposits_claimed_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -551,12 +452,6 @@ export function gql( export function gql( source: '\n \n query GetMultisigProposalCancelled(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n $where: cancelled_multisig_proposal_bool_exp\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCancelledFields\n }\n meta: cancelled_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n \n query GetMultisigProposalCancelled(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n $where: cancelled_multisig_proposal_bool_exp\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCancelledFields\n }\n meta: cancelled_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 \n query GetRecentMultisigProposalCancelled(\n $limit: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCancelledFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigProposalCancelled(\n $limit: Int\n $orderBy: [cancelled_multisig_proposal_order_by!]\n ) {\n multisigProposalCancelledEvents: cancelled_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCancelledFields\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -587,12 +482,6 @@ export function gql( export function gql( source: '\n \n query GetMultisigProposalCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_created_order_by!]\n $where: multisig_proposal_created_bool_exp\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCreatedFields\n }\n meta: multisig_proposal_created_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n \n query GetMultisigProposalCreated(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_created_order_by!]\n $where: multisig_proposal_created_bool_exp\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalCreatedFields\n }\n meta: multisig_proposal_created_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 \n query GetRecentMultisigProposalCreated(\n $limit: Int\n $orderBy: [multisig_proposal_created_order_by!]\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCreatedFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigProposalCreated(\n $limit: Int\n $orderBy: [multisig_proposal_created_order_by!]\n ) {\n multisigProposalCreatedEvents: multisig_proposal_created(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalCreatedFields\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -617,12 +506,6 @@ export function gql( export function gql( source: '\n \n query GetMultisigProposalExecuted(\n $limit: Int\n $offset: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n $where: executed_multisig_proposal_bool_exp\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalExecutedFields\n }\n meta: executed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n \n query GetMultisigProposalExecuted(\n $limit: Int\n $offset: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n $where: executed_multisig_proposal_bool_exp\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalExecutedFields\n }\n meta: executed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 \n query GetRecentMultisigProposalExecuted(\n $limit: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalExecutedFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigProposalExecuted(\n $limit: Int\n $orderBy: [executed_multisig_proposal_order_by!]\n ) {\n multisigProposalExecutedEvents: executed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalExecutedFields\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -647,12 +530,6 @@ export function gql( export function gql( source: '\n \n query GetMultisigProposalReady(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n $where: multisig_proposal_ready_bool_exp\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalReadyFields\n }\n meta: multisig_proposal_ready_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n \n query GetMultisigProposalReady(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n $where: multisig_proposal_ready_bool_exp\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalReadyFields\n }\n meta: multisig_proposal_ready_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 \n query GetRecentMultisigProposalReady(\n $limit: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalReadyFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigProposalReady(\n $limit: Int\n $orderBy: [multisig_proposal_ready_order_by!]\n ) {\n multisigProposalReadyEvents: multisig_proposal_ready(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalReadyFields\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -677,12 +554,6 @@ export function gql( export function gql( source: '\n \n query GetMultisigProposalRemoved(\n $limit: Int\n $offset: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n $where: removed_multisig_proposal_bool_exp\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalRemovedFields\n }\n meta: removed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n \n query GetMultisigProposalRemoved(\n $limit: Int\n $offset: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n $where: removed_multisig_proposal_bool_exp\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigProposalRemovedFields\n }\n meta: removed_multisig_proposal_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 \n query GetRecentMultisigProposalRemoved(\n $limit: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalRemovedFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigProposalRemoved(\n $limit: Int\n $orderBy: [removed_multisig_proposal_order_by!]\n ) {\n multisigProposalRemovedEvents: removed_multisig_proposal(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigProposalRemovedFields\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -699,8 +570,8 @@ export function gql( * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n' -): (typeof documents)['\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n']; + source: '\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n approvals\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n' +): (typeof documents)['\n fragment MultisigProposalListFields on multisig_proposal {\n id\n status\n deposit\n expiry_block\n approvals\n created_at\n multisig {\n id\n }\n proposer {\n id\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -743,12 +614,6 @@ export function gql( export function gql( source: '\n \n query GetMultisigSignerApproved(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_signer_approved_order_by!]\n $where: multisig_signer_approved_bool_exp\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigSignerApprovedFields\n }\n meta: multisig_signer_approved_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' ): (typeof documents)['\n \n query GetMultisigSignerApproved(\n $limit: Int\n $offset: Int\n $orderBy: [multisig_signer_approved_order_by!]\n $where: multisig_signer_approved_bool_exp\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n ...MultisigSignerApprovedFields\n }\n meta: multisig_signer_approved_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 \n query GetRecentMultisigSignerApproved(\n $limit: Int\n $orderBy: [multisig_signer_approved_order_by!]\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigSignerApprovedFields\n }\n }\n ' -): (typeof documents)['\n \n query GetRecentMultisigSignerApproved(\n $limit: Int\n $orderBy: [multisig_signer_approved_order_by!]\n ) {\n multisigSignerApprovedEvents: multisig_signer_approved(\n limit: $limit\n order_by: $orderBy\n ) {\n ...MultisigSignerApprovedFields\n }\n }\n ']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -765,74 +630,74 @@ export function gql( * 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 GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: scheduled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n query GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n meta: scheduled_reversible_transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; + source: '\n query GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' +): (typeof documents)['\n query GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\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 GetRecentScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' -): (typeof documents)['\n query GetRecentScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; + source: '\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ' +): (typeof documents)['\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: unified_transaction(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { detail_id: { _ilike: $keyword } }\n { id: { _ilike: $keyword } }\n ]\n }\n ) {\n id\n type\n hash\n detail_id\n block {\n height\n hash\n }\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\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 GetScheduledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: scheduled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_scheduled_transfers\n }\n }\n ' -): (typeof documents)['\n query GetScheduledReversibleTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: scheduled_reversible_transfer_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_scheduled_transfers\n }\n }\n ']; + source: '\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n }\n ' +): (typeof documents)['\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfersByExtrinsic: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n }\n transfersById: transfer(where: { id: { _eq: $hash } }) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n block {\n height\n }\n extrinsic {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\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 GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' -): (typeof documents)['\n query GetScheduledReversibleTransactionByTxId($tx_id: String!) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n where: { tx_id: { _eq: $tx_id } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n amount\n timestamp\n scheduled_at\n tx_id\n fee\n block {\n height\n }\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; + source: '\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' +): (typeof documents)['\n query GetUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n $where: unified_transaction_bool_exp\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n meta: unified_transaction_aggregate(where: $where) {\n aggregate {\n totalCount: count\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 SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfer(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n tx_id\n }\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n minerRewards: miner_reward(\n limit: $limit\n where: { block: { hash: { _ilike: $keyword } } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ' -): (typeof documents)['\n query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) {\n transactions: transfer(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n tx_id\n }\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n where: { tx_id: { _ilike: $keyword } }\n ) {\n tx_id\n }\n accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) {\n id\n }\n blocks: block(\n limit: $limit\n where: {\n _or: [\n { hash: { _ilike: $keyword } }\n { height: { _eq: $keyword_number } }\n ]\n }\n ) {\n height\n }\n highSecuritySets: high_security_set(\n limit: $limit\n where: { extrinsic: { id: { _ilike: $keyword } } }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n minerRewards: miner_reward(\n limit: $limit\n where: { block: { hash: { _ilike: $keyword } } }\n ) {\n block {\n height\n hash\n }\n reward\n miner {\n id\n }\n timestamp\n }\n errorEvents: error_event(\n limit: $limit\n where: {\n _or: [\n { error_type: { _ilike: $keyword } }\n { error_name: { _ilike: $keyword } }\n ]\n }\n ) {\n extrinsic {\n id\n pallet\n call\n }\n }\n }\n ']; + source: '\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' +): (typeof documents)['\n query GetRecentUnifiedTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [unified_transaction_order_by!]\n ) {\n transactions: unified_transaction(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n ) {\n id\n type\n hash\n block {\n height\n hash\n }\n timestamp\n amount\n fee\n status\n detail_id\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 GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n meta: transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ' -): (typeof documents)['\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n meta: transfer_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n ']; + source: '\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\n }\n }\n }\n ' +): (typeof documents)['\n query GetUnifiedTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: unified_transaction_aggregate(\n where: { timestamp: { _gte: $startDate, _lte: $endDate } }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: unified_transaction_aggregate {\n aggregate {\n totalCount: count\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 GetRecentTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\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 GetRecentTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n fee\n extrinsic {\n id\n pallet\n call\n }\n block {\n height\n }\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; + source: '\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\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: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\n }\n }\n' +): (typeof documents)['\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\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: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\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 GetTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_immediate_transfers\n }\n }\n ' -): (typeof documents)['\n query GetTransactionsStats(\n $startDate: timestamptz!\n $endDate: timestamptz!\n ) {\n last24Hour: transfer_aggregate(\n where: {\n timestamp: { _gte: $startDate, _lte: $endDate }\n extrinsic_id: { _is_null: false }\n }\n ) {\n aggregate {\n totalCount: count\n }\n }\n allTime: chain_stats_by_pk(id: "global") {\n total_immediate_transfers\n }\n }\n ']; + source: '\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\n id\n }\n }\n }\n' +): (typeof documents)['\n query GetTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [transfer_order_by!]\n $where: transfer_bool_exp\n ) {\n transactions: transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n extrinsic {\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 GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfers: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ' -): (typeof documents)['\n query GetExtrinsicByHash($hash: String!) {\n extrinsics: extrinsic(where: { id: { _eq: $hash } }) {\n id\n pallet\n call\n success\n fee\n timestamp\n index_in_block\n signer {\n id\n }\n block {\n height\n }\n }\n transfers: transfer(\n where: { extrinsic: { id: { _eq: $hash } } }\n order_by: { timestamp: asc }\n ) {\n id\n amount\n timestamp\n from {\n id\n }\n to {\n id\n }\n }\n }\n ']; + source: '\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n' +): (typeof documents)['\n query GetCancelledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [cancelled_reversible_transfer_order_by!]\n $where: cancelled_reversible_transfer_bool_exp\n ) {\n cancelledReversibleTransactions: cancelled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\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: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_label\n block {\n height\n }\n }\n meta: wormhole_extrinsic_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n' -): (typeof documents)['\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_label\n block {\n height\n }\n }\n meta: wormhole_extrinsic_aggregate(where: $where) {\n aggregate {\n totalCount: count\n }\n }\n }\n']; + source: '\n query GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n' +): (typeof documents)['\n query GetExecutedReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [executed_reversible_transfer_order_by!]\n $where: executed_reversible_transfer_bool_exp\n ) {\n executedReversibleTransactions: executed_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\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: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\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: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\n }\n }\n' -): (typeof documents)['\n query GetWormholeExtrinsicById($id: String!) {\n wormholeExtrinsicById: wormhole_extrinsic_by_pk(id: $id) {\n id\n extrinsic {\n id\n pallet\n call\n }\n total_amount\n output_count\n timestamp\n privacy_score\n privacy_score01_pct\n privacy_score1_pct\n privacy_score5_pct\n privacy_label\n pool_snapshot\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: wormhole_nullifier(\n where: { wormholeExtrinsic: { id: { _eq: $id } } }\n ) {\n nullifier\n nullifier_hash\n }\n }\n']; + source: '\n query GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\n }\n }\n' +): (typeof documents)['\n query GetScheduledReversibleTransactions(\n $limit: Int\n $offset: Int\n $orderBy: [scheduled_reversible_transfer_order_by!]\n $where: scheduled_reversible_transfer_bool_exp\n ) {\n scheduledReversibleTransactions: scheduled_reversible_transfer(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n tx_id\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: deposit_pool_stats_by_pk(id: "global") {\n last_updated_block\n buckets\n }\n }\n' -): (typeof documents)['\n query GetDepositPoolStats {\n depositPoolStatsById: deposit_pool_stats_by_pk(id: "global") {\n last_updated_block\n buckets\n }\n }\n']; + source: '\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\n }\n }\n' +): (typeof documents)['\n query GetWormholeExtrinsics(\n $limit: Int\n $offset: Int\n $orderBy: [wormhole_extrinsic_order_by!]!\n $where: wormhole_extrinsic_bool_exp\n ) {\n wormholeExtrinsics: wormhole_extrinsic(\n limit: $limit\n offset: $offset\n order_by: $orderBy\n where: $where\n ) {\n id\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 2864d6a..387ac04 100644 --- a/src/__generated__/graphql.ts +++ b/src/__generated__/graphql.ts @@ -123,6 +123,10 @@ export type Account = { id: Scalars['String']['output']; is_deposit_only: Scalars['Boolean']['output']; last_updated: Scalars['Int']['output']; + /** An array relationship */ + minedBlocks: Array; + /** An aggregate relationship */ + minedBlocks_aggregate: Block_Aggregate; privacy_deposits: Scalars['String']['output']; reserved: Scalars['numeric']['output']; /** An array relationship */ @@ -171,6 +175,24 @@ export type AccountExtrinsics_AggregateArgs = { where?: InputMaybe; }; +/** columns and relationships of "account" */ +export type AccountMinedBlocksArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +/** columns and relationships of "account" */ +export type AccountMinedBlocks_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + /** columns and relationships of "account" */ export type AccountTransfersFromArgs = { distinct_on?: InputMaybe>; @@ -259,6 +281,8 @@ export type Account_Bool_Exp = { id?: InputMaybe; is_deposit_only?: InputMaybe; last_updated?: InputMaybe; + minedBlocks?: InputMaybe; + minedBlocks_aggregate?: InputMaybe; privacy_deposits?: InputMaybe; reserved?: InputMaybe; transfersFrom?: InputMaybe; @@ -313,6 +337,9 @@ export type Account_Event = { /** An object relationship */ scheduledReversibleTransfer?: Maybe; scheduled_reversible_transfer_id?: Maybe; + /** An object relationship */ + techReferendumEvent?: Maybe; + tech_referendum_event_id?: Maybe; timestamp: Scalars['timestamptz']['output']; /** An object relationship */ transfer?: Maybe; @@ -392,6 +419,8 @@ export type Account_Event_Bool_Exp = { removed_multisig_proposal_id?: InputMaybe; scheduledReversibleTransfer?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + techReferendumEvent?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer?: InputMaybe; transfer_id?: InputMaybe; @@ -415,6 +444,7 @@ export type Account_Event_Max_Fields = { multisig_signer_approved_id?: Maybe; removed_multisig_proposal_id?: Maybe; scheduled_reversible_transfer_id?: Maybe; + tech_referendum_event_id?: Maybe; timestamp?: Maybe; transfer_id?: Maybe; }; @@ -436,6 +466,7 @@ export type Account_Event_Max_Order_By = { multisig_signer_approved_id?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer_id?: InputMaybe; }; @@ -458,6 +489,7 @@ export type Account_Event_Min_Fields = { multisig_signer_approved_id?: Maybe; removed_multisig_proposal_id?: Maybe; scheduled_reversible_transfer_id?: Maybe; + tech_referendum_event_id?: Maybe; timestamp?: Maybe; transfer_id?: Maybe; }; @@ -479,6 +511,7 @@ export type Account_Event_Min_Order_By = { multisig_signer_approved_id?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer_id?: InputMaybe; }; @@ -514,6 +547,8 @@ export type Account_Event_Order_By = { removed_multisig_proposal_id?: InputMaybe; scheduledReversibleTransfer?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + techReferendumEvent?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer?: InputMaybe; transfer_id?: InputMaybe; @@ -552,6 +587,8 @@ export enum Account_Event_Select_Column { /** column name */ ScheduledReversibleTransferId = 'scheduled_reversible_transfer_id', /** column name */ + TechReferendumEventId = 'tech_referendum_event_id', + /** column name */ Timestamp = 'timestamp', /** column name */ TransferId = 'transfer_id' @@ -582,6 +619,7 @@ export type Account_Event_Stream_Cursor_Value_Input = { multisig_signer_approved_id?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer_id?: InputMaybe; }; @@ -617,6 +655,7 @@ export type Account_Order_By = { id?: InputMaybe; is_deposit_only?: InputMaybe; last_updated?: InputMaybe; + minedBlocks_aggregate?: InputMaybe; privacy_deposits?: InputMaybe; reserved?: InputMaybe; transfersFrom_aggregate?: InputMaybe; @@ -952,6 +991,9 @@ export type Block = { hash: Scalars['String']['output']; height: Scalars['Int']['output']; id: Scalars['String']['output']; + /** An object relationship */ + minedBy?: Maybe; + mined_by_id?: Maybe; reward: Scalars['numeric']['output']; timestamp: Scalars['timestamptz']['output']; /** An array relationship */ @@ -1021,6 +1063,17 @@ export type Block_Aggregate = { nodes: Array; }; +export type Block_Aggregate_Bool_Exp = { + count?: InputMaybe; +}; + +export type Block_Aggregate_Bool_Exp_Count = { + arguments?: InputMaybe>; + distinct?: InputMaybe; + filter?: InputMaybe; + predicate: Int_Comparison_Exp; +}; + /** aggregate fields of "block" */ export type Block_Aggregate_Fields = { __typename?: 'block_aggregate_fields'; @@ -1043,6 +1096,21 @@ export type Block_Aggregate_FieldsCountArgs = { distinct?: InputMaybe; }; +/** order by aggregate values of table "block" */ +export type Block_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + /** aggregate avg on columns */ export type Block_Avg_Fields = { __typename?: 'block_avg_fields'; @@ -1050,6 +1118,12 @@ export type Block_Avg_Fields = { reward?: Maybe; }; +/** order by avg() on columns of table "block" */ +export type Block_Avg_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "block". All fields are combined with a logical 'AND'. */ export type Block_Bool_Exp = { _and?: InputMaybe>; @@ -1062,6 +1136,8 @@ export type Block_Bool_Exp = { hash?: InputMaybe; height?: InputMaybe; id?: InputMaybe; + minedBy?: InputMaybe; + mined_by_id?: InputMaybe; reward?: InputMaybe; timestamp?: InputMaybe; transactions?: InputMaybe; @@ -1074,20 +1150,42 @@ export type Block_Max_Fields = { hash?: Maybe; height?: Maybe; id?: Maybe; + mined_by_id?: Maybe; reward?: Maybe; timestamp?: Maybe; }; +/** order by max() on columns of table "block" */ +export type Block_Max_Order_By = { + hash?: InputMaybe; + height?: InputMaybe; + id?: InputMaybe; + mined_by_id?: InputMaybe; + reward?: InputMaybe; + timestamp?: InputMaybe; +}; + /** aggregate min on columns */ export type Block_Min_Fields = { __typename?: 'block_min_fields'; hash?: Maybe; height?: Maybe; id?: Maybe; + mined_by_id?: Maybe; reward?: Maybe; timestamp?: Maybe; }; +/** order by min() on columns of table "block" */ +export type Block_Min_Order_By = { + hash?: InputMaybe; + height?: InputMaybe; + id?: InputMaybe; + mined_by_id?: InputMaybe; + reward?: InputMaybe; + timestamp?: InputMaybe; +}; + /** Ordering options when selecting data from "block". */ export type Block_Order_By = { events_aggregate?: InputMaybe; @@ -1095,6 +1193,8 @@ export type Block_Order_By = { hash?: InputMaybe; height?: InputMaybe; id?: InputMaybe; + minedBy?: InputMaybe; + mined_by_id?: InputMaybe; reward?: InputMaybe; timestamp?: InputMaybe; transactions_aggregate?: InputMaybe; @@ -1109,6 +1209,8 @@ export enum Block_Select_Column { /** column name */ Id = 'id', /** column name */ + MinedById = 'mined_by_id', + /** column name */ Reward = 'reward', /** column name */ Timestamp = 'timestamp' @@ -1121,6 +1223,12 @@ export type Block_Stddev_Fields = { reward?: Maybe; }; +/** order by stddev() on columns of table "block" */ +export type Block_Stddev_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** aggregate stddev_pop on columns */ export type Block_Stddev_Pop_Fields = { __typename?: 'block_stddev_pop_fields'; @@ -1128,6 +1236,12 @@ export type Block_Stddev_Pop_Fields = { reward?: Maybe; }; +/** order by stddev_pop() on columns of table "block" */ +export type Block_Stddev_Pop_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** aggregate stddev_samp on columns */ export type Block_Stddev_Samp_Fields = { __typename?: 'block_stddev_samp_fields'; @@ -1135,6 +1249,12 @@ export type Block_Stddev_Samp_Fields = { reward?: Maybe; }; +/** order by stddev_samp() on columns of table "block" */ +export type Block_Stddev_Samp_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** Streaming cursor of the table "block" */ export type Block_Stream_Cursor_Input = { /** Stream column input with initial value */ @@ -1148,6 +1268,7 @@ export type Block_Stream_Cursor_Value_Input = { hash?: InputMaybe; height?: InputMaybe; id?: InputMaybe; + mined_by_id?: InputMaybe; reward?: InputMaybe; timestamp?: InputMaybe; }; @@ -1159,6 +1280,12 @@ export type Block_Sum_Fields = { reward?: Maybe; }; +/** order by sum() on columns of table "block" */ +export type Block_Sum_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** aggregate var_pop on columns */ export type Block_Var_Pop_Fields = { __typename?: 'block_var_pop_fields'; @@ -1166,6 +1293,12 @@ export type Block_Var_Pop_Fields = { reward?: Maybe; }; +/** order by var_pop() on columns of table "block" */ +export type Block_Var_Pop_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** aggregate var_samp on columns */ export type Block_Var_Samp_Fields = { __typename?: 'block_var_samp_fields'; @@ -1173,6 +1306,12 @@ export type Block_Var_Samp_Fields = { reward?: Maybe; }; +/** order by var_samp() on columns of table "block" */ +export type Block_Var_Samp_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** aggregate variance on columns */ export type Block_Variance_Fields = { __typename?: 'block_variance_fields'; @@ -1180,6 +1319,12 @@ export type Block_Variance_Fields = { reward?: Maybe; }; +/** order by variance() on columns of table "block" */ +export type Block_Variance_Order_By = { + height?: InputMaybe; + reward?: InputMaybe; +}; + /** columns and relationships of "cancelled_multisig_proposal" */ export type Cancelled_Multisig_Proposal = { __typename?: 'cancelled_multisig_proposal'; @@ -1537,7 +1682,9 @@ export type Chain_Stats = { total_multisig_proposals_removed: Scalars['Int']['output']; total_multisig_signer_approved: Scalars['Int']['output']; total_multisigs_created: Scalars['Int']['output']; + total_runtime_upgrades: Scalars['Int']['output']; total_scheduled_transfers: Scalars['Int']['output']; + total_tech_referenda: Scalars['Int']['output']; }; /** aggregated selection of "chain_stats" */ @@ -1591,7 +1738,9 @@ export type Chain_Stats_Avg_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** Boolean expression to filter rows from the table "chain_stats". All fields are combined with a logical 'AND'. */ @@ -1619,7 +1768,9 @@ export type Chain_Stats_Bool_Exp = { total_multisig_proposals_removed?: InputMaybe; total_multisig_signer_approved?: InputMaybe; total_multisigs_created?: InputMaybe; + total_runtime_upgrades?: InputMaybe; total_scheduled_transfers?: InputMaybe; + total_tech_referenda?: InputMaybe; }; /** aggregate max on columns */ @@ -1645,7 +1796,9 @@ export type Chain_Stats_Max_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** aggregate min on columns */ @@ -1671,7 +1824,9 @@ export type Chain_Stats_Min_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** Ordering options when selecting data from "chain_stats". */ @@ -1696,7 +1851,9 @@ export type Chain_Stats_Order_By = { total_multisig_proposals_removed?: InputMaybe; total_multisig_signer_approved?: InputMaybe; total_multisigs_created?: InputMaybe; + total_runtime_upgrades?: InputMaybe; total_scheduled_transfers?: InputMaybe; + total_tech_referenda?: InputMaybe; }; /** select columns of table "chain_stats" */ @@ -1742,7 +1899,11 @@ export enum Chain_Stats_Select_Column { /** column name */ TotalMultisigsCreated = 'total_multisigs_created', /** column name */ - TotalScheduledTransfers = 'total_scheduled_transfers' + TotalRuntimeUpgrades = 'total_runtime_upgrades', + /** column name */ + TotalScheduledTransfers = 'total_scheduled_transfers', + /** column name */ + TotalTechReferenda = 'total_tech_referenda' } /** aggregate stddev on columns */ @@ -1767,7 +1928,9 @@ export type Chain_Stats_Stddev_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** aggregate stddev_pop on columns */ @@ -1792,7 +1955,9 @@ export type Chain_Stats_Stddev_Pop_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** aggregate stddev_samp on columns */ @@ -1817,7 +1982,9 @@ export type Chain_Stats_Stddev_Samp_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** Streaming cursor of the table "chain_stats" */ @@ -1850,7 +2017,9 @@ export type Chain_Stats_Stream_Cursor_Value_Input = { total_multisig_proposals_removed?: InputMaybe; total_multisig_signer_approved?: InputMaybe; total_multisigs_created?: InputMaybe; + total_runtime_upgrades?: InputMaybe; total_scheduled_transfers?: InputMaybe; + total_tech_referenda?: InputMaybe; }; /** aggregate sum on columns */ @@ -1875,7 +2044,9 @@ export type Chain_Stats_Sum_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** aggregate var_pop on columns */ @@ -1900,7 +2071,9 @@ export type Chain_Stats_Var_Pop_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** aggregate var_samp on columns */ @@ -1925,7 +2098,9 @@ export type Chain_Stats_Var_Samp_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** aggregate variance on columns */ @@ -1950,7 +2125,9 @@ export type Chain_Stats_Variance_Fields = { total_multisig_proposals_removed?: Maybe; total_multisig_signer_approved?: Maybe; total_multisigs_created?: Maybe; + total_runtime_upgrades?: Maybe; total_scheduled_transfers?: Maybe; + total_tech_referenda?: Maybe; }; /** ordering argument of a cursor */ @@ -2293,8 +2470,14 @@ export type Event = { removedMultisigProposal?: Maybe; removed_multisig_proposal_id?: Maybe; /** An object relationship */ + runtimeUpgrade?: Maybe; + runtime_upgrade_id?: Maybe; + /** An object relationship */ scheduledReversibleTransfer?: Maybe; scheduled_reversible_transfer_id?: Maybe; + /** An object relationship */ + techReferendumEvent?: Maybe; + tech_referendum_event_id?: Maybe; timestamp: Scalars['timestamptz']['output']; /** An object relationship */ transfer?: Maybe; @@ -2377,8 +2560,12 @@ export type Event_Bool_Exp = { multisig_signer_approved_id?: InputMaybe; removedMultisigProposal?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; + runtimeUpgrade?: InputMaybe; + runtime_upgrade_id?: InputMaybe; scheduledReversibleTransfer?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + techReferendumEvent?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer?: InputMaybe; transfer_id?: InputMaybe; @@ -2404,7 +2591,9 @@ export type Event_Max_Fields = { multisig_proposal_ready_id?: Maybe; multisig_signer_approved_id?: Maybe; removed_multisig_proposal_id?: Maybe; + runtime_upgrade_id?: Maybe; scheduled_reversible_transfer_id?: Maybe; + tech_referendum_event_id?: Maybe; timestamp?: Maybe; transfer_id?: Maybe; type?: Maybe; @@ -2428,7 +2617,9 @@ export type Event_Max_Order_By = { multisig_proposal_ready_id?: InputMaybe; multisig_signer_approved_id?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; + runtime_upgrade_id?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer_id?: InputMaybe; type?: InputMaybe; @@ -2453,7 +2644,9 @@ export type Event_Min_Fields = { multisig_proposal_ready_id?: Maybe; multisig_signer_approved_id?: Maybe; removed_multisig_proposal_id?: Maybe; + runtime_upgrade_id?: Maybe; scheduled_reversible_transfer_id?: Maybe; + tech_referendum_event_id?: Maybe; timestamp?: Maybe; transfer_id?: Maybe; type?: Maybe; @@ -2477,7 +2670,9 @@ export type Event_Min_Order_By = { multisig_proposal_ready_id?: InputMaybe; multisig_signer_approved_id?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; + runtime_upgrade_id?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer_id?: InputMaybe; type?: InputMaybe; @@ -2516,8 +2711,12 @@ export type Event_Order_By = { multisig_signer_approved_id?: InputMaybe; removedMultisigProposal?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; + runtimeUpgrade?: InputMaybe; + runtime_upgrade_id?: InputMaybe; scheduledReversibleTransfer?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + techReferendumEvent?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer?: InputMaybe; transfer_id?: InputMaybe; @@ -2559,8 +2758,12 @@ export enum Event_Select_Column { /** column name */ RemovedMultisigProposalId = 'removed_multisig_proposal_id', /** column name */ + RuntimeUpgradeId = 'runtime_upgrade_id', + /** column name */ ScheduledReversibleTransferId = 'scheduled_reversible_transfer_id', /** column name */ + TechReferendumEventId = 'tech_referendum_event_id', + /** column name */ Timestamp = 'timestamp', /** column name */ TransferId = 'transfer_id', @@ -2594,7 +2797,9 @@ export type Event_Stream_Cursor_Value_Input = { multisig_proposal_ready_id?: InputMaybe; multisig_signer_approved_id?: InputMaybe; removed_multisig_proposal_id?: InputMaybe; + runtime_upgrade_id?: InputMaybe; scheduled_reversible_transfer_id?: InputMaybe; + tech_referendum_event_id?: InputMaybe; timestamp?: InputMaybe; transfer_id?: InputMaybe; type?: InputMaybe; @@ -5335,18 +5540,36 @@ export type Query_Root = { removed_multisig_proposal_aggregate: Removed_Multisig_Proposal_Aggregate; /** fetch data from the table: "removed_multisig_proposal" using primary key columns */ removed_multisig_proposal_by_pk?: Maybe; + /** fetch data from the table: "runtime_upgrade" */ + runtime_upgrade: Array; + /** fetch aggregated fields from the table: "runtime_upgrade" */ + runtime_upgrade_aggregate: Runtime_Upgrade_Aggregate; + /** fetch data from the table: "runtime_upgrade" using primary key columns */ + runtime_upgrade_by_pk?: Maybe; /** fetch data from the table: "scheduled_reversible_transfer" */ scheduled_reversible_transfer: Array; /** fetch aggregated fields from the table: "scheduled_reversible_transfer" */ scheduled_reversible_transfer_aggregate: Scheduled_Reversible_Transfer_Aggregate; /** fetch data from the table: "scheduled_reversible_transfer" using primary key columns */ scheduled_reversible_transfer_by_pk?: Maybe; + /** fetch data from the table: "tech_referendum_event" */ + tech_referendum_event: Array; + /** fetch aggregated fields from the table: "tech_referendum_event" */ + tech_referendum_event_aggregate: Tech_Referendum_Event_Aggregate; + /** fetch data from the table: "tech_referendum_event" using primary key columns */ + tech_referendum_event_by_pk?: Maybe; /** fetch data from the table: "transfer" */ transfer: Array; /** fetch aggregated fields from the table: "transfer" */ transfer_aggregate: Transfer_Aggregate; /** fetch data from the table: "transfer" using primary key columns */ transfer_by_pk?: Maybe; + /** fetch data from the table: "unified_transaction" */ + unified_transaction: Array; + /** fetch aggregated fields from the table: "unified_transaction" */ + unified_transaction_aggregate: Unified_Transaction_Aggregate; + /** fetch data from the table: "unified_transaction" using primary key columns */ + unified_transaction_by_pk?: Maybe; /** fetch data from the table: "wormhole_extrinsic" */ wormhole_extrinsic: Array; /** fetch aggregated fields from the table: "wormhole_extrinsic" */ @@ -5807,6 +6030,26 @@ export type Query_RootRemoved_Multisig_Proposal_By_PkArgs = { id: Scalars['String']['input']; }; +export type Query_RootRuntime_UpgradeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootRuntime_Upgrade_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootRuntime_Upgrade_By_PkArgs = { + id: Scalars['String']['input']; +}; + export type Query_RootScheduled_Reversible_TransferArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5827,6 +6070,26 @@ export type Query_RootScheduled_Reversible_Transfer_By_PkArgs = { id: Scalars['String']['input']; }; +export type Query_RootTech_Referendum_EventArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootTech_Referendum_Event_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootTech_Referendum_Event_By_PkArgs = { + id: Scalars['String']['input']; +}; + export type Query_RootTransferArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5847,6 +6110,26 @@ export type Query_RootTransfer_By_PkArgs = { id: Scalars['String']['input']; }; +export type Query_RootUnified_TransactionArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootUnified_Transaction_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Query_RootUnified_Transaction_By_PkArgs = { + id: Scalars['String']['input']; +}; + export type Query_RootWormhole_ExtrinsicArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6102,6 +6385,177 @@ export type Removed_Multisig_Proposal_Variance_Fields = { fee?: Maybe; }; +/** columns and relationships of "runtime_upgrade" */ +export type Runtime_Upgrade = { + __typename?: 'runtime_upgrade'; + /** An object relationship */ + block?: Maybe; + block_id?: Maybe; + /** An object relationship */ + event?: Maybe; + /** An object relationship */ + extrinsic?: Maybe; + extrinsic_id?: Maybe; + id: Scalars['String']['output']; + spec_version?: Maybe; + timestamp: Scalars['timestamptz']['output']; +}; + +/** aggregated selection of "runtime_upgrade" */ +export type Runtime_Upgrade_Aggregate = { + __typename?: 'runtime_upgrade_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "runtime_upgrade" */ +export type Runtime_Upgrade_Aggregate_Fields = { + __typename?: 'runtime_upgrade_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']['output']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** aggregate fields of "runtime_upgrade" */ +export type Runtime_Upgrade_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Runtime_Upgrade_Avg_Fields = { + __typename?: 'runtime_upgrade_avg_fields'; + spec_version?: Maybe; +}; + +/** Boolean expression to filter rows from the table "runtime_upgrade". All fields are combined with a logical 'AND'. */ +export type Runtime_Upgrade_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + block?: InputMaybe; + block_id?: InputMaybe; + event?: InputMaybe; + extrinsic?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + spec_version?: InputMaybe; + timestamp?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Runtime_Upgrade_Max_Fields = { + __typename?: 'runtime_upgrade_max_fields'; + block_id?: Maybe; + extrinsic_id?: Maybe; + id?: Maybe; + spec_version?: Maybe; + timestamp?: Maybe; +}; + +/** aggregate min on columns */ +export type Runtime_Upgrade_Min_Fields = { + __typename?: 'runtime_upgrade_min_fields'; + block_id?: Maybe; + extrinsic_id?: Maybe; + id?: Maybe; + spec_version?: Maybe; + timestamp?: Maybe; +}; + +/** Ordering options when selecting data from "runtime_upgrade". */ +export type Runtime_Upgrade_Order_By = { + block?: InputMaybe; + block_id?: InputMaybe; + event?: InputMaybe; + extrinsic?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + spec_version?: InputMaybe; + timestamp?: InputMaybe; +}; + +/** select columns of table "runtime_upgrade" */ +export enum Runtime_Upgrade_Select_Column { + /** column name */ + BlockId = 'block_id', + /** column name */ + ExtrinsicId = 'extrinsic_id', + /** column name */ + Id = 'id', + /** column name */ + SpecVersion = 'spec_version', + /** column name */ + Timestamp = 'timestamp' +} + +/** aggregate stddev on columns */ +export type Runtime_Upgrade_Stddev_Fields = { + __typename?: 'runtime_upgrade_stddev_fields'; + spec_version?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Runtime_Upgrade_Stddev_Pop_Fields = { + __typename?: 'runtime_upgrade_stddev_pop_fields'; + spec_version?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Runtime_Upgrade_Stddev_Samp_Fields = { + __typename?: 'runtime_upgrade_stddev_samp_fields'; + spec_version?: Maybe; +}; + +/** Streaming cursor of the table "runtime_upgrade" */ +export type Runtime_Upgrade_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Runtime_Upgrade_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Runtime_Upgrade_Stream_Cursor_Value_Input = { + block_id?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + spec_version?: InputMaybe; + timestamp?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Runtime_Upgrade_Sum_Fields = { + __typename?: 'runtime_upgrade_sum_fields'; + spec_version?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Runtime_Upgrade_Var_Pop_Fields = { + __typename?: 'runtime_upgrade_var_pop_fields'; + spec_version?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Runtime_Upgrade_Var_Samp_Fields = { + __typename?: 'runtime_upgrade_var_samp_fields'; + spec_version?: Maybe; +}; + +/** aggregate variance on columns */ +export type Runtime_Upgrade_Variance_Fields = { + __typename?: 'runtime_upgrade_variance_fields'; + spec_version?: Maybe; +}; + /** columns and relationships of "scheduled_reversible_transfer" */ export type Scheduled_Reversible_Transfer = { __typename?: 'scheduled_reversible_transfer'; @@ -6507,6 +6961,14 @@ export type Subscription_Root = { removed_multisig_proposal_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "removed_multisig_proposal" */ removed_multisig_proposal_stream: Array; + /** fetch data from the table: "runtime_upgrade" */ + runtime_upgrade: Array; + /** fetch aggregated fields from the table: "runtime_upgrade" */ + runtime_upgrade_aggregate: Runtime_Upgrade_Aggregate; + /** fetch data from the table: "runtime_upgrade" using primary key columns */ + runtime_upgrade_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "runtime_upgrade" */ + runtime_upgrade_stream: Array; /** fetch data from the table: "scheduled_reversible_transfer" */ scheduled_reversible_transfer: Array; /** fetch aggregated fields from the table: "scheduled_reversible_transfer" */ @@ -6515,6 +6977,14 @@ export type Subscription_Root = { scheduled_reversible_transfer_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "scheduled_reversible_transfer" */ scheduled_reversible_transfer_stream: Array; + /** fetch data from the table: "tech_referendum_event" */ + tech_referendum_event: Array; + /** fetch aggregated fields from the table: "tech_referendum_event" */ + tech_referendum_event_aggregate: Tech_Referendum_Event_Aggregate; + /** fetch data from the table: "tech_referendum_event" using primary key columns */ + tech_referendum_event_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "tech_referendum_event" */ + tech_referendum_event_stream: Array; /** fetch data from the table: "transfer" */ transfer: Array; /** fetch aggregated fields from the table: "transfer" */ @@ -6523,6 +6993,14 @@ export type Subscription_Root = { transfer_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "transfer" */ transfer_stream: Array; + /** fetch data from the table: "unified_transaction" */ + unified_transaction: Array; + /** fetch aggregated fields from the table: "unified_transaction" */ + unified_transaction_aggregate: Unified_Transaction_Aggregate; + /** fetch data from the table: "unified_transaction" using primary key columns */ + unified_transaction_by_pk?: Maybe; + /** fetch data from the table in a streaming manner: "unified_transaction" */ + unified_transaction_stream: Array; /** fetch data from the table: "wormhole_extrinsic" */ wormhole_extrinsic: Array; /** fetch aggregated fields from the table: "wormhole_extrinsic" */ @@ -7121,6 +7599,32 @@ export type Subscription_RootRemoved_Multisig_Proposal_StreamArgs = { where?: InputMaybe; }; +export type Subscription_RootRuntime_UpgradeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootRuntime_Upgrade_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootRuntime_Upgrade_By_PkArgs = { + id: Scalars['String']['input']; +}; + +export type Subscription_RootRuntime_Upgrade_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + export type Subscription_RootScheduled_Reversible_TransferArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7147,6 +7651,32 @@ export type Subscription_RootScheduled_Reversible_Transfer_StreamArgs = { where?: InputMaybe; }; +export type Subscription_RootTech_Referendum_EventArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootTech_Referendum_Event_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootTech_Referendum_Event_By_PkArgs = { + id: Scalars['String']['input']; +}; + +export type Subscription_RootTech_Referendum_Event_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + export type Subscription_RootTransferArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7173,6 +7703,32 @@ export type Subscription_RootTransfer_StreamArgs = { where?: InputMaybe; }; +export type Subscription_RootUnified_TransactionArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootUnified_Transaction_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +export type Subscription_RootUnified_Transaction_By_PkArgs = { + id: Scalars['String']['input']; +}; + +export type Subscription_RootUnified_Transaction_StreamArgs = { + batch_size: Scalars['Int']['input']; + cursor: Array>; + where?: InputMaybe; +}; + export type Subscription_RootWormhole_ExtrinsicArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7251,6 +7807,347 @@ export type Subscription_RootWormhole_Output_StreamArgs = { where?: InputMaybe; }; +/** columns and relationships of "tech_referendum_event" */ +export type Tech_Referendum_Event = { + __typename?: 'tech_referendum_event'; + /** An object relationship */ + actor?: Maybe; + actor_id?: Maybe; + /** An object relationship */ + block?: Maybe; + block_id?: Maybe; + description?: Maybe; + /** An object relationship */ + event?: Maybe; + /** An object relationship */ + extrinsic?: Maybe; + extrinsic_id?: Maybe; + id: Scalars['String']['output']; + is_runtime_upgrade: Scalars['Boolean']['output']; + origin?: Maybe; + proposal_calls?: Maybe; + proposal_preimage_hash?: Maybe; + proposal_size_bytes?: Maybe; + proposal_storage?: Maybe; + proposal_summary?: Maybe; + referendum_index: Scalars['Int']['output']; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + timestamp: Scalars['timestamptz']['output']; + title?: Maybe; + track?: Maybe; + track_name?: Maybe; + type: Scalars['String']['output']; +}; + +/** aggregated selection of "tech_referendum_event" */ +export type Tech_Referendum_Event_Aggregate = { + __typename?: 'tech_referendum_event_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "tech_referendum_event" */ +export type Tech_Referendum_Event_Aggregate_Fields = { + __typename?: 'tech_referendum_event_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']['output']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** aggregate fields of "tech_referendum_event" */ +export type Tech_Referendum_Event_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Tech_Referendum_Event_Avg_Fields = { + __typename?: 'tech_referendum_event_avg_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + +/** Boolean expression to filter rows from the table "tech_referendum_event". All fields are combined with a logical 'AND'. */ +export type Tech_Referendum_Event_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + actor?: InputMaybe; + actor_id?: InputMaybe; + block?: InputMaybe; + block_id?: InputMaybe; + description?: InputMaybe; + event?: InputMaybe; + extrinsic?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + is_runtime_upgrade?: InputMaybe; + origin?: InputMaybe; + proposal_calls?: InputMaybe; + proposal_preimage_hash?: InputMaybe; + proposal_size_bytes?: InputMaybe; + proposal_storage?: InputMaybe; + proposal_summary?: InputMaybe; + referendum_index?: InputMaybe; + tally_ayes?: InputMaybe; + tally_bare_ayes?: InputMaybe; + tally_nays?: InputMaybe; + timestamp?: InputMaybe; + title?: InputMaybe; + track?: InputMaybe; + track_name?: InputMaybe; + type?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Tech_Referendum_Event_Max_Fields = { + __typename?: 'tech_referendum_event_max_fields'; + actor_id?: Maybe; + block_id?: Maybe; + description?: Maybe; + extrinsic_id?: Maybe; + id?: Maybe; + origin?: Maybe; + proposal_calls?: Maybe; + proposal_preimage_hash?: Maybe; + proposal_size_bytes?: Maybe; + proposal_storage?: Maybe; + proposal_summary?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + timestamp?: Maybe; + title?: Maybe; + track?: Maybe; + track_name?: Maybe; + type?: Maybe; +}; + +/** aggregate min on columns */ +export type Tech_Referendum_Event_Min_Fields = { + __typename?: 'tech_referendum_event_min_fields'; + actor_id?: Maybe; + block_id?: Maybe; + description?: Maybe; + extrinsic_id?: Maybe; + id?: Maybe; + origin?: Maybe; + proposal_calls?: Maybe; + proposal_preimage_hash?: Maybe; + proposal_size_bytes?: Maybe; + proposal_storage?: Maybe; + proposal_summary?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + timestamp?: Maybe; + title?: Maybe; + track?: Maybe; + track_name?: Maybe; + type?: Maybe; +}; + +/** Ordering options when selecting data from "tech_referendum_event". */ +export type Tech_Referendum_Event_Order_By = { + actor?: InputMaybe; + actor_id?: InputMaybe; + block?: InputMaybe; + block_id?: InputMaybe; + description?: InputMaybe; + event?: InputMaybe; + extrinsic?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + is_runtime_upgrade?: InputMaybe; + origin?: InputMaybe; + proposal_calls?: InputMaybe; + proposal_preimage_hash?: InputMaybe; + proposal_size_bytes?: InputMaybe; + proposal_storage?: InputMaybe; + proposal_summary?: InputMaybe; + referendum_index?: InputMaybe; + tally_ayes?: InputMaybe; + tally_bare_ayes?: InputMaybe; + tally_nays?: InputMaybe; + timestamp?: InputMaybe; + title?: InputMaybe; + track?: InputMaybe; + track_name?: InputMaybe; + type?: InputMaybe; +}; + +/** select columns of table "tech_referendum_event" */ +export enum Tech_Referendum_Event_Select_Column { + /** column name */ + ActorId = 'actor_id', + /** column name */ + BlockId = 'block_id', + /** column name */ + Description = 'description', + /** column name */ + ExtrinsicId = 'extrinsic_id', + /** column name */ + Id = 'id', + /** column name */ + IsRuntimeUpgrade = 'is_runtime_upgrade', + /** column name */ + Origin = 'origin', + /** column name */ + ProposalCalls = 'proposal_calls', + /** column name */ + ProposalPreimageHash = 'proposal_preimage_hash', + /** column name */ + ProposalSizeBytes = 'proposal_size_bytes', + /** column name */ + ProposalStorage = 'proposal_storage', + /** column name */ + ProposalSummary = 'proposal_summary', + /** column name */ + ReferendumIndex = 'referendum_index', + /** column name */ + TallyAyes = 'tally_ayes', + /** column name */ + TallyBareAyes = 'tally_bare_ayes', + /** column name */ + TallyNays = 'tally_nays', + /** column name */ + Timestamp = 'timestamp', + /** column name */ + Title = 'title', + /** column name */ + Track = 'track', + /** column name */ + TrackName = 'track_name', + /** column name */ + Type = 'type' +} + +/** aggregate stddev on columns */ +export type Tech_Referendum_Event_Stddev_Fields = { + __typename?: 'tech_referendum_event_stddev_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Tech_Referendum_Event_Stddev_Pop_Fields = { + __typename?: 'tech_referendum_event_stddev_pop_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Tech_Referendum_Event_Stddev_Samp_Fields = { + __typename?: 'tech_referendum_event_stddev_samp_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + +/** Streaming cursor of the table "tech_referendum_event" */ +export type Tech_Referendum_Event_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Tech_Referendum_Event_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Tech_Referendum_Event_Stream_Cursor_Value_Input = { + actor_id?: InputMaybe; + block_id?: InputMaybe; + description?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + is_runtime_upgrade?: InputMaybe; + origin?: InputMaybe; + proposal_calls?: InputMaybe; + proposal_preimage_hash?: InputMaybe; + proposal_size_bytes?: InputMaybe; + proposal_storage?: InputMaybe; + proposal_summary?: InputMaybe; + referendum_index?: InputMaybe; + tally_ayes?: InputMaybe; + tally_bare_ayes?: InputMaybe; + tally_nays?: InputMaybe; + timestamp?: InputMaybe; + title?: InputMaybe; + track?: InputMaybe; + track_name?: InputMaybe; + type?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Tech_Referendum_Event_Sum_Fields = { + __typename?: 'tech_referendum_event_sum_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Tech_Referendum_Event_Var_Pop_Fields = { + __typename?: 'tech_referendum_event_var_pop_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Tech_Referendum_Event_Var_Samp_Fields = { + __typename?: 'tech_referendum_event_var_samp_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + +/** aggregate variance on columns */ +export type Tech_Referendum_Event_Variance_Fields = { + __typename?: 'tech_referendum_event_variance_fields'; + proposal_size_bytes?: Maybe; + referendum_index?: Maybe; + tally_ayes?: Maybe; + tally_bare_ayes?: Maybe; + tally_nays?: Maybe; + track?: Maybe; +}; + /** Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'. */ export type Timestamptz_Comparison_Exp = { _eq?: InputMaybe; @@ -7649,140 +8546,383 @@ export type Transfer_Variance_Order_By = { transfer_count?: InputMaybe; }; -/** columns and relationships of "wormhole_extrinsic" */ -export type Wormhole_Extrinsic = { - __typename?: 'wormhole_extrinsic'; +/** columns and relationships of "unified_transaction" */ +export type Unified_Transaction = { + __typename?: 'unified_transaction'; + amount?: Maybe; /** An object relationship */ block?: Maybe; + block_height: Scalars['Int']['output']; block_id?: Maybe; + detail_id: Scalars['String']['output']; + fee?: Maybe; /** An object relationship */ - extrinsic?: Maybe; - extrinsic_id?: Maybe; + from?: Maybe; + from_id?: Maybe; + hash?: Maybe; id: Scalars['String']['output']; - output_count: Scalars['Int']['output']; - /** An array relationship */ - outputs: Array; - /** An aggregate relationship */ - outputs_aggregate: Wormhole_Output_Aggregate; - pool_snapshot: Scalars['String']['output']; - privacy_label: Scalars['String']['output']; - privacy_score: Scalars['numeric']['output']; - privacy_score01_pct: Scalars['numeric']['output']; - privacy_score1_pct: Scalars['numeric']['output']; - privacy_score5_pct: Scalars['numeric']['output']; + status: Scalars['String']['output']; timestamp: Scalars['timestamptz']['output']; - total_amount: Scalars['numeric']['output']; -}; - -/** columns and relationships of "wormhole_extrinsic" */ -export type Wormhole_ExtrinsicOutputsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -/** columns and relationships of "wormhole_extrinsic" */ -export type Wormhole_ExtrinsicOutputs_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; + /** An object relationship */ + to?: Maybe; + to_id?: Maybe; + type: Scalars['String']['output']; }; -/** aggregated selection of "wormhole_extrinsic" */ -export type Wormhole_Extrinsic_Aggregate = { - __typename?: 'wormhole_extrinsic_aggregate'; - aggregate?: Maybe; - nodes: Array; +/** aggregated selection of "unified_transaction" */ +export type Unified_Transaction_Aggregate = { + __typename?: 'unified_transaction_aggregate'; + aggregate?: Maybe; + nodes: Array; }; -/** aggregate fields of "wormhole_extrinsic" */ -export type Wormhole_Extrinsic_Aggregate_Fields = { - __typename?: 'wormhole_extrinsic_aggregate_fields'; - avg?: Maybe; +/** aggregate fields of "unified_transaction" */ +export type Unified_Transaction_Aggregate_Fields = { + __typename?: 'unified_transaction_aggregate_fields'; + avg?: Maybe; count: Scalars['Int']['output']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - -/** aggregate fields of "wormhole_extrinsic" */ -export type Wormhole_Extrinsic_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** aggregate fields of "unified_transaction" */ +export type Unified_Transaction_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; distinct?: InputMaybe; }; /** aggregate avg on columns */ -export type Wormhole_Extrinsic_Avg_Fields = { - __typename?: 'wormhole_extrinsic_avg_fields'; - output_count?: Maybe; - privacy_score?: Maybe; - privacy_score01_pct?: Maybe; - privacy_score1_pct?: Maybe; - privacy_score5_pct?: Maybe; - total_amount?: Maybe; +export type Unified_Transaction_Avg_Fields = { + __typename?: 'unified_transaction_avg_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; }; -/** Boolean expression to filter rows from the table "wormhole_extrinsic". All fields are combined with a logical 'AND'. */ -export type Wormhole_Extrinsic_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; +/** Boolean expression to filter rows from the table "unified_transaction". All fields are combined with a logical 'AND'. */ +export type Unified_Transaction_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + amount?: InputMaybe; block?: InputMaybe; + block_height?: InputMaybe; block_id?: InputMaybe; - extrinsic?: InputMaybe; - extrinsic_id?: InputMaybe; + detail_id?: InputMaybe; + fee?: InputMaybe; + from?: InputMaybe; + from_id?: InputMaybe; + hash?: InputMaybe; id?: InputMaybe; - output_count?: InputMaybe; - outputs?: InputMaybe; - outputs_aggregate?: InputMaybe; - pool_snapshot?: InputMaybe; - privacy_label?: InputMaybe; - privacy_score?: InputMaybe; - privacy_score01_pct?: InputMaybe; - privacy_score1_pct?: InputMaybe; - privacy_score5_pct?: InputMaybe; + status?: InputMaybe; timestamp?: InputMaybe; - total_amount?: InputMaybe; + to?: InputMaybe; + to_id?: InputMaybe; + type?: InputMaybe; }; /** aggregate max on columns */ -export type Wormhole_Extrinsic_Max_Fields = { - __typename?: 'wormhole_extrinsic_max_fields'; +export type Unified_Transaction_Max_Fields = { + __typename?: 'unified_transaction_max_fields'; + amount?: Maybe; + block_height?: Maybe; block_id?: Maybe; - extrinsic_id?: Maybe; + detail_id?: Maybe; + fee?: Maybe; + from_id?: Maybe; + hash?: Maybe; id?: Maybe; - output_count?: Maybe; - pool_snapshot?: Maybe; - privacy_label?: Maybe; - privacy_score?: Maybe; - privacy_score01_pct?: Maybe; - privacy_score1_pct?: Maybe; - privacy_score5_pct?: Maybe; + status?: Maybe; timestamp?: Maybe; - total_amount?: Maybe; + to_id?: Maybe; + type?: Maybe; }; /** aggregate min on columns */ -export type Wormhole_Extrinsic_Min_Fields = { - __typename?: 'wormhole_extrinsic_min_fields'; +export type Unified_Transaction_Min_Fields = { + __typename?: 'unified_transaction_min_fields'; + amount?: Maybe; + block_height?: Maybe; block_id?: Maybe; - extrinsic_id?: Maybe; + detail_id?: Maybe; + fee?: Maybe; + from_id?: Maybe; + hash?: Maybe; id?: Maybe; - output_count?: Maybe; - pool_snapshot?: Maybe; - privacy_label?: Maybe; - privacy_score?: Maybe; - privacy_score01_pct?: Maybe; + status?: Maybe; + timestamp?: Maybe; + to_id?: Maybe; + type?: Maybe; +}; + +/** Ordering options when selecting data from "unified_transaction". */ +export type Unified_Transaction_Order_By = { + amount?: InputMaybe; + block?: InputMaybe; + block_height?: InputMaybe; + block_id?: InputMaybe; + detail_id?: InputMaybe; + fee?: InputMaybe; + from?: InputMaybe; + from_id?: InputMaybe; + hash?: InputMaybe; + id?: InputMaybe; + status?: InputMaybe; + timestamp?: InputMaybe; + to?: InputMaybe; + to_id?: InputMaybe; + type?: InputMaybe; +}; + +/** select columns of table "unified_transaction" */ +export enum Unified_Transaction_Select_Column { + /** column name */ + Amount = 'amount', + /** column name */ + BlockHeight = 'block_height', + /** column name */ + BlockId = 'block_id', + /** column name */ + DetailId = 'detail_id', + /** column name */ + Fee = 'fee', + /** column name */ + FromId = 'from_id', + /** column name */ + Hash = 'hash', + /** column name */ + Id = 'id', + /** column name */ + Status = 'status', + /** column name */ + Timestamp = 'timestamp', + /** column name */ + ToId = 'to_id', + /** column name */ + Type = 'type' +} + +/** aggregate stddev on columns */ +export type Unified_Transaction_Stddev_Fields = { + __typename?: 'unified_transaction_stddev_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Unified_Transaction_Stddev_Pop_Fields = { + __typename?: 'unified_transaction_stddev_pop_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Unified_Transaction_Stddev_Samp_Fields = { + __typename?: 'unified_transaction_stddev_samp_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; +}; + +/** Streaming cursor of the table "unified_transaction" */ +export type Unified_Transaction_Stream_Cursor_Input = { + /** Stream column input with initial value */ + initial_value: Unified_Transaction_Stream_Cursor_Value_Input; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type Unified_Transaction_Stream_Cursor_Value_Input = { + amount?: InputMaybe; + block_height?: InputMaybe; + block_id?: InputMaybe; + detail_id?: InputMaybe; + fee?: InputMaybe; + from_id?: InputMaybe; + hash?: InputMaybe; + id?: InputMaybe; + status?: InputMaybe; + timestamp?: InputMaybe; + to_id?: InputMaybe; + type?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Unified_Transaction_Sum_Fields = { + __typename?: 'unified_transaction_sum_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Unified_Transaction_Var_Pop_Fields = { + __typename?: 'unified_transaction_var_pop_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Unified_Transaction_Var_Samp_Fields = { + __typename?: 'unified_transaction_var_samp_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; +}; + +/** aggregate variance on columns */ +export type Unified_Transaction_Variance_Fields = { + __typename?: 'unified_transaction_variance_fields'; + amount?: Maybe; + block_height?: Maybe; + fee?: Maybe; +}; + +/** columns and relationships of "wormhole_extrinsic" */ +export type Wormhole_Extrinsic = { + __typename?: 'wormhole_extrinsic'; + /** An object relationship */ + block?: Maybe; + block_id?: Maybe; + /** An object relationship */ + extrinsic?: Maybe; + extrinsic_id?: Maybe; + id: Scalars['String']['output']; + output_count: Scalars['Int']['output']; + /** An array relationship */ + outputs: Array; + /** An aggregate relationship */ + outputs_aggregate: Wormhole_Output_Aggregate; + pool_snapshot: Scalars['String']['output']; + privacy_label: Scalars['String']['output']; + privacy_score: Scalars['numeric']['output']; + privacy_score01_pct: Scalars['numeric']['output']; + privacy_score1_pct: Scalars['numeric']['output']; + privacy_score5_pct: Scalars['numeric']['output']; + timestamp: Scalars['timestamptz']['output']; + total_amount: Scalars['numeric']['output']; +}; + +/** columns and relationships of "wormhole_extrinsic" */ +export type Wormhole_ExtrinsicOutputsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +/** columns and relationships of "wormhole_extrinsic" */ +export type Wormhole_ExtrinsicOutputs_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +/** aggregated selection of "wormhole_extrinsic" */ +export type Wormhole_Extrinsic_Aggregate = { + __typename?: 'wormhole_extrinsic_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "wormhole_extrinsic" */ +export type Wormhole_Extrinsic_Aggregate_Fields = { + __typename?: 'wormhole_extrinsic_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']['output']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + +/** aggregate fields of "wormhole_extrinsic" */ +export type Wormhole_Extrinsic_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Wormhole_Extrinsic_Avg_Fields = { + __typename?: 'wormhole_extrinsic_avg_fields'; + output_count?: Maybe; + privacy_score?: Maybe; + privacy_score01_pct?: Maybe; + privacy_score1_pct?: Maybe; + privacy_score5_pct?: Maybe; + total_amount?: Maybe; +}; + +/** Boolean expression to filter rows from the table "wormhole_extrinsic". All fields are combined with a logical 'AND'. */ +export type Wormhole_Extrinsic_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + block?: InputMaybe; + block_id?: InputMaybe; + extrinsic?: InputMaybe; + extrinsic_id?: InputMaybe; + id?: InputMaybe; + output_count?: InputMaybe; + outputs?: InputMaybe; + outputs_aggregate?: InputMaybe; + pool_snapshot?: InputMaybe; + privacy_label?: InputMaybe; + privacy_score?: InputMaybe; + privacy_score01_pct?: InputMaybe; + privacy_score1_pct?: InputMaybe; + privacy_score5_pct?: InputMaybe; + timestamp?: InputMaybe; + total_amount?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Wormhole_Extrinsic_Max_Fields = { + __typename?: 'wormhole_extrinsic_max_fields'; + block_id?: Maybe; + extrinsic_id?: Maybe; + id?: Maybe; + output_count?: Maybe; + pool_snapshot?: Maybe; + privacy_label?: Maybe; + privacy_score?: Maybe; + privacy_score01_pct?: Maybe; + privacy_score1_pct?: Maybe; + privacy_score5_pct?: Maybe; + timestamp?: Maybe; + total_amount?: Maybe; +}; + +/** aggregate min on columns */ +export type Wormhole_Extrinsic_Min_Fields = { + __typename?: 'wormhole_extrinsic_min_fields'; + block_id?: Maybe; + extrinsic_id?: Maybe; + id?: Maybe; + output_count?: Maybe; + pool_snapshot?: Maybe; + privacy_label?: Maybe; + privacy_score?: Maybe; + privacy_score01_pct?: Maybe; privacy_score1_pct?: Maybe; privacy_score5_pct?: Maybe; timestamp?: Maybe; @@ -8311,13 +9451,21 @@ export type GetAccountsQuery = { free: any; frozen: any; reserved: any; + flagEvents: Array<{ + __typename?: 'account_event'; + multisig_id?: string | null; + highSecuritySet?: { + __typename?: 'high_security_set'; + who_id?: string | null; + guardian_id?: string | null; + } | null; + }>; }>; meta?: { __typename?: 'chain_stats'; totalCount: number } | null; }; export type GetAccountByIdQueryVariables = Exact<{ id: Scalars['String']['input']; - limit: Scalars['Int']['input']; }>; export type GetAccountByIdQuery = { @@ -8338,272 +9486,9 @@ export type GetAccountByIdQuery = { total_rewards: any; total_scheduled_transfers: number; } | null; - multisig?: { - __typename?: 'multisig'; - id: string; - timestamp: any; - threshold: number; - nonce: any; - signers: Array; - creator?: { __typename?: 'account'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - } | null; - accountEvents: Array<{ - __typename?: 'account_event'; - transfer?: { - __typename?: 'transfer'; - fee: any; - amount: any; - timestamp: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - scheduledReversibleTransfer?: { - __typename?: 'scheduled_reversible_transfer'; - timestamp: any; - amount: any; - scheduled_at: any; - tx_id: string; - fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - executedReversibleTransfer?: { - __typename?: 'executed_reversible_transfer'; - timestamp: any; - tx_id: string; - block?: { __typename?: 'block'; height: number } | null; - scheduledTransfer?: { - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; - fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - cancelledReversibleTransfer?: { - __typename?: 'cancelled_reversible_transfer'; - timestamp: any; - tx_id: string; - block?: { __typename?: 'block'; height: number } | null; - cancelledBy?: { __typename?: 'account'; id: string } | null; - scheduledTransfer?: { - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; - fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - minerReward?: { - __typename?: 'miner_reward'; - reward: any; - timestamp: any; - block?: { __typename?: 'block'; height: number; hash: string } | null; - miner?: { __typename?: 'account'; id: string } | null; - } | null; - multisig?: { - __typename?: 'multisig'; - id: string; - timestamp: any; - threshold: number; - nonce: any; - signers: Array; - creator?: { __typename?: 'account'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - } | null; - multisigProposalCreated?: { - __typename?: 'multisig_proposal_created'; - id: string; - timestamp: any; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - proposal?: { - __typename?: 'multisig_proposal'; - id: string; - multisig?: { __typename?: 'multisig'; id: string } | null; - proposer?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - multisigSignerApproved?: { - __typename?: 'multisig_signer_approved'; - id: string; - timestamp: any; - approvals_count: number; - approver?: { __typename?: 'account'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - proposal?: { - __typename?: 'multisig_proposal'; - id: string; - multisig?: { __typename?: 'multisig'; id: string } | null; - proposer?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - multisigProposalReady?: { - __typename?: 'multisig_proposal_ready'; - id: string; - timestamp: any; - approvals_count: number; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - proposal?: { - __typename?: 'multisig_proposal'; - id: string; - multisig?: { __typename?: 'multisig'; id: string } | null; - proposer?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - executedMultisigProposal?: { - __typename?: 'executed_multisig_proposal'; - id: string; - timestamp: any; - approvers: Array; - result: string; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - proposal?: { - __typename?: 'multisig_proposal'; - id: string; - multisig?: { __typename?: 'multisig'; id: string } | null; - proposer?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - cancelledMultisigProposal?: { - __typename?: 'cancelled_multisig_proposal'; - id: string; - timestamp: any; - cancelledBy?: { __typename?: 'account'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - proposal?: { - __typename?: 'multisig_proposal'; - id: string; - multisig?: { __typename?: 'multisig'; id: string } | null; - proposer?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - removedMultisigProposal?: { - __typename?: 'removed_multisig_proposal'; - id: string; - timestamp: any; - removedBy?: { __typename?: 'account'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - proposal?: { - __typename?: 'multisig_proposal'; - id: string; - multisig?: { __typename?: 'multisig'; id: string } | null; - proposer?: { __typename?: 'account'; id: string } | null; - } | null; - } | null; - multisigDepositsClaimed?: { - __typename?: 'multisig_deposits_claimed'; - id: string; - timestamp: any; - total_returned: any; - proposals_removed: number; - claimer?: { __typename?: 'account'; id: string } | null; - multisig?: { __typename?: 'multisig'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - } | null; - }>; + multisig?: { __typename?: 'multisig'; id: string } | null; guardian: { __typename?: 'high_security_set_aggregate'; - nodes: Array<{ - __typename?: 'high_security_set'; - timestamp: any; - block?: { __typename?: 'block'; height: number } | null; - guardian?: { - __typename?: 'account'; - id: string; - free: any; - frozen: any; - reserved: any; - } | null; - }>; aggregate?: { __typename?: 'high_security_set_aggregate_fields'; totalCount: number; @@ -8611,49 +9496,11 @@ export type GetAccountByIdQuery = { }; beneficiaries: { __typename?: 'high_security_set_aggregate'; - nodes: Array<{ - __typename?: 'high_security_set'; - timestamp: any; - block?: { __typename?: 'block'; height: number } | null; - who?: { - __typename?: 'account'; - id: string; - free: any; - frozen: any; - reserved: any; - } | null; - }>; aggregate?: { __typename?: 'high_security_set_aggregate_fields'; totalCount: number; } | null; }; - wormholeOutputs: Array<{ - __typename?: 'wormhole_output'; - id: string; - amount: any; - exitAccount?: { __typename?: 'account'; id: string } | null; - wormholeExtrinsic?: { - __typename?: 'wormhole_extrinsic'; - id: string; - total_amount: any; - output_count: number; - timestamp: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - outputs: Array<{ - __typename?: 'wormhole_output'; - id: string; - amount: any; - exitAccount?: { __typename?: 'account'; id: string } | null; - }>; - } | null; - }>; }; export type GetAccountsStatsQueryVariables = Exact<{ @@ -8696,30 +9543,12 @@ export type GetBlocksQuery = { height: number; reward: any; timestamp: any; + mined_by_id?: string | null; extrinsics: Array<{ __typename?: 'extrinsic'; id: string }>; }>; meta?: { __typename?: 'chain_stats'; totalCount: number } | null; }; -export type GetRecentBlocksQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe | Block_Order_By>; -}>; - -export type GetRecentBlocksQuery = { - __typename?: 'query_root'; - blocks: Array<{ - __typename?: 'block'; - id: string; - hash: string; - height: number; - reward: any; - timestamp: any; - extrinsics: Array<{ __typename?: 'extrinsic'; id: string }>; - }>; -}; - export type GetBlockByIdQueryVariables = Exact<{ height: Scalars['Int']['input']; hash: Scalars['String']['input']; @@ -8742,7 +9571,7 @@ export type GetBlockByIdQuery = { success: boolean; fee: any; timestamp: any; - index_in_block: number; + indexInBlock: number; signer?: { __typename?: 'account'; id: string } | null; }>; }>; @@ -8776,108 +9605,6 @@ export type GetBlockStatsQuery = { }; }; -export type GetCancelledReversibleTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Cancelled_Reversible_Transfer_Order_By - >; - where?: InputMaybe; -}>; - -export type GetCancelledReversibleTransactionsQuery = { - __typename?: 'query_root'; - cancelledReversibleTransactions: Array<{ - __typename?: 'cancelled_reversible_transfer'; - timestamp: any; - tx_id: string; - block?: { __typename?: 'block'; height: number } | null; - cancelledBy?: { __typename?: 'account'; id: string } | null; - scheduledTransfer?: { - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; - fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - }>; - meta: { - __typename?: 'cancelled_reversible_transfer_aggregate'; - aggregate?: { - __typename?: 'cancelled_reversible_transfer_aggregate_fields'; - totalCount: number; - } | null; - }; -}; - -export type GetRecentCancelledReversibleTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Cancelled_Reversible_Transfer_Order_By - >; -}>; - -export type GetRecentCancelledReversibleTransactionsQuery = { - __typename?: 'query_root'; - cancelledReversibleTransactions: Array<{ - __typename?: 'cancelled_reversible_transfer'; - timestamp: any; - tx_id: string; - block?: { __typename?: 'block'; height: number } | null; - cancelledBy?: { __typename?: 'account'; id: string } | null; - scheduledTransfer?: { - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; - fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - }>; -}; - -export type GetCancelledReversibleTransactionsStatsQueryVariables = Exact<{ - startDate: Scalars['timestamptz']['input']; - endDate: Scalars['timestamptz']['input']; -}>; - -export type GetCancelledReversibleTransactionsStatsQuery = { - __typename?: 'query_root'; - last24Hour: { - __typename?: 'cancelled_reversible_transfer_aggregate'; - aggregate?: { - __typename?: 'cancelled_reversible_transfer_aggregate_fields'; - totalCount: number; - } | null; - }; - allTime?: { - __typename?: 'chain_stats'; - total_cancelled_transfers: number; - } | null; -}; - export type GetCancelledReversibleTransactionByTxIdQueryVariables = Exact<{ tx_id: Scalars['String']['input']; }>; @@ -8907,9 +9634,26 @@ export type GetCancelledReversibleTransactionByTxIdQuery = { }>; }; -export type GetStatusQueryVariables = Exact<{ [key: string]: never }>; +export type GetHomeChainStatsQueryVariables = Exact<{ + startDate: Scalars['timestamptz']['input']; + endDate: Scalars['timestamptz']['input']; + day0Start: Scalars['timestamptz']['input']; + day0End: Scalars['timestamptz']['input']; + day1Start: Scalars['timestamptz']['input']; + day1End: Scalars['timestamptz']['input']; + day2Start: Scalars['timestamptz']['input']; + day2End: Scalars['timestamptz']['input']; + day3Start: Scalars['timestamptz']['input']; + day3End: Scalars['timestamptz']['input']; + day4Start: Scalars['timestamptz']['input']; + day4End: Scalars['timestamptz']['input']; + day5Start: Scalars['timestamptz']['input']; + day5End: Scalars['timestamptz']['input']; + day6Start: Scalars['timestamptz']['input']; + day6End: Scalars['timestamptz']['input']; +}>; -export type GetStatusQuery = { +export type GetHomeChainStatsQuery = { __typename?: 'query_root'; status?: { __typename?: 'chain_stats'; @@ -8921,67 +9665,189 @@ export type GetStatusQuery = { total_scheduled_transfers: number; total_cancelled_transfers: number; } | null; -}; - -export type GetErrorEventsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe | Error_Event_Order_By>; - where?: InputMaybe; -}>; - -export type GetErrorEventsQuery = { - __typename?: 'query_root'; - errorEvents: Array<{ - __typename?: 'error_event'; - error_docs?: string | null; - error_module?: string | null; - error_name?: string | null; - error_type: string; - id: string; - timestamp: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; + last24Hour: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; } | null; - block?: { __typename?: 'block'; height: number } | null; - }>; - meta: { - __typename?: 'error_event_aggregate'; + }; + blocksDay0: { + __typename?: 'block_aggregate'; + aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; + }; + transfersDay0: { + __typename?: 'transfer_aggregate'; aggregate?: { - __typename?: 'error_event_aggregate_fields'; - totalCount: number; + __typename?: 'transfer_aggregate_fields'; + count: number; } | null; }; -}; - -export type GetRecentErrorEventsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe | Error_Event_Order_By>; - where?: InputMaybe; -}>; - -export type GetRecentErrorEventsQuery = { - __typename?: 'query_root'; - errorEvents: Array<{ - __typename?: 'error_event'; - error_docs?: string | null; - error_module?: string | null; - error_name?: string | null; - error_type: string; - id: string; - timestamp: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; + activeAccountsDay0: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + blocksDay1: { + __typename?: 'block_aggregate'; + aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; + }; + transfersDay1: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + activeAccountsDay1: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + blocksDay2: { + __typename?: 'block_aggregate'; + aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; + }; + transfersDay2: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + activeAccountsDay2: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + blocksDay3: { + __typename?: 'block_aggregate'; + aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; + }; + transfersDay3: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + activeAccountsDay3: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + blocksDay4: { + __typename?: 'block_aggregate'; + aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; + }; + transfersDay4: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + activeAccountsDay4: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + blocksDay5: { + __typename?: 'block_aggregate'; + aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; + }; + transfersDay5: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + activeAccountsDay5: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + blocksDay6: { + __typename?: 'block_aggregate'; + aggregate?: { __typename?: 'block_aggregate_fields'; count: number } | null; + }; + transfersDay6: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; + activeAccountsDay6: { + __typename?: 'transfer_aggregate'; + aggregate?: { + __typename?: 'transfer_aggregate_fields'; + count: number; + } | null; + }; +}; + +export type GetStatusQueryVariables = Exact<{ [key: string]: never }>; + +export type GetStatusQuery = { + __typename?: 'query_root'; + status?: { + __typename?: 'chain_stats'; + block_height: number; + total_accounts: number; + total_deposit_accounts: number; + total_executed_transfers: number; + total_immediate_transfers: number; + total_scheduled_transfers: number; + total_cancelled_transfers: number; + } | null; +}; + +export type GetErrorEventsQueryVariables = Exact<{ + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe | Error_Event_Order_By>; + where?: InputMaybe; +}>; + +export type GetErrorEventsQuery = { + __typename?: 'query_root'; + errorEvents: Array<{ + __typename?: 'error_event'; + error_docs?: string | null; + error_module?: string | null; + error_name?: string | null; + error_type: string; + id: string; + timestamp: any; + extrinsic?: { + __typename?: 'extrinsic'; + id: string; + pallet: string; call: string; } | null; block?: { __typename?: 'block'; height: number } | null; }>; + meta: { + __typename?: 'error_event_aggregate'; + aggregate?: { + __typename?: 'error_event_aggregate_fields'; + totalCount: number; + } | null; + }; }; export type GetErrorEventsStatsQueryVariables = Exact<{ @@ -9025,106 +9891,6 @@ export type GetErrorEventByHashQuery = { }>; }; -export type GetExecutedReversibleTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Executed_Reversible_Transfer_Order_By - >; - where?: InputMaybe; -}>; - -export type GetExecutedReversibleTransactionsQuery = { - __typename?: 'query_root'; - executedReversibleTransactions: Array<{ - __typename?: 'executed_reversible_transfer'; - timestamp: any; - tx_id: string; - block?: { __typename?: 'block'; height: number } | null; - scheduledTransfer?: { - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; - fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - }>; - meta: { - __typename?: 'executed_reversible_transfer_aggregate'; - aggregate?: { - __typename?: 'executed_reversible_transfer_aggregate_fields'; - totalCount: number; - } | null; - }; -}; - -export type GetRecentExecutedReversibleTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Executed_Reversible_Transfer_Order_By - >; -}>; - -export type GetRecentExecutedReversibleTransactionsQuery = { - __typename?: 'query_root'; - executedReversibleTransactions: Array<{ - __typename?: 'executed_reversible_transfer'; - timestamp: any; - tx_id: string; - block?: { __typename?: 'block'; height: number } | null; - scheduledTransfer?: { - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; - fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - } | null; - }>; -}; - -export type GetExecutedReversibleTransactionsStatsQueryVariables = Exact<{ - startDate: Scalars['timestamptz']['input']; - endDate: Scalars['timestamptz']['input']; -}>; - -export type GetExecutedReversibleTransactionsStatsQuery = { - __typename?: 'query_root'; - last24Hour: { - __typename?: 'executed_reversible_transfer_aggregate'; - aggregate?: { - __typename?: 'executed_reversible_transfer_aggregate_fields'; - totalCount: number; - } | null; - }; - allTime?: { - __typename?: 'chain_stats'; - total_executed_transfers: number; - } | null; -}; - export type GetExecutedReversibleTransactionByTxIdQueryVariables = Exact<{ tx_id: Scalars['String']['input']; }>; @@ -9182,34 +9948,6 @@ export type GetHighSecuritySetsQuery = { }; }; -export type GetRecentHighSecuritySetsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - Array | High_Security_Set_Order_By - >; - where?: InputMaybe; -}>; - -export type GetRecentHighSecuritySetsQuery = { - __typename?: 'query_root'; - highSecuritySets: Array<{ - __typename?: 'high_security_set'; - id: string; - timestamp: any; - delay: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - who?: { __typename?: 'account'; id: string } | null; - guardian?: { __typename?: 'account'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - }>; -}; - export type GetHighSecuritySetsStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -9253,21 +9991,42 @@ export type GetHighSecuritySetByHashQuery = { }>; }; -export type GetMinerLeaderboardChartQueryVariables = Exact<{ - limit?: InputMaybe; +export type GetMinerLeaderboardStatsQueryVariables = Exact<{ + startDate: Scalars['timestamptz']['input']; + endDate: Scalars['timestamptz']['input']; }>; -export type GetMinerLeaderboardChartQuery = { +export type GetMinerLeaderboardStatsQuery = { __typename?: 'query_root'; - topMiners: Array<{ - __typename?: 'account_stats'; - id: string; - total_mined_blocks: number; - }>; - blocks?: { __typename?: 'chain_stats'; totalCount: number } | null; -}; - -export type GetMinerLeaderboardQueryVariables = Exact<{ + chain?: { + __typename?: 'chain_stats'; + block_height: number; + total_miners: number; + } | null; + last24Hour: { + __typename?: 'miner_reward_aggregate'; + aggregate?: { + __typename?: 'miner_reward_aggregate_fields'; + totalCount: number; + } | null; + }; +}; + +export type GetMinerLeaderboardChartQueryVariables = Exact<{ + limit?: InputMaybe; +}>; + +export type GetMinerLeaderboardChartQuery = { + __typename?: 'query_root'; + topMiners: Array<{ + __typename?: 'account_stats'; + id: string; + total_mined_blocks: number; + }>; + blocks?: { __typename?: 'chain_stats'; totalCount: number } | null; +}; + +export type GetMinerLeaderboardQueryVariables = Exact<{ limit?: InputMaybe; offset?: InputMaybe; }>; @@ -9280,7 +10039,12 @@ export type GetMinerLeaderboardQuery = { total_mined_blocks: number; total_rewards: any; }>; - meta?: { __typename?: 'chain_stats'; totalCount: number } | null; + meta?: { + __typename?: 'chain_stats'; + block_height: number; + totalCount: number; + } | null; + topMiner: Array<{ __typename?: 'account_stats'; total_mined_blocks: number }>; }; export type GetMinerRewardsQueryVariables = Exact<{ @@ -9308,24 +10072,6 @@ export type GetMinerRewardsQuery = { }; }; -export type GetRecentMinerRewardsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe | Miner_Reward_Order_By>; - where?: InputMaybe; -}>; - -export type GetRecentMinerRewardsQuery = { - __typename?: 'query_root'; - minerRewards: Array<{ - __typename?: 'miner_reward'; - reward: any; - timestamp: any; - block?: { __typename?: 'block'; height: number; hash: string } | null; - miner?: { __typename?: 'account'; id: string } | null; - }>; -}; - export type GetMinerRewardsStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -9400,22 +10146,6 @@ export type GetMultisigCreatedQuery = { }; }; -export type GetRecentMultisigCreatedQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe | Multisig_Order_By>; -}>; - -export type GetRecentMultisigCreatedQuery = { - __typename?: 'query_root'; - multisigCreatedEvents: Array< - { __typename?: 'multisig' } & { - ' $fragmentRefs'?: { - MultisigCreatedFieldsFragment: MultisigCreatedFieldsFragment; - }; - } - >; -}; - export type GetMultisigCreatedStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -9451,6 +10181,21 @@ export type GetMultisigCreatedByHashQuery = { >; }; +export type GetMultisigByIdQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + +export type GetMultisigByIdQuery = { + __typename?: 'query_root'; + multisig?: + | ({ __typename?: 'multisig' } & { + ' $fragmentRefs'?: { + MultisigCreatedFieldsFragment: MultisigCreatedFieldsFragment; + }; + }) + | null; +}; + export type MultisigDepositsClaimedFieldsFragment = { __typename?: 'multisig_deposits_claimed'; id: string; @@ -9496,25 +10241,6 @@ export type GetMultisigDepositsClaimedQuery = { }; }; -export type GetRecentMultisigDepositsClaimedQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Multisig_Deposits_Claimed_Order_By - >; -}>; - -export type GetRecentMultisigDepositsClaimedQuery = { - __typename?: 'query_root'; - multisigDepositsClaimedEvents: Array< - { __typename?: 'multisig_deposits_claimed' } & { - ' $fragmentRefs'?: { - MultisigDepositsClaimedFieldsFragment: MultisigDepositsClaimedFieldsFragment; - }; - } - >; -}; - export type GetMultisigDepositsClaimedStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -9598,25 +10324,6 @@ export type GetMultisigProposalCancelledQuery = { }; }; -export type GetRecentMultisigProposalCancelledQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Cancelled_Multisig_Proposal_Order_By - >; -}>; - -export type GetRecentMultisigProposalCancelledQuery = { - __typename?: 'query_root'; - multisigProposalCancelledEvents: Array< - { __typename?: 'cancelled_multisig_proposal' } & { - ' $fragmentRefs'?: { - MultisigProposalCancelledFieldsFragment: MultisigProposalCancelledFieldsFragment; - }; - } - >; -}; - export type GetMultisigProposalCancelledStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -9707,25 +10414,6 @@ export type GetMultisigProposalCreatedQuery = { }; }; -export type GetRecentMultisigProposalCreatedQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Multisig_Proposal_Created_Order_By - >; -}>; - -export type GetRecentMultisigProposalCreatedQuery = { - __typename?: 'query_root'; - multisigProposalCreatedEvents: Array< - { __typename?: 'multisig_proposal_created' } & { - ' $fragmentRefs'?: { - MultisigProposalCreatedFieldsFragment: MultisigProposalCreatedFieldsFragment; - }; - } - >; -}; - export type GetMultisigProposalCreatedStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -9810,25 +10498,6 @@ export type GetMultisigProposalExecutedQuery = { }; }; -export type GetRecentMultisigProposalExecutedQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Executed_Multisig_Proposal_Order_By - >; -}>; - -export type GetRecentMultisigProposalExecutedQuery = { - __typename?: 'query_root'; - multisigProposalExecutedEvents: Array< - { __typename?: 'executed_multisig_proposal' } & { - ' $fragmentRefs'?: { - MultisigProposalExecutedFieldsFragment: MultisigProposalExecutedFieldsFragment; - }; - } - >; -}; - export type GetMultisigProposalExecutedStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -9911,24 +10580,6 @@ export type GetMultisigProposalReadyQuery = { }; }; -export type GetRecentMultisigProposalReadyQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe< - Array | Multisig_Proposal_Ready_Order_By - >; -}>; - -export type GetRecentMultisigProposalReadyQuery = { - __typename?: 'query_root'; - multisigProposalReadyEvents: Array< - { __typename?: 'multisig_proposal_ready' } & { - ' $fragmentRefs'?: { - MultisigProposalReadyFieldsFragment: MultisigProposalReadyFieldsFragment; - }; - } - >; -}; - export type GetMultisigProposalReadyStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -10012,25 +10663,6 @@ export type GetMultisigProposalRemovedQuery = { }; }; -export type GetRecentMultisigProposalRemovedQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Removed_Multisig_Proposal_Order_By - >; -}>; - -export type GetRecentMultisigProposalRemovedQuery = { - __typename?: 'query_root'; - multisigProposalRemovedEvents: Array< - { __typename?: 'removed_multisig_proposal' } & { - ' $fragmentRefs'?: { - MultisigProposalRemovedFieldsFragment: MultisigProposalRemovedFieldsFragment; - }; - } - >; -}; - export type GetMultisigProposalRemovedStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -10072,6 +10704,7 @@ export type MultisigProposalListFieldsFragment = { status: string; deposit: any; expiry_block: number; + approvals: Array; created_at: any; multisig?: { __typename?: 'multisig'; id: string } | null; proposer?: { __typename?: 'account'; id: string } | null; @@ -10270,24 +10903,6 @@ export type GetMultisigSignerApprovedQuery = { }; }; -export type GetRecentMultisigSignerApprovedQueryVariables = Exact<{ - limit?: InputMaybe; - orderBy?: InputMaybe< - Array | Multisig_Signer_Approved_Order_By - >; -}>; - -export type GetRecentMultisigSignerApprovedQuery = { - __typename?: 'query_root'; - multisigSignerApprovedEvents: Array< - { __typename?: 'multisig_signer_approved' } & { - ' $fragmentRefs'?: { - MultisigSignerApprovedFieldsFragment: MultisigSignerApprovedFieldsFragment; - }; - } - >; -}; - export type GetMultisigSignerApprovedStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; @@ -10323,17 +10938,11 @@ export type GetMultisigSignerApprovedByHashQuery = { >; }; -export type GetScheduledReversibleTransactionsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Scheduled_Reversible_Transfer_Order_By - >; - where?: InputMaybe; +export type GetScheduledReversibleTransactionByTxIdQueryVariables = Exact<{ + tx_id: Scalars['String']['input']; }>; -export type GetScheduledReversibleTransactionsQuery = { +export type GetScheduledReversibleTransactionByTxIdQuery = { __typename?: 'query_root'; scheduledReversibleTransactions: Array<{ __typename?: 'scheduled_reversible_transfer'; @@ -10352,290 +10961,186 @@ export type GetScheduledReversibleTransactionsQuery = { from?: { __typename?: 'account'; id: string } | null; to?: { __typename?: 'account'; id: string } | null; }>; - meta: { - __typename?: 'scheduled_reversible_transfer_aggregate'; - aggregate?: { - __typename?: 'scheduled_reversible_transfer_aggregate_fields'; - totalCount: number; - } | null; - }; }; -export type GetRecentScheduledReversibleTransactionsQueryVariables = Exact<{ +export type SearchAllQueryVariables = Exact<{ + keyword?: InputMaybe; + keyword_number?: InputMaybe; limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe< - | Array - | Scheduled_Reversible_Transfer_Order_By - >; }>; -export type GetRecentScheduledReversibleTransactionsQuery = { +export type SearchAllQuery = { __typename?: 'query_root'; - scheduledReversibleTransactions: Array<{ - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; - fee: any; + transactions: Array<{ + __typename?: 'unified_transaction'; + id: string; + type: string; + hash?: string | null; + detail_id: string; + block?: { __typename?: 'block'; height: number; hash: string } | null; + }>; + accounts: Array<{ __typename?: 'account'; id: string }>; + blocks: Array<{ __typename?: 'block'; height: number }>; + highSecuritySets: Array<{ + __typename?: 'high_security_set'; + extrinsic?: { + __typename?: 'extrinsic'; + id: string; + pallet: string; + call: string; + } | null; + }>; + errorEvents: Array<{ + __typename?: 'error_event'; extrinsic?: { __typename?: 'extrinsic'; id: string; pallet: string; call: string; } | null; - block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; }>; }; -export type GetScheduledReversibleTransactionsStatsQueryVariables = Exact<{ - startDate: Scalars['timestamptz']['input']; - endDate: Scalars['timestamptz']['input']; +export type GetExtrinsicByHashQueryVariables = Exact<{ + hash: Scalars['String']['input']; }>; -export type GetScheduledReversibleTransactionsStatsQuery = { +export type GetExtrinsicByHashQuery = { __typename?: 'query_root'; - last24Hour: { - __typename?: 'scheduled_reversible_transfer_aggregate'; - aggregate?: { - __typename?: 'scheduled_reversible_transfer_aggregate_fields'; - totalCount: number; - } | null; - }; - allTime?: { - __typename?: 'chain_stats'; - total_scheduled_transfers: number; - } | null; -}; - -export type GetScheduledReversibleTransactionByTxIdQueryVariables = Exact<{ - tx_id: Scalars['String']['input']; -}>; - -export type GetScheduledReversibleTransactionByTxIdQuery = { - __typename?: 'query_root'; - scheduledReversibleTransactions: Array<{ - __typename?: 'scheduled_reversible_transfer'; - amount: any; - timestamp: any; - scheduled_at: any; - tx_id: string; + extrinsics: Array<{ + __typename?: 'extrinsic'; + id: string; + pallet: string; + call: string; + success: boolean; fee: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; + timestamp: any; + index_in_block: number; + signer?: { __typename?: 'account'; id: string } | null; block?: { __typename?: 'block'; height: number } | null; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; }>; -}; - -export type SearchAllQueryVariables = Exact<{ - keyword?: InputMaybe; - keyword_number?: InputMaybe; - limit?: InputMaybe; -}>; - -export type SearchAllQuery = { - __typename?: 'query_root'; - transactions: Array<{ + transfersByExtrinsic: Array<{ __typename?: 'transfer'; + id: string; + amount: any; + timestamp: any; + from?: { __typename?: 'account'; id: string } | null; + to?: { __typename?: 'account'; id: string } | null; + block?: { __typename?: 'block'; height: number } | null; extrinsic?: { __typename?: 'extrinsic'; id: string; pallet: string; call: string; + success: boolean; + fee: any; + timestamp: any; + index_in_block: number; + signer?: { __typename?: 'account'; id: string } | null; + block?: { __typename?: 'block'; height: number } | null; } | null; }>; - scheduledReversibleTransactions: Array<{ - __typename?: 'scheduled_reversible_transfer'; - tx_id: string; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - }>; - executedReversibleTransactions: Array<{ - __typename?: 'executed_reversible_transfer'; - tx_id: string; - }>; - cancelledReversibleTransactions: Array<{ - __typename?: 'cancelled_reversible_transfer'; - tx_id: string; - }>; - accounts: Array<{ __typename?: 'account'; id: string }>; - blocks: Array<{ __typename?: 'block'; height: number }>; - highSecuritySets: Array<{ - __typename?: 'high_security_set'; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - }>; - minerRewards: Array<{ - __typename?: 'miner_reward'; - reward: any; + transfersById: Array<{ + __typename?: 'transfer'; + id: string; + amount: any; timestamp: any; - block?: { __typename?: 'block'; height: number; hash: string } | null; - miner?: { __typename?: 'account'; id: string } | null; - }>; - errorEvents: Array<{ - __typename?: 'error_event'; + from?: { __typename?: 'account'; id: string } | null; + to?: { __typename?: 'account'; id: string } | null; + block?: { __typename?: 'block'; height: number } | null; extrinsic?: { __typename?: 'extrinsic'; id: string; pallet: string; call: string; + success: boolean; + fee: any; + timestamp: any; + index_in_block: number; + signer?: { __typename?: 'account'; id: string } | null; + block?: { __typename?: 'block'; height: number } | null; } | null; }>; }; -export type GetTransactionsQueryVariables = Exact<{ +export type GetUnifiedTransactionsQueryVariables = Exact<{ limit?: InputMaybe; offset?: InputMaybe; - orderBy?: InputMaybe | Transfer_Order_By>; - where?: InputMaybe; + orderBy?: InputMaybe< + Array | Unified_Transaction_Order_By + >; + where?: InputMaybe; }>; -export type GetTransactionsQuery = { +export type GetUnifiedTransactionsQuery = { __typename?: 'query_root'; transactions: Array<{ - __typename?: 'transfer'; - fee: any; - amount: any; + __typename?: 'unified_transaction'; + id: string; + type: string; + hash?: string | null; timestamp: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; + amount?: any | null; + fee?: any | null; + status: string; + detail_id: string; + block?: { __typename?: 'block'; height: number; hash: string } | null; from?: { __typename?: 'account'; id: string } | null; to?: { __typename?: 'account'; id: string } | null; }>; meta: { - __typename?: 'transfer_aggregate'; + __typename?: 'unified_transaction_aggregate'; aggregate?: { - __typename?: 'transfer_aggregate_fields'; + __typename?: 'unified_transaction_aggregate_fields'; totalCount: number; } | null; }; }; -export type GetRecentTransactionsQueryVariables = Exact<{ +export type GetRecentUnifiedTransactionsQueryVariables = Exact<{ limit?: InputMaybe; offset?: InputMaybe; - orderBy?: InputMaybe | Transfer_Order_By>; - where?: InputMaybe; + orderBy?: InputMaybe< + Array | Unified_Transaction_Order_By + >; }>; -export type GetRecentTransactionsQuery = { +export type GetRecentUnifiedTransactionsQuery = { __typename?: 'query_root'; transactions: Array<{ - __typename?: 'transfer'; - fee: any; - amount: any; + __typename?: 'unified_transaction'; + id: string; + type: string; + hash?: string | null; timestamp: any; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; + amount?: any | null; + fee?: any | null; + status: string; + detail_id: string; + block?: { __typename?: 'block'; height: number; hash: string } | null; from?: { __typename?: 'account'; id: string } | null; to?: { __typename?: 'account'; id: string } | null; }>; }; -export type GetTransactionsStatsQueryVariables = Exact<{ +export type GetUnifiedTransactionsStatsQueryVariables = Exact<{ startDate: Scalars['timestamptz']['input']; endDate: Scalars['timestamptz']['input']; }>; -export type GetTransactionsStatsQuery = { +export type GetUnifiedTransactionsStatsQuery = { __typename?: 'query_root'; last24Hour: { - __typename?: 'transfer_aggregate'; + __typename?: 'unified_transaction_aggregate'; aggregate?: { - __typename?: 'transfer_aggregate_fields'; + __typename?: 'unified_transaction_aggregate_fields'; totalCount: number; } | null; }; - allTime?: { - __typename?: 'chain_stats'; - total_immediate_transfers: number; - } | null; -}; - -export type GetExtrinsicByHashQueryVariables = Exact<{ - hash: Scalars['String']['input']; -}>; - -export type GetExtrinsicByHashQuery = { - __typename?: 'query_root'; - extrinsics: Array<{ - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - success: boolean; - fee: any; - timestamp: any; - index_in_block: number; - signer?: { __typename?: 'account'; id: string } | null; - block?: { __typename?: 'block'; height: number } | null; - }>; - transfers: Array<{ - __typename?: 'transfer'; - id: string; - amount: any; - timestamp: any; - from?: { __typename?: 'account'; id: string } | null; - to?: { __typename?: 'account'; id: string } | null; - }>; -}; - -export type GetWormholeExtrinsicsQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - orderBy: Array | Wormhole_Extrinsic_Order_By; - where?: InputMaybe; -}>; - -export type GetWormholeExtrinsicsQuery = { - __typename?: 'query_root'; - wormholeExtrinsics: Array<{ - __typename?: 'wormhole_extrinsic'; - id: string; - total_amount: any; - output_count: number; - timestamp: any; - privacy_score: any; - privacy_label: string; - extrinsic?: { - __typename?: 'extrinsic'; - id: string; - pallet: string; - call: string; - } | null; - block?: { __typename?: 'block'; height: number } | null; - }>; - meta: { - __typename?: 'wormhole_extrinsic_aggregate'; + allTime: { + __typename?: 'unified_transaction_aggregate'; aggregate?: { - __typename?: 'wormhole_extrinsic_aggregate_fields'; + __typename?: 'unified_transaction_aggregate_fields'; totalCount: number; } | null; }; @@ -10686,61 +11191,131 @@ export type GetWormholeExtrinsicByIdQuery = { }>; }; -export type GetDepositPoolStatsQueryVariables = Exact<{ [key: string]: never }>; +export type GetTransactionsQueryVariables = Exact<{ + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe | Transfer_Order_By>; + where?: InputMaybe; +}>; -export type GetDepositPoolStatsQuery = { +export type GetTransactionsQuery = { __typename?: 'query_root'; - depositPoolStatsById?: { - __typename?: 'deposit_pool_stats'; - last_updated_block: number; - buckets: string; - } | null; + transactions: Array<{ + __typename?: 'transfer'; + extrinsic?: { __typename?: 'extrinsic'; id: string } | null; + }>; }; -export const MultisigCreatedFieldsFragmentDoc = { - kind: 'Document', - definitions: [ - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigCreatedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, - { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, - { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'creator' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ +export type GetCancelledReversibleTransactionsQueryVariables = Exact<{ + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe< + | Array + | Cancelled_Reversible_Transfer_Order_By + >; + where?: InputMaybe; +}>; + +export type GetCancelledReversibleTransactionsQuery = { + __typename?: 'query_root'; + cancelledReversibleTransactions: Array<{ + __typename?: 'cancelled_reversible_transfer'; + tx_id: string; + }>; +}; + +export type GetExecutedReversibleTransactionsQueryVariables = Exact<{ + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe< + | Array + | Executed_Reversible_Transfer_Order_By + >; + where?: InputMaybe; +}>; + +export type GetExecutedReversibleTransactionsQuery = { + __typename?: 'query_root'; + executedReversibleTransactions: Array<{ + __typename?: 'executed_reversible_transfer'; + tx_id: string; + }>; +}; + +export type GetScheduledReversibleTransactionsQueryVariables = Exact<{ + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe< + | Array + | Scheduled_Reversible_Transfer_Order_By + >; + where?: InputMaybe; +}>; + +export type GetScheduledReversibleTransactionsQuery = { + __typename?: 'query_root'; + scheduledReversibleTransactions: Array<{ + __typename?: 'scheduled_reversible_transfer'; + tx_id: string; + }>; +}; + +export type GetWormholeExtrinsicsQueryVariables = Exact<{ + limit?: InputMaybe; + offset?: InputMaybe; + orderBy: Array | Wormhole_Extrinsic_Order_By; + where?: InputMaybe; +}>; + +export type GetWormholeExtrinsicsQuery = { + __typename?: 'query_root'; + wormholeExtrinsics: Array<{ __typename?: 'wormhole_extrinsic'; id: string }>; +}; + +export const MultisigCreatedFieldsFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigCreatedFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, + { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, + { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'creator' }, + 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: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, { kind: 'Field', name: { kind: 'Name', value: 'call' } } @@ -11272,6 +11847,7 @@ export const MultisigProposalListFieldsFragmentDoc = { { kind: 'Field', name: { kind: 'Name', value: 'status' } }, { kind: 'Field', name: { kind: 'Name', value: 'deposit' } }, { kind: 'Field', name: { kind: 'Name', value: 'expiry_block' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvals' } }, { kind: 'Field', name: { kind: 'Name', value: 'created_at' } }, { kind: 'Field', @@ -11621,7 +12197,119 @@ export const GetAccountsDocument = { { 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: 'reserved' } }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'flagEvents' }, + name: { kind: 'Name', value: 'accountEvents' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_or' }, + value: { + kind: 'ListValue', + values: [ + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: 'high_security_set_id' + }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: '_is_null' + }, + value: { + kind: 'BooleanValue', + value: false + } + } + ] + } + } + ] + }, + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: 'multisig_id' + }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: '_is_null' + }, + value: { + kind: 'BooleanValue', + value: false + } + } + ] + } + } + ] + } + ] + } + } + ] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'limit' }, + value: { kind: 'IntValue', value: '20' } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'highSecuritySet' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'who_id' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'guardian_id' } + } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'multisig_id' } + } + ] + } + } ] } }, @@ -11667,17 +12355,6 @@ export const GetAccountByIdDocument = { 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: { @@ -11759,80 +12436,42 @@ export const GetAccountByIdDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, - { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, - { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'creator' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'accountEvents' }, - name: { kind: 'Name', value: 'account_event' }, + alias: { kind: 'Name', value: 'guardian' }, + name: { kind: 'Name', value: 'high_security_set_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, + name: { kind: 'Name', value: 'where' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'account_id' }, + name: { kind: 'Name', value: 'who' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, + name: { kind: 'Name', value: 'id' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' } + } + } + ] } } ] @@ -11847,3850 +12486,78 @@ export const GetAccountByIdDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'transfer' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - 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' } - } - ] - } + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } } ] } - }, + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'beneficiaries' }, + name: { kind: 'Name', value: 'high_security_set_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'guardian' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' } + } + } + ] + } + } + ] + } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'scheduledReversibleTransfer' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - 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' } - } - ] - } + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } } ] } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'executedReversibleTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_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: 'scheduledTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'tx_id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'fee' } - }, - { - 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: 'cancelledReversibleTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_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: 'cancelledBy' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduledTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'tx_id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'fee' } - }, - { - 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: 'minerReward' }, - 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: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'threshold' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'signers' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'creator' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisigProposalCreated' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { 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', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisigSignerApproved' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'approvals_count' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'approver' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisigProposalReady' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'approvals_count' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'executedMultisigProposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'approvers' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'result' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'cancelledMultisigProposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'cancelledBy' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'removedMultisigProposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'removedBy' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisigDepositsClaimed' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_returned' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposals_removed' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'claimer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'guardian' }, - name: { kind: 'Name', value: 'high_security_set_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'desc' } - } - ] - } - }, - { - 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: 'who' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'nodes' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - 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: 'guardian' }, - 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: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'beneficiaries' }, - name: { kind: 'Name', value: 'high_security_set_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'desc' } - } - ] - } - }, - { - 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: 'guardian' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'nodes' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - 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: '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: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'wormholeOutputs' }, - name: { kind: 'Name', value: 'wormhole_output' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'wormholeExtrinsic' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'desc' } - } - ] - } - } - ] - } - }, - { - 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: 'exitAccount' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - 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: 'amount' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'exitAccount' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'wormholeExtrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'output_count' } - }, - { - 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: 'outputs' }, - 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' } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] -} 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: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'all' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - 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: 'total_accounts' } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'recentlyActive' }, - name: { kind: 'Name', value: 'account_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'transfersFrom' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'recentlyDeposited' }, - name: { kind: 'Name', value: 'account_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'transfersTo' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'count' } } - ] - } - } - ] - } - } - ] - } - } - ] -} 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: 'block_order_by' } - } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'block_bool_exp' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocks' }, - name: { kind: 'Name', value: 'block' }, - 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: 'order_by' }, - 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', - name: { kind: 'Name', value: 'extrinsics' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'block_height' } - } - ] - } - } - ] - } - } - ] -} 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: 'block_order_by' } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocks' }, - name: { kind: 'Name', value: 'block' }, - 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: 'order_by' }, - 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' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsics' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - } - ] - } - } - ] - } - } - ] -} 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' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'blocks' }, - name: { kind: 'Name', value: 'block' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_or' }, - value: { - kind: 'ListValue', - values: [ - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'height' } - } - } - ] - } - } - ] - }, - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_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', - name: { kind: 'Name', value: 'extrinsics' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'index_in_block' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'success' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'index_in_block' }, - name: { kind: 'Name', value: 'index_in_block' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'signer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'minerRewards' }, - name: { kind: 'Name', value: 'miner_reward' }, - 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: '_or' }, - value: { - kind: 'ListValue', - values: [ - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'height' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { - kind: 'Name', - value: '_eq' - }, - value: { - kind: 'Variable', - name: { - kind: 'Name', - value: 'height' - } - } - } - ] - } - } - ] - }, - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'hash' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { - kind: 'Name', - value: '_eq' - }, - value: { - kind: 'Variable', - name: { - kind: 'Name', - value: 'hash' - } - } - } - ] - } - } - ] - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'miner' }, - 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' } } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetBlockStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetBlockStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'chain' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - 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: 'block_height' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'finalized_block_height' } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'minedIn24Hours' }, - name: { kind: 'Name', value: 'block_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode; -export const GetCancelledReversibleTransactionsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetCancelledReversibleTransactions' }, - 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: 'cancelled_reversible_transfer_order_by' - } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'cancelled_reversible_transfer_bool_exp' - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'cancelledReversibleTransactions' }, - name: { kind: 'Name', value: 'cancelled_reversible_transfer' }, - 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: 'order_by' }, - 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: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_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: 'cancelledBy' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduledTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - 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', - alias: { kind: 'Name', value: 'meta' }, - name: { - kind: 'Name', - value: 'cancelled_reversible_transfer_aggregate' - }, - arguments: [ - { - 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: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetCancelledReversibleTransactionsQuery, - GetCancelledReversibleTransactionsQueryVariables ->; -export const GetRecentCancelledReversibleTransactionsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentCancelledReversibleTransactions' }, - 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: 'cancelled_reversible_transfer_order_by' - } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'cancelledReversibleTransactions' }, - name: { kind: 'Name', value: 'cancelled_reversible_transfer' }, - 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: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_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: 'cancelledBy' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduledTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - 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' } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetRecentCancelledReversibleTransactionsQuery, - GetRecentCancelledReversibleTransactionsQueryVariables ->; -export const GetCancelledReversibleTransactionsStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetCancelledReversibleTransactionsStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { - kind: 'Name', - value: 'cancelled_reversible_transfer_aggregate' - }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - 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: 'total_cancelled_transfers' } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetCancelledReversibleTransactionsStatsQuery, - GetCancelledReversibleTransactionsStatsQueryVariables ->; -export const GetCancelledReversibleTransactionByTxIdDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetCancelledReversibleTransactionByTxId' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'tx_id' } - }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'cancelledReversibleTransactions' }, - name: { kind: 'Name', value: 'cancelled_reversible_transfer' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'tx_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'tx_id' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_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: 'cancelledBy' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduledTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - 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< - GetCancelledReversibleTransactionByTxIdQuery, - GetCancelledReversibleTransactionByTxIdQueryVariables ->; -export const GetStatusDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetStatus' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'status' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - 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: 'block_height' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_accounts' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_deposit_accounts' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_executed_transfers' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_immediate_transfers' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_scheduled_transfers' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_cancelled_transfers' } - } - ] - } - } - ] - } - } - ] -} 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: 'error_event_order_by' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'error_event_bool_exp' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'errorEvents' }, - name: { kind: 'Name', value: 'error_event' }, - 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: 'order_by' }, - 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: 'error_docs' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'error_module' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'error_name' } }, - { kind: 'Field', name: { kind: 'Name', value: 'error_type' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { 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: 'error_event_aggregate' }, - arguments: [ - { - 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: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - } - ] - } - } - ] -} 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: 'error_event_order_by' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'error_event_bool_exp' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'errorEvents' }, - name: { kind: 'Name', value: 'error_event' }, - 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: 'order_by' }, - 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: 'error_docs' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'error_module' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'error_name' } }, - { kind: 'Field', name: { kind: 'Name', value: 'error_type' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { 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: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'error_event_aggregate' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - 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: 'total_error_events' } - } - ] - } - } - ] - } - } - ] -} 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: 'error_event' }, - 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' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'error_docs' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'error_module' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'error_name' } }, - { kind: 'Field', name: { kind: 'Name', value: 'error_type' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { 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' } } - ] - } } ] } @@ -15699,51 +12566,26 @@ export const GetErrorEventByHashDocument = { } } ] -} as unknown as DocumentNode< - GetErrorEventByHashQuery, - GetErrorEventByHashQueryVariables ->; -export const GetExecutedReversibleTransactionsDocument = { +} as unknown as DocumentNode; +export const GetAccountsStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetExecutedReversibleTransactions' }, + name: { kind: 'Name', value: 'GetAccountsStats' }, 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' } + name: { kind: 'Name', value: 'startDate' } }, type: { - kind: 'ListType', + kind: 'NonNullType', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'executed_reversible_transfer_order_by' - } - } + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } } } }, @@ -15751,13 +12593,13 @@ export const GetExecutedReversibleTransactionsDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'where' } + name: { kind: 'Name', value: 'endDate' } }, type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'executed_reversible_transfer_bool_exp' + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } } } } @@ -15767,137 +12609,84 @@ export const GetExecutedReversibleTransactionsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'executedReversibleTransactions' }, - name: { kind: 'Name', value: 'executed_reversible_transfer' }, + alias: { kind: 'Name', value: 'all' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, 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: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } + name: { kind: 'Name', value: 'id' }, + value: { kind: 'StringValue', value: 'global', block: false } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_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: 'scheduledTransfer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - 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: 'total_accounts' } + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'recentlyActive' }, + name: { kind: 'Name', value: 'account_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'transfersFrom' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] } - ] - } + } + ] } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } @@ -15906,18 +12695,50 @@ export const GetExecutedReversibleTransactionsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { - kind: 'Name', - value: 'executed_reversible_transfer_aggregate' - }, + alias: { kind: 'Name', value: 'recentlyDeposited' }, + name: { kind: 'Name', value: 'account_aggregate' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'transfersTo' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] + } + } + ] } } ], @@ -15930,11 +12751,7 @@ export const GetExecutedReversibleTransactionsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } @@ -15946,16 +12763,16 @@ export const GetExecutedReversibleTransactionsDocument = { } ] } as unknown as DocumentNode< - GetExecutedReversibleTransactionsQuery, - GetExecutedReversibleTransactionsQueryVariables + GetAccountsStatsQuery, + GetAccountsStatsQueryVariables >; -export const GetRecentExecutedReversibleTransactionsDocument = { +export const GetBlocksDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentExecutedReversibleTransactions' }, + name: { kind: 'Name', value: 'GetBlocks' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -15980,18 +12797,29 @@ export const GetRecentExecutedReversibleTransactionsDocument = { name: { kind: 'Name', value: 'orderBy' } }, type: { - kind: 'ListType', + kind: 'NonNullType', type: { - kind: 'NonNullType', + kind: 'ListType', type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'executed_reversible_transfer_order_by' + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'block_order_by' } } } } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'block_bool_exp' } + } } ], selectionSet: { @@ -15999,8 +12827,8 @@ export const GetRecentExecutedReversibleTransactionsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'executedReversibleTransactions' }, - name: { kind: 'Name', value: 'executed_reversible_transfer' }, + alias: { kind: 'Name', value: 'blocks' }, + name: { kind: 'Name', value: 'block' }, arguments: [ { kind: 'Argument', @@ -16025,151 +12853,90 @@ export const GetRecentExecutedReversibleTransactionsDocument = { 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', name: { kind: 'Name', value: 'tx_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: 'mined_by_id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'scheduledTransfer' }, + name: { kind: 'Name', value: 'extrinsics' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'call' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'timestamp' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - 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: 'id' } } ] } } ] } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'id' }, + value: { kind: 'StringValue', value: 'global', block: false } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'block_height' } + } + ] + } } ] } } ] -} as unknown as DocumentNode< - GetRecentExecutedReversibleTransactionsQuery, - GetRecentExecutedReversibleTransactionsQueryVariables ->; -export const GetExecutedReversibleTransactionsStatsDocument = { +} as unknown as DocumentNode; +export const GetBlockByIdDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetExecutedReversibleTransactionsStats' }, + name: { kind: 'Name', value: 'GetBlockById' }, variableDefinitions: [ { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } + name: { kind: 'Name', value: 'height' } }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } } }, { kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, + variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } } } ], @@ -16178,11 +12945,8 @@ export const GetExecutedReversibleTransactionsStatsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { - kind: 'Name', - value: 'executed_reversible_transfer_aggregate' - }, + alias: { kind: 'Name', value: 'blocks' }, + name: { kind: 'Name', value: 'block' }, arguments: [ { kind: 'Argument', @@ -16192,25 +12956,53 @@ export const GetExecutedReversibleTransactionsStatsDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, + name: { kind: 'Name', value: '_or' }, value: { - kind: 'ObjectValue', - fields: [ + kind: 'ListValue', + values: [ { - kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'height' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'height' } + } + } + ] + } + } + ] }, { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] + } + } + ] } ] } @@ -16222,16 +13014,65 @@ export const GetExecutedReversibleTransactionsStatsDocument = { 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', - name: { kind: 'Name', value: 'aggregate' }, + name: { kind: 'Name', value: 'extrinsics' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'index_in_block' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'success' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timestamp' } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'indexInBlock' }, + name: { kind: 'Name', value: 'index_in_block' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'signer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'id' } + } + ] + } } ] } @@ -16241,60 +13082,8 @@ export const GetExecutedReversibleTransactionsStatsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - 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: 'total_executed_transfers' } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetExecutedReversibleTransactionsStatsQuery, - GetExecutedReversibleTransactionsStatsQueryVariables ->; -export const GetExecutedReversibleTransactionByTxIdDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetExecutedReversibleTransactionByTxId' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'tx_id' } - }, - type: { - kind: 'NonNullType', - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'executedReversibleTransactions' }, - name: { kind: 'Name', value: 'executed_reversible_transfer' }, + alias: { kind: 'Name', value: 'minerRewards' }, + name: { kind: 'Name', value: 'miner_reward' }, arguments: [ { kind: 'Argument', @@ -16304,16 +13093,73 @@ export const GetExecutedReversibleTransactionByTxIdDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'tx_id' }, + name: { kind: 'Name', value: 'block' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, + name: { kind: 'Name', value: '_or' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'tx_id' } + kind: 'ListValue', + values: [ + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'height' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: '_eq' + }, + value: { + kind: 'Variable', + name: { + kind: 'Name', + value: 'height' + } + } + } + ] + } + } + ] + }, + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: '_eq' + }, + value: { + kind: 'Variable', + name: { + kind: 'Name', + value: 'hash' + } + } + } + ] + } + } + ] + } + ] } } ] @@ -16326,59 +13172,29 @@ export const GetExecutedReversibleTransactionByTxIdDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'miner' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'scheduledTransfer' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'from' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } + name: { kind: 'Name', value: 'height' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'id' } - } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'hash' } } ] } } @@ -16389,48 +13205,26 @@ export const GetExecutedReversibleTransactionByTxIdDocument = { } } ] -} as unknown as DocumentNode< - GetExecutedReversibleTransactionByTxIdQuery, - GetExecutedReversibleTransactionByTxIdQueryVariables ->; -export const GetHighSecuritySetsDocument = { +} as unknown as DocumentNode; +export const GetBlockStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetHighSecuritySets' }, + name: { kind: 'Name', value: 'GetBlockStats' }, 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' } + name: { kind: 'Name', value: 'startDate' } }, type: { - kind: 'ListType', + kind: 'NonNullType', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'high_security_set_order_by' } - } + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } } } }, @@ -16438,11 +13232,14 @@ export const GetHighSecuritySetsDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'where' } + name: { kind: 'Name', value: 'endDate' } }, type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'high_security_set_bool_exp' } + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } } } ], @@ -16451,107 +13248,66 @@ export const GetHighSecuritySetsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'highSecuritySets' }, - name: { kind: 'Name', value: 'high_security_set' }, + alias: { kind: 'Name', value: 'chain' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, 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: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } + name: { kind: 'Name', value: 'id' }, + value: { kind: 'StringValue', value: 'global', block: false } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'who' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { kind: 'Field', - name: { kind: 'Name', value: 'guardian' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } + name: { kind: 'Name', value: 'block_height' } }, - { 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' } } - ] - } + name: { kind: 'Name', value: 'finalized_block_height' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'high_security_set_aggregate' }, + alias: { kind: 'Name', value: 'minedIn24Hours' }, + name: { kind: 'Name', value: 'block_aggregate' }, arguments: [ { 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' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] } } ], @@ -16579,60 +13335,24 @@ export const GetHighSecuritySetsDocument = { } } ] -} as unknown as DocumentNode< - GetHighSecuritySetsQuery, - GetHighSecuritySetsQueryVariables ->; -export const GetRecentHighSecuritySetsDocument = { +} as unknown as DocumentNode; +export const GetCancelledReversibleTransactionByTxIdDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentHighSecuritySets' }, + name: { kind: 'Name', value: 'GetCancelledReversibleTransactionByTxId' }, 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: 'high_security_set_order_by' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + name: { kind: 'Name', value: 'tx_id' } }, type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'high_security_set_bool_exp' } + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } } } ], @@ -16641,64 +13361,54 @@ export const GetRecentHighSecuritySetsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'highSecuritySets' }, - name: { kind: 'Name', value: 'high_security_set' }, + alias: { kind: 'Name', value: 'cancelledReversibleTransactions' }, + name: { kind: 'Name', value: 'cancelled_reversible_transfer' }, 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: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'tx_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'tx_id' } + } + } + ] + } + } + ] } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'who' }, + name: { kind: 'Name', value: 'cancelledBy' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -16708,50 +13418,227 @@ export const GetRecentHighSecuritySetsDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'guardian' }, + name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } ] } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'delay' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'scheduledTransfer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'scheduled_at' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + 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< - GetRecentHighSecuritySetsQuery, - GetRecentHighSecuritySetsQueryVariables ->; -export const GetHighSecuritySetsStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetHighSecuritySetsStats' }, - variableDefinitions: [ + ] + } + } + ] +} as unknown as DocumentNode< + GetCancelledReversibleTransactionByTxIdQuery, + GetCancelledReversibleTransactionByTxIdQueryVariables +>; +export const GetHomeChainStatsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetHomeChainStats' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day0Start' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day0End' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1Start' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1End' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2Start' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2End' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day3Start' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day3End' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } + name: { kind: 'Name', value: 'day4Start' } }, type: { kind: 'NonNullType', @@ -16765,7 +13652,63 @@ export const GetHighSecuritySetsStatsDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + name: { kind: 'Name', value: 'day4End' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5Start' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5End' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day6Start' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'day6End' } }, type: { kind: 'NonNullType', @@ -16779,10 +13722,55 @@ export const GetHighSecuritySetsStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'status' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'block_height' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_accounts' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_deposit_accounts' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_executed_transfers' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_immediate_transfers' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_scheduled_transfers' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_cancelled_transfers' } + } + ] + } + }, { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'high_security_set_aggregate' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', @@ -16814,6 +13802,20 @@ export const GetHighSecuritySetsStatsDocument = { } ] } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } } ] } @@ -16828,11 +13830,7 @@ export const GetHighSecuritySetsStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } @@ -16841,57 +13839,8 @@ export const GetHighSecuritySetsStatsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - 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: 'total_high_security_sets' } - } - ] - } - } - ] - } - } - ] -} 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', - alias: { kind: 'Name', value: 'highSecuritySets' }, - name: { kind: 'Name', value: 'high_security_set' }, + alias: { kind: 'Name', value: 'blocksDay0' }, + name: { kind: 'Name', value: 'block_aggregate' }, arguments: [ { kind: 'Argument', @@ -16901,25 +13850,24 @@ export const GetHighSecuritySetByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'timestamp' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: '_gte' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'day0Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day0End' } } } ] @@ -16931,129 +13879,66 @@ export const GetHighSecuritySetByHashDocument = { ], selectionSet: { kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'who' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'guardian' }, - 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' } }, + selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } ] } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetHighSecuritySetByHashQuery, - GetHighSecuritySetByHashQueryVariables ->; -export const GetMinerLeaderboardChartDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetMinerLeaderboardChart' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'topMiners' }, - name: { kind: 'Name', value: 'account_stats' }, + alias: { kind: 'Name', value: 'transfersDay0' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, + name: { kind: 'Name', value: 'where' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'total_mined_blocks' }, - value: { kind: 'EnumValue', value: 'desc' } - } - ] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day0Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day0End' } + } + } + ] + } + }, { kind: 'ObjectField', - name: { kind: 'Name', value: 'total_mined_blocks' }, + name: { kind: 'Name', value: 'extrinsic_id' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_gt' }, - value: { kind: 'IntValue', value: '0' } + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } } ] } @@ -17065,23 +13950,71 @@ export const GetMinerLeaderboardChartDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'total_mined_blocks' } + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'blocks' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, + alias: { kind: 'Name', value: 'activeAccountsDay0' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day0Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day0End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'from_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] + } } ], selectionSet: { @@ -17089,83 +14022,96 @@ export const GetMinerLeaderboardChartDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'block_height' } + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'count' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'columns' }, + value: { + kind: 'ListValue', + values: [{ kind: 'EnumValue', value: 'from_id' }] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'distinct' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } + ] + } } ] } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMinerLeaderboardChartQuery, - GetMinerLeaderboardChartQueryVariables ->; -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: 'account_stats' }, + alias: { kind: 'Name', value: 'blocksDay1' }, + name: { kind: 'Name', value: 'block_aggregate' }, 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: 'order_by' }, + name: { kind: 'Name', value: 'where' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'total_rewards' }, - value: { kind: 'EnumValue', value: 'desc' } + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1End' } + } + } + ] + } } ] } - }, + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'transfersDay1' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, + arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -17174,14 +14120,39 @@ export const GetMinerLeaderboardDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'total_mined_blocks' }, + name: { kind: 'Name', value: 'timestamp' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_gt' }, - value: { kind: 'IntValue', value: '0' } + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } } ] } @@ -17193,27 +14164,71 @@ export const GetMinerLeaderboardDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_mined_blocks' } - }, { kind: 'Field', - name: { kind: 'Name', value: 'total_rewards' } + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, + alias: { kind: 'Name', value: 'activeAccountsDay1' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day1End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'from_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] + } } ], selectionSet: { @@ -17221,111 +14236,72 @@ export const GetMinerLeaderboardDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'total_miners' } + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'count' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'columns' }, + value: { + kind: 'ListValue', + values: [{ kind: 'EnumValue', value: 'from_id' }] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'distinct' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } + ] + } } ] } - } - ] - } - } - ] -} 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: 'miner_reward_order_by' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'miner_reward_bool_exp' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'minerRewards' }, - name: { kind: 'Name', value: 'miner_reward' }, + alias: { kind: 'Name', value: 'blocksDay2' }, + name: { kind: 'Name', value: 'block_aggregate' }, 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: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, { 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' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2End' } + } + } + ] + } + } + ] } } ], @@ -17334,44 +14310,68 @@ export const GetMinerRewardsDocument = { 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' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } } + } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'miner_reward_aggregate' }, + alias: { kind: 'Name', value: 'transfersDay2' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { 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' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] } } ], @@ -17384,116 +14384,64 @@ export const GetMinerRewardsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } ] } - } - ] - } - } - ] -} 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: 'miner_reward_order_by' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'miner_reward_bool_exp' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'minerRewards' }, - name: { kind: 'Name', value: 'miner_reward' }, + alias: { kind: 'Name', value: 'activeAccountsDay2' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, 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: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - }, { 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' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day2End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'from_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] } } ], @@ -17502,85 +14450,39 @@ export const GetRecentMinerRewardsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'aggregate' }, 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' } } + name: { kind: 'Name', value: 'count' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'columns' }, + value: { + kind: 'ListValue', + values: [{ kind: 'EnumValue', value: 'from_id' }] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'distinct' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } ] } - }, - { 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: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ { - kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'miner_reward_aggregate' }, + kind: 'Field', + alias: { kind: 'Name', value: 'blocksDay3' }, + name: { kind: 'Name', value: 'block_aggregate' }, arguments: [ { kind: 'Argument', @@ -17599,7 +14501,7 @@ export const GetMinerRewardsStatsDocument = { name: { kind: 'Name', value: '_gte' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } + name: { kind: 'Name', value: 'day3Start' } } }, { @@ -17607,7 +14509,7 @@ export const GetMinerRewardsStatsDocument = { name: { kind: 'Name', value: '_lte' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + name: { kind: 'Name', value: 'day3End' } } } ] @@ -17626,11 +14528,7 @@ export const GetMinerRewardsStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } @@ -17639,13 +14537,56 @@ export const GetMinerRewardsStatsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, + alias: { kind: 'Name', value: 'transfersDay3' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day3Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day3End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] + } } ], selectionSet: { @@ -17653,43 +14594,21 @@ export const GetMinerRewardsStatsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'total_miner_rewards' } + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } } ] } - } - ] - } - } - ] -} 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', - alias: { kind: 'Name', value: 'minerRewards' }, - name: { kind: 'Name', value: 'miner_reward' }, + alias: { kind: 'Name', value: 'activeAccountsDay3' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', @@ -17699,29 +14618,42 @@ export const GetMinerRewardByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'timestamp' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'hash' }, + name: { kind: 'Name', value: '_gte' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'day3Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day3End' } } } ] } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'from_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } } ] } @@ -17732,132 +14664,72 @@ export const GetMinerRewardByHashDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'aggregate' }, 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< - GetMinerRewardByHashQuery, - GetMinerRewardByHashQueryVariables ->; -export const GetMultisigCreatedDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetMultisigCreated' }, - 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: 'multisig_order_by' } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_bool_exp' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'multisigCreatedEvents' }, - name: { kind: 'Name', value: 'multisig' }, - 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: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } + name: { kind: 'Name', value: 'count' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'columns' }, + value: { + kind: 'ListValue', + values: [{ kind: 'EnumValue', value: 'from_id' }] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'distinct' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } + ] + } } - }, + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'blocksDay4' }, + name: { kind: 'Name', value: 'block_aggregate' }, + arguments: [ { 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' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day4Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day4End' } + } + } + ] + } + } + ] } } ], @@ -17865,23 +14737,69 @@ export const GetMultisigCreatedDocument = { kind: 'SelectionSet', selections: [ { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigCreatedFields' } + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'multisig_aggregate' }, + alias: { kind: 'Name', value: 'transfersDay4' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { 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' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day4Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day4End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] } } ], @@ -17894,131 +14812,138 @@ export const GetMultisigCreatedDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } ] } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigCreatedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, - { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, - { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'creator' }, - 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: 'extrinsic' }, + alias: { kind: 'Name', value: 'activeAccountsDay4' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day4Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day4End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'from_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'count' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'columns' }, + value: { + kind: 'ListValue', + values: [{ kind: 'EnumValue', value: 'from_id' }] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'distinct' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } + ] + } + } ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigCreatedQuery, - GetMultisigCreatedQueryVariables ->; -export const GetRecentMultisigCreatedDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigCreated' }, - 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: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_order_by' } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ + } + }, { kind: 'Field', - alias: { kind: 'Name', value: 'multisigCreatedEvents' }, - name: { kind: 'Name', value: 'multisig' }, + alias: { kind: 'Name', value: 'blocksDay5' }, + name: { kind: 'Name', value: 'block_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, + name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5End' } + } + } + ] + } + } + ] } } ], @@ -18026,114 +14951,180 @@ export const GetRecentMultisigCreatedDocument = { kind: 'SelectionSet', selections: [ { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigCreatedFields' } + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } } ] } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigCreatedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, - { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, - { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'creator' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + alias: { kind: 'Name', value: 'transfersDay5' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } + } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + alias: { kind: 'Name', value: 'activeAccountsDay5' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day5End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'from_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetRecentMultisigCreatedQuery, - GetRecentMultisigCreatedQueryVariables ->; -export const GetMultisigCreatedStatsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetMultisigCreatedStats' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'count' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'columns' }, + value: { + kind: 'ListValue', + values: [{ kind: 'EnumValue', value: 'from_id' }] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'distinct' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } + ] + } + } + ] } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ + }, { kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'multisig_aggregate' }, + alias: { kind: 'Name', value: 'blocksDay6' }, + name: { kind: 'Name', value: 'block_aggregate' }, arguments: [ { kind: 'Argument', @@ -18152,7 +15143,7 @@ export const GetMultisigCreatedStatsDocument = { name: { kind: 'Name', value: '_gte' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } + name: { kind: 'Name', value: 'day6Start' } } }, { @@ -18160,7 +15151,7 @@ export const GetMultisigCreatedStatsDocument = { name: { kind: 'Name', value: '_lte' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + name: { kind: 'Name', value: 'day6End' } } } ] @@ -18179,11 +15170,7 @@ export const GetMultisigCreatedStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'count' } } ] } } @@ -18192,13 +15179,56 @@ export const GetMultisigCreatedStatsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, + alias: { kind: 'Name', value: 'transfersDay6' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day6Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day6End' } + } + } + ] + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } + } + ] + } } ], selectionSet: { @@ -18206,43 +15236,21 @@ export const GetMultisigCreatedStatsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'total_multisigs_created' } + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'count' } } + ] + } } ] } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigCreatedStatsQuery, - GetMultisigCreatedStatsQueryVariables ->; -export const GetMultisigCreatedByHashDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetMultisigCreatedByHash' }, - 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: 'multisigCreatedEvents' }, - name: { kind: 'Name', value: 'multisig' }, + alias: { kind: 'Name', value: 'activeAccountsDay6' }, + name: { kind: 'Name', value: 'transfer_aggregate' }, arguments: [ { kind: 'Argument', @@ -18252,29 +15260,42 @@ export const GetMultisigCreatedByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'timestamp' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: '_gte' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'day6Start' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'day6End' } } } ] } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'from_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_is_null' }, + value: { kind: 'BooleanValue', value: false } + } + ] + } } ] } @@ -18284,77 +15305,111 @@ export const GetMultisigCreatedByHashDocument = { kind: 'SelectionSet', selections: [ { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigCreatedFields' } + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'count' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'columns' }, + value: { + kind: 'ListValue', + values: [{ kind: 'EnumValue', value: 'from_id' }] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'distinct' }, + value: { kind: 'BooleanValue', value: true } + } + ] + } + ] + } } ] } } ] } - }, + } + ] +} as unknown as DocumentNode< + GetHomeChainStatsQuery, + GetHomeChainStatsQueryVariables +>; +export const GetStatusDocument = { + kind: 'Document', + definitions: [ { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigCreatedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig' } - }, + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetStatus' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, - { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, - { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'creator' }, - 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: 'extrinsic' }, + alias: { kind: 'Name', value: 'status' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'block_height' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_accounts' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_deposit_accounts' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_executed_transfers' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_immediate_transfers' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_scheduled_transfers' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_cancelled_transfers' } + } ] } } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigCreatedByHashQuery, - GetMultisigCreatedByHashQueryVariables ->; -export const GetMultisigDepositsClaimedDocument = { + ] + } + } + ] +} as unknown as DocumentNode; +export const GetErrorEventsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigDepositsClaimed' }, + name: { kind: 'Name', value: 'GetErrorEvents' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -18384,10 +15439,7 @@ export const GetMultisigDepositsClaimedDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'multisig_deposits_claimed_order_by' - } + name: { kind: 'Name', value: 'error_event_order_by' } } } } @@ -18400,7 +15452,7 @@ export const GetMultisigDepositsClaimedDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_deposits_claimed_bool_exp' } + name: { kind: 'Name', value: 'error_event_bool_exp' } } } ], @@ -18409,8 +15461,8 @@ export const GetMultisigDepositsClaimedDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigDepositsClaimedEvents' }, - name: { kind: 'Name', value: 'multisig_deposits_claimed' }, + alias: { kind: 'Name', value: 'errorEvents' }, + name: { kind: 'Name', value: 'error_event' }, arguments: [ { kind: 'Argument', @@ -18448,245 +15500,74 @@ export const GetMultisigDepositsClaimedDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'error_docs' } }, { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' } - } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'meta' }, - name: { - kind: 'Name', - value: 'multisig_deposits_claimed_aggregate' - }, - arguments: [ - { - 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: 'error_module' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'error_name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'error_type' } }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, + name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } ] } - } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_deposits_claimed' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'total_returned' } }, - { kind: 'Field', name: { kind: 'Name', value: 'proposals_removed' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'claimer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ + }, { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { 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< - GetMultisigDepositsClaimedQuery, - GetMultisigDepositsClaimedQueryVariables ->; -export const GetRecentMultisigDepositsClaimedDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigDepositsClaimed' }, - 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: 'orderBy' } }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'multisig_deposits_claimed_order_by' - } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigDepositsClaimedEvents' }, - name: { kind: 'Name', value: 'multisig_deposits_claimed' }, + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'error_event_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' } - } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_deposits_claimed' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'total_returned' } }, - { kind: 'Field', name: { kind: 'Name', value: 'proposals_removed' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'claimer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - 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: 'extrinsic' }, + 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: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } + ] + } + } ] } } @@ -18694,17 +15575,14 @@ export const GetRecentMultisigDepositsClaimedDocument = { } } ] -} as unknown as DocumentNode< - GetRecentMultisigDepositsClaimedQuery, - GetRecentMultisigDepositsClaimedQueryVariables ->; -export const GetMultisigDepositsClaimedStatsDocument = { +} as unknown as DocumentNode; +export const GetErrorEventsStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigDepositsClaimedStats' }, + name: { kind: 'Name', value: 'GetErrorEventsStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -18741,10 +15619,7 @@ export const GetMultisigDepositsClaimedStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { - kind: 'Name', - value: 'multisig_deposits_claimed_aggregate' - }, + name: { kind: 'Name', value: 'error_event_aggregate' }, arguments: [ { kind: 'Argument', @@ -18817,10 +15692,7 @@ export const GetMultisigDepositsClaimedStatsDocument = { selections: [ { kind: 'Field', - name: { - kind: 'Name', - value: 'total_multisig_deposits_claimed' - } + name: { kind: 'Name', value: 'total_error_events' } } ] } @@ -18830,16 +15702,16 @@ export const GetMultisigDepositsClaimedStatsDocument = { } ] } as unknown as DocumentNode< - GetMultisigDepositsClaimedStatsQuery, - GetMultisigDepositsClaimedStatsQueryVariables + GetErrorEventsStatsQuery, + GetErrorEventsStatsQueryVariables >; -export const GetMultisigDepositsClaimedByHashDocument = { +export const GetErrorEventByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigDepositsClaimedByHash' }, + name: { kind: 'Name', value: 'GetErrorEventByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -18855,8 +15727,8 @@ export const GetMultisigDepositsClaimedByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigDepositsClaimedEvents' }, - name: { kind: 'Name', value: 'multisig_deposits_claimed' }, + alias: { kind: 'Name', value: 'errorEvents' }, + name: { kind: 'Name', value: 'error_event' }, arguments: [ { kind: 'Argument', @@ -18897,69 +15769,165 @@ export const GetMultisigDepositsClaimedByHashDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'error_docs' } }, { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' } + kind: 'Field', + name: { kind: 'Name', value: 'error_module' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'error_name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'error_type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + }, + { 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 GetExecutedReversibleTransactionByTxIdDocument = { + kind: 'Document', + definitions: [ { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_deposits_claimed' } - }, + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetExecutedReversibleTransactionByTxId' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'tx_id' } + }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'total_returned' } }, - { kind: 'Field', name: { kind: 'Name', value: 'proposals_removed' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'claimer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - 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: 'extrinsic' }, + alias: { kind: 'Name', value: 'executedReversibleTransactions' }, + name: { kind: 'Name', value: 'executed_reversible_transfer' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'tx_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'tx_id' } + } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'tx_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: 'scheduledTransfer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'scheduled_at' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + 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' } + } + ] + } + } + ] + } + } ] } } @@ -18968,16 +15936,16 @@ export const GetMultisigDepositsClaimedByHashDocument = { } ] } as unknown as DocumentNode< - GetMultisigDepositsClaimedByHashQuery, - GetMultisigDepositsClaimedByHashQueryVariables + GetExecutedReversibleTransactionByTxIdQuery, + GetExecutedReversibleTransactionByTxIdQueryVariables >; -export const GetMultisigProposalCancelledDocument = { +export const GetHighSecuritySetsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalCancelled' }, + name: { kind: 'Name', value: 'GetHighSecuritySets' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -19006,11 +15974,8 @@ export const GetMultisigProposalCancelledDocument = { type: { kind: 'NonNullType', type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'cancelled_multisig_proposal_order_by' - } + kind: 'NamedType', + name: { kind: 'Name', value: 'high_security_set_order_by' } } } } @@ -19023,10 +15988,7 @@ export const GetMultisigProposalCancelledDocument = { }, type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'cancelled_multisig_proposal_bool_exp' - } + name: { kind: 'Name', value: 'high_security_set_bool_exp' } } } ], @@ -19035,8 +15997,8 @@ export const GetMultisigProposalCancelledDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalCancelledEvents' }, - name: { kind: 'Name', value: 'cancelled_multisig_proposal' }, + alias: { kind: 'Name', value: 'highSecuritySets' }, + name: { kind: 'Name', value: 'high_security_set' }, arguments: [ { kind: 'Argument', @@ -19074,11 +16036,52 @@ export const GetMultisigProposalCancelledDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { - kind: 'FragmentSpread', - name: { - kind: 'Name', - value: 'MultisigProposalCancelledFields' + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'who' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'guardian' }, + 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' } } + ] } } ] @@ -19087,10 +16090,7 @@ export const GetMultisigProposalCancelledDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'meta' }, - name: { - kind: 'Name', - value: 'cancelled_multisig_proposal_aggregate' - }, + name: { kind: 'Name', value: 'high_security_set_aggregate' }, arguments: [ { kind: 'Argument', @@ -19123,39 +16123,224 @@ export const GetMultisigProposalCancelledDocument = { } ] } - }, + } + ] +} as unknown as DocumentNode< + GetHighSecuritySetsQuery, + GetHighSecuritySetsQueryVariables +>; +export const GetHighSecuritySetsStatsDocument = { + kind: 'Document', + definitions: [ { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalCancelledFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'cancelled_multisig_proposal' } - }, + 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: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'cancelledBy' }, + alias: { kind: 'Name', value: 'last24Hour' }, + name: { kind: 'Name', value: 'high_security_set_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } + ] + } + } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'total_high_security_sets' } + } + ] + } + } + ] + } + } + ] +} 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', + alias: { kind: 'Name', value: 'highSecuritySets' }, + name: { kind: 'Name', value: 'high_security_set' }, + 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' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_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: 'multisig' }, + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'who' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -19165,80 +16350,70 @@ export const GetMultisigProposalCancelledDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + name: { kind: 'Name', value: 'guardian' }, 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', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } } ] } } ] } as unknown as DocumentNode< - GetMultisigProposalCancelledQuery, - GetMultisigProposalCancelledQueryVariables + GetHighSecuritySetByHashQuery, + GetHighSecuritySetByHashQueryVariables >; -export const GetRecentMultisigProposalCancelledDocument = { +export const GetMinerLeaderboardStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigProposalCancelled' }, + name: { kind: 'Name', value: 'GetMinerLeaderboardStats' }, variableDefinitions: [ { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'limit' } + name: { kind: 'Name', value: 'startDate' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } }, { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } + name: { kind: 'Name', value: 'endDate' } }, type: { - kind: 'ListType', + kind: 'NonNullType', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'cancelled_multisig_proposal_order_by' - } - } + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } } } } @@ -19248,159 +16423,109 @@ export const GetRecentMultisigProposalCancelledDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalCancelledEvents' }, - name: { kind: 'Name', value: 'cancelled_multisig_proposal' }, + alias: { kind: 'Name', value: 'chain' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } + name: { kind: 'Name', value: 'id' }, + value: { kind: 'StringValue', value: 'global', block: false } } ], selectionSet: { kind: 'SelectionSet', selections: [ { - kind: 'FragmentSpread', - name: { - kind: 'Name', - value: 'MultisigProposalCancelledFields' - } - } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalCancelledFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'cancelled_multisig_proposal' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'cancelledBy' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + kind: 'Field', + name: { kind: 'Name', value: 'block_height' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'total_miners' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, + alias: { kind: 'Name', value: 'last24Hour' }, + name: { kind: 'Name', value: 'miner_reward_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } ] } } ] } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } } ] } } ] } as unknown as DocumentNode< - GetRecentMultisigProposalCancelledQuery, - GetRecentMultisigProposalCancelledQueryVariables + GetMinerLeaderboardStatsQuery, + GetMinerLeaderboardStatsQueryVariables >; -export const GetMultisigProposalCancelledStatsDocument = { +export const GetMinerLeaderboardChartDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalCancelledStats' }, + name: { kind: 'Name', value: 'GetMinerLeaderboardChart' }, variableDefinitions: [ { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + name: { kind: 'Name', value: 'limit' } }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } } ], selectionSet: { @@ -19408,12 +16533,31 @@ export const GetMultisigProposalCancelledStatsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { - kind: 'Name', - value: 'cancelled_multisig_proposal_aggregate' - }, + alias: { kind: 'Name', value: 'topMiners' }, + name: { kind: 'Name', value: 'account_stats' }, arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'limit' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'total_mined_blocks' }, + value: { kind: 'EnumValue', value: 'desc' } + } + ] + } + }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -19422,25 +16566,14 @@ export const GetMultisigProposalCancelledStatsDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, + name: { kind: 'Name', value: 'total_mined_blocks' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - } + name: { kind: 'Name', value: '_gt' }, + value: { kind: 'IntValue', value: '0' } } ] } @@ -19452,26 +16585,17 @@ export const GetMultisigProposalCancelledStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } + name: { kind: 'Name', value: 'total_mined_blocks' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, + alias: { kind: 'Name', value: 'blocks' }, name: { kind: 'Name', value: 'chain_stats_by_pk' }, arguments: [ { @@ -19485,10 +16609,8 @@ export const GetMultisigProposalCancelledStatsDocument = { selections: [ { kind: 'Field', - name: { - kind: 'Name', - value: 'total_multisig_proposals_cancelled' - } + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'block_height' } } ] } @@ -19498,24 +16620,32 @@ export const GetMultisigProposalCancelledStatsDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalCancelledStatsQuery, - GetMultisigProposalCancelledStatsQueryVariables + GetMinerLeaderboardChartQuery, + GetMinerLeaderboardChartQueryVariables >; -export const GetMultisigProposalCancelledByHashDocument = { +export const GetMinerLeaderboardDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalCancelledByHash' }, + 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: { @@ -19523,9 +16653,39 @@ export const GetMultisigProposalCancelledByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalCancelledEvents' }, - name: { kind: 'Name', value: 'cancelled_multisig_proposal' }, + alias: { kind: 'Name', value: 'leaderboardEntries' }, + name: { kind: 'Name', value: 'account_stats' }, 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: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'total_mined_blocks' }, + value: { kind: 'EnumValue', value: 'desc' } + } + ] + } + }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -19534,26 +16694,14 @@ export const GetMultisigProposalCancelledByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'total_mined_blocks' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } + name: { kind: 'Name', value: '_gt' }, + value: { kind: 'IntValue', value: '0' } } ] } @@ -19562,93 +16710,99 @@ export const GetMultisigProposalCancelledByHashDocument = { } } ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'FragmentSpread', - name: { - kind: 'Name', - value: 'MultisigProposalCancelledFields' - } - } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalCancelledFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'cancelled_multisig_proposal' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'cancelledBy' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } + name: { kind: 'Name', value: 'total_mined_blocks' } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } + name: { kind: 'Name', value: 'total_rewards' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'height' } } + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'total_miners' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'block_height' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + alias: { kind: 'Name', value: 'topMiner' }, + name: { kind: 'Name', value: 'account_stats' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'limit' }, + value: { kind: 'IntValue', value: '1' } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'total_mined_blocks' }, + value: { kind: 'EnumValue', value: 'desc' } + } + ] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'total_mined_blocks' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gt' }, + value: { kind: 'IntValue', value: '0' } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'total_mined_blocks' } + } ] } } @@ -19657,16 +16811,16 @@ export const GetMultisigProposalCancelledByHashDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalCancelledByHashQuery, - GetMultisigProposalCancelledByHashQueryVariables + GetMinerLeaderboardQuery, + GetMinerLeaderboardQueryVariables >; -export const GetMultisigProposalCreatedDocument = { +export const GetMinerRewardsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalCreated' }, + name: { kind: 'Name', value: 'GetMinerRewards' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -19696,10 +16850,7 @@ export const GetMultisigProposalCreatedDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'multisig_proposal_created_order_by' - } + name: { kind: 'Name', value: 'miner_reward_order_by' } } } } @@ -19712,7 +16863,7 @@ export const GetMultisigProposalCreatedDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_created_bool_exp' } + name: { kind: 'Name', value: 'miner_reward_bool_exp' } } } ], @@ -19721,8 +16872,8 @@ export const GetMultisigProposalCreatedDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalCreatedEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_created' }, + alias: { kind: 'Name', value: 'minerRewards' }, + name: { kind: 'Name', value: 'miner_reward' }, arguments: [ { kind: 'Argument', @@ -19761,19 +16912,38 @@ export const GetMultisigProposalCreatedDocument = { kind: 'SelectionSet', selections: [ { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalCreatedFields' } - } + 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: 'multisig_proposal_created_aggregate' - }, + name: { kind: 'Name', value: 'miner_reward_aggregate' }, arguments: [ { kind: 'Argument', @@ -19806,85 +16976,231 @@ export const GetMultisigProposalCreatedDocument = { } ] } - }, + } + ] +} as unknown as DocumentNode< + GetMinerRewardsQuery, + GetMinerRewardsQueryVariables +>; +export const GetMinerRewardsStatsDocument = { + kind: 'Document', + definitions: [ { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalRefFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal' } - }, + 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: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, + alias: { kind: 'Name', value: 'last24Hour' }, + name: { kind: 'Name', value: 'miner_reward_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } + ] + } + } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'id' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'total_miner_rewards' } + } ] } } ] } - }, + } + ] +} as unknown as DocumentNode< + GetMinerRewardsStatsQuery, + GetMinerRewardsStatsQueryVariables +>; +export const GetMinerRewardByHashDocument = { + kind: 'Document', + definitions: [ { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalCreatedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_created' } - }, + 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: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalRefFields' } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + alias: { kind: 'Name', value: 'minerRewards' }, + name: { kind: 'Name', value: 'miner_reward' }, + 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: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_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: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { + 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' } } ] } } @@ -19893,16 +17209,16 @@ export const GetMultisigProposalCreatedDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalCreatedQuery, - GetMultisigProposalCreatedQueryVariables + GetMinerRewardByHashQuery, + GetMinerRewardByHashQueryVariables >; -export const GetRecentMultisigProposalCreatedDocument = { +export const GetMultisigCreatedDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigProposalCreated' }, + name: { kind: 'Name', value: 'GetMultisigCreated' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -19912,6 +17228,14 @@ export const GetRecentMultisigProposalCreatedDocument = { }, 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: { @@ -19924,13 +17248,21 @@ export const GetRecentMultisigProposalCreatedDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'multisig_proposal_created_order_by' - } + name: { kind: 'Name', value: 'multisig_order_by' } } } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_bool_exp' } + } } ], selectionSet: { @@ -19938,8 +17270,8 @@ export const GetRecentMultisigProposalCreatedDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalCreatedEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_created' }, + alias: { kind: 'Name', value: 'multisigCreatedEvents' }, + name: { kind: 'Name', value: 'multisig' }, arguments: [ { kind: 'Argument', @@ -19949,6 +17281,14 @@ export const GetRecentMultisigProposalCreatedDocument = { 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: 'order_by' }, @@ -19956,6 +17296,14 @@ export const GetRecentMultisigProposalCreatedDocument = { kind: 'Variable', name: { kind: 'Name', value: 'orderBy' } } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + } } ], selectionSet: { @@ -19963,42 +17311,42 @@ export const GetRecentMultisigProposalCreatedDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalCreatedFields' } + name: { kind: 'Name', value: 'MultisigCreatedFields' } } ] } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalRefFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'multisig_aggregate' }, + arguments: [ + { + 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: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } + ] + } + } ] } } @@ -20007,26 +17355,26 @@ export const GetRecentMultisigProposalCreatedDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalCreatedFields' }, + name: { kind: 'Name', value: 'MultisigCreatedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_created' } + name: { kind: 'Name', value: 'multisig' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, + { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, + { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, + name: { kind: 'Name', value: 'creator' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalRefFields' } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, @@ -20057,16 +17405,16 @@ export const GetRecentMultisigProposalCreatedDocument = { } ] } as unknown as DocumentNode< - GetRecentMultisigProposalCreatedQuery, - GetRecentMultisigProposalCreatedQueryVariables + GetMultisigCreatedQuery, + GetMultisigCreatedQueryVariables >; -export const GetMultisigProposalCreatedStatsDocument = { +export const GetMultisigCreatedStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalCreatedStats' }, + name: { kind: 'Name', value: 'GetMultisigCreatedStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -20103,10 +17451,7 @@ export const GetMultisigProposalCreatedStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { - kind: 'Name', - value: 'multisig_proposal_created_aggregate' - }, + name: { kind: 'Name', value: 'multisig_aggregate' }, arguments: [ { kind: 'Argument', @@ -20179,7 +17524,7 @@ export const GetMultisigProposalCreatedStatsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'total_multisig_proposals' } + name: { kind: 'Name', value: 'total_multisigs_created' } } ] } @@ -20189,16 +17534,16 @@ export const GetMultisigProposalCreatedStatsDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalCreatedStatsQuery, - GetMultisigProposalCreatedStatsQueryVariables + GetMultisigCreatedStatsQuery, + GetMultisigCreatedStatsQueryVariables >; -export const GetMultisigProposalCreatedByHashDocument = { +export const GetMultisigCreatedByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalCreatedByHash' }, + name: { kind: 'Name', value: 'GetMultisigCreatedByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -20214,8 +17559,8 @@ export const GetMultisigProposalCreatedByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalCreatedEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_created' }, + alias: { kind: 'Name', value: 'multisigCreatedEvents' }, + name: { kind: 'Name', value: 'multisig' }, arguments: [ { kind: 'Argument', @@ -20258,42 +17603,107 @@ export const GetMultisigProposalCreatedByHashDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalCreatedFields' } + name: { kind: 'Name', value: 'MultisigCreatedFields' } } ] } } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalRefFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal' } - }, + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigCreatedFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, + { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, + { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'creator' }, + 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: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigCreatedByHashQuery, + GetMultisigCreatedByHashQueryVariables +>; +export const GetMultisigByIdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigById' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + alias: { kind: 'Name', value: 'multisig' }, + name: { kind: 'Name', value: 'multisig_by_pk' }, + 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: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigCreatedFields' } + } ] } } @@ -20302,26 +17712,26 @@ export const GetMultisigProposalCreatedByHashDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalCreatedFields' }, + name: { kind: 'Name', value: 'MultisigCreatedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_created' } + name: { kind: 'Name', value: 'multisig' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, + { kind: 'Field', name: { kind: 'Name', value: 'nonce' } }, + { kind: 'Field', name: { kind: 'Name', value: 'signers' } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, + name: { kind: 'Name', value: 'creator' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalRefFields' } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, @@ -20352,16 +17762,16 @@ export const GetMultisigProposalCreatedByHashDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalCreatedByHashQuery, - GetMultisigProposalCreatedByHashQueryVariables + GetMultisigByIdQuery, + GetMultisigByIdQueryVariables >; -export const GetMultisigProposalExecutedDocument = { +export const GetMultisigDepositsClaimedDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalExecuted' }, + name: { kind: 'Name', value: 'GetMultisigDepositsClaimed' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -20393,7 +17803,7 @@ export const GetMultisigProposalExecutedDocument = { kind: 'NamedType', name: { kind: 'Name', - value: 'executed_multisig_proposal_order_by' + value: 'multisig_deposits_claimed_order_by' } } } @@ -20407,7 +17817,7 @@ export const GetMultisigProposalExecutedDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'executed_multisig_proposal_bool_exp' } + name: { kind: 'Name', value: 'multisig_deposits_claimed_bool_exp' } } } ], @@ -20416,8 +17826,8 @@ export const GetMultisigProposalExecutedDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalExecutedEvents' }, - name: { kind: 'Name', value: 'executed_multisig_proposal' }, + alias: { kind: 'Name', value: 'multisigDepositsClaimedEvents' }, + name: { kind: 'Name', value: 'multisig_deposits_claimed' }, arguments: [ { kind: 'Argument', @@ -20457,10 +17867,7 @@ export const GetMultisigProposalExecutedDocument = { selections: [ { kind: 'FragmentSpread', - name: { - kind: 'Name', - value: 'MultisigProposalExecutedFields' - } + name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' } } ] } @@ -20470,7 +17877,7 @@ export const GetMultisigProposalExecutedDocument = { alias: { kind: 'Name', value: 'meta' }, name: { kind: 'Name', - value: 'executed_multisig_proposal_aggregate' + value: 'multisig_deposits_claimed_aggregate' }, arguments: [ { @@ -20507,197 +17914,35 @@ export const GetMultisigProposalExecutedDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalExecutedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'executed_multisig_proposal' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvers' } }, - { kind: 'Field', name: { kind: 'Name', value: 'result' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigProposalExecutedQuery, - GetMultisigProposalExecutedQueryVariables ->; -export const GetRecentMultisigProposalExecutedDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigProposalExecuted' }, - 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: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'executed_multisig_proposal_order_by' - } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalExecutedEvents' }, - name: { kind: 'Name', value: 'executed_multisig_proposal' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'FragmentSpread', - name: { - kind: 'Name', - value: 'MultisigProposalExecutedFields' - } - } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalExecutedFields' }, + name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'executed_multisig_proposal' } + name: { kind: 'Name', value: 'multisig_deposits_claimed' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvers' } }, - { kind: 'Field', name: { kind: 'Name', value: 'result' } }, + { kind: 'Field', name: { kind: 'Name', value: 'total_returned' } }, + { kind: 'Field', name: { kind: 'Name', value: 'proposals_removed' } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, + name: { kind: 'Name', value: 'claimer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'multisig' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, @@ -20728,16 +17973,16 @@ export const GetRecentMultisigProposalExecutedDocument = { } ] } as unknown as DocumentNode< - GetRecentMultisigProposalExecutedQuery, - GetRecentMultisigProposalExecutedQueryVariables + GetMultisigDepositsClaimedQuery, + GetMultisigDepositsClaimedQueryVariables >; -export const GetMultisigProposalExecutedStatsDocument = { +export const GetMultisigDepositsClaimedStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalExecutedStats' }, + name: { kind: 'Name', value: 'GetMultisigDepositsClaimedStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -20776,7 +18021,7 @@ export const GetMultisigProposalExecutedStatsDocument = { alias: { kind: 'Name', value: 'last24Hour' }, name: { kind: 'Name', - value: 'executed_multisig_proposal_aggregate' + value: 'multisig_deposits_claimed_aggregate' }, arguments: [ { @@ -20852,7 +18097,7 @@ export const GetMultisigProposalExecutedStatsDocument = { kind: 'Field', name: { kind: 'Name', - value: 'total_multisig_proposals_executed' + value: 'total_multisig_deposits_claimed' } } ] @@ -20863,16 +18108,16 @@ export const GetMultisigProposalExecutedStatsDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalExecutedStatsQuery, - GetMultisigProposalExecutedStatsQueryVariables + GetMultisigDepositsClaimedStatsQuery, + GetMultisigDepositsClaimedStatsQueryVariables >; -export const GetMultisigProposalExecutedByHashDocument = { +export const GetMultisigDepositsClaimedByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalExecutedByHash' }, + name: { kind: 'Name', value: 'GetMultisigDepositsClaimedByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -20888,8 +18133,8 @@ export const GetMultisigProposalExecutedByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalExecutedEvents' }, - name: { kind: 'Name', value: 'executed_multisig_proposal' }, + alias: { kind: 'Name', value: 'multisigDepositsClaimedEvents' }, + name: { kind: 'Name', value: 'multisig_deposits_claimed' }, arguments: [ { kind: 'Argument', @@ -20932,10 +18177,7 @@ export const GetMultisigProposalExecutedByHashDocument = { selections: [ { kind: 'FragmentSpread', - name: { - kind: 'Name', - value: 'MultisigProposalExecutedFields' - } + name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' } } ] } @@ -20945,45 +18187,35 @@ export const GetMultisigProposalExecutedByHashDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalExecutedFields' }, + name: { kind: 'Name', value: 'MultisigDepositsClaimedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'executed_multisig_proposal' } + name: { kind: 'Name', value: 'multisig_deposits_claimed' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvers' } }, - { kind: 'Field', name: { kind: 'Name', value: 'result' } }, + { kind: 'Field', name: { kind: 'Name', value: 'total_returned' } }, + { kind: 'Field', name: { kind: 'Name', value: 'proposals_removed' } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, + name: { kind: 'Name', value: 'claimer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'multisig' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, @@ -21014,16 +18246,16 @@ export const GetMultisigProposalExecutedByHashDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalExecutedByHashQuery, - GetMultisigProposalExecutedByHashQueryVariables + GetMultisigDepositsClaimedByHashQuery, + GetMultisigDepositsClaimedByHashQueryVariables >; -export const GetMultisigProposalReadyDocument = { +export const GetMultisigProposalCancelledDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalReady' }, + name: { kind: 'Name', value: 'GetMultisigProposalCancelled' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -21055,7 +18287,7 @@ export const GetMultisigProposalReadyDocument = { kind: 'NamedType', name: { kind: 'Name', - value: 'multisig_proposal_ready_order_by' + value: 'cancelled_multisig_proposal_order_by' } } } @@ -21069,7 +18301,10 @@ export const GetMultisigProposalReadyDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_ready_bool_exp' } + name: { + kind: 'Name', + value: 'cancelled_multisig_proposal_bool_exp' + } } } ], @@ -21078,8 +18313,8 @@ export const GetMultisigProposalReadyDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalReadyEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_ready' }, + alias: { kind: 'Name', value: 'multisigProposalCancelledEvents' }, + name: { kind: 'Name', value: 'cancelled_multisig_proposal' }, arguments: [ { kind: 'Argument', @@ -21119,7 +18354,10 @@ export const GetMultisigProposalReadyDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalReadyFields' } + name: { + kind: 'Name', + value: 'MultisigProposalCancelledFields' + } } ] } @@ -21127,7 +18365,10 @@ export const GetMultisigProposalReadyDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'multisig_proposal_ready_aggregate' }, + name: { + kind: 'Name', + value: 'cancelled_multisig_proposal_aggregate' + }, arguments: [ { kind: 'Argument', @@ -21163,165 +18404,26 @@ export const GetMultisigProposalReadyDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalReadyFields' }, + name: { kind: 'Name', value: 'MultisigProposalCancelledFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_ready' } + name: { kind: 'Name', value: 'cancelled_multisig_proposal' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigProposalReadyQuery, - GetMultisigProposalReadyQueryVariables ->; -export const GetRecentMultisigProposalReadyDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigProposalReady' }, - 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: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'multisig_proposal_ready_order_by' - } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalReadyEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_ready' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - } - ], + name: { kind: 'Name', value: 'cancelledBy' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalReadyFields' } - } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalReadyFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_ready' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, { kind: 'Field', name: { kind: 'Name', value: 'proposal' }, @@ -21379,16 +18481,16 @@ export const GetRecentMultisigProposalReadyDocument = { } ] } as unknown as DocumentNode< - GetRecentMultisigProposalReadyQuery, - GetRecentMultisigProposalReadyQueryVariables + GetMultisigProposalCancelledQuery, + GetMultisigProposalCancelledQueryVariables >; -export const GetMultisigProposalReadyStatsDocument = { +export const GetMultisigProposalCancelledStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalReadyStats' }, + name: { kind: 'Name', value: 'GetMultisigProposalCancelledStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -21425,7 +18527,10 @@ export const GetMultisigProposalReadyStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'multisig_proposal_ready_aggregate' }, + name: { + kind: 'Name', + value: 'cancelled_multisig_proposal_aggregate' + }, arguments: [ { kind: 'Argument', @@ -21498,7 +18603,10 @@ export const GetMultisigProposalReadyStatsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'total_multisig_proposal_ready' } + name: { + kind: 'Name', + value: 'total_multisig_proposals_cancelled' + } } ] } @@ -21508,16 +18616,16 @@ export const GetMultisigProposalReadyStatsDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalReadyStatsQuery, - GetMultisigProposalReadyStatsQueryVariables + GetMultisigProposalCancelledStatsQuery, + GetMultisigProposalCancelledStatsQueryVariables >; -export const GetMultisigProposalReadyByHashDocument = { +export const GetMultisigProposalCancelledByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalReadyByHash' }, + name: { kind: 'Name', value: 'GetMultisigProposalCancelledByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -21533,8 +18641,8 @@ export const GetMultisigProposalReadyByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalReadyEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_ready' }, + alias: { kind: 'Name', value: 'multisigProposalCancelledEvents' }, + name: { kind: 'Name', value: 'cancelled_multisig_proposal' }, arguments: [ { kind: 'Argument', @@ -21577,7 +18685,10 @@ export const GetMultisigProposalReadyByHashDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalReadyFields' } + name: { + kind: 'Name', + value: 'MultisigProposalCancelledFields' + } } ] } @@ -21587,17 +18698,26 @@ export const GetMultisigProposalReadyByHashDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalReadyFields' }, + name: { kind: 'Name', value: 'MultisigProposalCancelledFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_ready' } + name: { kind: 'Name', value: 'cancelled_multisig_proposal' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'cancelledBy' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, { kind: 'Field', name: { kind: 'Name', value: 'proposal' }, @@ -21655,16 +18775,16 @@ export const GetMultisigProposalReadyByHashDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalReadyByHashQuery, - GetMultisigProposalReadyByHashQueryVariables + GetMultisigProposalCancelledByHashQuery, + GetMultisigProposalCancelledByHashQueryVariables >; -export const GetMultisigProposalRemovedDocument = { +export const GetMultisigProposalCreatedDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalRemoved' }, + name: { kind: 'Name', value: 'GetMultisigProposalCreated' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -21696,7 +18816,7 @@ export const GetMultisigProposalRemovedDocument = { kind: 'NamedType', name: { kind: 'Name', - value: 'removed_multisig_proposal_order_by' + value: 'multisig_proposal_created_order_by' } } } @@ -21710,7 +18830,7 @@ export const GetMultisigProposalRemovedDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'removed_multisig_proposal_bool_exp' } + name: { kind: 'Name', value: 'multisig_proposal_created_bool_exp' } } } ], @@ -21719,8 +18839,8 @@ export const GetMultisigProposalRemovedDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalRemovedEvents' }, - name: { kind: 'Name', value: 'removed_multisig_proposal' }, + alias: { kind: 'Name', value: 'multisigProposalCreatedEvents' }, + name: { kind: 'Name', value: 'multisig_proposal_created' }, arguments: [ { kind: 'Argument', @@ -21760,7 +18880,7 @@ export const GetMultisigProposalRemovedDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalRemovedFields' } + name: { kind: 'Name', value: 'MultisigProposalCreatedFields' } } ] } @@ -21770,7 +18890,7 @@ export const GetMultisigProposalRemovedDocument = { alias: { kind: 'Name', value: 'meta' }, name: { kind: 'Name', - value: 'removed_multisig_proposal_aggregate' + value: 'multisig_proposal_created_aggregate' }, arguments: [ { @@ -21807,19 +18927,18 @@ export const GetMultisigProposalRemovedDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalRemovedFields' }, + name: { kind: 'Name', value: 'MultisigProposalRefFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'removed_multisig_proposal' } + name: { kind: 'Name', value: 'multisig_proposal' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'removedBy' }, + name: { kind: 'Name', value: 'multisig' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -21829,133 +18948,11 @@ export const GetMultisigProposalRemovedDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigProposalRemovedQuery, - GetMultisigProposalRemovedQueryVariables ->; -export const GetRecentMultisigProposalRemovedDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigProposalRemoved' }, - 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: 'orderBy' } - }, - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'removed_multisig_proposal_order_by' - } - } - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalRemovedEvents' }, - name: { kind: 'Name', value: 'removed_multisig_proposal' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } - } - } - ], + name: { kind: 'Name', value: 'proposer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalRemovedFields' } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } } @@ -21964,52 +18961,25 @@ export const GetRecentMultisigProposalRemovedDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalRemovedFields' }, + name: { kind: 'Name', value: 'MultisigProposalCreatedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'removed_multisig_proposal' } + name: { kind: 'Name', value: 'multisig_proposal_created' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'removedBy' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { kind: 'Field', name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } + kind: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigProposalRefFields' } } ] } @@ -22041,16 +19011,16 @@ export const GetRecentMultisigProposalRemovedDocument = { } ] } as unknown as DocumentNode< - GetRecentMultisigProposalRemovedQuery, - GetRecentMultisigProposalRemovedQueryVariables + GetMultisigProposalCreatedQuery, + GetMultisigProposalCreatedQueryVariables >; -export const GetMultisigProposalRemovedStatsDocument = { +export const GetMultisigProposalCreatedStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalRemovedStats' }, + name: { kind: 'Name', value: 'GetMultisigProposalCreatedStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -22089,7 +19059,7 @@ export const GetMultisigProposalRemovedStatsDocument = { alias: { kind: 'Name', value: 'last24Hour' }, name: { kind: 'Name', - value: 'removed_multisig_proposal_aggregate' + value: 'multisig_proposal_created_aggregate' }, arguments: [ { @@ -22163,10 +19133,7 @@ export const GetMultisigProposalRemovedStatsDocument = { selections: [ { kind: 'Field', - name: { - kind: 'Name', - value: 'total_multisig_proposals_removed' - } + name: { kind: 'Name', value: 'total_multisig_proposals' } } ] } @@ -22176,16 +19143,16 @@ export const GetMultisigProposalRemovedStatsDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalRemovedStatsQuery, - GetMultisigProposalRemovedStatsQueryVariables + GetMultisigProposalCreatedStatsQuery, + GetMultisigProposalCreatedStatsQueryVariables >; -export const GetMultisigProposalRemovedByHashDocument = { +export const GetMultisigProposalCreatedByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalRemovedByHash' }, + name: { kind: 'Name', value: 'GetMultisigProposalCreatedByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -22201,8 +19168,8 @@ export const GetMultisigProposalRemovedByHashDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposalRemovedEvents' }, - name: { kind: 'Name', value: 'removed_multisig_proposal' }, + alias: { kind: 'Name', value: 'multisigProposalCreatedEvents' }, + name: { kind: 'Name', value: 'multisig_proposal_created' }, arguments: [ { kind: 'Argument', @@ -22245,7 +19212,7 @@ export const GetMultisigProposalRemovedByHashDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalRemovedFields' } + name: { kind: 'Name', value: 'MultisigProposalCreatedFields' } } ] } @@ -22255,19 +19222,18 @@ export const GetMultisigProposalRemovedByHashDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalRemovedFields' }, + name: { kind: 'Name', value: 'MultisigProposalRefFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'removed_multisig_proposal' } + name: { kind: 'Name', value: 'multisig_proposal' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'removedBy' }, + name: { kind: 'Name', value: 'multisig' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -22275,32 +19241,40 @@ export const GetMultisigProposalRemovedByHashDocument = { ] } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigProposalCreatedFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal_created' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } + kind: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigProposalRefFields' } } ] } @@ -22332,16 +19306,16 @@ export const GetMultisigProposalRemovedByHashDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalRemovedByHashQuery, - GetMultisigProposalRemovedByHashQueryVariables + GetMultisigProposalCreatedByHashQuery, + GetMultisigProposalCreatedByHashQueryVariables >; -export const GetMultisigProposalsDocument = { +export const GetMultisigProposalExecutedDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposals' }, + name: { kind: 'Name', value: 'GetMultisigProposalExecuted' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -22371,7 +19345,10 @@ export const GetMultisigProposalsDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_order_by' } + name: { + kind: 'Name', + value: 'executed_multisig_proposal_order_by' + } } } } @@ -22384,7 +19361,7 @@ export const GetMultisigProposalsDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_bool_exp' } + name: { kind: 'Name', value: 'executed_multisig_proposal_bool_exp' } } } ], @@ -22393,8 +19370,8 @@ export const GetMultisigProposalsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposals' }, - name: { kind: 'Name', value: 'multisig_proposal' }, + alias: { kind: 'Name', value: 'multisigProposalExecutedEvents' }, + name: { kind: 'Name', value: 'executed_multisig_proposal' }, arguments: [ { kind: 'Argument', @@ -22434,7 +19411,10 @@ export const GetMultisigProposalsDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalListFields' } + name: { + kind: 'Name', + value: 'MultisigProposalExecutedFields' + } } ] } @@ -22442,7 +19422,10 @@ export const GetMultisigProposalsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'multisig_proposal_aggregate' }, + name: { + kind: 'Name', + value: 'executed_multisig_proposal_aggregate' + }, arguments: [ { kind: 'Argument', @@ -22478,36 +19461,67 @@ export const GetMultisigProposalsDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalListFields' }, + name: { kind: 'Name', value: 'MultisigProposalExecutedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal' } + name: { kind: 'Name', value: 'executed_multisig_proposal' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, - { kind: 'Field', name: { kind: 'Name', value: 'deposit' } }, - { kind: 'Field', name: { kind: 'Name', value: 'expiry_block' } }, - { kind: 'Field', name: { kind: 'Name', value: 'created_at' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvers' } }, + { kind: 'Field', name: { kind: 'Name', value: 'result' } }, { kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, + name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'multisig' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + 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: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } ] } } @@ -22516,16 +19530,16 @@ export const GetMultisigProposalsDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalsQuery, - GetMultisigProposalsQueryVariables + GetMultisigProposalExecutedQuery, + GetMultisigProposalExecutedQueryVariables >; -export const GetMultisigProposalStatsDocument = { +export const GetMultisigProposalExecutedStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalStats' }, + name: { kind: 'Name', value: 'GetMultisigProposalExecutedStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -22562,7 +19576,10 @@ export const GetMultisigProposalStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'multisig_proposal_aggregate' }, + name: { + kind: 'Name', + value: 'executed_multisig_proposal_aggregate' + }, arguments: [ { kind: 'Argument', @@ -22572,7 +19589,7 @@ export const GetMultisigProposalStatsDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'created_at' }, + name: { kind: 'Name', value: 'timestamp' }, value: { kind: 'ObjectValue', fields: [ @@ -22586,10 +19603,123 @@ export const GetMultisigProposalStatsDocument = { }, { kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } + ] + } + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'total_multisig_proposals_executed' + } + } + ] + } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigProposalExecutedStatsQuery, + GetMultisigProposalExecutedStatsQueryVariables +>; +export const GetMultisigProposalExecutedByHashDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigProposalExecutedByHash' }, + 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: 'multisigProposalExecutedEvents' }, + name: { kind: 'Name', value: 'executed_multisig_proposal' }, + 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' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] } } ] @@ -22602,17 +19732,57 @@ export const GetMultisigProposalStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'MultisigProposalExecutedFields' + } + } + ] + } + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigProposalExecutedFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'executed_multisig_proposal' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvers' } }, + { kind: 'Field', name: { kind: 'Name', value: 'result' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposal' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, + name: { kind: 'Name', value: 'multisig' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } } @@ -22621,22 +19791,23 @@ export const GetMultisigProposalStatsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } - } - ], + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'total_multisig_proposals' } - } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } ] } } @@ -22645,23 +19816,62 @@ export const GetMultisigProposalStatsDocument = { } ] } as unknown as DocumentNode< - GetMultisigProposalStatsQuery, - GetMultisigProposalStatsQueryVariables + GetMultisigProposalExecutedByHashQuery, + GetMultisigProposalExecutedByHashQueryVariables >; -export const GetMultisigProposalByIdDocument = { +export const GetMultisigProposalReadyDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigProposalById' }, + name: { kind: 'Name', value: 'GetMultisigProposalReady' }, variableDefinitions: [ { kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + 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: 'NamedType', name: { kind: 'Name', value: 'String' } } + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { + kind: 'Name', + value: 'multisig_proposal_ready_order_by' + } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal_ready_bool_exp' } } } ], @@ -22670,68 +19880,39 @@ export const GetMultisigProposalByIdDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigProposal' }, - name: { kind: 'Name', value: 'multisig_proposal_by_pk' }, + alias: { kind: 'Name', value: 'multisigProposalReadyEvents' }, + name: { kind: 'Name', value: 'multisig_proposal_ready' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigProposalDetailFields' } + name: { kind: 'Name', value: 'limit' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } } - ] - } - }, - { - kind: 'Field', - alias: { kind: 'Name', value: 'createdEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_created' }, - arguments: [ + }, { kind: 'Argument', - name: { kind: 'Name', value: 'where' }, + name: { kind: 'Name', value: 'offset' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'proposal_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'offset' } } }, { kind: 'Argument', name: { kind: 'Name', value: 'order_by' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'orderBy' } + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } } } ], @@ -22740,142 +19921,71 @@ export const GetMultisigProposalByIdDocument = { selections: [ { kind: 'FragmentSpread', - name: { - kind: 'Name', - value: 'MultisigProposalLifecycleEventFields' - } + name: { kind: 'Name', value: 'MultisigProposalReadyFields' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'signerApprovedEvents' }, - name: { kind: 'Name', value: 'multisig_signer_approved' }, + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'multisig_proposal_ready_aggregate' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'proposal_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, + name: { kind: 'Name', value: 'where' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'where' } } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } ] } } ] } - }, + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigProposalReadyFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal_ready' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, { kind: 'Field', - alias: { kind: 'Name', value: 'readyEvents' }, - name: { kind: 'Name', value: 'multisig_proposal_ready' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'proposal_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] - } - } - ], + name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'multisig' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -22885,11 +19995,11 @@ export const GetMultisigProposalByIdDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'proposer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } } @@ -22898,8 +20008,78 @@ export const GetMultisigProposalByIdDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'executedEvents' }, - name: { kind: 'Name', value: 'executed_multisig_proposal' }, + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigProposalReadyQuery, + GetMultisigProposalReadyQueryVariables +>; +export const GetMultisigProposalReadyStatsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigProposalReadyStats' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'last24Hour' }, + name: { kind: 'Name', value: 'multisig_proposal_ready_aggregate' }, arguments: [ { kind: 'Argument', @@ -22909,16 +20089,24 @@ export const GetMultisigProposalByIdDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'proposal_id' }, + name: { kind: 'Name', value: 'timestamp' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, + name: { kind: 'Name', value: '_gte' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'id' } + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } } } ] @@ -22926,54 +20114,81 @@ export const GetMultisigProposalByIdDocument = { } ] } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] - } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } ] } - }, + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } + name: { kind: 'Name', value: 'total_multisig_proposal_ready' } } ] } - }, + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigProposalReadyStatsQuery, + GetMultisigProposalReadyStatsQueryVariables +>; +export const GetMultisigProposalReadyByHashDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigProposalReadyByHash' }, + 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: 'cancelledEvents' }, - name: { kind: 'Name', value: 'cancelled_multisig_proposal' }, + alias: { kind: 'Name', value: 'multisigProposalReadyEvents' }, + name: { kind: 'Name', value: 'multisig_proposal_ready' }, arguments: [ { kind: 'Argument', @@ -22983,16 +20198,25 @@ export const GetMultisigProposalByIdDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'proposal_id' }, + name: { kind: 'Name', value: 'extrinsic' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, + name: { kind: 'Name', value: 'id' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] } } ] @@ -23000,30 +20224,44 @@ export const GetMultisigProposalByIdDocument = { } ] } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] - } } ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigProposalReadyFields' } + } + ] + } + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigProposalReadyFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal_ready' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'multisig' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -23033,11 +20271,11 @@ export const GetMultisigProposalByIdDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'proposer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } } @@ -23046,72 +20284,172 @@ export const GetMultisigProposalByIdDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'removedEvents' }, + name: { kind: 'Name', value: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigProposalReadyByHashQuery, + GetMultisigProposalReadyByHashQueryVariables +>; +export const GetMultisigProposalRemovedDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigProposalRemoved' }, + 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: 'removed_multisig_proposal_order_by' + } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'removed_multisig_proposal_bool_exp' } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'multisigProposalRemovedEvents' }, name: { kind: 'Name', value: 'removed_multisig_proposal' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'where' }, + name: { kind: 'Name', value: 'limit' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'proposal_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] + 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: 'order_by' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] + 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: 'timestamp' } }, { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, + kind: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigProposalRemovedFields' } + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'meta' }, + name: { + kind: 'Name', + value: 'removed_multisig_proposal_aggregate' + }, + arguments: [ + { + 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' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } ] } } @@ -23123,63 +20461,19 @@ export const GetMultisigProposalByIdDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalDetailFields' }, + name: { kind: 'Name', value: 'MultisigProposalRemovedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal' } + name: { kind: 'Name', value: 'removed_multisig_proposal' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, - { kind: 'Field', name: { kind: 'Name', value: 'deposit' } }, - { kind: 'Field', name: { kind: 'Name', value: 'expiry_block' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvals' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call_raw' } }, - { kind: 'Field', name: { kind: 'Name', value: 'decode_error' } }, - { kind: 'Field', name: { kind: 'Name', value: 'created_at' } }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'transfer_amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'schedule_amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'delay_kind' } }, - { kind: 'Field', name: { kind: 'Name', value: 'delay_value' } }, - { kind: 'Field', name: { kind: 'Name', value: 'schedule_asset_id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'guardian' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'transferTo' }, + name: { kind: 'Name', value: 'removedBy' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -23189,27 +20483,47 @@ export const GetMultisigProposalByIdDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'scheduleTo' }, + name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'multisig' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'recoverAccount' }, + 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: 'createdExtrinsic' }, + name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -23218,101 +20532,34 @@ export const GetMultisigProposalByIdDocument = { { kind: 'Field', name: { kind: 'Name', value: 'call' } } ] } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'createdAtBlock' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigProposalLifecycleEventFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_proposal_created' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - 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' } } - ] - } } ] } } ] } as unknown as DocumentNode< - GetMultisigProposalByIdQuery, - GetMultisigProposalByIdQueryVariables + GetMultisigProposalRemovedQuery, + GetMultisigProposalRemovedQueryVariables >; -export const GetMultisigSignerApprovedDocument = { +export const GetMultisigProposalRemovedStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigSignerApproved' }, + name: { kind: 'Name', value: 'GetMultisigProposalRemovedStats' }, 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' } + name: { kind: 'Name', value: 'startDate' } }, type: { - kind: 'ListType', + kind: 'NonNullType', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'multisig_signer_approved_order_by' - } - } + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } } } }, @@ -23320,11 +20567,14 @@ export const GetMultisigSignerApprovedDocument = { kind: 'VariableDefinition', variable: { kind: 'Variable', - name: { kind: 'Name', value: 'where' } + name: { kind: 'Name', value: 'endDate' } }, type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_signer_approved_bool_exp' } + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } } } ], @@ -23333,63 +20583,157 @@ export const GetMultisigSignerApprovedDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigSignerApprovedEvents' }, - name: { kind: 'Name', value: 'multisig_signer_approved' }, + alias: { kind: 'Name', value: 'last24Hour' }, + name: { + kind: 'Name', + value: 'removed_multisig_proposal_aggregate' + }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'offset' }, + name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'offset' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] } - }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'order_by' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } + ] + } } - }, + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - } + name: { kind: 'Name', value: 'id' }, + value: { kind: 'StringValue', value: 'global', block: false } } ], selectionSet: { kind: 'SelectionSet', selections: [ { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigSignerApprovedFields' } + kind: 'Field', + name: { + kind: 'Name', + value: 'total_multisig_proposals_removed' + } } ] } - }, + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigProposalRemovedStatsQuery, + GetMultisigProposalRemovedStatsQueryVariables +>; +export const GetMultisigProposalRemovedByHashDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigProposalRemovedByHash' }, + 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: 'meta' }, - name: { kind: 'Name', value: 'multisig_signer_approved_aggregate' }, + alias: { kind: 'Name', value: 'multisigProposalRemovedEvents' }, + name: { kind: 'Name', value: 'removed_multisig_proposal' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'extrinsic' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] + } + } + ] + } + } + ] } } ], @@ -23397,18 +20741,8 @@ export const GetMultisigSignerApprovedDocument = { kind: 'SelectionSet', selections: [ { - kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } + kind: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigProposalRemovedFields' } } ] } @@ -23418,20 +20752,19 @@ export const GetMultisigSignerApprovedDocument = { }, { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigSignerApprovedFields' }, + name: { kind: 'Name', value: 'MultisigProposalRemovedFields' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_signer_approved' } + name: { kind: 'Name', value: 'removed_multisig_proposal' } }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, { kind: 'Field', - name: { kind: 'Name', value: 'approver' }, + name: { kind: 'Name', value: 'removedBy' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -23496,16 +20829,16 @@ export const GetMultisigSignerApprovedDocument = { } ] } as unknown as DocumentNode< - GetMultisigSignerApprovedQuery, - GetMultisigSignerApprovedQueryVariables + GetMultisigProposalRemovedByHashQuery, + GetMultisigProposalRemovedByHashQueryVariables >; -export const GetRecentMultisigSignerApprovedDocument = { +export const GetMultisigProposalsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentMultisigSignerApproved' }, + name: { kind: 'Name', value: 'GetMultisigProposals' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -23515,6 +20848,14 @@ export const GetRecentMultisigSignerApprovedDocument = { }, 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: { @@ -23527,13 +20868,21 @@ export const GetRecentMultisigSignerApprovedDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'multisig_signer_approved_order_by' - } + name: { kind: 'Name', value: 'multisig_proposal_order_by' } } } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal_bool_exp' } + } } ], selectionSet: { @@ -23541,8 +20890,8 @@ export const GetRecentMultisigSignerApprovedDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'multisigSignerApprovedEvents' }, - name: { kind: 'Name', value: 'multisig_signer_approved' }, + alias: { kind: 'Name', value: 'multisigProposals' }, + name: { kind: 'Name', value: 'multisig_proposal' }, arguments: [ { kind: 'Argument', @@ -23552,6 +20901,14 @@ export const GetRecentMultisigSignerApprovedDocument = { 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: 'order_by' }, @@ -23559,6 +20916,14 @@ export const GetRecentMultisigSignerApprovedDocument = { kind: 'Variable', name: { kind: 'Name', value: 'orderBy' } } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + } } ], selectionSet: { @@ -23566,86 +20931,81 @@ export const GetRecentMultisigSignerApprovedDocument = { selections: [ { kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigSignerApprovedFields' } + name: { kind: 'Name', value: 'MultisigProposalListFields' } } ] } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigSignerApprovedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_signer_approved' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'approver' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } }, { kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'multisig_proposal_aggregate' }, + arguments: [ + { + 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: 'multisig' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } ] } } ] } - }, + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigProposalListFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'deposit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'expiry_block' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvals' } }, + { kind: 'Field', name: { kind: 'Name', value: 'created_at' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'multisig' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'proposer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } } @@ -23654,16 +21014,16 @@ export const GetRecentMultisigSignerApprovedDocument = { } ] } as unknown as DocumentNode< - GetRecentMultisigSignerApprovedQuery, - GetRecentMultisigSignerApprovedQueryVariables + GetMultisigProposalsQuery, + GetMultisigProposalsQueryVariables >; -export const GetMultisigSignerApprovedStatsDocument = { +export const GetMultisigProposalStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetMultisigSignerApprovedStats' }, + name: { kind: 'Name', value: 'GetMultisigProposalStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -23700,7 +21060,7 @@ export const GetMultisigSignerApprovedStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'multisig_signer_approved_aggregate' }, + name: { kind: 'Name', value: 'multisig_proposal_aggregate' }, arguments: [ { kind: 'Argument', @@ -23710,7 +21070,7 @@ export const GetMultisigSignerApprovedStatsDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, + name: { kind: 'Name', value: 'created_at' }, value: { kind: 'ObjectValue', fields: [ @@ -23773,46 +21133,271 @@ export const GetMultisigSignerApprovedStatsDocument = { selections: [ { kind: 'Field', - name: { - kind: 'Name', - value: 'total_multisig_signer_approved' + name: { kind: 'Name', value: 'total_multisig_proposals' } + } + ] + } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigProposalStatsQuery, + GetMultisigProposalStatsQueryVariables +>; +export const GetMultisigProposalByIdDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigProposalById' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'multisigProposal' }, + name: { kind: 'Name', value: 'multisig_proposal_by_pk' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'id' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigProposalDetailFields' } + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'createdEvents' }, + name: { kind: 'Name', value: 'multisig_proposal_created' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'proposal_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' } + } + } + ] + } + } + ] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'MultisigProposalLifecycleEventFields' + } + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'signerApprovedEvents' }, + name: { kind: 'Name', value: 'multisig_signer_approved' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'proposal_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' } + } + } + ] + } + } + ] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + 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', + alias: { kind: 'Name', value: 'readyEvents' }, + name: { kind: 'Name', value: 'multisig_proposal_ready' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'proposal_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' } + } + } + ] + } + } + ] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + 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' } } + ] } } ] } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigSignerApprovedStatsQuery, - GetMultisigSignerApprovedStatsQueryVariables ->; -export const GetMultisigSignerApprovedByHashDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetMultisigSignerApprovedByHash' }, - 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: 'multisigSignerApprovedEvents' }, - name: { kind: 'Name', value: 'multisig_signer_approved' }, + alias: { kind: 'Name', value: 'executedEvents' }, + name: { kind: 'Name', value: 'executed_multisig_proposal' }, arguments: [ { kind: 'Argument', @@ -23822,25 +21407,16 @@ export const GetMultisigSignerApprovedByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'proposal_id' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: '_eq' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'id' } } } ] @@ -23848,54 +21424,30 @@ export const GetMultisigSignerApprovedByHashDocument = { } ] } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] + } } ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'FragmentSpread', - name: { kind: 'Name', value: 'MultisigSignerApprovedFields' } - } - ] - } - } - ] - } - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'MultisigSignerApprovedFields' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'multisig_signer_approved' } - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'approver' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'proposal' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'multisig' }, + name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -23905,11 +21457,11 @@ export const GetMultisigSignerApprovedByHashDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'proposer' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } } @@ -23918,160 +21470,65 @@ export const GetMultisigSignerApprovedByHashDocument = { }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode< - GetMultisigSignerApprovedByHashQuery, - GetMultisigSignerApprovedByHashQueryVariables ->; -export const GetScheduledReversibleTransactionsDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'GetScheduledReversibleTransactions' }, - 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: 'scheduled_reversible_transfer_order_by' - } - } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'scheduled_reversible_transfer_bool_exp' - } - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'scheduledReversibleTransactions' }, - name: { kind: 'Name', value: 'scheduled_reversible_transfer' }, + alias: { kind: 'Name', value: 'cancelledEvents' }, + name: { kind: 'Name', value: 'cancelled_multisig_proposal' }, 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: 'order_by' }, + name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'orderBy' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'proposal_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' } + } + } + ] + } + } + ] } }, { kind: 'Argument', - name: { kind: 'Name', value: 'where' }, + name: { kind: 'Name', value: 'order_by' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] } } ], selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, { kind: 'Field', name: { kind: 'Name', value: 'block' }, @@ -24081,61 +21538,78 @@ export const GetScheduledReversibleTransactionsDocument = { { 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', - alias: { kind: 'Name', value: 'meta' }, - name: { - kind: 'Name', - value: 'scheduled_reversible_transfer_aggregate' - }, + alias: { kind: 'Name', value: 'removedEvents' }, + name: { kind: 'Name', value: 'removed_multisig_proposal' }, arguments: [ { kind: 'Argument', name: { kind: 'Name', value: 'where' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'proposal_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'id' } + } + } + ] + } + } + ] + } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] } } ], selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, + name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { 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' } } ] } } @@ -24144,19 +21618,165 @@ export const GetScheduledReversibleTransactionsDocument = { } ] } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigProposalDetailFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'deposit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'expiry_block' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvals' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call_raw' } }, + { kind: 'Field', name: { kind: 'Name', value: 'decode_error' } }, + { kind: 'Field', name: { kind: 'Name', value: 'created_at' } }, + { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'transfer_amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'schedule_amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'delay_kind' } }, + { kind: 'Field', name: { kind: 'Name', value: 'delay_value' } }, + { kind: 'Field', name: { kind: 'Name', value: 'schedule_asset_id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'multisig' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'guardian' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'transferTo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'scheduleTo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'recoverAccount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdExtrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'createdAtBlock' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigProposalLifecycleEventFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_proposal_created' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + 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' } } + ] + } + } + ] + } } ] } as unknown as DocumentNode< - GetScheduledReversibleTransactionsQuery, - GetScheduledReversibleTransactionsQueryVariables + GetMultisigProposalByIdQuery, + GetMultisigProposalByIdQueryVariables >; -export const GetRecentScheduledReversibleTransactionsDocument = { +export const GetMultisigSignerApprovedDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentScheduledReversibleTransactions' }, + name: { kind: 'Name', value: 'GetMultisigSignerApproved' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -24188,11 +21808,22 @@ export const GetRecentScheduledReversibleTransactionsDocument = { kind: 'NamedType', name: { kind: 'Name', - value: 'scheduled_reversible_transfer_order_by' + value: 'multisig_signer_approved_order_by' } } } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_signer_approved_bool_exp' } + } } ], selectionSet: { @@ -24200,8 +21831,8 @@ export const GetRecentScheduledReversibleTransactionsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'scheduledReversibleTransactions' }, - name: { kind: 'Name', value: 'scheduled_reversible_transfer' }, + alias: { kind: 'Name', value: 'multisigSignerApprovedEvents' }, + name: { kind: 'Name', value: 'multisig_signer_approved' }, arguments: [ { kind: 'Argument', @@ -24226,6 +21857,38 @@ export const GetRecentScheduledReversibleTransactionsDocument = { 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: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigSignerApprovedFields' } + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'meta' }, + name: { kind: 'Name', value: 'multisig_signer_approved_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + } } ], selectionSet: { @@ -24233,55 +21896,226 @@ export const GetRecentScheduledReversibleTransactionsDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } ] } - }, - { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + } + ] + } + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigSignerApprovedFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_signer_approved' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'approver' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposal' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'scheduled_at' } + name: { kind: 'Name', value: 'multisig' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'proposer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { 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: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetMultisigSignerApprovedQuery, + GetMultisigSignerApprovedQueryVariables +>; +export const GetMultisigSignerApprovedStatsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetMultisigSignerApprovedStats' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'timestamptz' } + } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'last24Hour' }, + name: { kind: 'Name', value: 'multisig_signer_approved_aggregate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_gte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'startDate' } + } + }, + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_lte' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'endDate' } + } + } + ] + } + } + ] + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'from' }, + name: { kind: 'Name', value: 'aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } ] } - }, + } + ] + } + }, + { + kind: 'Field', + alias: { kind: 'Name', value: 'allTime' }, + name: { kind: 'Name', value: 'chain_stats_by_pk' }, + 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: 'to' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } - ] + name: { + kind: 'Name', + value: 'total_multisig_signer_approved' } } ] @@ -24292,43 +22126,23 @@ export const GetRecentScheduledReversibleTransactionsDocument = { } ] } as unknown as DocumentNode< - GetRecentScheduledReversibleTransactionsQuery, - GetRecentScheduledReversibleTransactionsQueryVariables + GetMultisigSignerApprovedStatsQuery, + GetMultisigSignerApprovedStatsQueryVariables >; -export const GetScheduledReversibleTransactionsStatsDocument = { +export const GetMultisigSignerApprovedByHashDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetScheduledReversibleTransactionsStats' }, + name: { kind: 'Name', value: 'GetMultisigSignerApprovedByHash' }, variableDefinitions: [ { kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } - } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } - }, + variable: { kind: 'Variable', name: { kind: 'Name', value: 'hash' } }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'timestamptz' } - } + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } } } ], @@ -24337,11 +22151,8 @@ export const GetScheduledReversibleTransactionsStatsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'last24Hour' }, - name: { - kind: 'Name', - value: 'scheduled_reversible_transfer_aggregate' - }, + alias: { kind: 'Name', value: 'multisigSignerApprovedEvents' }, + name: { kind: 'Name', value: 'multisig_signer_approved' }, arguments: [ { kind: 'Argument', @@ -24351,24 +22162,25 @@ export const GetScheduledReversibleTransactionsStatsDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, + name: { kind: 'Name', value: 'extrinsic' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_gte' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'startDate' } - } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_lte' }, + name: { kind: 'Name', value: 'id' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'endDate' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } + } + ] } } ] @@ -24381,17 +22193,63 @@ export const GetScheduledReversibleTransactionsStatsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { + kind: 'FragmentSpread', + name: { kind: 'Name', value: 'MultisigSignerApprovedFields' } + } + ] + } + } + ] + } + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'MultisigSignerApprovedFields' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'multisig_signer_approved' } + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'approvals_count' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'approver' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposal' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'aggregate' }, + name: { kind: 'Name', value: 'multisig' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'proposer' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } } @@ -24400,22 +22258,23 @@ export const GetScheduledReversibleTransactionsStatsDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } - } - ], + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'total_scheduled_transfers' } - } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } ] } } @@ -24424,8 +22283,8 @@ export const GetScheduledReversibleTransactionsStatsDocument = { } ] } as unknown as DocumentNode< - GetScheduledReversibleTransactionsStatsQuery, - GetScheduledReversibleTransactionsStatsQueryVariables + GetMultisigSignerApprovedByHashQuery, + GetMultisigSignerApprovedByHashQueryVariables >; export const GetScheduledReversibleTransactionByTxIdDocument = { kind: 'Document', @@ -24564,101 +22423,31 @@ export const SearchAllDocument = { name: { kind: 'Name', value: 'keyword' } }, type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword_number' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfer' }, - 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: 'extrinsic' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] - } - } - ] - } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - } - ] - } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword_number' } + }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'limit' } }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'scheduledReversibleTransactions' }, - name: { kind: 'Name', value: 'scheduled_reversible_transfer' }, + alias: { kind: 'Name', value: 'transactions' }, + name: { kind: 'Name', value: 'unified_transaction' }, arguments: [ { kind: 'Argument', @@ -24676,17 +22465,75 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'tx_id' }, + name: { kind: 'Name', value: '_or' }, value: { - kind: 'ObjectValue', - fields: [ + kind: 'ListValue', + values: [ { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_ilike' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } + } + ] + } + } + ] + }, + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'detail_id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_ilike' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } + } + ] + } + } + ] + }, + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_ilike' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } + } + ] + } + } + ] } ] } @@ -24698,29 +22545,31 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, + { kind: 'Field', name: { kind: 'Name', value: 'detail_id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'pallet' } + name: { kind: 'Name', value: 'height' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { kind: 'Field', name: { kind: 'Name', value: 'hash' } } ] } - }, - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } } + } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'executedReversibleTransactions' }, - name: { kind: 'Name', value: 'executed_reversible_transfer' }, + alias: { kind: 'Name', value: 'accounts' }, + name: { kind: 'Name', value: 'account' }, arguments: [ { kind: 'Argument', @@ -24738,7 +22587,7 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'tx_id' }, + name: { kind: 'Name', value: 'id' }, value: { kind: 'ObjectValue', fields: [ @@ -24760,14 +22609,14 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'cancelledReversibleTransactions' }, - name: { kind: 'Name', value: 'cancelled_reversible_transfer' }, + alias: { kind: 'Name', value: 'blocks' }, + name: { kind: 'Name', value: 'block' }, arguments: [ { kind: 'Argument', @@ -24785,17 +22634,56 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'tx_id' }, + name: { kind: 'Name', value: '_or' }, value: { - kind: 'ObjectValue', - fields: [ + kind: 'ListValue', + values: [ { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'hash' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_ilike' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } + } + ] + } + } + ] + }, + { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'height' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { + kind: 'Name', + value: 'keyword_number' + } + } + } + ] + } + } + ] } ] } @@ -24807,14 +22695,14 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } } + { kind: 'Field', name: { kind: 'Name', value: 'height' } } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'accounts' }, - name: { kind: 'Name', value: 'account' }, + alias: { kind: 'Name', value: 'highSecuritySets' }, + name: { kind: 'Name', value: 'high_security_set' }, arguments: [ { kind: 'Argument', @@ -24832,16 +22720,25 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: 'extrinsic' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, + name: { kind: 'Name', value: 'id' }, value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_ilike' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'keyword' } + } + } + ] } } ] @@ -24854,14 +22751,28 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + } ] } }, { kind: 'Field', - alias: { kind: 'Name', value: 'blocks' }, - name: { kind: 'Name', value: 'block' }, + alias: { kind: 'Name', value: 'errorEvents' }, + name: { kind: 'Name', value: 'error_event' }, arguments: [ { kind: 'Argument', @@ -24888,7 +22799,7 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'hash' }, + name: { kind: 'Name', value: 'error_type' }, value: { kind: 'ObjectValue', fields: [ @@ -24910,19 +22821,16 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'height' }, + name: { kind: 'Name', value: 'error_name' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, + name: { kind: 'Name', value: '_ilike' }, value: { kind: 'Variable', - name: { - kind: 'Name', - value: 'keyword_number' - } + name: { kind: 'Name', value: 'keyword' } } } ] @@ -24940,23 +22848,54 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + } ] } - }, + } + ] + } + } + ] +} as unknown as DocumentNode; +export const GetExtrinsicByHashDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetExtrinsicByHash' }, + 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: 'highSecuritySets' }, - name: { kind: 'Name', value: 'high_security_set' }, + alias: { kind: 'Name', value: 'extrinsics' }, + name: { kind: 'Name', value: 'extrinsic' }, arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -24965,25 +22904,16 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'id' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, + name: { kind: 'Name', value: '_eq' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } } } ] @@ -24996,18 +22926,33 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { kind: 'Field', name: { kind: 'Name', value: 'success' } }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'index_in_block' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'signer' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { 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' } } ] } } @@ -25016,17 +22961,9 @@ export const SearchAllDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'minerRewards' }, - name: { kind: 'Name', value: 'miner_reward' }, + alias: { kind: 'Name', value: 'transfersByExtrinsic' }, + name: { kind: 'Name', value: 'transfer' }, arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'limit' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'limit' } - } - }, { kind: 'Argument', name: { kind: 'Name', value: 'where' }, @@ -25035,22 +22972,22 @@ export const SearchAllDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'extrinsic' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'hash' }, + name: { kind: 'Name', value: 'id' }, value: { kind: 'ObjectValue', fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, + name: { kind: 'Name', value: '_eq' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } + name: { kind: 'Name', value: 'hash' } } } ] @@ -25061,29 +22998,41 @@ export const SearchAllDocument = { } ] } + }, + { + kind: 'Argument', + name: { kind: 'Name', value: 'order_by' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'timestamp' }, + value: { kind: 'EnumValue', value: 'asc' } + } + ] + } } ], selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'block' }, + name: { kind: 'Name', value: 'from' }, selectionSet: { kind: 'SelectionSet', selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'height' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'hash' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } }, - { kind: 'Field', name: { kind: 'Name', value: 'reward' } }, { kind: 'Field', - name: { kind: 'Name', value: 'miner' }, + name: { kind: 'Name', value: 'to' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -25091,78 +23040,97 @@ export const SearchAllDocument = { ] } }, - { 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: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'success' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timestamp' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'index_in_block' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'signer' }, + 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', - alias: { kind: 'Name', value: 'errorEvents' }, - name: { kind: 'Name', value: 'error_event' }, - 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: '_or' }, - value: { - kind: 'ListValue', - values: [ - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'error_type' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] - }, - { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'error_name' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_ilike' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'keyword' } - } - } - ] - } - } - ] + alias: { kind: 'Name', value: 'transfersById' }, + name: { kind: 'Name', value: 'transfer' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'where' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'id' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: '_eq' }, + value: { + kind: 'Variable', + name: { kind: 'Name', value: 'hash' } + } } ] } @@ -25174,6 +23142,39 @@ export const SearchAllDocument = { selectionSet: { kind: 'SelectionSet', selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { 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: 'block' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'height' } } + ] + } + }, { kind: 'Field', name: { kind: 'Name', value: 'extrinsic' }, @@ -25185,7 +23186,46 @@ export const SearchAllDocument = { kind: 'Field', name: { kind: 'Name', value: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } + { kind: 'Field', name: { kind: 'Name', value: 'call' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'success' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'timestamp' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'index_in_block' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'signer' }, + 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' } + } + ] + } + } ] } } @@ -25196,14 +23236,17 @@ export const SearchAllDocument = { } } ] -} as unknown as DocumentNode; -export const GetTransactionsDocument = { +} as unknown as DocumentNode< + GetExtrinsicByHashQuery, + GetExtrinsicByHashQueryVariables +>; +export const GetUnifiedTransactionsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetTransactions' }, + name: { kind: 'Name', value: 'GetUnifiedTransactions' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -25233,7 +23276,7 @@ export const GetTransactionsDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'transfer_order_by' } + name: { kind: 'Name', value: 'unified_transaction_order_by' } } } } @@ -25246,7 +23289,7 @@ export const GetTransactionsDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'transfer_bool_exp' } + name: { kind: 'Name', value: 'unified_transaction_bool_exp' } } } ], @@ -25256,7 +23299,7 @@ export const GetTransactionsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfer' }, + name: { kind: 'Name', value: 'unified_transaction' }, arguments: [ { kind: 'Argument', @@ -25294,34 +23337,28 @@ export const GetTransactionsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'pallet' } + name: { kind: 'Name', value: 'height' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { - 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: 'amount' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'detail_id' } }, { kind: 'Field', name: { kind: 'Name', value: 'from' }, @@ -25348,7 +23385,7 @@ export const GetTransactionsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'meta' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, + name: { kind: 'Name', value: 'unified_transaction_aggregate' }, arguments: [ { kind: 'Argument', @@ -25384,16 +23421,16 @@ export const GetTransactionsDocument = { } ] } as unknown as DocumentNode< - GetTransactionsQuery, - GetTransactionsQueryVariables + GetUnifiedTransactionsQuery, + GetUnifiedTransactionsQueryVariables >; -export const GetRecentTransactionsDocument = { +export const GetRecentUnifiedTransactionsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetRecentTransactions' }, + name: { kind: 'Name', value: 'GetRecentUnifiedTransactions' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -25423,21 +23460,10 @@ export const GetRecentTransactionsDocument = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { kind: 'Name', value: 'transfer_order_by' } + name: { kind: 'Name', value: 'unified_transaction_order_by' } } } } - }, - { - kind: 'VariableDefinition', - variable: { - kind: 'Variable', - name: { kind: 'Name', value: 'where' } - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'transfer_bool_exp' } - } } ], selectionSet: { @@ -25446,7 +23472,7 @@ export const GetRecentTransactionsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'transactions' }, - name: { kind: 'Name', value: 'transfer' }, + name: { kind: 'Name', value: 'unified_transaction' }, arguments: [ { kind: 'Argument', @@ -25471,47 +23497,33 @@ export const GetRecentTransactionsDocument = { 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: 'fee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { kind: 'Field', name: { kind: 'Name', value: 'hash' } }, { kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, { kind: 'Field', - name: { kind: 'Name', value: 'pallet' } + name: { kind: 'Name', value: 'height' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { - 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: 'amount' } }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, + { kind: 'Field', name: { kind: 'Name', value: 'amount' } }, + { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'status' } }, + { kind: 'Field', name: { kind: 'Name', value: 'detail_id' } }, { kind: 'Field', name: { kind: 'Name', value: 'from' }, @@ -25540,16 +23552,16 @@ export const GetRecentTransactionsDocument = { } ] } as unknown as DocumentNode< - GetRecentTransactionsQuery, - GetRecentTransactionsQueryVariables + GetRecentUnifiedTransactionsQuery, + GetRecentUnifiedTransactionsQueryVariables >; -export const GetTransactionsStatsDocument = { +export const GetUnifiedTransactionsStatsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetTransactionsStats' }, + name: { kind: 'Name', value: 'GetUnifiedTransactionsStats' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -25586,7 +23598,7 @@ export const GetTransactionsStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'last24Hour' }, - name: { kind: 'Name', value: 'transfer_aggregate' }, + name: { kind: 'Name', value: 'unified_transaction_aggregate' }, arguments: [ { kind: 'Argument', @@ -25618,20 +23630,6 @@ export const GetTransactionsStatsDocument = { } ] } - }, - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic_id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_is_null' }, - value: { kind: 'BooleanValue', value: false } - } - ] - } } ] } @@ -25660,20 +23658,23 @@ export const GetTransactionsStatsDocument = { { kind: 'Field', alias: { kind: 'Name', value: 'allTime' }, - name: { kind: 'Name', value: 'chain_stats_by_pk' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } - } - ], + name: { kind: 'Name', value: 'unified_transaction_aggregate' }, selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'total_immediate_transfers' } + name: { kind: 'Name', value: 'aggregate' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'totalCount' }, + name: { kind: 'Name', value: 'count' } + } + ] + } } ] } @@ -25683,91 +23684,132 @@ export const GetTransactionsStatsDocument = { } ] } as unknown as DocumentNode< - GetTransactionsStatsQuery, - GetTransactionsStatsQueryVariables + GetUnifiedTransactionsStatsQuery, + GetUnifiedTransactionsStatsQueryVariables >; -export const GetExtrinsicByHashDocument = { +export const GetWormholeExtrinsicByIdDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetExtrinsicByHash' }, - 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: 'extrinsics' }, - name: { kind: 'Name', value: 'extrinsic' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'hash' } - } - } - ] - } - } - ] - } + name: { kind: 'Name', value: 'GetWormholeExtrinsicById' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'wormholeExtrinsicById' }, + name: { kind: 'Name', value: 'wormhole_extrinsic_by_pk' }, + 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: 'pallet' } }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } }, - { kind: 'Field', name: { kind: 'Name', value: 'success' } }, - { kind: 'Field', name: { kind: 'Name', value: 'fee' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'extrinsic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pallet' } + }, + { kind: 'Field', name: { kind: 'Name', value: 'call' } } + ] + } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'total_amount' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'output_count' } + }, { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, { kind: 'Field', - name: { kind: 'Name', value: 'index_in_block' } + name: { kind: 'Name', value: 'privacy_score' } }, { kind: 'Field', - name: { kind: 'Name', value: 'signer' }, + name: { kind: 'Name', value: 'privacy_score01_pct' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'privacy_score1_pct' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'privacy_score5_pct' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'privacy_label' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'pool_snapshot' } + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'block' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } } + { 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: 'block' }, + name: { kind: 'Name', value: 'outputs' }, selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'height' } } + { 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' } } ] } } @@ -25776,8 +23818,8 @@ export const GetExtrinsicByHashDocument = { }, { kind: 'Field', - alias: { kind: 'Name', value: 'transfers' }, - name: { kind: 'Name', value: 'transfer' }, + alias: { kind: 'Name', value: 'wormholeNullifiers' }, + name: { kind: 'Name', value: 'wormhole_nullifier' }, arguments: [ { kind: 'Argument', @@ -25787,7 +23829,7 @@ export const GetExtrinsicByHashDocument = { fields: [ { kind: 'ObjectField', - name: { kind: 'Name', value: 'extrinsic' }, + name: { kind: 'Name', value: 'wormholeExtrinsic' }, value: { kind: 'ObjectValue', fields: [ @@ -25802,7 +23844,7 @@ export const GetExtrinsicByHashDocument = { name: { kind: 'Name', value: '_eq' }, value: { kind: 'Variable', - name: { kind: 'Name', value: 'hash' } + name: { kind: 'Name', value: 'id' } } } ] @@ -25813,41 +23855,127 @@ export const GetExtrinsicByHashDocument = { } ] } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'nullifier' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'nullifier_hash' } + } + ] + } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetWormholeExtrinsicByIdQuery, + GetWormholeExtrinsicByIdQueryVariables +>; +export const GetTransactionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetTransactions' }, + 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: 'transfer_order_by' } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'transfer_bool_exp' } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + alias: { kind: 'Name', value: 'transactions' }, + name: { kind: 'Name', value: 'transfer' }, + 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: 'order_by' }, value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'timestamp' }, - value: { kind: 'EnumValue', value: 'asc' } - } - ] + 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: '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' }, + name: { kind: 'Name', value: 'extrinsic' }, selectionSet: { kind: 'SelectionSet', selections: [ @@ -25863,16 +23991,16 @@ export const GetExtrinsicByHashDocument = { } ] } as unknown as DocumentNode< - GetExtrinsicByHashQuery, - GetExtrinsicByHashQueryVariables + GetTransactionsQuery, + GetTransactionsQueryVariables >; -export const GetWormholeExtrinsicsDocument = { +export const GetCancelledReversibleTransactionsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetWormholeExtrinsics' }, + name: { kind: 'Name', value: 'GetCancelledReversibleTransactions' }, variableDefinitions: [ { kind: 'VariableDefinition', @@ -25897,14 +24025,14 @@ export const GetWormholeExtrinsicsDocument = { name: { kind: 'Name', value: 'orderBy' } }, type: { - kind: 'NonNullType', + kind: 'ListType', type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'wormhole_extrinsic_order_by' } + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { + kind: 'Name', + value: 'cancelled_reversible_transfer_order_by' } } } @@ -25918,7 +24046,10 @@ export const GetWormholeExtrinsicsDocument = { }, type: { kind: 'NamedType', - name: { kind: 'Name', value: 'wormhole_extrinsic_bool_exp' } + name: { + kind: 'Name', + value: 'cancelled_reversible_transfer_bool_exp' + } } } ], @@ -25927,8 +24058,8 @@ export const GetWormholeExtrinsicsDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'wormholeExtrinsics' }, - name: { kind: 'Name', value: 'wormhole_extrinsic' }, + alias: { kind: 'Name', value: 'cancelledReversibleTransactions' }, + name: { kind: 'Name', value: 'cancelled_reversible_transfer' }, arguments: [ { kind: 'Argument', @@ -25966,83 +24097,7 @@ export const GetWormholeExtrinsicsDocument = { selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'output_count' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacy_score' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacy_label' } - }, - { - 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: 'wormhole_extrinsic_aggregate' }, - arguments: [ - { - 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: 'aggregate' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - alias: { kind: 'Name', value: 'totalCount' }, - name: { kind: 'Name', value: 'count' } - } - ] - } - } + { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } } ] } } @@ -26051,23 +24106,65 @@ export const GetWormholeExtrinsicsDocument = { } ] } as unknown as DocumentNode< - GetWormholeExtrinsicsQuery, - GetWormholeExtrinsicsQueryVariables + GetCancelledReversibleTransactionsQuery, + GetCancelledReversibleTransactionsQueryVariables >; -export const GetWormholeExtrinsicByIdDocument = { +export const GetExecutedReversibleTransactionsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetWormholeExtrinsicById' }, + name: { kind: 'Name', value: 'GetExecutedReversibleTransactions' }, variableDefinitions: [ { kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + 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: 'NamedType', name: { kind: 'Name', value: 'String' } } + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { + kind: 'Name', + value: 'executed_reversible_transfer_order_by' + } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { + kind: 'Name', + value: 'executed_reversible_transfer_bool_exp' + } } } ], @@ -26076,162 +24173,161 @@ export const GetWormholeExtrinsicByIdDocument = { selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'wormholeExtrinsicById' }, - name: { kind: 'Name', value: 'wormhole_extrinsic_by_pk' }, + alias: { kind: 'Name', value: 'executedReversibleTransactions' }, + name: { kind: 'Name', value: 'executed_reversible_transfer' }, 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: 'extrinsic' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pallet' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'call' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total_amount' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'output_count' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'timestamp' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacy_score' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacy_score01_pct' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacy_score1_pct' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacy_score5_pct' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'privacy_label' } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'pool_snapshot' } - }, - { - 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: 'outputs' }, - 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' } } - ] - } + 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: 'order_by' }, + 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: 'tx_id' } } ] } + } + ] + } + } + ] +} as unknown as DocumentNode< + GetExecutedReversibleTransactionsQuery, + GetExecutedReversibleTransactionsQueryVariables +>; +export const GetScheduledReversibleTransactionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'GetScheduledReversibleTransactions' }, + 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: 'scheduled_reversible_transfer_order_by' + } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } }, + type: { + kind: 'NamedType', + name: { + kind: 'Name', + value: 'scheduled_reversible_transfer_bool_exp' + } + } + } + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'wormholeNullifiers' }, - name: { kind: 'Name', value: 'wormhole_nullifier' }, + alias: { kind: 'Name', value: 'scheduledReversibleTransactions' }, + name: { kind: 'Name', value: 'scheduled_reversible_transfer' }, 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: 'order_by' }, + 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: 'wormholeExtrinsic' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'id' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: '_eq' }, - value: { - kind: 'Variable', - name: { kind: 'Name', value: 'id' } - } - } - ] - } - } - ] - } - } - ] + kind: 'Variable', + name: { kind: 'Name', value: 'where' } } } ], selectionSet: { kind: 'SelectionSet', selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'nullifier' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'nullifier_hash' } - } + { kind: 'Field', name: { kind: 'Name', value: 'tx_id' } } ] } } @@ -26240,38 +24336,110 @@ export const GetWormholeExtrinsicByIdDocument = { } ] } as unknown as DocumentNode< - GetWormholeExtrinsicByIdQuery, - GetWormholeExtrinsicByIdQueryVariables + GetScheduledReversibleTransactionsQuery, + GetScheduledReversibleTransactionsQueryVariables >; -export const GetDepositPoolStatsDocument = { +export const GetWormholeExtrinsicsDocument = { kind: 'Document', definitions: [ { kind: 'OperationDefinition', operation: 'query', - name: { kind: 'Name', value: 'GetDepositPoolStats' }, + 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' } } + }, + { + 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: 'wormhole_extrinsic_order_by' } + } + } + } + } + }, + { + kind: 'VariableDefinition', + variable: { + kind: 'Variable', + name: { kind: 'Name', value: 'where' } + }, + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'wormhole_extrinsic_bool_exp' } + } + } + ], selectionSet: { kind: 'SelectionSet', selections: [ { kind: 'Field', - alias: { kind: 'Name', value: 'depositPoolStatsById' }, - name: { kind: 'Name', value: 'deposit_pool_stats_by_pk' }, + alias: { kind: 'Name', value: 'wormholeExtrinsics' }, + name: { kind: 'Name', value: 'wormhole_extrinsic' }, arguments: [ { kind: 'Argument', - name: { kind: 'Name', value: 'id' }, - value: { kind: 'StringValue', value: 'global', block: false } + 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: 'order_by' }, + 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: 'last_updated_block' } - }, - { kind: 'Field', name: { kind: 'Name', value: 'buckets' } } + { kind: 'Field', name: { kind: 'Name', value: 'id' } } ] } } @@ -26280,6 +24448,6 @@ export const GetDepositPoolStatsDocument = { } ] } as unknown as DocumentNode< - GetDepositPoolStatsQuery, - GetDepositPoolStatsQueryVariables + GetWormholeExtrinsicsQuery, + GetWormholeExtrinsicsQueryVariables >; diff --git a/src/api/accounts.tsx b/src/api/accounts.tsx index a66e610..1f6ee4b 100644 --- a/src/api/accounts.tsx +++ b/src/api/accounts.tsx @@ -6,7 +6,6 @@ import { subDays } from 'date-fns/subDays'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; import type { AccountSorts } from '@/constants/query-sorts'; -import { QUERY_UNIFIED_LIMIT } from '@/constants/query-unified-limit'; import type { AccountListResponse, AccountResponse, @@ -32,6 +31,21 @@ export const accounts = { free frozen reserved + flagEvents: accountEvents( + where: { + _or: [ + { high_security_set_id: { _is_null: false } } + { multisig_id: { _is_null: false } } + ] + } + limit: 20 + ) { + highSecuritySet { + who_id + guardian_id + } + multisig_id + } } meta: chain_stats_by_pk(id: "global") { totalCount: total_accounts @@ -53,7 +67,7 @@ export const accounts = { }, getById: () => { const GET_ACCOUNT = gql` - query GetAccountById($id: String!, $limit: Int!) { + query GetAccountById($id: String!) { account: account_by_pk(id: $id) { id free @@ -70,392 +84,21 @@ export const accounts = { } multisig: multisig_by_pk(id: $id) { id - timestamp - threshold - nonce - signers - creator { - id - } - block { - height - } - extrinsic { - id - pallet - call - } - } - accountEvents: account_event( - limit: $limit - where: { account_id: { _eq: $id } } - ) { - transfer { - fee - extrinsic { - id - pallet - call - } - block { - height - } - amount - timestamp - from { - id - } - to { - id - } - } - scheduledReversibleTransfer { - extrinsic { - id - pallet - call - } - timestamp - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - executedReversibleTransfer { - timestamp - tx_id - block { - height - } - scheduledTransfer { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - } - cancelledReversibleTransfer { - timestamp - tx_id - block { - height - } - cancelledBy { - id - } - scheduledTransfer { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - } - minerReward { - block { - height - hash - } - reward - miner { - id - } - timestamp - } - multisig { - id - timestamp - threshold - nonce - signers - creator { - id - } - block { - height - } - extrinsic { - id - pallet - call - } - } - multisigProposalCreated { - id - timestamp - block { - height - } - extrinsic { - id - pallet - call - } - proposal { - id - multisig { - id - } - proposer { - id - } - } - } - multisigSignerApproved { - id - timestamp - approvals_count - approver { - id - } - block { - height - } - extrinsic { - id - pallet - call - } - proposal { - id - multisig { - id - } - proposer { - id - } - } - } - multisigProposalReady { - id - timestamp - approvals_count - block { - height - } - extrinsic { - id - pallet - call - } - proposal { - id - multisig { - id - } - proposer { - id - } - } - } - executedMultisigProposal { - id - timestamp - approvers - result - block { - height - } - extrinsic { - id - pallet - call - } - proposal { - id - multisig { - id - } - proposer { - id - } - } - } - cancelledMultisigProposal { - id - timestamp - cancelledBy { - id - } - block { - height - } - extrinsic { - id - pallet - call - } - proposal { - id - multisig { - id - } - proposer { - id - } - } - } - removedMultisigProposal { - id - timestamp - removedBy { - id - } - block { - height - } - extrinsic { - id - pallet - call - } - proposal { - id - multisig { - id - } - proposer { - id - } - } - } - multisigDepositsClaimed { - id - timestamp - total_returned - proposals_removed - claimer { - id - } - multisig { - id - } - block { - height - } - extrinsic { - id - pallet - call - } - } } - guardian: high_security_set_aggregate( - order_by: { timestamp: desc } - limit: $limit where: { who: { id: { _eq: $id } } } ) { - nodes { - timestamp - block { - height - } - guardian { - id - free - frozen - reserved - } - } aggregate { totalCount: count } } - beneficiaries: high_security_set_aggregate( - order_by: { timestamp: desc } - limit: $limit where: { guardian: { id: { _eq: $id } } } ) { - nodes { - timestamp - block { - height - } - who { - id - free - frozen - reserved - } - } aggregate { totalCount: count } } - - wormholeOutputs: wormhole_output( - order_by: { wormholeExtrinsic: { timestamp: desc } } - limit: $limit - where: { exitAccount: { id: { _eq: $id } } } - ) { - id - amount - exitAccount { - id - } - wormholeExtrinsic { - id - extrinsic { - id - pallet - call - } - total_amount - output_count - timestamp - block { - height - } - outputs { - id - exitAccount { - id - } - amount - } - } - } } `; @@ -464,8 +107,7 @@ export const accounts = { useQuery(GET_ACCOUNT, { ...config, variables: { - id, - limit: QUERY_UNIFIED_LIMIT + id } }) }; diff --git a/src/api/blocks.tsx b/src/api/blocks.tsx index b993ac7..5a40bc9 100644 --- a/src/api/blocks.tsx +++ b/src/api/blocks.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Block_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { BlockSorts } from '@/constants/query-sorts'; import type { BlockListResponse, BlockResponse, - BlockStatsResponse, - RecentBlocksResponse + BlockStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -39,6 +37,7 @@ export const blocks = { height reward timestamp + mined_by_id extrinsics { id } @@ -62,39 +61,6 @@ export const blocks = { } }); }, - useGetRecent: ( - config?: Omit, 'variables'> - ) => { - const GET_RECENT_BLOCKS = gql` - query GetRecentBlocks( - $limit: Int - $offset: Int - $orderBy: [block_order_by!] - ) { - blocks: block(limit: $limit, offset: $offset, order_by: $orderBy) { - id - hash - height - reward - timestamp - extrinsics { - id - } - } - } - `; - - return useQuery>( - GET_RECENT_BLOCKS, - { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT - } - } - ); - }, getById: () => { const GET_BLOCK_BY_ID = gql` query GetBlockById($height: Int!, $hash: String!) { @@ -115,7 +81,7 @@ export const blocks = { success fee timestamp - index_in_block: index_in_block + indexInBlock: index_in_block signer { id } diff --git a/src/api/cancelled-reversible-transactions.tsx b/src/api/cancelled-reversible-transactions.tsx index 4c6af79..09a1a63 100644 --- a/src/api/cancelled-reversible-transactions.tsx +++ b/src/api/cancelled-reversible-transactions.tsx @@ -1,194 +1,9 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; -import type { Cancelled_Reversible_Transfer_Bool_Exp } 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 type { - CancelledReversibleTransactionListResponse, - CancelledReversibleTransactionResponse, - CancelledReversibleTransactionsStatsResponse, - RecentCancelledReversibleTransactionsResponse -} from '@/schemas'; -import type { PaginatedQueryVariables } from '@/types/query'; -import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; +import type { CancelledReversibleTransactionResponse } from '@/schemas'; export const cancelledReversibleTransactions = { - useGetAll: ( - config?: QueryHookOptions< - CancelledReversibleTransactionListResponse, - PaginatedQueryVariables< - CancelledReversibleTransactionSorts, - Cancelled_Reversible_Transfer_Bool_Exp - > - > - ) => { - const GET_CANCELLED_REVERSIBLE_TRANSACTIONS = gql` - query GetCancelledReversibleTransactions( - $limit: Int - $offset: Int - $orderBy: [cancelled_reversible_transfer_order_by!] - $where: cancelled_reversible_transfer_bool_exp - ) { - cancelledReversibleTransactions: cancelled_reversible_transfer( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - timestamp - tx_id - block { - height - } - cancelledBy { - id - } - scheduledTransfer { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - } - meta: cancelled_reversible_transfer_aggregate(where: $where) { - aggregate { - totalCount: count - } - } - } - `; - - return useQuery< - CancelledReversibleTransactionListResponse, - PaginatedQueryVariables< - CancelledReversibleTransactionSorts, - Cancelled_Reversible_Transfer_Bool_Exp - > - >(GET_CANCELLED_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: config?.variables?.orderBy ?? { 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: [cancelled_reversible_transfer_order_by!] - ) { - cancelledReversibleTransactions: cancelled_reversible_transfer( - limit: $limit - offset: $offset - order_by: $orderBy - ) { - timestamp - tx_id - block { - height - } - cancelledBy { - id - } - scheduledTransfer { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - } - } - `; - - return useQuery< - RecentCancelledReversibleTransactionsResponse, - PaginatedQueryVariables - >(GET_RECENT_CANCELLED_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT - } - }); - }, - useGetStats: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const { startDate, endDate } = useGetRecentDateRange(); - - const GET_CANCELLED_REVERSIBLE_TRANSACTIONS_STATS = gql` - query GetCancelledReversibleTransactionsStats( - $startDate: timestamptz! - $endDate: timestamptz! - ) { - last24Hour: cancelled_reversible_transfer_aggregate( - where: { timestamp: { _gte: $startDate, _lte: $endDate } } - ) { - aggregate { - totalCount: count - } - } - allTime: chain_stats_by_pk(id: "global") { - total_cancelled_transfers - } - } - `; - - return useQuery( - GET_CANCELLED_REVERSIBLE_TRANSACTIONS_STATS, - { - ...config, - variables: { - startDate, - endDate - } - } - ); - }, getByTxId: () => { const QUERY = gql` query GetCancelledReversibleTransactionByTxId($tx_id: String!) { diff --git a/src/api/chain-status.tsx b/src/api/chain-status.tsx index 677164d..069eae4 100644 --- a/src/api/chain-status.tsx +++ b/src/api/chain-status.tsx @@ -1,7 +1,247 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; +import { useMemo } from 'react'; -import type { ChainStatusResponse } from '@/schemas'; +import type { + ChainStatusResponse, + HomeChainStatsResponse, + HomeChainStatsVariables +} from '@/schemas'; +import { + HOME_STATS_DAY_COUNT, + useHomeStatsDayWindows +} from '@/utils/get-home-stats-day-windows'; +import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; + +const GET_HOME_STATS = gql` + query GetHomeChainStats( + $startDate: timestamptz! + $endDate: timestamptz! + $day0Start: timestamptz! + $day0End: timestamptz! + $day1Start: timestamptz! + $day1End: timestamptz! + $day2Start: timestamptz! + $day2End: timestamptz! + $day3Start: timestamptz! + $day3End: timestamptz! + $day4Start: timestamptz! + $day4End: timestamptz! + $day5Start: timestamptz! + $day5End: timestamptz! + $day6Start: timestamptz! + $day6End: timestamptz! + ) { + status: chain_stats_by_pk(id: "global") { + block_height + total_accounts + total_deposit_accounts + total_executed_transfers + total_immediate_transfers + total_scheduled_transfers + total_cancelled_transfers + } + last24Hour: transfer_aggregate( + where: { + timestamp: { _gte: $startDate, _lte: $endDate } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + blocksDay0: block_aggregate( + where: { timestamp: { _gte: $day0Start, _lte: $day0End } } + ) { + aggregate { + count + } + } + transfersDay0: transfer_aggregate( + where: { + timestamp: { _gte: $day0Start, _lte: $day0End } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + activeAccountsDay0: transfer_aggregate( + where: { + timestamp: { _gte: $day0Start, _lte: $day0End } + from_id: { _is_null: false } + } + ) { + aggregate { + count(columns: [from_id], distinct: true) + } + } + blocksDay1: block_aggregate( + where: { timestamp: { _gte: $day1Start, _lte: $day1End } } + ) { + aggregate { + count + } + } + transfersDay1: transfer_aggregate( + where: { + timestamp: { _gte: $day1Start, _lte: $day1End } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + activeAccountsDay1: transfer_aggregate( + where: { + timestamp: { _gte: $day1Start, _lte: $day1End } + from_id: { _is_null: false } + } + ) { + aggregate { + count(columns: [from_id], distinct: true) + } + } + blocksDay2: block_aggregate( + where: { timestamp: { _gte: $day2Start, _lte: $day2End } } + ) { + aggregate { + count + } + } + transfersDay2: transfer_aggregate( + where: { + timestamp: { _gte: $day2Start, _lte: $day2End } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + activeAccountsDay2: transfer_aggregate( + where: { + timestamp: { _gte: $day2Start, _lte: $day2End } + from_id: { _is_null: false } + } + ) { + aggregate { + count(columns: [from_id], distinct: true) + } + } + blocksDay3: block_aggregate( + where: { timestamp: { _gte: $day3Start, _lte: $day3End } } + ) { + aggregate { + count + } + } + transfersDay3: transfer_aggregate( + where: { + timestamp: { _gte: $day3Start, _lte: $day3End } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + activeAccountsDay3: transfer_aggregate( + where: { + timestamp: { _gte: $day3Start, _lte: $day3End } + from_id: { _is_null: false } + } + ) { + aggregate { + count(columns: [from_id], distinct: true) + } + } + blocksDay4: block_aggregate( + where: { timestamp: { _gte: $day4Start, _lte: $day4End } } + ) { + aggregate { + count + } + } + transfersDay4: transfer_aggregate( + where: { + timestamp: { _gte: $day4Start, _lte: $day4End } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + activeAccountsDay4: transfer_aggregate( + where: { + timestamp: { _gte: $day4Start, _lte: $day4End } + from_id: { _is_null: false } + } + ) { + aggregate { + count(columns: [from_id], distinct: true) + } + } + blocksDay5: block_aggregate( + where: { timestamp: { _gte: $day5Start, _lte: $day5End } } + ) { + aggregate { + count + } + } + transfersDay5: transfer_aggregate( + where: { + timestamp: { _gte: $day5Start, _lte: $day5End } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + activeAccountsDay5: transfer_aggregate( + where: { + timestamp: { _gte: $day5Start, _lte: $day5End } + from_id: { _is_null: false } + } + ) { + aggregate { + count(columns: [from_id], distinct: true) + } + } + blocksDay6: block_aggregate( + where: { timestamp: { _gte: $day6Start, _lte: $day6End } } + ) { + aggregate { + count + } + } + transfersDay6: transfer_aggregate( + where: { + timestamp: { _gte: $day6Start, _lte: $day6End } + extrinsic_id: { _is_null: false } + } + ) { + aggregate { + count + } + } + activeAccountsDay6: transfer_aggregate( + where: { + timestamp: { _gte: $day6Start, _lte: $day6End } + from_id: { _is_null: false } + } + ) { + aggregate { + count(columns: [from_id], distinct: true) + } + } + } +`; export const chainStatus = { useGetStatus: (config?: QueryHookOptions) => { @@ -22,5 +262,59 @@ export const chainStatus = { return useQuery(GET_STATUS, { ...config }); + }, + + useGetHomeStats: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const { startDate, endDate } = useGetRecentDateRange(); + const dayWindows = useHomeStatsDayWindows(); + + const variables = useMemo((): HomeChainStatsVariables => { + const [day0, day1, day2, day3, day4, day5, day6] = dayWindows; + + if ( + dayWindows.length !== HOME_STATS_DAY_COUNT || + !day0 || + !day1 || + !day2 || + !day3 || + !day4 || + !day5 || + !day6 + ) { + throw new Error('Expected 7 day windows for home stats'); + } + + return { + startDate, + endDate, + day0Start: day0.start, + day0End: day0.end, + day1Start: day1.start, + day1End: day1.end, + day2Start: day2.start, + day2End: day2.end, + day3Start: day3.start, + day3End: day3.end, + day4Start: day4.start, + day4End: day4.end, + day5Start: day5.start, + day5End: day5.end, + day6Start: day6.start, + day6End: day6.end + }; + }, [dayWindows, endDate, startDate]); + + return useQuery( + GET_HOME_STATS, + { + ...config, + variables + } + ); } }; diff --git a/src/api/errors.tsx b/src/api/errors.tsx index a07deac..295f596 100644 --- a/src/api/errors.tsx +++ b/src/api/errors.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Error_Event_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { ErrorEventSorts } from '@/constants/query-sorts'; import type { ErrorEventListResponse, ErrorEventResponse, - ErrorEventsStatsResponse, - RecentErrorEventsResponse + ErrorEventsStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -70,51 +68,6 @@ export const errors = { } }); }, - useGetRecent: ( - config?: Omit, 'variables'> - ) => { - const GET_RECENT_ERROR_EVENTS = gql` - query GetRecentErrorEvents( - $limit: Int - $offset: Int - $orderBy: [error_event_order_by!] - $where: error_event_bool_exp - ) { - errorEvents: error_event( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - error_docs - error_module - error_name - error_type - extrinsic { - id - pallet - call - } - id - timestamp - block { - height - } - } - } - `; - - return useQuery< - RecentErrorEventsResponse, - PaginatedQueryVariables - >(GET_RECENT_ERROR_EVENTS, { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT - } - }); - }, useGetStats: ( config?: Omit, 'variables'> ) => { diff --git a/src/api/executed-reversible-transactions.tsx b/src/api/executed-reversible-transactions.tsx index 66c28b1..98f06b0 100644 --- a/src/api/executed-reversible-transactions.tsx +++ b/src/api/executed-reversible-transactions.tsx @@ -1,188 +1,9 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; -import type { Executed_Reversible_Transfer_Bool_Exp } 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 type { - ExecutedReversibleTransactionListResponse, - ExecutedReversibleTransactionResponse, - ExecutedReversibleTransactionsStatsResponse, - RecentExecutedReversibleTransactionsResponse -} from '@/schemas'; -import type { PaginatedQueryVariables } from '@/types/query'; -import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; +import type { ExecutedReversibleTransactionResponse } from '@/schemas'; export const executedReversibleTransactions = { - useGetAll: ( - config?: QueryHookOptions< - ExecutedReversibleTransactionListResponse, - PaginatedQueryVariables< - ExecutedReversibleTransactionSorts, - Executed_Reversible_Transfer_Bool_Exp - > - > - ) => { - const GET_EXECUTED_REVERSIBLE_TRANSACTIONS = gql` - query GetExecutedReversibleTransactions( - $limit: Int - $offset: Int - $orderBy: [executed_reversible_transfer_order_by!] - $where: executed_reversible_transfer_bool_exp - ) { - executedReversibleTransactions: executed_reversible_transfer( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - timestamp - tx_id - block { - height - } - scheduledTransfer { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - } - meta: executed_reversible_transfer_aggregate(where: $where) { - aggregate { - totalCount: count - } - } - } - `; - - return useQuery< - ExecutedReversibleTransactionListResponse, - PaginatedQueryVariables< - ExecutedReversibleTransactionSorts, - Executed_Reversible_Transfer_Bool_Exp - > - >(GET_EXECUTED_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: config?.variables?.orderBy ?? { 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: [executed_reversible_transfer_order_by!] - ) { - executedReversibleTransactions: executed_reversible_transfer( - limit: $limit - offset: $offset - order_by: $orderBy - ) { - timestamp - tx_id - block { - height - } - scheduledTransfer { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - } - } - `; - - return useQuery< - RecentExecutedReversibleTransactionsResponse, - PaginatedQueryVariables - >(GET_RECENT_EXECUTED_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT - } - }); - }, - useGetStats: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const { startDate, endDate } = useGetRecentDateRange(); - - const GET_EXECUTED_REVERSIBLE_TRANSACTIONS_STATS = gql` - query GetExecutedReversibleTransactionsStats( - $startDate: timestamptz! - $endDate: timestamptz! - ) { - last24Hour: executed_reversible_transfer_aggregate( - where: { timestamp: { _gte: $startDate, _lte: $endDate } } - ) { - aggregate { - totalCount: count - } - } - allTime: chain_stats_by_pk(id: "global") { - total_executed_transfers - } - } - `; - - return useQuery( - GET_EXECUTED_REVERSIBLE_TRANSACTIONS_STATS, - { - ...config, - variables: { - startDate, - endDate - } - } - ); - }, getByTxId: () => { const QUERY = gql` query GetExecutedReversibleTransactionByTxId($tx_id: String!) { diff --git a/src/api/high-security-sets.tsx b/src/api/high-security-sets.tsx index 5b790e4..84c2f79 100644 --- a/src/api/high-security-sets.tsx +++ b/src/api/high-security-sets.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { High_Security_Set_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { HighSecuritySetSorts } from '@/constants/query-sorts'; import type { HighSecuritySetListResponse, HighSecuritySetResponse, - HighSecuritySetsStatsResponse, - RecentHighSecuritySetsResponse + HighSecuritySetsStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -73,55 +71,6 @@ export const highSecuritySets = { } }); }, - useGetRecent: ( - config?: Omit, 'variables'> - ) => { - const GET_RECENT_HIGH_SECURITY_SETS = gql` - query GetRecentHighSecuritySets( - $limit: Int - $offset: Int - $orderBy: [high_security_set_order_by!] - $where: high_security_set_bool_exp - ) { - highSecuritySets: high_security_set( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - id - extrinsic { - id - pallet - call - } - who { - id - } - guardian { - id - } - timestamp - delay - block { - height - } - } - } - `; - - return useQuery< - RecentHighSecuritySetsResponse, - PaginatedQueryVariables - >(GET_RECENT_HIGH_SECURITY_SETS, { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT, - where: {} - } - }); - }, useGetStats: ( config?: Omit, 'variables'> ) => { diff --git a/src/api/index.tsx b/src/api/index.tsx index 8c29eb5..4a399b6 100644 --- a/src/api/index.tsx +++ b/src/api/index.tsx @@ -21,6 +21,7 @@ import { multisigSignerApproved } from './multisig-signer-approved'; import { scheduledReversibleTransactions } from './scheduled-reversible-transactions'; import { search } from './search'; import { transactions } from './transactions'; +import { unifiedTransactions } from './unified-transactions'; import { wormhole } from './wormhole'; const useApiClient = () => { @@ -31,6 +32,7 @@ const useApiClient = () => { chainStatus, errors, transactions, + unifiedTransactions, scheduledReversibleTransactions, executedReversibleTransactions, cancelledReversibleTransactions, diff --git a/src/api/miner-leaderboard.tsx b/src/api/miner-leaderboard.tsx index 6905ba4..e067473 100644 --- a/src/api/miner-leaderboard.tsx +++ b/src/api/miner-leaderboard.tsx @@ -5,11 +5,49 @@ import { MINER_LEADERBOARD_CHART_TOP_N } from '@/constants/miner-leaderboard-cha import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; import type { MinerLeaderboardChartResponse, - MinerLeaderboardResponse + MinerLeaderboardResponse, + MinerLeaderboardStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; +import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; export const minerLeaderboard = { + useGetStats: ( + config?: Omit, 'variables'> + ) => { + const { startDate, endDate } = useGetRecentDateRange(); + + const GET_MINER_LEADERBOARD_STATS = gql` + query GetMinerLeaderboardStats( + $startDate: timestamptz! + $endDate: timestamptz! + ) { + chain: chain_stats_by_pk(id: "global") { + block_height + total_miners + } + last24Hour: miner_reward_aggregate( + where: { timestamp: { _gte: $startDate, _lte: $endDate } } + ) { + aggregate { + totalCount: count + } + } + } + `; + + return useQuery( + GET_MINER_LEADERBOARD_STATS, + { + ...config, + variables: { + startDate, + endDate + } + } + ); + }, + useGetChartData: ( config?: QueryHookOptions ) => { @@ -48,7 +86,7 @@ export const minerLeaderboard = { leaderboardEntries: account_stats( limit: $limit offset: $offset - order_by: { total_rewards: desc } + order_by: { total_mined_blocks: desc } where: { total_mined_blocks: { _gt: 0 } } ) { id @@ -57,6 +95,14 @@ export const minerLeaderboard = { } meta: chain_stats_by_pk(id: "global") { totalCount: total_miners + block_height + } + topMiner: account_stats( + limit: 1 + order_by: { total_mined_blocks: desc } + where: { total_mined_blocks: { _gt: 0 } } + ) { + total_mined_blocks } } `; diff --git a/src/api/miner-rewards.tsx b/src/api/miner-rewards.tsx index 294e8a5..897005d 100644 --- a/src/api/miner-rewards.tsx +++ b/src/api/miner-rewards.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Miner_Reward_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MinerRewardSorts } from '@/constants/query-sorts'; import type { MinerRewardListResponse, MinerRewardResponse, - MinerRewardsStatsResponse, - RecentMinerRewardsResponse + MinerRewardsStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -65,46 +63,6 @@ export const minerRewards = { } }); }, - useGetRecent: ( - config?: Omit, 'variables'> - ) => { - const GET_RECENT_MINER_REWARDS = gql` - query GetRecentMinerRewards( - $limit: Int - $offset: Int - $orderBy: [miner_reward_order_by!] - $where: miner_reward_bool_exp - ) { - minerRewards: miner_reward( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - block { - height - hash - } - reward - miner { - id - } - timestamp - } - } - `; - - return useQuery< - RecentMinerRewardsResponse, - PaginatedQueryVariables - >(GET_RECENT_MINER_REWARDS, { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT - } - }); - }, useGetStats: ( config?: Omit, 'variables'> ) => { diff --git a/src/api/multisig-created.tsx b/src/api/multisig-created.tsx index 52f9e79..c3321f3 100644 --- a/src/api/multisig-created.tsx +++ b/src/api/multisig-created.tsx @@ -3,13 +3,12 @@ import { gql, useQuery } from '@apollo/client'; import type { Multisig_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigCreatedSorts } from '@/constants/query-sorts'; import type { + MultisigByIdResponse, MultisigCreatedListResponse, MultisigCreatedResponse, - MultisigCreatedStatsResponse, - RecentMultisigCreatedResponse + MultisigCreatedStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -79,32 +78,6 @@ export const multisigCreated = { } }); }, - useGetRecent: ( - config?: Omit, 'variables'> - ) => { - const GET_RECENT_MULTISIG_CREATED = gql` - ${MULTISIG_CREATED_FIELDS} - query GetRecentMultisigCreated( - $limit: Int - $orderBy: [multisig_order_by!] - ) { - multisigCreatedEvents: multisig(limit: $limit, order_by: $orderBy) { - ...MultisigCreatedFields - } - } - `; - - return useQuery( - GET_RECENT_MULTISIG_CREATED, - { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT - } - } - ); - }, useGetStats: ( config?: Omit, 'variables'> ) => { @@ -158,5 +131,23 @@ export const multisigCreated = { variables: { hash } }) }; + }, + getById: () => { + const GET_MULTISIG_BY_ID = gql` + ${MULTISIG_CREATED_FIELDS} + query GetMultisigById($id: String!) { + multisig: multisig_by_pk(id: $id) { + ...MultisigCreatedFields + } + } + `; + + return { + useQuery: (id: string, config?: QueryHookOptions) => + useQuery(GET_MULTISIG_BY_ID, { + ...config, + variables: { id } + }) + }; } }; diff --git a/src/api/multisig-deposits-claimed.tsx b/src/api/multisig-deposits-claimed.tsx index 9ea9905..c5982f3 100644 --- a/src/api/multisig-deposits-claimed.tsx +++ b/src/api/multisig-deposits-claimed.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Multisig_Deposits_Claimed_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigDepositsClaimedSorts } from '@/constants/query-sorts'; import type { MultisigDepositsClaimedListResponse, MultisigDepositsClaimedResponse, - MultisigDepositsClaimedStatsResponse, - RecentMultisigDepositsClaimedResponse + MultisigDepositsClaimedStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -81,32 +79,6 @@ export const multisigDepositsClaimed = { } }); }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const QUERY = gql` - ${MULTISIG_DEPOSITS_CLAIMED_FIELDS} - query GetRecentMultisigDepositsClaimed( - $limit: Int - $orderBy: [multisig_deposits_claimed_order_by!] - ) { - multisigDepositsClaimedEvents: multisig_deposits_claimed( - limit: $limit - order_by: $orderBy - ) { - ...MultisigDepositsClaimedFields - } - } - `; - - return useQuery(QUERY, { - ...config, - variables: { orderBy: { timestamp: 'desc' }, limit: QUERY_RECENT_LIMIT } - }); - }, useGetStats: ( config?: Omit< QueryHookOptions, diff --git a/src/api/multisig-proposal-cancelled.tsx b/src/api/multisig-proposal-cancelled.tsx index a616b71..a1732d0 100644 --- a/src/api/multisig-proposal-cancelled.tsx +++ b/src/api/multisig-proposal-cancelled.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Cancelled_Multisig_Proposal_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigProposalCancelledSorts } from '@/constants/query-sorts'; import type { MultisigProposalCancelledListResponse, MultisigProposalCancelledResponse, - MultisigProposalCancelledStatsResponse, - RecentMultisigProposalCancelledResponse + MultisigProposalCancelledStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -85,32 +83,6 @@ export const multisigProposalCancelled = { } }); }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const QUERY = gql` - ${MULTISIG_PROPOSAL_CANCELLED_FIELDS} - query GetRecentMultisigProposalCancelled( - $limit: Int - $orderBy: [cancelled_multisig_proposal_order_by!] - ) { - multisigProposalCancelledEvents: cancelled_multisig_proposal( - limit: $limit - order_by: $orderBy - ) { - ...MultisigProposalCancelledFields - } - } - `; - - return useQuery(QUERY, { - ...config, - variables: { orderBy: { timestamp: 'desc' }, limit: QUERY_RECENT_LIMIT } - }); - }, useGetStats: ( config?: Omit< QueryHookOptions, diff --git a/src/api/multisig-proposal-created.tsx b/src/api/multisig-proposal-created.tsx index 8f66f9c..ea4544f 100644 --- a/src/api/multisig-proposal-created.tsx +++ b/src/api/multisig-proposal-created.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Multisig_Proposal_Created_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigProposalCreatedSorts } from '@/constants/query-sorts'; import type { MultisigProposalCreatedListResponse, MultisigProposalCreatedResponse, - MultisigProposalCreatedStatsResponse, - RecentMultisigProposalCreatedResponse + MultisigProposalCreatedStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -89,32 +87,6 @@ export const multisigProposalCreated = { } }); }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const QUERY = gql` - ${MULTISIG_PROPOSAL_CREATED_FIELDS} - query GetRecentMultisigProposalCreated( - $limit: Int - $orderBy: [multisig_proposal_created_order_by!] - ) { - multisigProposalCreatedEvents: multisig_proposal_created( - limit: $limit - order_by: $orderBy - ) { - ...MultisigProposalCreatedFields - } - } - `; - - return useQuery(QUERY, { - ...config, - variables: { orderBy: { timestamp: 'desc' }, limit: QUERY_RECENT_LIMIT } - }); - }, useGetStats: ( config?: Omit< QueryHookOptions, diff --git a/src/api/multisig-proposal-executed.tsx b/src/api/multisig-proposal-executed.tsx index 6577e1b..05c5087 100644 --- a/src/api/multisig-proposal-executed.tsx +++ b/src/api/multisig-proposal-executed.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Executed_Multisig_Proposal_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigProposalExecutedSorts } from '@/constants/query-sorts'; import type { MultisigProposalExecutedListResponse, MultisigProposalExecutedResponse, - MultisigProposalExecutedStatsResponse, - RecentMultisigProposalExecutedResponse + MultisigProposalExecutedStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -84,32 +82,6 @@ export const multisigProposalExecuted = { } }); }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const QUERY = gql` - ${MULTISIG_PROPOSAL_EXECUTED_FIELDS} - query GetRecentMultisigProposalExecuted( - $limit: Int - $orderBy: [executed_multisig_proposal_order_by!] - ) { - multisigProposalExecutedEvents: executed_multisig_proposal( - limit: $limit - order_by: $orderBy - ) { - ...MultisigProposalExecutedFields - } - } - `; - - return useQuery(QUERY, { - ...config, - variables: { orderBy: { timestamp: 'desc' }, limit: QUERY_RECENT_LIMIT } - }); - }, useGetStats: ( config?: Omit< QueryHookOptions, diff --git a/src/api/multisig-proposal-ready.tsx b/src/api/multisig-proposal-ready.tsx index 0155be9..ba6a2f9 100644 --- a/src/api/multisig-proposal-ready.tsx +++ b/src/api/multisig-proposal-ready.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Multisig_Proposal_Ready_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigProposalReadySorts } from '@/constants/query-sorts'; import type { MultisigProposalReadyListResponse, MultisigProposalReadyResponse, - MultisigProposalReadyStatsResponse, - RecentMultisigProposalReadyResponse + MultisigProposalReadyStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -83,32 +81,6 @@ export const multisigProposalReady = { } }); }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const QUERY = gql` - ${MULTISIG_PROPOSAL_READY_FIELDS} - query GetRecentMultisigProposalReady( - $limit: Int - $orderBy: [multisig_proposal_ready_order_by!] - ) { - multisigProposalReadyEvents: multisig_proposal_ready( - limit: $limit - order_by: $orderBy - ) { - ...MultisigProposalReadyFields - } - } - `; - - return useQuery(QUERY, { - ...config, - variables: { orderBy: { timestamp: 'desc' }, limit: QUERY_RECENT_LIMIT } - }); - }, useGetStats: ( config?: Omit< QueryHookOptions, diff --git a/src/api/multisig-proposal-removed.tsx b/src/api/multisig-proposal-removed.tsx index 59b43a3..b6a74ad 100644 --- a/src/api/multisig-proposal-removed.tsx +++ b/src/api/multisig-proposal-removed.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Removed_Multisig_Proposal_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigProposalRemovedSorts } from '@/constants/query-sorts'; import type { MultisigProposalRemovedListResponse, MultisigProposalRemovedResponse, - MultisigProposalRemovedStatsResponse, - RecentMultisigProposalRemovedResponse + MultisigProposalRemovedStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -85,32 +83,6 @@ export const multisigProposalRemoved = { } }); }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const QUERY = gql` - ${MULTISIG_PROPOSAL_REMOVED_FIELDS} - query GetRecentMultisigProposalRemoved( - $limit: Int - $orderBy: [removed_multisig_proposal_order_by!] - ) { - multisigProposalRemovedEvents: removed_multisig_proposal( - limit: $limit - order_by: $orderBy - ) { - ...MultisigProposalRemovedFields - } - } - `; - - return useQuery(QUERY, { - ...config, - variables: { orderBy: { timestamp: 'desc' }, limit: QUERY_RECENT_LIMIT } - }); - }, useGetStats: ( config?: Omit< QueryHookOptions, diff --git a/src/api/multisig-proposals.tsx b/src/api/multisig-proposals.tsx index bf3df7d..73c9ef0 100644 --- a/src/api/multisig-proposals.tsx +++ b/src/api/multisig-proposals.tsx @@ -18,6 +18,7 @@ const MULTISIG_PROPOSAL_LIST_FIELDS = gql` status deposit expiry_block + approvals created_at multisig { id diff --git a/src/api/multisig-signer-approved.tsx b/src/api/multisig-signer-approved.tsx index 7407d80..103c95e 100644 --- a/src/api/multisig-signer-approved.tsx +++ b/src/api/multisig-signer-approved.tsx @@ -3,13 +3,11 @@ import { gql, useQuery } from '@apollo/client'; import type { Multisig_Signer_Approved_Bool_Exp } from '@/__generated__/graphql'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; import type { MultisigSignerApprovedSorts } from '@/constants/query-sorts'; import type { MultisigSignerApprovedListResponse, MultisigSignerApprovedResponse, - MultisigSignerApprovedStatsResponse, - RecentMultisigSignerApprovedResponse + MultisigSignerApprovedStatsResponse } from '@/schemas'; import type { PaginatedQueryVariables } from '@/types/query'; import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; @@ -86,32 +84,6 @@ export const multisigSignerApproved = { } }); }, - useGetRecent: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const QUERY = gql` - ${MULTISIG_SIGNER_APPROVED_FIELDS} - query GetRecentMultisigSignerApproved( - $limit: Int - $orderBy: [multisig_signer_approved_order_by!] - ) { - multisigSignerApprovedEvents: multisig_signer_approved( - limit: $limit - order_by: $orderBy - ) { - ...MultisigSignerApprovedFields - } - } - `; - - return useQuery(QUERY, { - ...config, - variables: { orderBy: { timestamp: 'desc' }, limit: QUERY_RECENT_LIMIT } - }); - }, useGetStats: ( config?: Omit< QueryHookOptions, diff --git a/src/api/scheduled-reversible-transactions.tsx b/src/api/scheduled-reversible-transactions.tsx index 02f19ba..0ebdb8c 100644 --- a/src/api/scheduled-reversible-transactions.tsx +++ b/src/api/scheduled-reversible-transactions.tsx @@ -1,174 +1,9 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; -import type { Scheduled_Reversible_Transfer_Bool_Exp } 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 type { - RecentScheduledReversibleTransactionsResponse, - ScheduledReversibleTransactionListResponse, - ScheduledReversibleTransactionResponse, - ScheduledReversibleTransactionsStatsResponse -} from '@/schemas'; -import type { PaginatedQueryVariables } from '@/types/query'; -import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; +import type { ScheduledReversibleTransactionResponse } from '@/schemas'; export const scheduledReversibleTransactions = { - useGetAll: ( - config?: QueryHookOptions< - ScheduledReversibleTransactionListResponse, - PaginatedQueryVariables< - ScheduledReversibleTransactionSorts, - Scheduled_Reversible_Transfer_Bool_Exp - > - > - ) => { - const GET_SCHEDULED_REVERSIBLE_TRANSACTIONS = gql` - query GetScheduledReversibleTransactions( - $limit: Int - $offset: Int - $orderBy: [scheduled_reversible_transfer_order_by!] - $where: scheduled_reversible_transfer_bool_exp - ) { - scheduledReversibleTransactions: scheduled_reversible_transfer( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - meta: scheduled_reversible_transfer_aggregate(where: $where) { - aggregate { - totalCount: count - } - } - } - `; - - return useQuery< - ScheduledReversibleTransactionListResponse, - PaginatedQueryVariables< - ScheduledReversibleTransactionSorts, - Scheduled_Reversible_Transfer_Bool_Exp - > - >(GET_SCHEDULED_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: config?.variables?.orderBy ?? { 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: [scheduled_reversible_transfer_order_by!] - ) { - scheduledReversibleTransactions: scheduled_reversible_transfer( - limit: $limit - offset: $offset - order_by: $orderBy - ) { - extrinsic { - id - pallet - call - } - amount - timestamp - scheduled_at - tx_id - fee - block { - height - } - from { - id - } - to { - id - } - } - } - `; - - return useQuery< - RecentScheduledReversibleTransactionsResponse, - PaginatedQueryVariables - >(GET_RECENT_SCHEDULED_REVERSIBLE_TRANSACTIONS, { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT - } - }); - }, - useGetStats: ( - config?: Omit< - QueryHookOptions, - 'variables' - > - ) => { - const { startDate, endDate } = useGetRecentDateRange(); - - const GET_SCHEDULED_REVERSIBLE_TRANSACTIONS_STATS = gql` - query GetScheduledReversibleTransactionsStats( - $startDate: timestamptz! - $endDate: timestamptz! - ) { - last24Hour: scheduled_reversible_transfer_aggregate( - where: { timestamp: { _gte: $startDate, _lte: $endDate } } - ) { - aggregate { - totalCount: count - } - } - allTime: chain_stats_by_pk(id: "global") { - total_scheduled_transfers - } - } - `; - - return useQuery( - GET_SCHEDULED_REVERSIBLE_TRANSACTIONS_STATS, - { - ...config, - variables: { - startDate, - endDate - } - } - ); - }, getByTxId: () => { const QUERY = gql` query GetScheduledReversibleTransactionByTxId($tx_id: String!) { diff --git a/src/api/search.tsx b/src/api/search.tsx index 50ab27d..3d1f47d 100644 --- a/src/api/search.tsx +++ b/src/api/search.tsx @@ -28,38 +28,24 @@ export const search = (fetcher: DataFetcher) => ({ all: () => { const SEARCH_ALL = gql` query SearchAll($keyword: String, $keyword_number: Int, $limit: Int) { - transactions: transfer( + transactions: unified_transaction( limit: $limit - where: { extrinsic: { id: { _ilike: $keyword } } } - ) { - extrinsic { - id - pallet - call + where: { + _or: [ + { hash: { _ilike: $keyword } } + { detail_id: { _ilike: $keyword } } + { id: { _ilike: $keyword } } + ] } - } - scheduledReversibleTransactions: scheduled_reversible_transfer( - limit: $limit - where: { tx_id: { _ilike: $keyword } } ) { - extrinsic { - id - pallet - call + id + type + hash + detail_id + block { + height + hash } - tx_id - } - executedReversibleTransactions: executed_reversible_transfer( - limit: $limit - where: { tx_id: { _ilike: $keyword } } - ) { - tx_id - } - cancelledReversibleTransactions: cancelled_reversible_transfer( - limit: $limit - where: { tx_id: { _ilike: $keyword } } - ) { - tx_id } accounts: account(limit: $limit, where: { id: { _ilike: $keyword } }) { id @@ -85,20 +71,6 @@ export const search = (fetcher: DataFetcher) => ({ call } } - minerRewards: miner_reward( - limit: $limit - where: { block: { hash: { _ilike: $keyword } } } - ) { - block { - height - hash - } - reward - miner { - id - } - timestamp - } errorEvents: error_event( limit: $limit where: { diff --git a/src/api/transactions.tsx b/src/api/transactions.tsx index e3151bd..57e457c 100644 --- a/src/api/transactions.tsx +++ b/src/api/transactions.tsx @@ -1,48 +1,32 @@ import type { QueryHookOptions } from '@apollo/client'; import { gql, useQuery } from '@apollo/client'; -import type { Transfer_Bool_Exp } from '@/__generated__/graphql'; -import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; -import type { TransactionSorts } from '@/constants/query-sorts'; -import type { - ExtrinsicDetailResponse, - RecentTransactionsResponse, - TransactionListResponse, - TransactionsStatsResponse -} from '@/schemas'; -import type { PaginatedQueryVariables } from '@/types/query'; -import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; +import type { ExtrinsicDetailResponse } from '@/schemas'; export const transactions = { - useGetAll: ( - config?: QueryHookOptions< - TransactionListResponse, - PaginatedQueryVariables - > - ) => { - const GET_TRANSACTIONS = gql` - query GetTransactions( - $limit: Int - $offset: Int - $orderBy: [transfer_order_by!] - $where: transfer_bool_exp - ) { - transactions: transfer( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { + getByHash: () => { + const QUERY = gql` + query GetExtrinsicByHash($hash: String!) { + extrinsics: extrinsic(where: { id: { _eq: $hash } }) { + id + pallet + call + success fee - extrinsic { + timestamp + index_in_block + signer { id - pallet - call } block { height } + } + transfersByExtrinsic: transfer( + where: { extrinsic: { id: { _eq: $hash } } } + order_by: { timestamp: asc } + ) { + id amount timestamp from { @@ -51,58 +35,27 @@ export const transactions = { to { id } - } - meta: transfer_aggregate(where: $where) { - aggregate { - totalCount: count + block { + height } - } - } - `; - - return useQuery< - TransactionListResponse, - PaginatedQueryVariables - >(GET_TRANSACTIONS, { - ...config, - variables: { - orderBy: config?.variables?.orderBy ?? { timestamp: 'desc' }, - limit: config?.variables?.limit ?? QUERY_DEFAULT_LIMIT, - offset: config?.variables?.offset ?? 0, - where: { - _and: [ - { extrinsic_id: { _is_null: false } }, - { ...config?.variables?.where } - ] - } - } - }); - }, - useGetRecent: ( - config?: Omit, 'variables'> - ) => { - const GET_RECENT_TRANSACTIONS = gql` - query GetRecentTransactions( - $limit: Int - $offset: Int - $orderBy: [transfer_order_by!] - $where: transfer_bool_exp - ) { - transactions: transfer( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - fee extrinsic { id pallet call + success + fee + timestamp + index_in_block + signer { + id + } + block { + height + } } - block { - height - } + } + transfersById: transfer(where: { id: { _eq: $hash } }) { + id amount timestamp from { @@ -111,86 +64,23 @@ export const transactions = { to { id } - } - } - `; - - return useQuery< - RecentTransactionsResponse, - PaginatedQueryVariables - >(GET_RECENT_TRANSACTIONS, { - ...config, - variables: { - orderBy: { timestamp: 'desc' }, - limit: QUERY_RECENT_LIMIT, - where: { extrinsic_id: { _is_null: false } } - } - }); - }, - useGetStats: ( - config?: Omit, 'variables'> - ) => { - const { startDate, endDate } = useGetRecentDateRange(); - - const GET_TRANSACTIONS_STATS = gql` - query GetTransactionsStats( - $startDate: timestamptz! - $endDate: timestamptz! - ) { - last24Hour: transfer_aggregate( - where: { - timestamp: { _gte: $startDate, _lte: $endDate } - extrinsic_id: { _is_null: false } - } - ) { - aggregate { - totalCount: count - } - } - allTime: chain_stats_by_pk(id: "global") { - total_immediate_transfers - } - } - `; - - return useQuery(GET_TRANSACTIONS_STATS, { - ...config, - variables: { - startDate, - endDate - } - }); - }, - getByHash: () => { - const QUERY = gql` - query GetExtrinsicByHash($hash: String!) { - extrinsics: extrinsic(where: { id: { _eq: $hash } }) { - id - pallet - call - success - fee - timestamp - index_in_block - signer { - id - } block { height } - } - transfers: transfer( - where: { extrinsic: { id: { _eq: $hash } } } - order_by: { timestamp: asc } - ) { - id - amount - timestamp - from { - id - } - to { + extrinsic { id + pallet + call + success + fee + timestamp + index_in_block + signer { + id + } + block { + height + } } } } diff --git a/src/api/unified-transactions.tsx b/src/api/unified-transactions.tsx new file mode 100644 index 0000000..54423dc --- /dev/null +++ b/src/api/unified-transactions.tsx @@ -0,0 +1,173 @@ +import type { QueryHookOptions } from '@apollo/client'; +import { gql, useQuery } from '@apollo/client'; + +import type { Unified_Transaction_Bool_Exp } from '@/__generated__/graphql'; +import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; +import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit'; +import type { UnifiedListTransactionSorts } from '@/constants/query-sorts'; +import type { + RecentUnifiedListTransactionsResponse, + UnifiedListTransactionListResponse, + UnifiedListTransactionsStatsResponse +} from '@/schemas'; +import type { PaginatedQueryVariables } from '@/types/query'; +import { useGetRecentDateRange } from '@/utils/get-recent-date-range'; + +export const unifiedTransactions = { + useGetAll: ( + config?: QueryHookOptions< + UnifiedListTransactionListResponse, + PaginatedQueryVariables< + UnifiedListTransactionSorts, + Unified_Transaction_Bool_Exp + > + > + ) => { + const GET_UNIFIED_TRANSACTIONS = gql` + query GetUnifiedTransactions( + $limit: Int + $offset: Int + $orderBy: [unified_transaction_order_by!] + $where: unified_transaction_bool_exp + ) { + transactions: unified_transaction( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + type + hash + block { + height + hash + } + timestamp + amount + fee + status + detail_id + from { + id + } + to { + id + } + } + meta: unified_transaction_aggregate(where: $where) { + aggregate { + totalCount: count + } + } + } + `; + + return useQuery< + UnifiedListTransactionListResponse, + PaginatedQueryVariables< + UnifiedListTransactionSorts, + Unified_Transaction_Bool_Exp + > + >(GET_UNIFIED_TRANSACTIONS, { + ...config, + variables: { + orderBy: config?.variables?.orderBy ?? { 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_UNIFIED_TRANSACTIONS = gql` + query GetRecentUnifiedTransactions( + $limit: Int + $offset: Int + $orderBy: [unified_transaction_order_by!] + ) { + transactions: unified_transaction( + limit: $limit + offset: $offset + order_by: $orderBy + ) { + id + type + hash + block { + height + hash + } + timestamp + amount + fee + status + detail_id + from { + id + } + to { + id + } + } + } + `; + + return useQuery( + GET_RECENT_UNIFIED_TRANSACTIONS, + { + ...config, + variables: { + orderBy: { timestamp: 'desc' }, + limit: QUERY_RECENT_LIMIT + } + } + ); + }, + + useGetStats: ( + config?: Omit< + QueryHookOptions, + 'variables' + > + ) => { + const { startDate, endDate } = useGetRecentDateRange(); + + const GET_UNIFIED_TRANSACTIONS_STATS = gql` + query GetUnifiedTransactionsStats( + $startDate: timestamptz! + $endDate: timestamptz! + ) { + last24Hour: unified_transaction_aggregate( + where: { timestamp: { _gte: $startDate, _lte: $endDate } } + ) { + aggregate { + totalCount: count + } + } + allTime: unified_transaction_aggregate { + aggregate { + totalCount: count + } + } + } + `; + + return useQuery( + GET_UNIFIED_TRANSACTIONS_STATS, + { + ...config, + variables: { + startDate, + endDate + } + } + ); + } +}; diff --git a/src/api/wormhole.tsx b/src/api/wormhole.tsx index f02f19a..a4b1a05 100644 --- a/src/api/wormhole.tsx +++ b/src/api/wormhole.tsx @@ -1,50 +1,6 @@ import { gql, useQuery } from '@apollo/client'; -import type { Wormhole_Extrinsic_Bool_Exp } from '@/__generated__/graphql'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import { type WormholeExtrinsicSorts } from '@/constants/query-sorts'; -import type { - DepositPoolStatsResponse, - WormholeExtrinsicListResponse, - WormholeExtrinsicResponse -} from '@/schemas/wormhole'; -import type { PaginatedQueryVariables } from '@/types/query'; - -const GET_WORMHOLE_EXTRINSICS = gql` - query GetWormholeExtrinsics( - $limit: Int - $offset: Int - $orderBy: [wormhole_extrinsic_order_by!]! - $where: wormhole_extrinsic_bool_exp - ) { - wormholeExtrinsics: wormhole_extrinsic( - limit: $limit - offset: $offset - order_by: $orderBy - where: $where - ) { - id - extrinsic { - id - pallet - call - } - total_amount - output_count - timestamp - privacy_score - privacy_label - block { - height - } - } - meta: wormhole_extrinsic_aggregate(where: $where) { - aggregate { - totalCount: count - } - } - } -`; +import type { WormholeExtrinsicResponse } from '@/schemas/wormhole'; const GET_WORMHOLE_EXTRINSIC_BY_ID = gql` query GetWormholeExtrinsicById($id: String!) { @@ -87,40 +43,7 @@ const GET_WORMHOLE_EXTRINSIC_BY_ID = gql` } `; -const GET_DEPOSIT_POOL_STATS = gql` - query GetDepositPoolStats { - depositPoolStatsById: deposit_pool_stats_by_pk(id: "global") { - last_updated_block - buckets - } - } -`; - export const wormhole = { - useGetAll: (config?: { - pollInterval?: number; - variables?: PaginatedQueryVariables< - WormholeExtrinsicSorts, - Wormhole_Extrinsic_Bool_Exp - >; - }) => { - const { pollInterval = DATA_POOL_INTERVAL, variables = {} } = config ?? {}; - const { - orderBy = { timestamp: 'desc' }, - limit = 25, - offset = 0, - where - } = variables as PaginatedQueryVariables< - WormholeExtrinsicSorts, - Wormhole_Extrinsic_Bool_Exp - >; - - return useQuery(GET_WORMHOLE_EXTRINSICS, { - pollInterval, - variables: { orderBy: [orderBy], limit, offset, where } - }); - }, - getById: () => { return { useQuery: (id: string, config?: { pollInterval?: number }) => { @@ -135,12 +58,5 @@ export const wormhole = { ); } }; - }, - - useGetDepositPoolStats: (config?: { pollInterval?: number }) => { - const { pollInterval = DATA_POOL_INTERVAL } = config ?? {}; - return useQuery(GET_DEPOSIT_POOL_STATS, { - pollInterval - }); } }; diff --git a/src/components/common/status-page/StatusPage.tsx b/src/components/common/status-page/StatusPage.tsx new file mode 100644 index 0000000..4503903 --- /dev/null +++ b/src/components/common/status-page/StatusPage.tsx @@ -0,0 +1,115 @@ +import { Link } from '@tanstack/react-router'; +import type { ReactNode } from 'react'; + +import { Button } from '@/components/ui/button'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; +import { cn } from '@/lib/utils'; + +type StatusPageLink = { + label: string; + to: string; + variant?: 'default' | 'outline'; +}; + +type StatusPageButton = { + label: string; + onClick: () => void; + variant?: 'default' | 'outline'; +}; + +export type StatusPageAction = StatusPageLink | StatusPageButton; + +export interface StatusPageProps { + code: string; + eyebrow: string; + title: string; + description: string; + detail?: ReactNode; + actions: StatusPageAction[]; + codeClassName?: string; +} + +function isLinkAction(action: StatusPageAction): action is StatusPageLink { + return 'to' in action; +} + +export function StatusPage({ + code, + eyebrow, + title, + description, + detail, + actions, + codeClassName +}: StatusPageProps) { + return ( + + +
+

+ {eyebrow} +

+ +

+ {code} +

+ +
+

{title}

+

+ {description} +

+
+
+ + {detail ? ( +
+

+ Details +

+
+ {detail} +
+
+ ) : null} + +
+ {actions.map((action) => { + if (isLinkAction(action)) { + return ( + + ); + } + + return ( + + ); + })} +
+
+
+ ); +} diff --git a/src/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS.tsx deleted file mode 100644 index 94676ec..0000000 --- a/src/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { createColumnHelper } from '@tanstack/react-table'; - -import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; -import { RESOURCES } from '@/constants/resources'; -import type { AccountBeneficiary } from '@/schemas'; -import { formatMonetaryValue } from '@/utils/formatter'; - -const columnHelper = createColumnHelper(); - -export const ACCOUNT_BENEFICIARIES_COLUMNS = [ - columnHelper.accessor('who.id', { - id: 'id', - header: 'Identity', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('who.free', { - id: 'free', - header: 'Free', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }), - columnHelper.accessor('who.frozen', { - id: 'frozen', - header: 'Frozen', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }), - columnHelper.accessor('who.reserved', { - id: 'reserved', - header: 'Reserved', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }) -]; diff --git a/src/components/common/table-columns/ACCOUNT_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_COLUMNS.tsx index 744f8ea..c7c1730 100644 --- a/src/components/common/table-columns/ACCOUNT_COLUMNS.tsx +++ b/src/components/common/table-columns/ACCOUNT_COLUMNS.tsx @@ -1,5 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table'; +import { Badge } from '@/components/ui/badge'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { RESOURCES } from '@/constants/resources'; import type { Account } from '@/schemas'; @@ -7,18 +8,59 @@ import { formatMonetaryValue } from '@/utils/formatter'; const columnHelper = createColumnHelper(); +const getAccountFlags = (account: Account) => { + const events = account.flagEvents ?? []; + const isHighSec = events.some( + (event) => event.highSecuritySet?.who_id === account.id + ); + const isGuardian = events.some( + (event) => event.highSecuritySet?.guardian_id === account.id + ); + const isMultisig = events.some((event) => !!event.multisig_id); + + return { isHighSec, isGuardian, isMultisig }; +}; + export const ACCOUNT_COLUMNS = [ columnHelper.accessor('id', { id: 'id', - header: 'Identity', + header: 'Address', cell: (props) => ( ), enableSorting: false }), + columnHelper.display({ + id: 'flags', + header: 'Flags', + cell: (props) => { + const { isHighSec, isGuardian, isMultisig } = getAccountFlags( + props.row.original + ); + const hasFlags = isHighSec || isGuardian || isMultisig; + + if (!hasFlags) { + return ( + + Standard + + ); + } + + return ( +
+ {isHighSec && High Sec} + {isGuardian && Guardian} + {isMultisig && Multisig} +
+ ); + }, + enableSorting: false + }), columnHelper.accessor('free', { id: 'free', header: 'Free', diff --git a/src/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS.tsx deleted file mode 100644 index 454c0f6..0000000 --- a/src/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { createColumnHelper } from '@tanstack/react-table'; - -import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; -import { RESOURCES } from '@/constants/resources'; -import type { AccountGuardian } from '@/schemas'; -import { formatMonetaryValue } from '@/utils/formatter'; - -const columnHelper = createColumnHelper(); - -export const ACCOUNT_GUARDIAN_COLUMNS = [ - columnHelper.accessor('guardian.id', { - id: 'id', - header: 'Identity', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('guardian.free', { - id: 'free', - header: 'Free', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }), - columnHelper.accessor('guardian.frozen', { - id: 'frozen', - header: 'Frozen', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }), - columnHelper.accessor('guardian.reserved', { - id: 'reserved', - header: 'Reserved', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }) -]; diff --git a/src/components/common/table-columns/BLOCK_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_COLUMNS.tsx index f5b3e7b..458ee1a 100644 --- a/src/components/common/table-columns/BLOCK_COLUMNS.tsx +++ b/src/components/common/table-columns/BLOCK_COLUMNS.tsx @@ -4,7 +4,11 @@ import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWith import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { Block } from '@/schemas'; -import { formatMonetaryValue } from '@/utils/formatter'; +import { + formatBlockHeight, + formatMonetaryValue, + formatTxAddress +} from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -15,7 +19,8 @@ export const BLOCK_COLUMNS = [ cell: (props) => ( ), enableSorting: false @@ -23,29 +28,54 @@ export const BLOCK_COLUMNS = [ columnHelper.accessor('hash', { id: 'hash', header: 'Hash', - cell: (props) => ( - - ), + cell: (props) => { + const hash = props.getValue(); + return ( + + ); + }, enableSorting: false }), columnHelper.accessor((row) => row.extrinsics.length, { id: 'extrinsicsCount', - header: 'Extrinsics', - cell: (props) => props.getValue(), + header: 'Txs', + cell: (props) => ( + {props.getValue()} + ), enableSorting: true }), columnHelper.accessor('reward', { id: 'reward', header: 'Reward', - cell: (props) => formatMonetaryValue(props.getValue()), + cell: (props) => ( + {formatMonetaryValue(props.getValue())} + ), enableSorting: true }), + columnHelper.accessor('mined_by_id', { + id: 'miner', + header: 'Miner', + cell: (props) => { + const id = props.getValue(); + if (!id) return ; + return ( + + ); + }, + enableSorting: false + }), columnHelper.accessor('timestamp', { id: 'timestamp', - header: 'Timestamp', + header: 'Time', cell: (props) => , 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 deleted file mode 100644 index e5aec08..0000000 --- a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ /dev/null @@ -1,83 +0,0 @@ -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('tx_id', { - id: 'tx-id', - header: 'Tx ID', - 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/ERROR_EVENT_COLUMNS.tsx b/src/components/common/table-columns/ERROR_EVENT_COLUMNS.tsx index 3b7ec42..b0bcf7a 100644 --- a/src/components/common/table-columns/ERROR_EVENT_COLUMNS.tsx +++ b/src/components/common/table-columns/ERROR_EVENT_COLUMNS.tsx @@ -4,23 +4,23 @@ import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWith import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { ErrorEvent } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); export const ERROR_EVENT_COLUMNS = [ columnHelper.accessor('extrinsic.id', { id: 'extrinsicHash', - header: 'Extrinsic Hash', + header: 'Hash', cell: (props) => props.getValue() ? ( ) : ( - 'Is not available' + '-' ), enableSorting: false }), @@ -30,17 +30,12 @@ export const ERROR_EVENT_COLUMNS = [ cell: (props) => ( ), enableSorting: true }), - columnHelper.accessor('timestamp', { - id: 'timestamp', - header: 'Timestamp', - cell: (props) => , - enableSorting: true - }), + columnHelper.accessor('error_type', { id: 'errorType', header: 'Type', @@ -52,5 +47,11 @@ export const ERROR_EVENT_COLUMNS = [ header: 'Name', cell: (props) => props.getValue() ?? '-', enableSorting: true + }), + columnHelper.accessor('timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + 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 deleted file mode 100644 index 697a4a2..0000000 --- a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ /dev/null @@ -1,71 +0,0 @@ -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('tx_id', { - id: 'tx-id', - header: 'Tx ID', - 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/EXTRINSIC_COLUMNS.tsx b/src/components/common/table-columns/EXTRINSIC_COLUMNS.tsx index 0f92961..34723a1 100644 --- a/src/components/common/table-columns/EXTRINSIC_COLUMNS.tsx +++ b/src/components/common/table-columns/EXTRINSIC_COLUMNS.tsx @@ -1,12 +1,12 @@ import { createColumnHelper } from '@tanstack/react-table'; +import { Badge } from '@/components/ui/badge'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; -import { cn } from '@/lib/utils'; import type { BlockExtrinsic } from '@/schemas/blocks'; -import { getExtrinsicDetailPath } from '@/utils/get-extrinsic-detail-path'; import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; +import { getExtrinsicDetailPath } from '@/utils/get-extrinsic-detail-path'; const columnHelper = createColumnHelper(); @@ -23,7 +23,7 @@ export const createExtrinsicColumns = () => { // Extrinsic Hash column columnHelper.accessor('id', { id: 'extrinsic', - header: 'Extrinsic', + header: 'Hash', cell: (props) => { const hash = props.getValue(); const { pallet, call } = props.row.original; @@ -97,16 +97,9 @@ export const createExtrinsicColumns = () => { cell: (props) => { const success = props.getValue(); return ( - + {success ? 'Success' : 'Failed'} - + ); }, enableSorting: false diff --git a/src/components/common/table-columns/EXTRINSIC_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/EXTRINSIC_TRANSACTION_COLUMNS.tsx index 523f863..7f63b47 100644 --- a/src/components/common/table-columns/EXTRINSIC_TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/EXTRINSIC_TRANSACTION_COLUMNS.tsx @@ -3,7 +3,7 @@ import { createColumnHelper } from '@tanstack/react-table'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { RESOURCES } from '@/constants/resources'; import type { ExtrinsicTransfer } from '@/schemas'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; +import { formatMonetaryValue } from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -17,7 +17,8 @@ export const EXTRINSIC_TRANSACTION_COLUMNS = [ return ( ); @@ -33,7 +34,8 @@ export const EXTRINSIC_TRANSACTION_COLUMNS = [ return ( ); diff --git a/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx b/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx index 98bf015..93b1222 100644 --- a/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx +++ b/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx @@ -4,7 +4,11 @@ import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWith import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { HighSecuritySet } from '@/schemas'; -import { formatDuration, formatTxAddress } from '@/utils/formatter'; +import { + formatBlockHeight, + formatDuration, + formatTxAddress +} from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -20,7 +24,7 @@ export const HIGH_SECURITY_SET_COLUMNS = [ textCopy={props.getValue() ?? ''} /> ) : ( - 'Is not available' + ), enableSorting: false }), @@ -30,7 +34,7 @@ export const HIGH_SECURITY_SET_COLUMNS = [ cell: (props) => ( ), enableSorting: true diff --git a/src/components/common/table-columns/MINER_LEADERBOARD_COLUMNS.tsx b/src/components/common/table-columns/MINER_LEADERBOARD_COLUMNS.tsx index 14c988a..def0088 100644 --- a/src/components/common/table-columns/MINER_LEADERBOARD_COLUMNS.tsx +++ b/src/components/common/table-columns/MINER_LEADERBOARD_COLUMNS.tsx @@ -1,21 +1,65 @@ import { createColumnHelper } from '@tanstack/react-table'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { + MINER_DISTRIBUTION_COLORS, + MINER_DISTRIBUTION_OTHERS_COLOR +} from '@/constants/miner-leaderboard-chart'; import { RESOURCES } from '@/constants/resources'; +import { cn } from '@/lib/utils'; import type { MinerStats } from '@/schemas'; import { formatMonetaryValue } from '@/utils/formatter'; const columnHelper = createColumnHelper(); -export const MINER_LEADERBOARD_COLUMNS = [ +const getRankClassName = (rank: number) => { + switch (rank) { + case 1: + return 'text-flare'; + case 2: + return 'text-rank-2'; + case 3: + return 'text-rank-3'; + default: + return 'text-muted-text'; + } +}; + +const getShareColor = (rank: number) => { + if (rank >= 1 && rank <= MINER_DISTRIBUTION_COLORS.length) { + return ( + MINER_DISTRIBUTION_COLORS[rank - 1] ?? MINER_DISTRIBUTION_OTHERS_COLOR + ); + } + return 'var(--border-strong)'; +}; + +export type MinerLeaderboardColumnsOptions = { + totalBlocks: number; + maxSharePct: number; +}; + +export const getMinerLeaderboardColumns = ({ + totalBlocks, + maxSharePct +}: MinerLeaderboardColumnsOptions) => [ columnHelper.display({ id: 'rank', header: 'Rank', cell: ({ row: { index }, table: { getState } }) => { const { pageIndex, pageSize } = getState().pagination; - const properIndex = pageIndex * pageSize + (index + 1); + const rank = pageIndex * pageSize + (index + 1); - return
{properIndex}
; + return ( +
+ #{rank} +
+ ); }, enableSorting: false, meta: { @@ -31,20 +75,57 @@ export const MINER_LEADERBOARD_COLUMNS = [ ), enableSorting: false }), columnHelper.accessor('total_mined_blocks', { id: 'total_mined_blocks', - header: 'Mined Blocks', - cell: (props) => props.getValue(), + header: 'Blocks Mined', + cell: (props) => ( + + {(props.getValue() ?? 0).toLocaleString()} + + ), + enableSorting: false + }), + columnHelper.display({ + id: 'share', + header: 'Share', + cell: ({ row: { index, original }, table: { getState } }) => { + const { pageIndex, pageSize } = getState().pagination; + const rank = pageIndex * pageSize + (index + 1); + const blocks = original.total_mined_blocks ?? 0; + const pct = totalBlocks > 0 ? (blocks / totalBlocks) * 100 : 0; + const barWidth = + maxSharePct > 0 ? Math.min(100, (pct / maxSharePct) * 100) : 0; + + return ( +
+
+
+
+ {pct.toFixed(1)}% +
+ ); + }, enableSorting: false }), columnHelper.accessor('total_rewards', { id: 'total_rewards', header: 'Total Rewards', - cell: (props) => formatMonetaryValue(props.getValue(), 5), + cell: (props) => ( + + {formatMonetaryValue(props.getValue(), 5)} + + ), enableSorting: false }) ]; diff --git a/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx b/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx index b48fc21..6853022 100644 --- a/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx +++ b/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx @@ -4,7 +4,11 @@ import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWith import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MinerReward } from '@/schemas'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; +import { + formatBlockHeight, + formatMonetaryValue, + formatTxAddress +} from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -26,7 +30,7 @@ export const MINER_REWARD_COLUMNS = [ cell: (props) => ( ), enableSorting: true diff --git a/src/components/common/table-columns/MULTISIG_CREATED_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_CREATED_COLUMNS.tsx index 4faaa8b..5d430a3 100644 --- a/src/components/common/table-columns/MULTISIG_CREATED_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_CREATED_COLUMNS.tsx @@ -4,14 +4,32 @@ import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWith import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigCreated } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; const columnHelper = createColumnHelper(); export const MULTISIG_CREATED_COLUMNS = [ + columnHelper.accessor('id', { + id: 'wallet', + header: 'Wallet', + cell: (props) => { + const walletId = props.getValue(); + return walletId ? ( + + ) : ( + '-' + ); + }, + enableSorting: false + }), columnHelper.accessor('extrinsic.id', { id: 'extrinsicHash', - header: 'Extrinsic Hash', + header: 'Hash', cell: (props) => { const extrinsicId = props.getValue(); return extrinsicId ? ( @@ -32,7 +50,7 @@ export const MULTISIG_CREATED_COLUMNS = [ cell: (props) => ( ), enableSorting: true @@ -70,7 +88,7 @@ export const MULTISIG_CREATED_COLUMNS = [ }), columnHelper.accessor('timestamp', { id: 'timestamp', - header: 'Timestamp', + header: 'Created', cell: (props) => , enableSorting: true }) diff --git a/src/components/common/table-columns/MULTISIG_DEPOSITS_CLAIMED_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_DEPOSITS_CLAIMED_COLUMNS.tsx index c281285..17e6699 100644 --- a/src/components/common/table-columns/MULTISIG_DEPOSITS_CLAIMED_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_DEPOSITS_CLAIMED_COLUMNS.tsx @@ -4,7 +4,12 @@ import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWith import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigDepositsClaimed } from '@/schemas'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; +import { + formatBlockHeight, + formatMonetaryValue, + formatTxAddress +} from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; const columnHelper = createColumnHelper(); @@ -32,7 +37,7 @@ export const MULTISIG_DEPOSITS_CLAIMED_COLUMNS = [ cell: (props) => ( ), enableSorting: true @@ -43,7 +48,7 @@ export const MULTISIG_DEPOSITS_CLAIMED_COLUMNS = [ cell: (props) => props.getValue() ? ( diff --git a/src/components/common/table-columns/MULTISIG_PROPOSAL_CANCELLED_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_PROPOSAL_CANCELLED_COLUMNS.tsx index fad7d85..4539159 100644 --- a/src/components/common/table-columns/MULTISIG_PROPOSAL_CANCELLED_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_PROPOSAL_CANCELLED_COLUMNS.tsx @@ -5,7 +5,7 @@ import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/Prop import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalCancelled } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -33,7 +33,7 @@ export const MULTISIG_PROPOSAL_CANCELLED_COLUMNS = [ cell: (props) => ( ), enableSorting: true diff --git a/src/components/common/table-columns/MULTISIG_PROPOSAL_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_PROPOSAL_COLUMNS.tsx index 8b4949b..af4405f 100644 --- a/src/components/common/table-columns/MULTISIG_PROPOSAL_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_PROPOSAL_COLUMNS.tsx @@ -1,18 +1,43 @@ import { createColumnHelper } from '@tanstack/react-table'; +import { Badge, type BadgeProps } from '@/components/ui/badge'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposal } from '@/schemas'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; +import { + formatBlockHeight, + formatMonetaryValue, + formatTxAddress +} from '@/utils/formatter'; import { getMultisigProposalHref } from '@/utils/get-multisig-proposal-href'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; const columnHelper = createColumnHelper(); +const statusBadgeVariant = ( + status: string | null | undefined +): BadgeProps['variant'] => { + switch (status?.toUpperCase()) { + case 'SCHEDULED': + return 'reversible'; + case 'APPROVED': + case 'READY': + return 'immediate'; + case 'EXECUTED': + return 'success'; + case 'CANCELLED': + case 'REMOVED': + return 'error'; + default: + return 'miner'; + } +}; + export const MULTISIG_PROPOSAL_COLUMNS = [ columnHelper.accessor('id', { id: 'id', - header: 'ID', + header: 'Proposal ID', cell: (props) => { const proposal = props.row.original; const id = props.getValue(); @@ -29,16 +54,20 @@ export const MULTISIG_PROPOSAL_COLUMNS = [ columnHelper.accessor('status', { id: 'status', header: 'Status', - cell: (props) => props.getValue() ?? '-', + cell: (props) => { + const status = props.getValue(); + if (!status) return '-'; + return {status}; + }, enableSorting: true }), columnHelper.accessor('multisig.id', { id: 'multisig', - header: 'Multisig', + header: 'Wallet', cell: (props) => props.getValue() ? ( @@ -62,6 +91,16 @@ export const MULTISIG_PROPOSAL_COLUMNS = [ ), enableSorting: false }), + columnHelper.accessor('approvals', { + id: 'approvals', + header: 'Approvers', + cell: (props) => { + const approvals = props.getValue(); + if (!approvals?.length) return '0 approvers'; + return `${approvals.length} approver${approvals.length === 1 ? '' : 's'}`; + }, + enableSorting: false + }), columnHelper.accessor('deposit', { id: 'deposit', header: 'Deposit', @@ -74,14 +113,14 @@ export const MULTISIG_PROPOSAL_COLUMNS = [ cell: (props) => ( ), enableSorting: true }), columnHelper.accessor('created_at', { id: 'created_at', - header: 'Created At', + header: 'Created', cell: (props) => , enableSorting: true }) diff --git a/src/components/common/table-columns/MULTISIG_PROPOSAL_CREATED_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_PROPOSAL_CREATED_COLUMNS.tsx index aa2baa0..e8d0387 100644 --- a/src/components/common/table-columns/MULTISIG_PROPOSAL_CREATED_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_PROPOSAL_CREATED_COLUMNS.tsx @@ -5,7 +5,8 @@ import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/Prop import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalCreated } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; const columnHelper = createColumnHelper(); @@ -33,7 +34,7 @@ export const MULTISIG_PROPOSAL_CREATED_COLUMNS = [ cell: (props) => ( ), enableSorting: true @@ -51,7 +52,7 @@ export const MULTISIG_PROPOSAL_CREATED_COLUMNS = [ cell: (props) => props.getValue() ? ( diff --git a/src/components/common/table-columns/MULTISIG_PROPOSAL_EXECUTED_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_PROPOSAL_EXECUTED_COLUMNS.tsx index e5b1d07..7238512 100644 --- a/src/components/common/table-columns/MULTISIG_PROPOSAL_EXECUTED_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_PROPOSAL_EXECUTED_COLUMNS.tsx @@ -5,7 +5,7 @@ import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/Prop import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalExecuted } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -33,7 +33,7 @@ export const MULTISIG_PROPOSAL_EXECUTED_COLUMNS = [ cell: (props) => ( ), enableSorting: true diff --git a/src/components/common/table-columns/MULTISIG_PROPOSAL_READY_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_PROPOSAL_READY_COLUMNS.tsx index c251b78..a66360b 100644 --- a/src/components/common/table-columns/MULTISIG_PROPOSAL_READY_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_PROPOSAL_READY_COLUMNS.tsx @@ -5,7 +5,7 @@ import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/Prop import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalReady } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -33,7 +33,7 @@ export const MULTISIG_PROPOSAL_READY_COLUMNS = [ cell: (props) => ( ), enableSorting: true diff --git a/src/components/common/table-columns/MULTISIG_PROPOSAL_REMOVED_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_PROPOSAL_REMOVED_COLUMNS.tsx index 05b4ba4..918a9cd 100644 --- a/src/components/common/table-columns/MULTISIG_PROPOSAL_REMOVED_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_PROPOSAL_REMOVED_COLUMNS.tsx @@ -5,7 +5,7 @@ import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/Prop import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalRemoved } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -33,7 +33,7 @@ export const MULTISIG_PROPOSAL_REMOVED_COLUMNS = [ cell: (props) => ( ), enableSorting: true @@ -41,7 +41,9 @@ export const MULTISIG_PROPOSAL_REMOVED_COLUMNS = [ columnHelper.accessor('proposal.id', { id: 'proposal', header: 'Proposal', - cell: (props) => , + cell: (props) => ( + + ), enableSorting: false }), columnHelper.accessor('removedBy.id', { diff --git a/src/components/common/table-columns/MULTISIG_SIGNER_APPROVED_COLUMNS.tsx b/src/components/common/table-columns/MULTISIG_SIGNER_APPROVED_COLUMNS.tsx index 361ec06..eeabe41 100644 --- a/src/components/common/table-columns/MULTISIG_SIGNER_APPROVED_COLUMNS.tsx +++ b/src/components/common/table-columns/MULTISIG_SIGNER_APPROVED_COLUMNS.tsx @@ -5,7 +5,7 @@ import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/Prop import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigSignerApproved } from '@/schemas'; -import { formatTxAddress } from '@/utils/formatter'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -33,7 +33,7 @@ export const MULTISIG_SIGNER_APPROVED_COLUMNS = [ cell: (props) => ( ), enableSorting: true @@ -62,7 +62,9 @@ export const MULTISIG_SIGNER_APPROVED_COLUMNS = [ columnHelper.accessor('proposal.id', { id: 'proposal', header: 'Proposal', - cell: (props) => , + cell: (props) => ( + + ), enableSorting: false }), columnHelper.accessor('timestamp', { diff --git a/src/components/common/table-columns/RECENT_BLOCK_COLUMNS.tsx b/src/components/common/table-columns/RECENT_BLOCK_COLUMNS.tsx new file mode 100644 index 0000000..560a1f1 --- /dev/null +++ b/src/components/common/table-columns/RECENT_BLOCK_COLUMNS.tsx @@ -0,0 +1,46 @@ +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 { Block } from '@/schemas'; +import { formatBlockHeight, formatTxAddress } from '@/utils/formatter'; + +const columnHelper = createColumnHelper(); + +export const RECENT_BLOCK_COLUMNS = [ + columnHelper.accessor('height', { + id: 'height', + header: 'Height', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor('hash', { + id: 'hash', + header: 'Hash', + cell: (props) => ( + + ), + enableSorting: false + }), + columnHelper.accessor((row) => row.extrinsics.length, { + id: 'Txs', + header: 'Txs', + cell: (props) => props.getValue(), + enableSorting: true + }), + columnHelper.accessor('timestamp', { + id: 'timestamp', + header: 'Timestamp', + cell: (props) => , + enableSorting: true + }) +]; diff --git a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx deleted file mode 100644 index 54c06c1..0000000 --- a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx +++ /dev/null @@ -1,77 +0,0 @@ -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 { ScheduledReversibleTransaction } from '@/schemas'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; - -const columnHelper = createColumnHelper(); - -export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [ - columnHelper.accessor('tx_id', { - id: 'tx-id', - header: 'Tx ID', - 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('scheduled_at', { - id: 'scheduled_at', - header: 'Scheduled At', - cell: (props) => , - enableSorting: true - }), - columnHelper.accessor('from.id', { - id: 'from', - header: 'From', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('to.id', { - id: 'to', - header: 'To', - cell: (props) => ( - - ), - enableSorting: false - }), - columnHelper.accessor('amount', { - id: 'amount', - header: 'Amount', - cell: (props) => formatMonetaryValue(props.getValue(), 5), - enableSorting: true - }) -]; diff --git a/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx index dc556ae..49de46f 100644 --- a/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx +++ b/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx @@ -5,7 +5,11 @@ import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { Transaction } from '@/schemas'; import { getExtrinsicDetailPath } from '@/utils/get-extrinsic-detail-path'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; +import { + formatBlockHeight, + formatMonetaryValue, + formatTxAddress +} from '@/utils/formatter'; const columnHelper = createColumnHelper(); @@ -41,7 +45,7 @@ export const TRANSACTION_COLUMNS = [ cell: (props) => ( ), enableSorting: true diff --git a/src/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS.tsx new file mode 100644 index 0000000..6a6eb0c --- /dev/null +++ b/src/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS.tsx @@ -0,0 +1,189 @@ +import { createColumnHelper } from '@tanstack/react-table'; +import type { VariantProps } from 'class-variance-authority'; + +import { Badge, type badgeVariants } from '@/components/ui/badge'; +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; +import { RESOURCES } from '@/constants/resources'; +import type { + UnifiedListTransaction, + UnifiedListTransactionStatus +} from '@/schemas'; +import { + formatBlockHeight, + formatMonetaryValue, + formatTxAddress +} from '@/utils/formatter'; +import { getUnifiedTransactionDetailPath } from '@/utils/get-unified-transaction-detail-path'; + +type BadgeVariant = NonNullable['variant']>; + +const STATUS_BADGE: Record< + UnifiedListTransactionStatus, + { label: string; variant: BadgeVariant } +> = { + SUCCESS: { label: 'Success', variant: 'success' }, + ERROR: { label: 'Error', variant: 'error' }, + SCHEDULED: { label: 'Scheduled', variant: 'reversible' }, + EXECUTED: { label: 'Executed', variant: 'success' }, + CANCELLED: { label: 'Cancelled', variant: 'error' } +}; + +const columnHelper = createColumnHelper(); + +export const UNIFIED_LIST_TRANSACTION_COLUMNS = [ + columnHelper.accessor((row) => row.hash ?? row.detail_id, { + id: 'hash', + header: 'Hash / ID', + cell: (props) => { + const row = props.row.original; + const display = row.hash ?? row.detail_id; + return ( + + ); + }, + enableSorting: false + }), + columnHelper.accessor('block.height', { + id: 'block_height', + header: 'Block', + cell: (props) => ( + + ), + enableSorting: true + }), + columnHelper.accessor('timestamp', { + id: 'timestamp', + header: 'Time', + cell: (props) => , + enableSorting: true + }), + columnHelper.accessor((row) => row.from?.id, { + id: 'from', + header: 'From', + cell: (props) => { + const id = props.getValue(); + if (!id) return ; + return ( + + ); + }, + enableSorting: false + }), + columnHelper.accessor((row) => row.to?.id, { + id: 'to', + header: 'To', + cell: (props) => { + const id = props.getValue(); + if (!id) return ; + return ( + + ); + }, + enableSorting: false + }), + columnHelper.accessor('amount', { + id: 'amount', + header: 'Amount', + cell: (props) => { + const value = props.getValue(); + if (value == null) + return ; + return {formatMonetaryValue(value, 5)}; + }, + enableSorting: true + }), + columnHelper.accessor('fee', { + id: 'fee', + header: 'Fee', + cell: (props) => { + const value = props.getValue(); + if (value == null) + return ; + return ( + + {formatMonetaryValue(value, 5)} + + ); + }, + enableSorting: true + }), + columnHelper.accessor('status', { + id: 'status', + header: 'Status', + cell: (props) => { + const status = props.getValue(); + const config = STATUS_BADGE[status] ?? { + label: status, + variant: 'miner' as const + }; + return {config.label}; + }, + enableSorting: false + }) +]; + +/** Compact columns for landing recent transactions */ +export const RECENT_UNIFIED_LIST_TRANSACTION_COLUMNS = [ + columnHelper.accessor((row) => row.hash ?? row.detail_id, { + id: 'hash', + header: 'Hash / ID', + cell: (props) => { + const row = props.row.original; + const display = row.hash ?? row.detail_id; + return ( + + ); + }, + enableSorting: false + }), + columnHelper.accessor('amount', { + id: 'amount', + header: 'Amount', + cell: (props) => { + const value = props.getValue(); + if (value == null) + return ; + return {formatMonetaryValue(value, 5)}; + }, + enableSorting: false + }), + columnHelper.accessor('timestamp', { + id: 'timestamp', + header: 'Time', + cell: (props) => , + enableSorting: false + }) +]; diff --git a/src/components/common/table-columns/UNIFIED_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/UNIFIED_TRANSACTION_COLUMNS.tsx deleted file mode 100644 index 64979fc..0000000 --- a/src/components/common/table-columns/UNIFIED_TRANSACTION_COLUMNS.tsx +++ /dev/null @@ -1,494 +0,0 @@ -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 { TRANSACTION_TYPE_CONFIG } from '@/constants/transaction-types'; -import { cn } from '@/lib/utils'; -import type { UnifiedTransaction } from '@/schemas/unified-transaction'; -import { - formatDuration, - formatMonetaryValue, - formatTxAddress -} from '@/utils/formatter'; -import { getMultisigProposalHref } from '@/utils/get-multisig-proposal-href'; - -const columnHelper = createColumnHelper(); - -export interface UnifiedTransactionColumnsOptions { - showBlockColumn?: boolean; -} - -export const createUnifiedTransactionColumns = ( - options: UnifiedTransactionColumnsOptions = {} -) => { - const { showBlockColumn = true } = options; - - const columns = [ - // Type column - columnHelper.accessor('type', { - id: 'type', - header: 'Type', - cell: (props) => { - const type = props.getValue(); - const config = TRANSACTION_TYPE_CONFIG[type] ?? { - label: type, - className: 'bg-gray-100 text-gray-800' - }; - return ( - - {config.label} - - ); - }, - enableSorting: false - }), - - // Extrinsic column - columnHelper.accessor('extrinsic', { - id: 'extrinsic', - header: 'Extrinsic', - cell: (props) => { - const extrinsic = props.getValue(); - const row = props.row.original; - - // Determine link target and display text based on type - let href = ''; - let displayText = '-'; - const extrinsicId = extrinsic?.id; - - if (row.type === 'immediate' && extrinsicId) { - href = `${RESOURCES.transactions}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'scheduled-reversible' && row.id) { - href = `${RESOURCES.scheduledReversibleTransactions}/${row.id}`; - displayText = formatTxAddress(row.id); - } else if (row.type === 'executed-reversible' && row.id) { - href = `${RESOURCES.executedReversibleTransactions}/${row.id}`; - displayText = formatTxAddress(row.id); - } else if (row.type === 'cancelled-reversible' && row.id) { - href = `${RESOURCES.cancelledReversibleTransactions}/${row.id}`; - displayText = formatTxAddress(row.id); - } else if (row.type === 'miner-reward' && row.block) { - href = `${RESOURCES.blocks}/${row.block.height}`; - displayText = `Block #${row.block.height}`; - } else if (row.type === 'high-security') { - if (extrinsicId) { - href = `${RESOURCES.highSecuritySets}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.block) { - href = `${RESOURCES.highSecuritySets}`; - displayText = `Block #${row.block.height}`; - } - } else if (row.type === 'wormhole') { - href = `${RESOURCES.wormhole}/${row.id}`; - displayText = extrinsicId - ? formatTxAddress(extrinsicId) - : formatTxAddress(row.id); - } else if (row.type === 'error' && extrinsicId) { - href = `${RESOURCES.errors}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-created' && extrinsicId) { - href = `${RESOURCES.multisigCreated}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-proposal-created' && extrinsicId) { - href = `${RESOURCES.multisigProposalCreated}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-signer-approved' && extrinsicId) { - href = `${RESOURCES.multisigSignerApproved}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-proposal-ready' && extrinsicId) { - href = `${RESOURCES.multisigProposalReady}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-proposal-executed' && extrinsicId) { - href = `${RESOURCES.multisigProposalExecuted}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-proposal-cancelled' && extrinsicId) { - href = `${RESOURCES.multisigProposalCancelled}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-proposal-removed' && extrinsicId) { - href = `${RESOURCES.multisigProposalRemoved}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } else if (row.type === 'multisig-deposits-claimed' && extrinsicId) { - href = `${RESOURCES.multisigDepositsClaimed}/${extrinsicId}`; - displayText = formatTxAddress(extrinsicId); - } - - if (!href) { - return -; - } - - return ( - - ); - }, - enableSorting: false - }), - - // Timestamp column - columnHelper.accessor('timestamp', { - id: 'timestamp', - header: 'Timestamp', - cell: (props) => { - const timestamp = props.getValue(); - if (!timestamp) return -; - return ; - }, - enableSorting: true - }), - - // Details column (parties, error info, etc.) - columnHelper.display({ - id: 'details', - header: 'Details', - cell: (props) => { - const row = props.row.original; - - // For transfers (immediate/reversible) - if ( - [ - 'immediate', - 'scheduled-reversible', - 'executed-reversible', - 'cancelled-reversible' - ].includes(row.type) - ) { - return ( -
- {row.from && ( -
- From: - -
- )} - {row.to && ( -
- To: - -
- )} -
- ); - } - - // For miner rewards - if (row.type === 'miner-reward' && row.miner) { - return ( -
- Miner: - -
- ); - } - - // For high security sets - if (row.type === 'high-security') { - return ( -
- {row.who && ( -
- Beneficiary: - -
- )} - {row.guardian && ( -
- Guardian: - -
- )} -
- ); - } - - // For wormhole - show outputs - if (row.type === 'wormhole' && row.outputs && row.outputs.length > 0) { - return ( -
- {row.outputs.slice(0, 2).map((output, idx) => ( -
- Exit: - -
- ))} - {row.outputs.length > 2 && ( - - +{row.outputs.length - 2} more - - )} -
- ); - } - - // For error events - if (row.type === 'error') { - return ( -
- {row.errorType && ( -
- Type: - {row.errorType} -
- )} - {row.errorName && ( -
- Name: - {row.errorName} -
- )} -
- ); - } - - if (row.type === 'multisig-created') { - return ( -
- {row.creator && ( -
- Creator: - -
- )} - {row.threshold != null && ( -
- Threshold: - {row.threshold} -
- )} -
- ); - } - - if ( - [ - 'multisig-proposal-created', - 'multisig-signer-approved', - 'multisig-proposal-ready', - 'multisig-proposal-executed', - 'multisig-proposal-cancelled', - 'multisig-proposal-removed' - ].includes(row.type) - ) { - return ( -
- {row.proposalId && ( -
- Proposal: - {(() => { - const href = getMultisigProposalHref({ - id: row.proposalId - }); - const text = formatTxAddress(row.proposalId); - return href ? ( - - ) : ( - {text} - ); - })()} -
- )} - {row.multisig && ( -
- Multisig: - -
- )} - {row.approver && ( -
- Approver: - -
- )} - {row.cancelledBy && ( -
- Cancelled by: - -
- )} - {row.removedBy && ( -
- Removed by: - -
- )} - {row.approvalsCount != null && ( -
- Approvals: - {row.approvalsCount} -
- )} - {row.result && ( -
- Result: - {row.result} -
- )} -
- ); - } - - if (row.type === 'multisig-deposits-claimed') { - return ( -
- {row.claimer && ( -
- Claimer: - -
- )} - {row.multisig && ( -
- Multisig: - -
- )} -
- ); - } - - return -; - } - }), - - // Amount column - columnHelper.display({ - id: 'amount', - header: 'Amount', - cell: (props) => { - const row = props.row.original; - - // For transfers - if ( - [ - 'immediate', - 'scheduled-reversible', - 'executed-reversible', - 'cancelled-reversible' - ].includes(row.type) && - row.amount !== undefined - ) { - return formatMonetaryValue(BigInt(row.amount), 5); - } - - // For miner rewards - if (row.type === 'miner-reward' && row.reward !== undefined) { - return formatMonetaryValue(row.reward, 5); - } - - // For wormhole - if (row.type === 'wormhole' && row.totalAmount !== undefined) { - return formatMonetaryValue(row.totalAmount, 5); - } - - // For high security sets - show delay - if (row.type === 'high-security' && row.delay !== undefined) { - return ( - - {formatDuration(row.delay)} - - ); - } - - if ( - row.type === 'multisig-deposits-claimed' && - row.totalReturned != null - ) { - return formatMonetaryValue(String(row.totalReturned), 5); - } - - return -; - } - }) - ]; - - // Optionally add block column after timestamp - if (showBlockColumn) { - const blockColumn = columnHelper.display({ - id: 'block', - header: 'Block', - cell: (props) => { - const height = props.row.original.block?.height; - if (!height) return -; - return ( - - ); - } - }); - - // Insert block column after timestamp (index 2) - columns.splice(3, 0, blockColumn); - } - - return columns; -}; - -// Default export for backward compatibility -export const UNIFIED_TRANSACTION_COLUMNS = createUnifiedTransactionColumns(); diff --git a/src/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx b/src/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx deleted file mode 100644 index 981cac3..0000000 --- a/src/components/common/table-columns/WORMHOLE_OUTPUT_COLUMNS.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { createColumnHelper } from '@tanstack/react-table'; - -import { PrivacyScoreBadge } from '@/components/features/wormhole/PrivacyScoreBadge'; -import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; -import { TimestampDisplay } from '@/components/ui/timestamp-display'; -import { RESOURCES } from '@/constants/resources'; -import type { WormholeExtrinsic } from '@/schemas/wormhole'; -import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter'; - -export type WormholeExtrinsicRow = WormholeExtrinsic; - -const columnHelper = createColumnHelper(); - -export const WORMHOLE_EXTRINSIC_COLUMNS = [ - columnHelper.accessor('extrinsic.id', { - id: 'extrinsic_hash', - header: 'Extrinsic', - cell: (props) => { - const hash = props.getValue(); - const { id } = props.row.original; - return ( - - ); - }, - enableSorting: false - }), - columnHelper.accessor('total_amount', { - id: 'total_amount', - header: 'Total Amount', - cell: (props) => formatMonetaryValue(props.getValue()), - enableSorting: true - }), - columnHelper.accessor('output_count', { - id: 'output_count', - header: 'Outputs', - cell: (props) => props.getValue(), - enableSorting: false - }), - columnHelper.accessor('privacy_score', { - 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/common/theme-provider/theme-provider.tsx b/src/components/common/theme-provider/theme-provider.tsx deleted file mode 100644 index b494218..0000000 --- a/src/components/common/theme-provider/theme-provider.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import React, { - createContext, - useContext, - useEffect, - useMemo, - useState -} from 'react'; - -type Theme = 'dark' | 'light' | 'system'; - -type ThemeProviderProps = { - children: React.ReactNode; - defaultTheme?: Theme; - storageKey: string; -}; - -type ThemeProviderState = { - theme: Theme; - setTheme: (theme: Theme) => void; -}; - -const initialState: ThemeProviderState = { - theme: 'system', - setTheme: () => null -}; - -const ThemeProviderContext = createContext(initialState); - -export function ThemeProvider({ - children, - defaultTheme = 'system', - storageKey, - ...props -}: ThemeProviderProps) { - const [theme, setTheme] = useState( - () => (localStorage.getItem(storageKey) as Theme) || defaultTheme - ); - - useEffect(() => { - const root = window.document.documentElement; - - root.classList.remove('light', 'dark'); - - if (theme === 'system') { - const systemTheme = window.matchMedia('(prefers-color-scheme: dark)') - .matches - ? 'dark' - : 'light'; - - root.classList.add(systemTheme); - return; - } - - root.classList.add(theme); - }, [theme]); - - const value = useMemo(() => { - const initialValue = { - theme, - setTheme: (newTheme: Theme) => { - localStorage.setItem(storageKey, newTheme); - setTheme(newTheme); - } - }; - - return initialValue; - }, [theme]); - - return ( - - {children} - - ); -} - -export const useTheme = () => { - const context = useContext(ThemeProviderContext); - - if (context === undefined) - throw new Error('useTheme must be used within a ThemeProvider'); - - return context; -}; diff --git a/src/components/features/account-details/account-all-transactions/AccountAllTransactions.tsx b/src/components/features/account-details/account-all-transactions/AccountAllTransactions.tsx index 5aea3c3..d8f8e2a 100644 --- a/src/components/features/account-details/account-all-transactions/AccountAllTransactions.tsx +++ b/src/components/features/account-details/account-all-transactions/AccountAllTransactions.tsx @@ -1,31 +1,29 @@ -import type { QueryResult } from '@apollo/client'; import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; -import { ContentContainer } from '@/components/ui/content-container'; -import type { AccountResponse } from '@/schemas'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useAccountAllTransactions } from './hook'; interface Props { - query: QueryResult; + accountId: string; } -export const AccountAllTransactions: React.FC = ({ query }) => { - const { getStatus, table, error } = useAccountAllTransactions(query); +export const AccountAllTransactions: React.FC = ({ accountId }) => { + const { getStatus, table, error } = useAccountAllTransactions(accountId); return ( - -

All Account Activity

+
+

Activity

Error: {error && error.message}

+ errorFallback: }} withControls /> - +
); }; diff --git a/src/components/features/account-details/account-all-transactions/hook.tsx b/src/components/features/account-details/account-all-transactions/hook.tsx index c54825e..275da8c 100644 --- a/src/components/features/account-details/account-all-transactions/hook.tsx +++ b/src/components/features/account-details/account-all-transactions/hook.tsx @@ -1,189 +1,82 @@ -import type { QueryResult } from '@apollo/client'; -import { - getCoreRowModel, - getPaginationRowModel, - useReactTable -} from '@tanstack/react-table'; -import { useCallback, useMemo, useState } from 'react'; +import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; +import { useEffect, useMemo, useState } from 'react'; -import { createUnifiedTransactionColumns } from '@/components/common/table-columns/UNIFIED_TRANSACTION_COLUMNS'; +import useApiClient from '@/api'; +import { UNIFIED_LIST_TRANSACTION_COLUMNS } from '@/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import { - sortByTimestampDesc, - transformCancelledTransaction, - transformExecutedTransaction, - transformHighSecuritySet, - transformImmediateTransaction, - transformMinerReward, - transformMultisigCreated, - transformMultisigDepositsClaimed, - transformMultisigProposalCancelled, - transformMultisigProposalCreated, - transformMultisigProposalExecuted, - transformMultisigProposalReady, - transformMultisigProposalRemoved, - transformMultisigSignerApproved, - transformScheduledTransaction, - transformWormholeOutput -} from '@/hooks/useUnifiedTransactions'; -import type { AccountResponse, UnifiedTransaction } from '@/schemas'; +import type { UnifiedListTransactionSorts } from '@/constants/query-sorts'; +import { useOrderBy } from '@/hooks/useOrderBy'; +import { useTableState } from '@/hooks/useTableState'; +import type { UnifiedListTransaction } from '@/schemas'; +import { transformSortLiteral } from '@/utils/transform-sort'; -// Account page shows block column -const columns = createUnifiedTransactionColumns({ showBlockColumn: true }); +export const useAccountAllTransactions = (accountId: string) => { + const api = useApiClient(); -export const useAccountAllTransactions = ( - query: QueryResult -) => { - const { data, error: fetchError, loading } = query; - const [pagination, setPagination] = useState({ - pageIndex: 0, - pageSize: QUERY_DEFAULT_LIMIT - }); - - // Transform all transaction types into unified format - const tableData = useMemo(() => { - if (!data) return []; - - const unified: UnifiedTransaction[] = []; - - // Add immediate transactions - data.accountEvents?.forEach((event, idx) => { - if (event.transfer) { - unified.push(transformImmediateTransaction(event.transfer, idx)); - } - if (event.scheduledReversibleTransfer) { - unified.push( - transformScheduledTransaction(event.scheduledReversibleTransfer) - ); - } - if (event.executedReversibleTransfer) { - unified.push( - transformExecutedTransaction(event.executedReversibleTransfer) - ); - } - if (event.cancelledReversibleTransfer) { - unified.push( - transformCancelledTransaction(event.cancelledReversibleTransfer) - ); - } - - if (event.minerReward) { - unified.push(transformMinerReward(event.minerReward, idx)); - } - if (event.multisig) { - unified.push(transformMultisigCreated(event.multisig)); - } - if (event.multisigProposalCreated) { - unified.push( - transformMultisigProposalCreated(event.multisigProposalCreated) - ); - } - if (event.multisigSignerApproved) { - unified.push( - transformMultisigSignerApproved(event.multisigSignerApproved) - ); - } - if (event.multisigProposalReady) { - unified.push( - transformMultisigProposalReady(event.multisigProposalReady) - ); - } - if (event.executedMultisigProposal) { - unified.push( - transformMultisigProposalExecuted(event.executedMultisigProposal) - ); - } - if (event.cancelledMultisigProposal) { - unified.push( - transformMultisigProposalCancelled(event.cancelledMultisigProposal) - ); - } - if (event.removedMultisigProposal) { - unified.push( - transformMultisigProposalRemoved(event.removedMultisigProposal) - ); - } - if (event.multisigDepositsClaimed) { - unified.push( - transformMultisigDepositsClaimed(event.multisigDepositsClaimed) - ); - } - }); + const { + orderBy, + limit, + currentPageIndex, + handleChangeSorting, + handleChangePagination, + paginationValue + } = useTableState(null, QUERY_DEFAULT_LIMIT); - // Add guardian relationships (as high-security type) - data.guardian?.nodes?.forEach((guardian, idx) => { - unified.push( - transformHighSecuritySet( - { - timestamp: (guardian as { timestamp?: string }).timestamp ?? '', - block: (guardian as { block?: { height: number } }).block ?? { - height: 0 - }, - who: { id: '' }, // Guardian view doesn't have who (it's the current account) - guardian: guardian.guardian - }, - idx - ) - ); - }); + const orderByObject = useOrderBy(orderBy ?? ''); + const sortingValue = transformSortLiteral(orderBy); - // Add beneficiary relationships (as high-security type) - data.beneficiaries?.nodes?.forEach((beneficiary, idx) => { - unified.push( - transformHighSecuritySet( - { - timestamp: (beneficiary as { timestamp?: string }).timestamp ?? '', - block: (beneficiary as { block?: { height: number } }).block ?? { - height: 0 - }, - who: beneficiary.who, - guardian: { id: '' } // Beneficiary view doesn't have guardian (it's the current account) - }, - idx - ) - ); - }); + const where = useMemo( + () => ({ + _or: [ + { from: { id: { _eq: accountId } } }, + { to: { id: { _eq: accountId } } } + ] + }), + [accountId] + ); - // Add wormhole outputs - data.wormholeOutputs?.forEach((output, idx) => { - const { wormholeExtrinsic } = output; - if (wormholeExtrinsic) { - unified.push( - transformWormholeOutput( - { - id: wormholeExtrinsic.id, - extrinsic: wormholeExtrinsic.extrinsic, - timestamp: wormholeExtrinsic.timestamp, - totalAmount: wormholeExtrinsic.totalAmount, - outputCount: wormholeExtrinsic.outputCount, - outputs: wormholeExtrinsic.outputs, - block: wormholeExtrinsic.block - }, - idx - ) - ); - } - }); + const { + loading, + data, + error: fetchError + } = api.unifiedTransactions.useGetAll({ + pollInterval: DATA_POOL_INTERVAL, + variables: { + orderBy: orderByObject, + limit, + offset: currentPageIndex * limit, + where + } + }); - return sortByTimestampDesc(unified); - }, [data]); + const transactionColumns = useMemo( + () => UNIFIED_LIST_TRANSACTION_COLUMNS, + [] + ); + const [rowCount, setRowCount] = useState( + data?.meta.aggregate.totalCount ?? 0 + ); - const table = useReactTable({ - data: tableData, - columns, + const table = useReactTable({ + data: data?.transactions ?? [], + columns: transactionColumns, getCoreRowModel: getCoreRowModel(), - getPaginationRowModel: getPaginationRowModel(), - enableSorting: false, state: { - pagination + sorting: sortingValue, + pagination: paginationValue }, - onPaginationChange: setPagination + rowCount, + onSortingChange: handleChangeSorting, + onPaginationChange: handleChangePagination, + manualSorting: true, + manualPagination: true }); const success = !loading && !fetchError; const error = !loading && fetchError; - const getStatus = useCallback(() => { + const getStatus = () => { switch (true) { case success: return 'success'; @@ -194,7 +87,12 @@ export const useAccountAllTransactions = ( default: return 'idle'; } - }, [success, error, loading]); + }; + + useEffect(() => { + if (!loading && data?.meta.aggregate.totalCount != null) + setRowCount(data.meta.aggregate.totalCount); + }, [loading, data?.meta.aggregate.totalCount]); return { table, diff --git a/src/components/features/account-details/account-beneficiaries/AccountBeneficiaries.tsx b/src/components/features/account-details/account-beneficiaries/AccountBeneficiaries.tsx deleted file mode 100644 index 3fb2e9e..0000000 --- a/src/components/features/account-details/account-beneficiaries/AccountBeneficiaries.tsx +++ /dev/null @@ -1,43 +0,0 @@ -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 { AccountResponse } from '@/schemas'; - -import { useAccountBeneficiaries } from './hook'; - -interface Props { - query: QueryResult; - accountId: string; -} - -export const AccountBeneficiaries: React.FC = ({ query, accountId }) => { - const { getStatus, table, error } = useAccountBeneficiaries(query); - - return ( - -

Beneficiary Accounts

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

- }} - /> - - {!query.loading && - query.data?.beneficiaries.aggregate.totalCount !== 0 && ( - - )} -
- ); -}; diff --git a/src/components/features/account-details/account-beneficiaries/hook.tsx b/src/components/features/account-details/account-beneficiaries/hook.tsx deleted file mode 100644 index 23ff8a1..0000000 --- a/src/components/features/account-details/account-beneficiaries/hook.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import type { QueryResult } from '@apollo/client'; -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { useCallback, useMemo } from 'react'; - -import { ACCOUNT_BENEFICIARIES_COLUMNS } from '@/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS'; -import type { AccountBeneficiary, AccountResponse } from '@/schemas'; - -export const useAccountBeneficiaries = ( - query: QueryResult -) => { - const { data, error: fetchError, loading } = query; - const beneficiariesColumns = useMemo(() => ACCOUNT_BENEFICIARIES_COLUMNS, []); - - const tableData = useMemo( - () => data?.beneficiaries?.nodes ?? [], - [data?.beneficiaries?.nodes] - ); - - const table = useReactTable({ - data: tableData, - columns: beneficiariesColumns, - 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 deleted file mode 100644 index 53c2414..0000000 --- a/src/components/features/account-details/account-data-tabs/AccountDataTabs.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { QueryResult } from '@apollo/client'; -import React from 'react'; - -import { ContentContainer } from '@/components/ui/content-container'; -import { SectionContainer } from '@/components/ui/section-container'; -import type { AccountResponse } from '@/schemas'; - -import { AccountAllTransactions } from '../account-all-transactions/AccountAllTransactions'; - -export interface AccountDataTabsProps { - query: QueryResult; -} - -export const AccountDataTabs: React.FC = ({ query }) => { - return ( - - - - - - ); -}; diff --git a/src/components/features/account-details/account-guardian/AccountGuardian.tsx b/src/components/features/account-details/account-guardian/AccountGuardian.tsx deleted file mode 100644 index f83703e..0000000 --- a/src/components/features/account-details/account-guardian/AccountGuardian.tsx +++ /dev/null @@ -1,42 +0,0 @@ -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 { AccountResponse } from '@/schemas'; - -import { useAccountGuardian } from './hook'; - -interface Props { - query: QueryResult; - accountId: string; -} - -export const AccountGuardian: React.FC = ({ query, accountId }) => { - const { getStatus, table, error } = useAccountGuardian(query); - - return ( - -

Guardian Account

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

- }} - /> - - {!query.loading && query.data?.guardian.aggregate.totalCount !== 0 && ( - - )} -
- ); -}; diff --git a/src/components/features/account-details/account-guardian/hook.tsx b/src/components/features/account-details/account-guardian/hook.tsx deleted file mode 100644 index 4a83093..0000000 --- a/src/components/features/account-details/account-guardian/hook.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import type { QueryResult } from '@apollo/client'; -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { useCallback, useMemo } from 'react'; - -import { ACCOUNT_GUARDIAN_COLUMNS } from '@/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS'; -import type { AccountGuardian, AccountResponse } from '@/schemas'; - -export const useAccountGuardian = (query: QueryResult) => { - const { data, error: fetchError, loading } = query; - const guardianColumns = useMemo(() => ACCOUNT_GUARDIAN_COLUMNS, []); - - const tableData = useMemo( - () => data?.guardian?.nodes ?? [], - [data?.guardian?.nodes] - ); - - const table = useReactTable({ - data: tableData, - columns: guardianColumns, - 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-information/AccountInformation.tsx b/src/components/features/account-details/account-information/AccountInformation.tsx index 58c1d9e..b185cf6 100644 --- a/src/components/features/account-details/account-information/AccountInformation.tsx +++ b/src/components/features/account-details/account-information/AccountInformation.tsx @@ -1,19 +1,34 @@ import type { QueryResult } from '@apollo/client'; -import { Check, X } from 'lucide-react'; +import { Link } from '@tanstack/react-router'; import * as React from 'react'; +import { Badge } from '@/components/ui/badge'; import { DataList } from '@/components/ui/composites/data-list/DataList'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; import { Skeleton } from '@/components/ui/skeleton'; import { useChecksum } from '@/hooks/useChecksum'; import type { AccountResponse } from '@/schemas'; import { formatMonetaryValue } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface AccountInformationProps { accountId: string; query: QueryResult; } +interface AccountDetailsInfo { + id: string; + free: number; + frozen: number; + reserved: number; + transactions: number; + miningRewards: number; + checksum: string; + isHighSecurity: boolean; + isGuardian: boolean; + isMultisig: boolean; +} + export const AccountInformation: React.FC = ({ accountId, query @@ -25,50 +40,46 @@ export const AccountInformation: React.FC = ({ loading, accountId ); - const transactions = data?.accountStats.total_immediate_transfers; - const scheduledReversibleTransactions = - data?.accountStats.total_scheduled_transfers; - const executedReversibleTransactions = - data?.accountStats.total_executed_transfers; - const cancelledReversibleTransactions = - data?.accountStats.total_cancelled_transfers; - const miningRewards = data?.accountStats.total_mined_blocks; - const beneficiaries = data?.beneficiaries.aggregate.totalCount; - const guardians = data?.guardian.aggregate.totalCount; - const information = [ + const stats = data?.accountStats; + const transactions = + (stats?.total_immediate_transfers ?? 0) + + (stats?.total_scheduled_transfers ?? 0) + + (stats?.total_executed_transfers ?? 0) + + (stats?.total_cancelled_transfers ?? 0); + const miningRewards = stats?.total_mined_blocks ?? 0; + const isHighSecurity = (data?.guardian?.aggregate.totalCount ?? 0) > 0; + const isGuardian = (data?.beneficiaries?.aggregate.totalCount ?? 0) > 0; + const isMultisig = !!data?.multisig; + + const information: AccountDetailsInfo[] = [ { id: accountId, free: account?.free ?? 0, frozen: account?.frozen ?? 0, reserved: account?.reserved ?? 0, transactions, - scheduledReversibleTransactions, - executedReversibleTransactions, - cancelledReversibleTransactions, miningRewards, - checksum, - isHighSecurity: guardians && guardians > 0, - isGuardian: beneficiaries && beneficiaries > 0, - isMultisig: !!data?.multisig + checksum: checksum ?? '', + isHighSecurity, + isGuardian, + isMultisig } ]; return ( - loading={loading} data={information} fields={[ { - label: 'ID', + label: 'Address', key: 'id', render: (value) => }, { label: 'Check Phrase', key: 'checksum', - tooltip: - 'A human-readable checksum from cryptocurrency address; designed to make address verification easier and prevent address poisoning attacks—where attackers craft lookalike addresses to trick users.', render: (value) => checksumLoading ? ( @@ -77,31 +88,55 @@ export const AccountInformation: React.FC = ({ ) }, { - label: 'Is High Security', + label: 'Account type', key: 'isHighSecurity', - tooltip: - 'Whether the account is a beneficiary of a high security set', - render: (value) => - value ? : - }, - { - label: 'Is Guardian', - key: 'isGuardian', - tooltip: 'Whether the account is a guardian of a high security set', - render: (value) => - value ? : - }, - { - label: 'Is Multisig', - key: 'isMultisig', - tooltip: 'Whether this account is a multisig wallet', - render: (value) => - value ? : + render: (_value, item) => { + const badges: React.ReactNode[] = []; + if (item.isHighSecurity) { + badges.push( + + High security beneficiary + + ); + } + if (item.isGuardian) { + badges.push( + + Guardian + + ); + } + if (item.isMultisig) { + badges.push( + + Multisig + + ); + } + if (badges.length === 0) { + return ( + + Standard + + ); + } + return ( +
{badges}
+ ); + } }, { label: 'Free Balance', key: 'free', - render: (value) => formatMonetaryValue(value), + render: (value) => ( + + {formatMonetaryValue(value)} + + ), tooltip: 'The amount of tokens that can be used.' }, { @@ -118,34 +153,20 @@ export const AccountInformation: React.FC = ({ tooltip: 'The amount of tokens that are locked and cannot be used. ' }, { - label: 'Immediate Transactions', + label: 'Transactions', key: 'transactions', - render: (value) => - value > 1 ? `${value} transactions` : `${value} transaction` - }, - { - 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` + render: (value) => ( + {value.toLocaleString()} + ) }, { label: 'Mining Rewards', key: 'miningRewards', - render: (value) => - value > 1 ? `${value} rewards` : `${value} reward` + render: (value) => ( + + {value > 1 ? `${value} rewards` : `${value} reward`} + + ) } ]} /> diff --git a/src/components/features/account-details/account-multisig-information/AccountMultisigInformation.tsx b/src/components/features/account-details/account-multisig-information/AccountMultisigInformation.tsx deleted file mode 100644 index f10c04e..0000000 --- a/src/components/features/account-details/account-multisig-information/AccountMultisigInformation.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import * as React from 'react'; - -import { getMultisigAccountFields } from '@/components/features/multisig-created-details/multisig-created-fields'; -import { DataList } from '@/components/ui/composites/data-list/DataList'; -import type { MultisigCreated } from '@/schemas'; - -export interface AccountMultisigInformationProps { - multisig: MultisigCreated; - loading?: boolean; -} - -export const AccountMultisigInformation: React.FC< - AccountMultisigInformationProps -> = ({ multisig, loading = false }) => { - const information: Partial[] = [ - { - id: multisig.id, - timestamp: multisig.timestamp, - block: multisig.block, - extrinsic: multisig.extrinsic, - creator: multisig.creator, - threshold: multisig.threshold, - nonce: multisig.nonce, - signers: multisig.signers - } - ]; - - return ( - <> -

Multisig Details

- > - loading={loading} - data={information} - fields={getMultisigAccountFields()} - /> - - ); -}; diff --git a/src/components/features/account-details/index.tsx b/src/components/features/account-details/index.tsx index d5b6c24..11b020b 100644 --- a/src/components/features/account-details/index.tsx +++ b/src/components/features/account-details/index.tsx @@ -6,9 +6,8 @@ import { ContentContainer } from '@/components/ui/content-container'; import { SectionContainer } from '@/components/ui/section-container'; import { validateAccountId } from '@/utils/validate-account-id'; -import { AccountDataTabs } from './account-data-tabs/AccountDataTabs'; +import { AccountAllTransactions } from './account-all-transactions/AccountAllTransactions'; import { AccountInformation } from './account-information/AccountInformation'; -import { AccountMultisigInformation } from './account-multisig-information/AccountMultisigInformation'; interface Props { id: string; @@ -23,23 +22,14 @@ export const AccountDetails: React.FC = ({ id }) => { if (!loading && !data?.account && !isAccountValid) throw notFound(); return ( - <> - - -

Account Details

- - - - {data?.multisig && ( - - )} -
-
- - - + + +

Account

+ + + + +
+
); }; diff --git a/src/components/features/account-listing/accounts-heading/AccountsHeading.tsx b/src/components/features/account-listing/accounts-heading/AccountsHeading.tsx new file mode 100644 index 0000000..8776ec4 --- /dev/null +++ b/src/components/features/account-listing/accounts-heading/AccountsHeading.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; + +export interface AccountsHeadingProps {} + +export const AccountsHeading: React.FC = () => { + return ( +
+

Accounts

+
+ ); +}; diff --git a/src/components/features/account-listing/accounts-stats/AccountsStats.tsx b/src/components/features/account-listing/accounts-stats/AccountsStats.tsx index 9e928a2..740266c 100644 --- a/src/components/features/account-listing/accounts-stats/AccountsStats.tsx +++ b/src/components/features/account-listing/accounts-stats/AccountsStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -12,7 +19,7 @@ export const AccountsStats: React.FC = () => { const api = useApiClient(); const { accountId, block } = useSearch({ strict: false - }) as any; + }) as { accountId?: string; block?: string }; const shouldHide = !!(accountId || block); @@ -26,7 +33,7 @@ export const AccountsStats: React.FC = () => { const success = !loading && !error; return ( -
+ @@ -34,37 +41,49 @@ export const AccountsStats: React.FC = () => { - {success &&

{data?.all.total_accounts}

} + {success && ( +

+ {data?.all.total_accounts.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-

Active Accounts (7D)

+

Active (7D)

- {success &&

{data?.recentlyActive.aggregate.count}

} + {success && ( +

+ {data?.recentlyActive.aggregate.count.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-

Deposit Accounts (7D)

+

Deposit Accounts

- {success &&

{data?.recentlyDeposited.aggregate.count}

} + {success && ( +

+ {data?.recentlyDeposited.aggregate.count.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-
+ ); }; diff --git a/src/components/features/account-listing/accounts-table/AccountsTable.tsx b/src/components/features/account-listing/accounts-table/AccountsTable.tsx index ba2b34c..5494383 100644 --- a/src/components/features/account-listing/accounts-table/AccountsTable.tsx +++ b/src/components/features/account-listing/accounts-table/AccountsTable.tsx @@ -1,4 +1,5 @@ import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useAccountsTable } from './hook'; @@ -10,7 +11,7 @@ export const AccountsTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/block-details/block-all-transactions/BlockAllTransactions.tsx b/src/components/features/block-details/block-all-transactions/BlockAllTransactions.tsx index d59d955..2498632 100644 --- a/src/components/features/block-details/block-all-transactions/BlockAllTransactions.tsx +++ b/src/components/features/block-details/block-all-transactions/BlockAllTransactions.tsx @@ -2,7 +2,7 @@ import type { QueryResult } from '@apollo/client'; import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; -import { ContentContainer } from '@/components/ui/content-container'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import type { BlockResponse } from '@/schemas'; import { useBlockAllTransactions } from './hook'; @@ -15,17 +15,19 @@ export const BlockAllTransactions: React.FC = ({ query }) => { const { getStatus, table, error } = useBlockAllTransactions(query); return ( - -

Extrinsics

+
+
Transactions in this block
Error: {error && error.message}

+ errorFallback: }} withControls + emptyTitle="No transactions in this block" + emptyDescription="This block contained only the miner reward with no user transactions." /> - +
); }; diff --git a/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx b/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx deleted file mode 100644 index 8fda7ac..0000000 --- a/src/components/features/block-details/block-data-tabs/BlockDataTabs.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { QueryResult } from '@apollo/client'; -import React from 'react'; - -import { ContentContainer } from '@/components/ui/content-container'; -import { SectionContainer } from '@/components/ui/section-container'; -import type { BlockResponse } from '@/schemas'; - -import { BlockAllTransactions } from '../block-all-transactions/BlockAllTransactions'; - -export interface BlockDataTabsProps { - query: QueryResult; -} - -export const BlockDataTabs: React.FC = ({ query }) => { - return ( - - - - - - ); -}; diff --git a/src/components/features/block-details/block-information/BlockInformation.tsx b/src/components/features/block-details/block-information/BlockInformation.tsx index d31e99a..cf9f942 100644 --- a/src/components/features/block-details/block-information/BlockInformation.tsx +++ b/src/components/features/block-details/block-information/BlockInformation.tsx @@ -4,9 +4,10 @@ import * as React from 'react'; 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { BlockResponse } from '@/schemas'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; export interface BlockInformationProps { query: QueryResult; @@ -34,10 +35,10 @@ export const BlockInformation: React.FC = ({ { height: block?.height, hash: block?.hash, + miner, reward: block?.reward, timestamp: block?.timestamp, - extrinsicsCount, - miner + extrinsicsCount } ]; @@ -49,17 +50,24 @@ export const BlockInformation: React.FC = ({ { label: 'Height', key: 'height', - render: (value) => + render: (value) => + value != null ? ( + + {formatBlockHeight(value as number)} + + ) : ( + + ) }, { label: 'Hash', key: 'hash', - render: (value) => - }, - { - label: 'Reward', - key: 'reward', - render: (value) => formatMonetaryValue(value) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Mined by', @@ -69,21 +77,29 @@ export const BlockInformation: React.FC = ({ ) : ( "Miner address isn't registered." ) }, { - label: 'Timestamp', + label: 'Reward', + key: 'reward', + render: (value) => formatMonetaryValue(value) + }, + { + label: 'Time', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => }, { - label: 'Extrinsics', + label: 'Transactions', key: 'extrinsicsCount', - render: (value) => - value === 1 ? `${value} extrinsic` : `${value} extrinsics` + render: (value) => ( + {value as number} + ) } ]} /> diff --git a/src/components/features/block-details/index.tsx b/src/components/features/block-details/index.tsx index cbc745b..a00a7b6 100644 --- a/src/components/features/block-details/index.tsx +++ b/src/components/features/block-details/index.tsx @@ -4,8 +4,9 @@ import * as React from 'react'; import useApiClient from '@/api'; import { ContentContainer } from '@/components/ui/content-container'; import { SectionContainer } from '@/components/ui/section-container'; +import { formatBlockHeight } from '@/utils/formatter'; -import { BlockDataTabs } from './block-data-tabs/BlockDataTabs'; +import { BlockAllTransactions } from './block-all-transactions/BlockAllTransactions'; import { BlockInformation } from './block-information/BlockInformation'; interface Props { @@ -19,17 +20,19 @@ export const BlockDetails: React.FC = ({ id }) => { if (!loading && !data?.blocks[0]) notFound(); + const height = data?.blocks[0]?.height; + const title = + height != null ? `Block #${formatBlockHeight(height)}` : 'Block Details'; + return ( - <> - - -

Block Details

+ + +

{title}

- -
-
+ - - + +
+
); }; diff --git a/src/components/features/block-listing/blocks-heading/BlocksHeading.tsx b/src/components/features/block-listing/blocks-heading/BlocksHeading.tsx new file mode 100644 index 0000000..d67dfca --- /dev/null +++ b/src/components/features/block-listing/blocks-heading/BlocksHeading.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; + +export interface BlocksHeadingProps {} + +export const BlocksHeading: React.FC = () => { + return ( +
+

Blocks

+
+ ); +}; diff --git a/src/components/features/block-listing/blocks-stats/BlocksStats.tsx b/src/components/features/block-listing/blocks-stats/BlocksStats.tsx index 3dd5ba6..d81ecd1 100644 --- a/src/components/features/block-listing/blocks-stats/BlocksStats.tsx +++ b/src/components/features/block-listing/blocks-stats/BlocksStats.tsx @@ -1,7 +1,14 @@ import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -16,7 +23,7 @@ export const BlocksStats: React.FC = () => { const success = !loading && !error; return ( -
+ @@ -24,37 +31,49 @@ export const BlocksStats: React.FC = () => { - {success &&

{data?.chain.block_height}

} + {success && ( +

+ #{data?.chain.block_height.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-

Finalized Blocks

+

Finalized

- {success &&

{data?.chain.finalized_block_height}

} + {success && ( +

+ #{data?.chain.finalized_block_height.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-

Mined Blocks (24H)

+

Mined (24h)

- {success &&

{data?.minedIn24Hours.aggregate.totalCount}

} + {success && ( +

+ {data?.minedIn24Hours.aggregate.totalCount.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-
+ ); }; diff --git a/src/components/features/block-listing/blocks-table/BlocksTable.tsx b/src/components/features/block-listing/blocks-table/BlocksTable.tsx index 96de6b4..4a0b4fa 100644 --- a/src/components/features/block-listing/blocks-table/BlocksTable.tsx +++ b/src/components/features/block-listing/blocks-table/BlocksTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useBlocksTable } from './hook'; @@ -12,7 +13,7 @@ export const BlocksTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> 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 23912b6..b29c13b 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 @@ -5,9 +5,10 @@ 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { CancelledReversibleTransactionResponse } from '@/schemas'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; export interface CancelledReversibleTransactionInformationProps { txId: string; @@ -64,7 +65,7 @@ export const CancelledReversibleTransactionInformation: React.FC< key: 'block', render: (value) => ( @@ -73,7 +74,7 @@ export const CancelledReversibleTransactionInformation: React.FC< { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => }, { label: 'Cancelled By', 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 deleted file mode 100644 index 6627813..0000000 --- a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transaction-heading/CancelledReversibleTransactionHeading.tsx +++ /dev/null @@ -1,36 +0,0 @@ -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 deleted file mode 100644 index 4420deb..0000000 --- a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-stats/CancelledReversibleTransactionsStats.tsx +++ /dev/null @@ -1,60 +0,0 @@ -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; - - const shouldHide = !!(accountId || block); - - const { loading, data, error } = - api.cancelledReversibleTransactions.useGetStats({ - pollInterval: DATA_POOL_INTERVAL, - skip: shouldHide - }); - - if (shouldHide) return null; - - const success = !loading && !error; - - return ( -
- - - -

Total Cancelled Transactions

-
-
- - {success &&

{data?.allTime.total_cancelled_transfers}

} - {loading && } - {error &&

Error: {error.message}

} -
-
- - - - -

Recent Cancelled Transactions (24H)

-
-
- - {success &&

{data?.last24Hour.aggregate.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 deleted file mode 100644 index 5d479d6..0000000 --- a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index d8d0061..0000000 --- a/src/components/features/cancelled-reversible-transaction-listing/cancelled-reversible-transactions-table/hook.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { useSearch } from '@tanstack/react-router'; -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -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 { useOrderBy } from '@/hooks/useOrderBy'; -import { useTableState } from '@/hooks/useTableState'; -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 { - orderBy, - limit, - currentPageIndex, - handleChangeSorting, - handleChangePagination, - paginationValue - } = useTableState(null, QUERY_DEFAULT_LIMIT); - - const orderByObject = useOrderBy( - orderBy ?? '' - ); - const sortingValue = transformSortLiteral(orderBy); - - const { - loading, - data, - error: fetchError - } = api.cancelledReversibleTransactions.useGetAll({ - pollInterval: DATA_POOL_INTERVAL, - variables: { - orderBy: orderByObject, - 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.aggregate.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.aggregate.totalCount) - setRowCount(data.meta.aggregate.totalCount); - }, [loading, data?.meta.aggregate.totalCount]); - - return { - table, - getStatus, - error: fetchError - }; -}; diff --git a/src/components/features/error-event-details/error-event-information/ErrorEventInformation.tsx b/src/components/features/error-event-details/error-event-information/ErrorEventInformation.tsx index 1d5c11f..742417b 100644 --- a/src/components/features/error-event-details/error-event-information/ErrorEventInformation.tsx +++ b/src/components/features/error-event-details/error-event-information/ErrorEventInformation.tsx @@ -5,14 +5,17 @@ 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { ErrorEvent } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; export interface ErrorEventInformationProps { id: string; } +const EmptyValue = () => ; + export const ErrorEventInformation: React.FC = ({ id }) => { @@ -50,38 +53,62 @@ export const ErrorEventInformation: React.FC = ({ className="break-all" /> ) : ( - '-' + ) }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as ErrorEvent['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Error Type', - key: 'error_type' + key: 'error_type', + render: (value) => + value ? ( + {value as string} + ) : ( + + ) }, { label: 'Error Module', key: 'error_module', - render: (value) => (value ? (value as string) : '-') + render: (value) => + value ? ( + {value as string} + ) : ( + + ) }, { label: 'Error Name', key: 'error_name', - render: (value) => (value ? (value as string) : '-') + render: (value) => + value ? ( + {value as string} + ) : ( + + ) }, { label: 'Error Docs', @@ -90,7 +117,7 @@ export const ErrorEventInformation: React.FC = ({ value ? ( ) : ( - '-' + ) } ]} diff --git a/src/components/features/error-events-listing/error-events-heading/ErrorEventsHeading.tsx b/src/components/features/error-events-listing/error-events-heading/ErrorEventsHeading.tsx index 21f0e02..892d804 100644 --- a/src/components/features/error-events-listing/error-events-heading/ErrorEventsHeading.tsx +++ b/src/components/features/error-events-listing/error-events-heading/ErrorEventsHeading.tsx @@ -10,20 +10,20 @@ export const ErrorEventsHeading: React.FC = () => { return (
-

Error Events

+

Error Events

{block ? ( -
+
In block {block}
) : ( -

+

A list of all error events that occurred on the network.

)} diff --git a/src/components/features/error-events-listing/error-events-stats/ErrorEventsStats.tsx b/src/components/features/error-events-listing/error-events-stats/ErrorEventsStats.tsx index 8e6ccec..f5a50cf 100644 --- a/src/components/features/error-events-listing/error-events-stats/ErrorEventsStats.tsx +++ b/src/components/features/error-events-listing/error-events-stats/ErrorEventsStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -26,40 +33,40 @@ export const ErrorEventsStats: React.FC = () => { const success = !loading && !error; return ( -
+ - Total Error Events + +

Total Error Events

+
{success && ( -

+

{data?.allTime.total_error_events.toLocaleString()}

)} - {loading && } - {error && ( -

Error: {error.message}

- )} + {loading && } + {error && }
- Recent Error Events (24H) + +

Recent Error Events (24H)

+
{success && ( -

+

{data?.last24Hour.aggregate.totalCount.toLocaleString()}

)} - {loading && } - {error && ( -

Error: {error.message}

- )} + {loading && } + {error && }
-
+ ); }; diff --git a/src/components/features/error-events-listing/error-events-table/ErrorEventsTable.tsx b/src/components/features/error-events-listing/error-events-table/ErrorEventsTable.tsx index 6c39f51..7ebe2a3 100644 --- a/src/components/features/error-events-listing/error-events-table/ErrorEventsTable.tsx +++ b/src/components/features/error-events-listing/error-events-table/ErrorEventsTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useErrorEventsTable } from './hook'; @@ -12,7 +13,7 @@ export const ErrorEventsTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> 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 608a134..e500580 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 @@ -5,9 +5,10 @@ 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { ExecutedReversibleTransactionResponse } from '@/schemas'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; export interface ExecutedReversibleTransactionInformationProps { txId: string; @@ -55,7 +56,7 @@ export const ExecutedReversibleTransactionInformation: React.FC< key: 'block', render: (value) => ( @@ -64,7 +65,7 @@ export const ExecutedReversibleTransactionInformation: React.FC< { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => }, { label: 'From', diff --git a/src/components/features/executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading.tsx b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading.tsx deleted file mode 100644 index ae880e5..0000000 --- a/src/components/features/executed-reversible-transaction-listing/executed-reversible-transaction-heading/ExecutedReversibleTransactionHeading.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Link, useSearch } from '@tanstack/react-router'; -import * as React from 'react'; - -export interface ExecutedReversibleTransactionHeadingProps {} - -export const ExecutedReversibleTransactionHeading: React.FC< - ExecutedReversibleTransactionHeadingProps -> = () => { - const { accountId, block } = useSearch({ - strict: false - }) as any; - - return ( -
-

Executed Reversible Transactions

- - {block && ( -
- In block - - {block} - -
- )} - - {accountId && ( -
- By - - {accountId} - -
- )} -
- ); -}; diff --git a/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats.tsx b/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats.tsx deleted file mode 100644 index 1364d69..0000000 --- a/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-stats/ExecutedReversibleTransactionsStats.tsx +++ /dev/null @@ -1,60 +0,0 @@ -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 ExecutedReversibleTransactionsStatsProps {} - -export const ExecutedReversibleTransactionsStats: React.FC< - ExecutedReversibleTransactionsStatsProps -> = () => { - const api = useApiClient(); - const { accountId, block } = useSearch({ - strict: false - }) as any; - - const shouldHide = !!(accountId || block); - - const { loading, data, error } = - api.executedReversibleTransactions.useGetStats({ - pollInterval: DATA_POOL_INTERVAL, - skip: shouldHide - }); - - if (shouldHide) return null; - - const success = !loading && !error; - - return ( -
- - - -

Total Executed Transactions

-
-
- - {success &&

{data?.allTime.total_executed_transfers}

} - {loading && } - {error &&

Error: {error.message}

} -
-
- - - - -

Recent Executed Transactions (24H)

-
-
- - {success &&

{data?.last24Hour.aggregate.totalCount}

} - {loading && } - {error &&

Error: {error.message}

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

- }} - withControls - /> - ); -}; diff --git a/src/components/features/high-security-set-details/high-security-set-information/HighSecuritySetInformation.tsx b/src/components/features/high-security-set-details/high-security-set-information/HighSecuritySetInformation.tsx index dcf31bd..6560c28 100644 --- a/src/components/features/high-security-set-details/high-security-set-information/HighSecuritySetInformation.tsx +++ b/src/components/features/high-security-set-details/high-security-set-information/HighSecuritySetInformation.tsx @@ -5,9 +5,10 @@ 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { HighSecuritySetResponse } from '@/schemas'; -import { formatDuration, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatDuration } from '@/utils/formatter'; export interface HighSecuritySetInformationProps { hash: string; @@ -15,6 +16,8 @@ export interface HighSecuritySetInformationProps { type HighSecuritySet = HighSecuritySetResponse['highSecuritySets'][0]; +const EmptyValue = () => ; + export const HighSecuritySetInformation: React.FC< HighSecuritySetInformationProps > = ({ hash }) => { @@ -45,65 +48,86 @@ export const HighSecuritySetInformation: React.FC< { label: 'Extrinsic', key: 'extrinsic', - render: (value) => ( - - ) + render: (value) => { + const extrinsicId = (value as HighSecuritySet['extrinsic'])?.id; + return extrinsicId ? ( + + ) : ( + + ); + } }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as HighSecuritySet['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Beneficiary', tooltip: 'The account that set the high security feature', key: 'who', - render: (value) => ( - - ) + render: (value) => { + const whoId = (value as HighSecuritySet['who'])?.id; + return whoId ? ( + + ) : ( + + ); + } }, { label: 'Guardian', tooltip: 'The entrustee who can intercept the reversible transaction', key: 'guardian', - render: (value) => ( - - ) + render: (value) => { + const guardianId = (value as HighSecuritySet['guardian'])?.id; + return guardianId ? ( + + ) : ( + + ); + } }, { label: 'Reversible Time', tooltip: 'The enforced time period to confirm the reversible transaction', key: 'delay', - render: (value) => formatDuration(value as string | number | bigint) + render: (value) => + value != null ? ( + + {formatDuration(value as string | number | bigint)} + + ) : ( + + ) } ]} /> diff --git a/src/components/features/high-security-sets-listing/high-security-sets-heading/HighSecuritySetsHeading.tsx b/src/components/features/high-security-sets-listing/high-security-sets-heading/HighSecuritySetsHeading.tsx index 5a7303a..0b6a70c 100644 --- a/src/components/features/high-security-sets-listing/high-security-sets-heading/HighSecuritySetsHeading.tsx +++ b/src/components/features/high-security-sets-listing/high-security-sets-heading/HighSecuritySetsHeading.tsx @@ -8,25 +8,33 @@ export const HighSecuritySetsHeading: React.FC< > = () => { const { accountId, block } = useSearch({ strict: false - }) as any; + }) as { accountId?: string; block?: string }; return (
-

High Security Sets

+

High Security Sets

{block && ( -
+
In block - + {block}
)} {accountId && ( -
+
By - + {accountId}
diff --git a/src/components/features/high-security-sets-listing/high-security-sets-stats/HighSecuritySetsStats.tsx b/src/components/features/high-security-sets-listing/high-security-sets-stats/HighSecuritySetsStats.tsx index ad57d84..19e4438 100644 --- a/src/components/features/high-security-sets-listing/high-security-sets-stats/HighSecuritySetsStats.tsx +++ b/src/components/features/high-security-sets-listing/high-security-sets-stats/HighSecuritySetsStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -14,7 +21,7 @@ export const HighSecuritySetsStats: React.FC< const api = useApiClient(); const { accountId, block } = useSearch({ strict: false - }) as any; + }) as { accountId?: string; block?: string }; const shouldHide = !!(accountId || block); @@ -28,32 +35,40 @@ export const HighSecuritySetsStats: React.FC< const success = !loading && !error; return ( -
+ -

Total High Security Sets

+

Total

- {success &&

{data?.allTime.total_high_security_sets}

} + {success && ( +

+ {data?.allTime.total_high_security_sets.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-

Recent High Security Sets (24H)

+

Last 24h

- {success &&

{data?.last24Hour.aggregate.totalCount}

} + {success && ( +

+ {data?.last24Hour.aggregate.totalCount.toLocaleString()} +

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-
+ ); }; diff --git a/src/components/features/high-security-sets-listing/high-security-sets-table/HighSecuritySetsTable.tsx b/src/components/features/high-security-sets-listing/high-security-sets-table/HighSecuritySetsTable.tsx index dc4a995..91c9b0b 100644 --- a/src/components/features/high-security-sets-listing/high-security-sets-table/HighSecuritySetsTable.tsx +++ b/src/components/features/high-security-sets-listing/high-security-sets-table/HighSecuritySetsTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useHighSecuritySetsTable } from './hook'; @@ -12,7 +13,7 @@ export const HighSecuritySetsTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/landing/block-tables/BlocksTable.tsx b/src/components/features/landing/block-tables/BlocksTable.tsx index cb999aa..988f97b 100644 --- a/src/components/features/landing/block-tables/BlocksTable.tsx +++ b/src/components/features/landing/block-tables/BlocksTable.tsx @@ -1,4 +1,5 @@ import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useBlocksTable } from './hook'; @@ -10,7 +11,7 @@ export const BlocksTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error : {error && error.message}

+ errorFallback: }} /> ); diff --git a/src/components/features/landing/block-tables/hook.tsx b/src/components/features/landing/block-tables/hook.tsx index 3b438fc..64d535e 100644 --- a/src/components/features/landing/block-tables/hook.tsx +++ b/src/components/features/landing/block-tables/hook.tsx @@ -2,7 +2,7 @@ import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useMemo } from 'react'; import useApiClient from '@/api'; -import { BLOCK_COLUMNS } from '@/components/common/table-columns/BLOCK_COLUMNS'; +import { RECENT_BLOCK_COLUMNS } from '@/components/common/table-columns/RECENT_BLOCK_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { transformBlockOrderBy } from '@/constants/query-sorts'; import { useTableState } from '@/hooks/useTableState'; @@ -39,7 +39,7 @@ export const useBlocksTable = () => { } }); - const blockColumns = useMemo(() => BLOCK_COLUMNS, []); + const blockColumns = useMemo(() => RECENT_BLOCK_COLUMNS, []); const table = useReactTable({ data: data?.blocks ?? [], diff --git a/src/components/features/landing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx b/src/components/features/landing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx deleted file mode 100644 index 3aa771e..0000000 --- a/src/components/features/landing/cancelled-reversible-transactions-table/CancelledReversibleTransactionsTable.tsx +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 44864f9..0000000 --- a/src/components/features/landing/cancelled-reversible-transactions-table/hook.tsx +++ /dev/null @@ -1,51 +0,0 @@ -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 b16b13c..80a029d 100644 --- a/src/components/features/landing/data-tabs/DataTabs.tsx +++ b/src/components/features/landing/data-tabs/DataTabs.tsx @@ -1,18 +1,17 @@ import React from 'react'; import { ContentContainer } from '@/components/ui/content-container'; -import { SectionContainer } from '@/components/ui/section-container'; import { RecentBlocks } from '../recent-blocks/RecentBlocks'; +import { RecentTransactions } from '../recent-transactions/RecentTransactions'; export interface DataTabsProps {} export const DataTabs: React.FC = () => { return ( - - - - - + + + + ); }; diff --git a/src/components/features/landing/error-events-table/ErrorEventsTable.tsx b/src/components/features/landing/error-events-table/ErrorEventsTable.tsx deleted file mode 100644 index 316e406..0000000 --- a/src/components/features/landing/error-events-table/ErrorEventsTable.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { DataTable } from '@/components/ui/composites/data-table/DataTable'; - -import { useErrorEventsTable } from './hook'; - -export const ErrorEventsTable = () => { - const { getStatus, table, error } = useErrorEventsTable(); - - return ( - Error : {error && error.message}

- }} - /> - ); -}; diff --git a/src/components/features/landing/error-events-table/hook.tsx b/src/components/features/landing/error-events-table/hook.tsx deleted file mode 100644 index 76e6cf3..0000000 --- a/src/components/features/landing/error-events-table/hook.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { useMemo } from 'react'; - -import useApiClient from '@/api'; -import { ERROR_EVENT_COLUMNS } from '@/components/common/table-columns/ERROR_EVENT_COLUMNS'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import type { ErrorEvent } from '@/schemas'; - -export const useErrorEventsTable = () => { - const api = useApiClient(); - - const { - loading, - data, - error: fetchError - } = api.errors.useGetRecent({ - pollInterval: DATA_POOL_INTERVAL - }); - - const errorEventColumns = useMemo(() => ERROR_EVENT_COLUMNS, []); - - const table = useReactTable({ - data: data?.errorEvents ?? [], - columns: errorEventColumns, - getCoreRowModel: getCoreRowModel(), - enableSorting: false, - rowCount: data?.errorEvents?.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/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx b/src/components/features/landing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx deleted file mode 100644 index f7267ad..0000000 --- a/src/components/features/landing/executed-reversible-transactions-table/ExecutedReversibleTransactionsTable.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { DataTable } from '@/components/ui/composites/data-table/DataTable'; - -import { useExecutedReversibleTransactionsTable } from './hook'; - -export const ExecutedReversibleTransactionsTable = () => { - const { getStatus, table, error } = useExecutedReversibleTransactionsTable(); - - return ( - Error : {error && error.message}

- }} - /> - ); -}; diff --git a/src/components/features/landing/executed-reversible-transactions-table/hook.tsx b/src/components/features/landing/executed-reversible-transactions-table/hook.tsx deleted file mode 100644 index 09f1cf9..0000000 --- a/src/components/features/landing/executed-reversible-transactions-table/hook.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { useMemo } from 'react'; - -import useApiClient from '@/api'; -import { EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import type { ExecutedReversibleTransaction } from '@/schemas'; - -export const useExecutedReversibleTransactionsTable = () => { - const api = useApiClient(); - const { - loading, - data, - error: fetchError - } = api.executedReversibleTransactions.useGetRecent({ - pollInterval: DATA_POOL_INTERVAL - }); - const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); - - const table = useReactTable({ - data: data?.executedReversibleTransactions ?? [], - columns, - getCoreRowModel: getCoreRowModel(), - enableSorting: false, - rowCount: data?.executedReversibleTransactions?.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/hero/Hero.tsx b/src/components/features/landing/hero/Hero.tsx index 08e03c0..31540d5 100644 --- a/src/components/features/landing/hero/Hero.tsx +++ b/src/components/features/landing/hero/Hero.tsx @@ -22,24 +22,18 @@ export const Hero = () => { return ( - -
-

- Explore the Quantus Blockchain Network -

+ +
+
+ Search the chain +
-

- Discover, analyze, and track transactions across the blockchain - network in real-time -

-
- -
diff --git a/src/components/features/landing/hero/chain-stats/ChainStats.tsx b/src/components/features/landing/hero/chain-stats/ChainStats.tsx index f4e219d..5d48b84 100644 --- a/src/components/features/landing/hero/chain-stats/ChainStats.tsx +++ b/src/components/features/landing/hero/chain-stats/ChainStats.tsx @@ -1,99 +1,65 @@ import React from 'react'; -import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { Info } from '@/components/ui/composites/info/Info'; -import { Skeleton } from '@/components/ui/skeleton'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +import { CardGroup } from '@/components/ui/card'; +import { StatSparklineCard } from '@/components/ui/composites/stat-sparkline-card'; -export interface ChainStatsProps {} +import { useChainStats } from './hook'; -export const ChainStats: React.FC = () => { - const api = useApiClient(); - const { loading, data, error } = api.chainStatus.useGetStatus({ - pollInterval: DATA_POOL_INTERVAL - }); +const STROKE_FLARE = 'var(--flare)'; +const STROKE_GLACIER = 'var(--glacier)'; +const STROKE_MUTED = 'var(--muted-text)'; - const success = !loading && !error; +export interface ChainStatsProps {} - const depositAccounts = data?.status?.total_deposit_accounts ?? 0; - const totalAccounts = data?.status?.total_accounts ?? 0; - const activeAccounts = totalAccounts - depositAccounts; +export const ChainStats: React.FC = () => { + const { + loading, + error, + blockHeight, + totalTransactions, + last24HourTransactions, + activeAccounts, + blocksPoints, + transfersPoints, + activeAccountsPoints + } = useChainStats(); - const totalImmediateTransactions = - data?.status?.total_immediate_transfers ?? 0; - const totalScheduledTransactions = - data?.status?.total_scheduled_transfers ?? 0; - const totalExecutedTransactions = data?.status?.total_executed_transfers ?? 0; - const totalCancelledTransactions = - data?.status?.total_cancelled_transfers ?? 0; - const totalTransactions = - totalImmediateTransactions + - totalScheduledTransactions + - totalExecutedTransactions + - totalCancelledTransactions; + const errorMessage = error?.message ?? null; return ( -
- - - -

Latest Block

-
-
- - {success &&

#{data?.status?.block_height}

} - {loading && } - {error &&

Error: {error.message}

} -
-
- - - - -

Transactions

- - - Total count of immediate transactions and reversible transactions - -
-
- - {success &&

{totalTransactions}

} - {loading && } - {error &&

Error: {error.message}

} -
-
- - - - -

Active Accounts

- - Account that has an activity. -
-
- - {success &&

{activeAccounts}

} - {loading && } - {error &&

Error: {error.message}

} -
-
+ + - - - -

Deposit Accounts

+ - Account receiving transfers. -
-
- - {success &&

{depositAccounts}

} - {loading && } - {error &&

Error: {error.message}

} -
-
-
+ + ); }; diff --git a/src/components/features/landing/hero/chain-stats/hook.tsx b/src/components/features/landing/hero/chain-stats/hook.tsx new file mode 100644 index 0000000..748b8bb --- /dev/null +++ b/src/components/features/landing/hero/chain-stats/hook.tsx @@ -0,0 +1,104 @@ +import { useMemo } from 'react'; + +import useApiClient from '@/api'; +import type { SparklinePoint } from '@/components/ui/composites/stat-sparkline-card'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; +import type { HomeChainStatsResponse } from '@/schemas'; +import { + HOME_STATS_DAY_COUNT, + useHomeStatsDayWindows +} from '@/utils/get-home-stats-day-windows'; + +const seriesFromDays = ( + data: HomeChainStatsResponse | undefined, + prefix: 'blocksDay' | 'transfersDay' | 'activeAccountsDay' +): number[] => { + if (!data) return []; + + return Array.from({ length: HOME_STATS_DAY_COUNT }, (_, index) => { + const key = `${prefix}${index}` as keyof HomeChainStatsResponse; + const bucket = data[key] as HomeChainStatsResponse['blocksDay0']; + return bucket?.aggregate?.count ?? 0; + }); +}; + +const toPoints = ( + values: number[], + labels: string[], + formatValue: (value: number) => string +): SparklinePoint[] => + values.map((value, index) => ({ + value, + label: labels[index] ?? '', + displayValue: formatValue(value) + })); + +export const useChainStats = () => { + const api = useApiClient(); + const dayWindows = useHomeStatsDayWindows(); + const { loading, data, error } = api.chainStatus.useGetHomeStats({ + pollInterval: DATA_POOL_INTERVAL + }); + + const status = data?.status; + + const depositAccounts = status?.total_deposit_accounts ?? 0; + const totalAccounts = status?.total_accounts ?? 0; + const activeAccounts = totalAccounts - depositAccounts; + + const totalTransactions = + (status?.total_immediate_transfers ?? 0) + + (status?.total_scheduled_transfers ?? 0) + + (status?.total_executed_transfers ?? 0) + + (status?.total_cancelled_transfers ?? 0); + + const last24HourTransactions = data?.last24Hour?.aggregate?.count ?? 0; + + const dayLabels = useMemo( + () => dayWindows.map((window) => window.label), + [dayWindows] + ); + + const blocksPoints = useMemo( + () => + toPoints( + seriesFromDays(data, 'blocksDay'), + dayLabels, + (value) => `${value.toLocaleString()} blocks` + ), + [data, dayLabels] + ); + + const transfersPoints = useMemo( + () => + toPoints( + seriesFromDays(data, 'transfersDay'), + dayLabels, + (value) => `${value.toLocaleString()} txs` + ), + [data, dayLabels] + ); + + const activeAccountsPoints = useMemo( + () => + toPoints( + seriesFromDays(data, 'activeAccountsDay'), + dayLabels, + (value) => `${value.toLocaleString()} active` + ), + [data, dayLabels] + ); + + return { + loading, + error, + blockHeight: status?.block_height, + totalTransactions, + last24HourTransactions, + activeAccounts, + totalAccounts, + blocksPoints, + transfersPoints, + activeAccountsPoints + }; +}; diff --git a/src/components/features/landing/high-security-sets-table/HighSecuritySetsTable.tsx b/src/components/features/landing/high-security-sets-table/HighSecuritySetsTable.tsx deleted file mode 100644 index 1427281..0000000 --- a/src/components/features/landing/high-security-sets-table/HighSecuritySetsTable.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { DataTable } from '@/components/ui/composites/data-table/DataTable'; - -import { useHighSecuritySetsTable } from './hook'; - -export const HighSecuritySetsTable = () => { - const { getStatus, table, error } = useHighSecuritySetsTable(); - - return ( - Error : {error && error.message}

- }} - /> - ); -}; diff --git a/src/components/features/landing/high-security-sets-table/hook.tsx b/src/components/features/landing/high-security-sets-table/hook.tsx deleted file mode 100644 index c63cc09..0000000 --- a/src/components/features/landing/high-security-sets-table/hook.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { useMemo } from 'react'; - -import useApiClient from '@/api'; -import { HIGH_SECURITY_SET_COLUMNS } from '@/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import type { HighSecuritySet } from '@/schemas'; - -export const useHighSecuritySetsTable = () => { - const api = useApiClient(); - const { - loading, - data, - error: fetchError - } = api.highSecuritySets.useGetRecent({ - pollInterval: DATA_POOL_INTERVAL - }); - const highSecuritySetColumns = useMemo(() => HIGH_SECURITY_SET_COLUMNS, []); - - const table = useReactTable({ - data: data?.highSecuritySets ?? [], - columns: highSecuritySetColumns, - getCoreRowModel: getCoreRowModel(), - enableSorting: false, - rowCount: data?.highSecuritySets?.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/miner-rewards-table/MinerRewardsTable.tsx b/src/components/features/landing/miner-rewards-table/MinerRewardsTable.tsx deleted file mode 100644 index 8959b14..0000000 --- a/src/components/features/landing/miner-rewards-table/MinerRewardsTable.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { DataTable } from '@/components/ui/composites/data-table/DataTable'; - -import { useMinerRewardsTable } from './hook'; - -export const MinerRewardsTable = () => { - const { getStatus, table, error } = useMinerRewardsTable(); - - return ( - Error : {error && error.message}

- }} - /> - ); -}; diff --git a/src/components/features/landing/miner-rewards-table/hook.tsx b/src/components/features/landing/miner-rewards-table/hook.tsx deleted file mode 100644 index a588ee0..0000000 --- a/src/components/features/landing/miner-rewards-table/hook.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { useMemo } from 'react'; - -import useApiClient from '@/api'; -import { MINER_REWARD_COLUMNS } from '@/components/common/table-columns/MINER_REWARD_COLUMNS'; -import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import type { MinerReward } from '@/schemas'; - -export const useMinerRewardsTable = () => { - const api = useApiClient(); - const { - loading, - data, - error: fetchError - } = api.minerRewards.useGetRecent({ - pollInterval: DATA_POOL_INTERVAL - }); - const minerRewardColumns = useMemo(() => MINER_REWARD_COLUMNS, []); - - const table = useReactTable({ - data: data?.minerRewards ?? [], - columns: minerRewardColumns, - getCoreRowModel: getCoreRowModel(), - enableSorting: false, - rowCount: data?.minerRewards?.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/recent-blocks/RecentBlocks.tsx b/src/components/features/landing/recent-blocks/RecentBlocks.tsx index f69d258..0cfff64 100644 --- a/src/components/features/landing/recent-blocks/RecentBlocks.tsx +++ b/src/components/features/landing/recent-blocks/RecentBlocks.tsx @@ -1,6 +1,5 @@ import { Link } from '@tanstack/react-router'; -import { Button } from '@/components/ui/button'; import { ContentContainer } from '@/components/ui/content-container'; import { RESOURCES } from '@/constants/resources'; @@ -9,13 +8,16 @@ import { BlocksTable } from '../block-tables/BlocksTable'; export const RecentBlocks = () => { return ( -

Recent Blocks

+

Recent Blocks

- +
); }; diff --git a/src/components/features/landing/recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions.tsx b/src/components/features/landing/recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions.tsx deleted file mode 100644 index 8689d5a..0000000 --- a/src/components/features/landing/recent-cancelled-reversible-transactions/RecentCancelledReversibleTransactions.tsx +++ /dev/null @@ -1,23 +0,0 @@ -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-error-events/RecentErrorEvents.tsx b/src/components/features/landing/recent-error-events/RecentErrorEvents.tsx deleted file mode 100644 index 703618f..0000000 --- a/src/components/features/landing/recent-error-events/RecentErrorEvents.tsx +++ /dev/null @@ -1,21 +0,0 @@ -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 { ErrorEventsTable } from '../error-events-table/ErrorEventsTable'; - -export const RecentErrorEvents = () => { - return ( - -

Recent Error Events

- - - - -
- ); -}; diff --git a/src/components/features/landing/recent-error-events/RecentTransactions.tsx b/src/components/features/landing/recent-error-events/RecentTransactions.tsx deleted file mode 100644 index 4958237..0000000 --- a/src/components/features/landing/recent-error-events/RecentTransactions.tsx +++ /dev/null @@ -1,21 +0,0 @@ -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 { TransactionsTable } from '../transactions-table/TransactionsTable'; - -export const RecentTransactions = () => { - return ( - -

Recent Immediate Transactions

- - - - -
- ); -}; diff --git a/src/components/features/landing/recent-executed-reversible-transactions/RecentExecutedReversibleTransactions.tsx b/src/components/features/landing/recent-executed-reversible-transactions/RecentExecutedReversibleTransactions.tsx deleted file mode 100644 index b3f214f..0000000 --- a/src/components/features/landing/recent-executed-reversible-transactions/RecentExecutedReversibleTransactions.tsx +++ /dev/null @@ -1,23 +0,0 @@ -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 { ExecutedReversibleTransactionsTable } from '../executed-reversible-transactions-table/ExecutedReversibleTransactionsTable'; - -export const RecentExecutedReversibleTransactions = () => { - return ( - -

Recent Executed Reversible Transactions

- - - - -
- ); -}; diff --git a/src/components/features/landing/recent-high-security-sets/RecentHighSecuritySets.tsx b/src/components/features/landing/recent-high-security-sets/RecentHighSecuritySets.tsx deleted file mode 100644 index d38e4d5..0000000 --- a/src/components/features/landing/recent-high-security-sets/RecentHighSecuritySets.tsx +++ /dev/null @@ -1,21 +0,0 @@ -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 { HighSecuritySetsTable } from '../high-security-sets-table/HighSecuritySetsTable'; - -export const RecentHighSecuritySets = () => { - return ( - -

Recent High Security Sets

- - - - -
- ); -}; diff --git a/src/components/features/landing/recent-miner-rewards/RecentMinerRewards.tsx b/src/components/features/landing/recent-miner-rewards/RecentMinerRewards.tsx deleted file mode 100644 index 4965f92..0000000 --- a/src/components/features/landing/recent-miner-rewards/RecentMinerRewards.tsx +++ /dev/null @@ -1,21 +0,0 @@ -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 { MinerRewardsTable } from '../miner-rewards-table/MinerRewardsTable'; - -export const RecentMinerRewards = () => { - return ( - -

Recent Miner Rewards

- - - - -
- ); -}; diff --git a/src/components/features/landing/recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions.tsx b/src/components/features/landing/recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions.tsx deleted file mode 100644 index 6023c41..0000000 --- a/src/components/features/landing/recent-scheduled-reversible-transactions/RecentScheduledReversibleTransactions.tsx +++ /dev/null @@ -1,23 +0,0 @@ -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/recent-transactions/RecentTransactions.tsx b/src/components/features/landing/recent-transactions/RecentTransactions.tsx index 4958237..2c5fbcd 100644 --- a/src/components/features/landing/recent-transactions/RecentTransactions.tsx +++ b/src/components/features/landing/recent-transactions/RecentTransactions.tsx @@ -1,6 +1,5 @@ import { Link } from '@tanstack/react-router'; -import { Button } from '@/components/ui/button'; import { ContentContainer } from '@/components/ui/content-container'; import { RESOURCES } from '@/constants/resources'; @@ -9,13 +8,16 @@ import { TransactionsTable } from '../transactions-table/TransactionsTable'; export const RecentTransactions = () => { return ( -

Recent Immediate Transactions

+

Recent 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 deleted file mode 100644 index d265ceb..0000000 --- a/src/components/features/landing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index d7cfdaf..0000000 --- a/src/components/features/landing/scheduled-reversible-transactions-table/hook.tsx +++ /dev/null @@ -1,51 +0,0 @@ -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/components/features/landing/transactions-table/TransactionsTable.tsx b/src/components/features/landing/transactions-table/TransactionsTable.tsx index 0762ccb..801afb1 100644 --- a/src/components/features/landing/transactions-table/TransactionsTable.tsx +++ b/src/components/features/landing/transactions-table/TransactionsTable.tsx @@ -1,4 +1,5 @@ import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useTransactionsTable } from './hook'; @@ -10,7 +11,7 @@ export const TransactionsTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error : {error && error.message}

+ errorFallback: }} /> ); diff --git a/src/components/features/landing/transactions-table/hook.tsx b/src/components/features/landing/transactions-table/hook.tsx index d3823f4..47fa92c 100644 --- a/src/components/features/landing/transactions-table/hook.tsx +++ b/src/components/features/landing/transactions-table/hook.tsx @@ -2,9 +2,9 @@ import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useMemo } from 'react'; import useApiClient from '@/api'; -import { TRANSACTION_COLUMNS } from '@/components/common/table-columns/TRANSACTION_COLUMNS'; +import { RECENT_UNIFIED_LIST_TRANSACTION_COLUMNS } from '@/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import type { Transaction } from '@/schemas'; +import type { UnifiedListTransaction } from '@/schemas'; export const useTransactionsTable = () => { const api = useApiClient(); @@ -12,12 +12,15 @@ export const useTransactionsTable = () => { loading, data, error: fetchError - } = api.transactions.useGetRecent({ + } = api.unifiedTransactions.useGetRecent({ pollInterval: DATA_POOL_INTERVAL }); - const transactionColumns = useMemo(() => TRANSACTION_COLUMNS, []); + const transactionColumns = useMemo( + () => RECENT_UNIFIED_LIST_TRANSACTION_COLUMNS, + [] + ); - const table = useReactTable({ + const table = useReactTable({ data: data?.transactions ?? [], columns: transactionColumns, getCoreRowModel: getCoreRowModel(), diff --git a/src/components/features/miner-leaderboard/miner-leaderboard-chart/MinerLeaderboardChart.tsx b/src/components/features/miner-leaderboard/miner-leaderboard-chart/MinerLeaderboardChart.tsx index ed88d33..aaffaa2 100644 --- a/src/components/features/miner-leaderboard/miner-leaderboard-chart/MinerLeaderboardChart.tsx +++ b/src/components/features/miner-leaderboard/miner-leaderboard-chart/MinerLeaderboardChart.tsx @@ -1,125 +1,76 @@ -import { - ArcElement, - Chart, - type ChartOptions, - Legend, - Tooltip, - type TooltipItem -} from 'chart.js'; -import React, { useMemo } from 'react'; -import { Pie } from 'react-chartjs-2'; -import { useMediaQuery } from 'usehooks-ts'; +import React from 'react'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Card, CardContent } from '@/components/ui/card'; +import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; -import { formatTxAddress } from '@/utils/formatter'; +import { RESOURCES } from '@/constants/resources'; import { useMinerLeaderboardChart } from './hook'; -Chart.register(ArcElement, Legend, Tooltip); - -const SM_BREAKPOINT = '(min-width: 576px)'; - export const MinerLeaderboardChart = () => { - const isSmUp = useMediaQuery(SM_BREAKPOINT, { - defaultValue: false, - initializeWithValue: false - }); - - const { chartData, dominantMiner, total, getStatus, error } = + const { segments, legendItems, getStatus, error } = useMinerLeaderboardChart(); const status = getStatus(); - const pieOptions: ChartOptions<'pie'> = useMemo( - () => ({ - responsive: true, - maintainAspectRatio: true, - aspectRatio: 1, - layout: { - padding: isSmUp ? 12 : 8 - }, - plugins: { - legend: { - position: 'bottom', - labels: isSmUp - ? { - font: { size: 12 }, - padding: 10, - boxWidth: 40 - } - : { - font: { size: 10 }, - padding: 4, - boxWidth: 12 - } - }, - tooltip: { - callbacks: { - title: (tooltipItems: TooltipItem<'pie'>[]) => - tooltipItems[0]?.label ?? '', - label: (context: { - parsed: number; - dataset: { data: number[] }; - }) => { - const totalBlocks = context.dataset.data.reduce( - (a, b) => a + b, - 0 - ); - const pct = - totalBlocks > 0 - ? ((context.parsed / totalBlocks) * 100).toFixed(1) - : '0'; - return ` ${context.parsed.toLocaleString()} blocks (${pct}%)`; - } - } - } - } - }), - [isSmUp] - ); - return ( - - - -

Block Mining Distribution

-
-
- - {status === 'loading' && } - {status === 'error' &&

Error: {error && error.message}

} - {status === 'success' && chartData && ( -
- {dominantMiner && ( -

- Dominant miner:{' '} - - {formatTxAddress(dominantMiner.id ?? '')} - {' '} - with{' '} - - {(dominantMiner.total_mined_blocks ?? 0).toLocaleString()} - {' '} - blocks out of{' '} - - {total.toLocaleString()} - {' '} - total ( - {total > 0 - ? ( - ((dominantMiner.total_mined_blocks ?? 0) / total) * - 100 - ).toFixed(1) - : '0'} - %) -

- )} -
- +
+

+ Block Distribution +

+ + + + {status === 'loading' && } + {status === 'error' && } + {status === 'success' && segments.length > 0 && ( +
+
+ {segments.map((segment) => ( +
+ ))} +
+ +
+ {legendItems.map((item) => ( +
+ + {item.id ? ( + + ) : ( + {item.label} + )} +
+ ))} +
-
- )} -
-
+ )} + + +
); }; diff --git a/src/components/features/miner-leaderboard/miner-leaderboard-chart/hook.tsx b/src/components/features/miner-leaderboard/miner-leaderboard-chart/hook.tsx index 1c0c92d..943cf11 100644 --- a/src/components/features/miner-leaderboard/miner-leaderboard-chart/hook.tsx +++ b/src/components/features/miner-leaderboard/miner-leaderboard-chart/hook.tsx @@ -2,11 +2,20 @@ import { useMemo } from 'react'; import useApiClient from '@/api'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; -import { MINER_LEADERBOARD_CHART_TOP_N } from '@/constants/miner-leaderboard-chart'; -import { formatTxAddress } from '@/utils/formatter'; +import { + MINER_DISTRIBUTION_COLORS, + MINER_DISTRIBUTION_OTHERS_COLOR, + MINER_LEADERBOARD_CHART_LEGEND_N, + MINER_LEADERBOARD_CHART_TOP_N +} from '@/constants/miner-leaderboard-chart'; -const getCssVar = (name: string) => - `hsl(${getComputedStyle(document.documentElement).getPropertyValue(name).trim()})`; +export type DistributionSegment = { + id: string | null; + label: string; + blocks: number; + pct: number; + color: string; +}; export const useMinerLeaderboardChart = () => { const api = useApiClient(); @@ -20,60 +29,63 @@ export const useMinerLeaderboardChart = () => { variables: { limit: MINER_LEADERBOARD_CHART_TOP_N } }); - const chartData = useMemo(() => { - if (!data) return null; + const { segments, legendItems, total } = useMemo(() => { + if (!data) { + return { + segments: [] as DistributionSegment[], + legendItems: [] as DistributionSegment[], + total: 0 + }; + } - const total = data.blocks.totalCount ?? 0; + const totalBlocks = data.blocks.totalCount ?? 0; const { topMiners } = data; const topBlocksSum = topMiners.reduce( (sum, m) => sum + (m.total_mined_blocks ?? 0), 0 ); - const othersBlocks = total - topBlocksSum; + const othersBlocks = Math.max(0, totalBlocks - topBlocksSum); - const labels = [ - ...topMiners.map((m) => formatTxAddress(m.id ?? '')), - ...(othersBlocks > 0 ? ['Others'] : []) - ]; + const minerSegments: DistributionSegment[] = topMiners.map((m, i) => { + const blocks = m.total_mined_blocks ?? 0; + return { + id: m.id ?? null, + label: m.id ?? '', + blocks, + pct: totalBlocks > 0 ? (blocks / totalBlocks) * 100 : 0, + color: + MINER_DISTRIBUTION_COLORS[i % MINER_DISTRIBUTION_COLORS.length] ?? + MINER_DISTRIBUTION_OTHERS_COLOR + }; + }); - const values = [ - ...topMiners.map((m) => m.total_mined_blocks ?? 0), - ...(othersBlocks > 0 ? [othersBlocks] : []) - ]; + const othersSegment: DistributionSegment | null = + othersBlocks > 0 + ? { + id: null, + label: 'Others', + blocks: othersBlocks, + pct: totalBlocks > 0 ? (othersBlocks / totalBlocks) * 100 : 0, + color: MINER_DISTRIBUTION_OTHERS_COLOR + } + : null; - const chartColors = [ - getCssVar('--chart-1'), - getCssVar('--chart-2'), - getCssVar('--chart-3'), - getCssVar('--chart-4'), - getCssVar('--chart-5'), - getCssVar('--chart-6'), - getCssVar('--chart-7'), - getCssVar('--chart-8'), - getCssVar('--chart-9'), - getCssVar('--chart-10') - ]; + const allSegments = othersSegment + ? [...minerSegments, othersSegment] + : minerSegments; - const backgroundColors = [ - ...topMiners.map((_, i) => chartColors[i % chartColors.length]), - ...(othersBlocks > 0 ? [getCssVar('--muted-foreground')] : []) + const legendItems = [ + ...minerSegments.slice(0, MINER_LEADERBOARD_CHART_LEGEND_N), + ...(othersSegment ? [othersSegment] : []) ]; return { - labels, - datasets: [ - { - data: values, - backgroundColor: backgroundColors, - borderWidth: 0 - } - ] + segments: allSegments, + legendItems, + total: totalBlocks }; }, [data]); - const dominantMiner = data?.topMiners[0] ?? null; - const total = data?.blocks.totalCount ?? 0; - const success = !loading && !fetchError; const error = !loading && fetchError; @@ -91,8 +103,8 @@ export const useMinerLeaderboardChart = () => { }; return { - chartData, - dominantMiner, + segments, + legendItems, total, getStatus, error diff --git a/src/components/features/miner-leaderboard/miner-leaderboard-stats/MinerLeaderboardStats.tsx b/src/components/features/miner-leaderboard/miner-leaderboard-stats/MinerLeaderboardStats.tsx new file mode 100644 index 0000000..8f754bb --- /dev/null +++ b/src/components/features/miner-leaderboard/miner-leaderboard-stats/MinerLeaderboardStats.tsx @@ -0,0 +1,73 @@ +import React from 'react'; + +import useApiClient from '@/api'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; +import { Skeleton } from '@/components/ui/skeleton'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; + +export const MinerLeaderboardStats: React.FC = () => { + const api = useApiClient(); + const { loading, data, error } = api.minerLeaderboard.useGetStats({ + pollInterval: DATA_POOL_INTERVAL + }); + + const success = !loading && !error; + + return ( + + + + +

Total Blocks

+
+
+ + {success && ( +

{data?.chain?.block_height?.toLocaleString() ?? '—'}

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

Active Miners

+
+
+ + {success && ( +

{data?.chain?.total_miners?.toLocaleString() ?? '—'}

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

Rewards (24h)

+
+
+ + {success && ( +

+ {data?.last24Hour.aggregate.totalCount?.toLocaleString() ?? '—'} +

+ )} + {loading && } + {error && } +
+
+
+ ); +}; diff --git a/src/components/features/miner-leaderboard/miner-leaderboard-table/MinerLeaderboardTable.tsx b/src/components/features/miner-leaderboard/miner-leaderboard-table/MinerLeaderboardTable.tsx index 2beb737..c99e49c 100644 --- a/src/components/features/miner-leaderboard/miner-leaderboard-table/MinerLeaderboardTable.tsx +++ b/src/components/features/miner-leaderboard/miner-leaderboard-table/MinerLeaderboardTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMinerLeaderboardTable } from './hook'; @@ -12,7 +13,7 @@ export const MinerLeaderboardTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/miner-leaderboard/miner-leaderboard-table/hook.tsx b/src/components/features/miner-leaderboard/miner-leaderboard-table/hook.tsx index a26e850..53f69b2 100644 --- a/src/components/features/miner-leaderboard/miner-leaderboard-table/hook.tsx +++ b/src/components/features/miner-leaderboard/miner-leaderboard-table/hook.tsx @@ -2,7 +2,7 @@ import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useEffect, useMemo, useState } from 'react'; import useApiClient from '@/api'; -import { MINER_LEADERBOARD_COLUMNS } from '@/components/common/table-columns/MINER_LEADERBOARD_COLUMNS'; +import { getMinerLeaderboardColumns } from '@/components/common/table-columns/MINER_LEADERBOARD_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; import { useTableState } from '@/hooks/useTableState'; @@ -25,7 +25,19 @@ export const useMinerLeaderboardTable = () => { } }); - const minerLeaderboardColumns = useMemo(() => MINER_LEADERBOARD_COLUMNS, []); + const totalBlocks = data?.meta.block_height ?? 0; + const topMinerBlocks = data?.topMiner?.[0]?.total_mined_blocks ?? 0; + const maxSharePct = + totalBlocks > 0 ? (topMinerBlocks / totalBlocks) * 100 : 0; + + const minerLeaderboardColumns = useMemo( + () => + getMinerLeaderboardColumns({ + totalBlocks, + maxSharePct + }), + [totalBlocks, maxSharePct] + ); const [rowCount, setRowCount] = useState(data?.meta.totalCount ?? 0); const table = useReactTable({ diff --git a/src/components/features/miner-reward-details/miner-reward-information/MinerRewardInformation.tsx b/src/components/features/miner-reward-details/miner-reward-information/MinerRewardInformation.tsx index 330f428..91b9fc7 100644 --- a/src/components/features/miner-reward-details/miner-reward-information/MinerRewardInformation.tsx +++ b/src/components/features/miner-reward-details/miner-reward-information/MinerRewardInformation.tsx @@ -5,9 +5,10 @@ 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MinerReward } from '@/schemas'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; export interface MinerRewardInformationProps { hash: string; @@ -72,7 +73,7 @@ export const MinerRewardInformation: React.FC = ({ key: 'block', render: (value) => ( @@ -97,7 +98,7 @@ export const MinerRewardInformation: React.FC = ({ { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => } ]} /> diff --git a/src/components/features/miner-reward-listing/miner-rewards-stats/MinerRewardsStats.tsx b/src/components/features/miner-reward-listing/miner-rewards-stats/MinerRewardsStats.tsx index 0f5a1ce..1cc1527 100644 --- a/src/components/features/miner-reward-listing/miner-rewards-stats/MinerRewardsStats.tsx +++ b/src/components/features/miner-reward-listing/miner-rewards-stats/MinerRewardsStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -26,7 +33,7 @@ export const MinerRewardsStats: React.FC = () => { const success = !loading && !error; return ( -
+ @@ -36,7 +43,7 @@ export const MinerRewardsStats: React.FC = () => { {success &&

{data?.allTime?.total_miner_rewards}

} {loading && } - {error &&

Error: {error.message}

} + {error && }
@@ -49,9 +56,9 @@ export const MinerRewardsStats: React.FC = () => { {success &&

{data?.last24Hour.aggregate.totalCount}

} {loading && } - {error &&

Error: {error.message}

} + {error && }
-
+ ); }; diff --git a/src/components/features/miner-reward-listing/miner-rewards-table/MinerRewardsTable.tsx b/src/components/features/miner-reward-listing/miner-rewards-table/MinerRewardsTable.tsx index 91c40f2..6204bdd 100644 --- a/src/components/features/miner-reward-listing/miner-rewards-table/MinerRewardsTable.tsx +++ b/src/components/features/miner-reward-listing/miner-rewards-table/MinerRewardsTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMinerRewardsTable } from './hook'; @@ -12,7 +13,7 @@ export const MinerRewardsTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-created-details/multisig-created-fields.tsx b/src/components/features/multisig-created-details/multisig-created-fields.tsx index 140f221..237dd58 100644 --- a/src/components/features/multisig-created-details/multisig-created-fields.tsx +++ b/src/components/features/multisig-created-details/multisig-created-fields.tsx @@ -2,9 +2,11 @@ import * as React from 'react'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigCreated } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; type MultisigCreatedField = { label: string; @@ -13,16 +15,28 @@ type MultisigCreatedField = { render?: (value: unknown, item: Partial) => React.ReactNode; }; +const EmptyValue = () => ; + const getSharedMultisigConfigurationFields = (): MultisigCreatedField[] => [ { label: 'Threshold', key: 'threshold', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Nonce', key: 'nonce', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Creator', @@ -34,10 +48,9 @@ const getSharedMultisigConfigurationFields = (): MultisigCreatedField[] => [ href={`${RESOURCES.accounts}/${creatorId}`} text={creatorId} textCopy={creatorId} - className="break-all" /> ) : ( - '-' + ); } }, @@ -46,7 +59,7 @@ const getSharedMultisigConfigurationFields = (): MultisigCreatedField[] => [ key: 'signers', render: (value) => { const signers = value as string[] | undefined; - if (!signers?.length) return '-'; + if (!signers?.length) return ; return (
{signers.map((signer) => ( @@ -55,7 +68,6 @@ const getSharedMultisigConfigurationFields = (): MultisigCreatedField[] => [ href={`${RESOURCES.accounts}/${signer}`} text={signer} textCopy={signer} - className="break-all" /> ))}
@@ -68,52 +80,83 @@ export const getMultisigCreatedEventFields = (): MultisigCreatedField[] => [ { label: 'Extrinsic Hash', key: 'extrinsic', - render: (value) => - (value as MultisigCreated['extrinsic'])?.id ? ( - + render: (value) => { + const extrinsicId = (value as MultisigCreated['extrinsic'])?.id; + return extrinsicId ? ( + ) : ( - '-' - ) + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value as string, true) + render: (value) => + value ? : }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as MultisigCreated['block'] | undefined; + if (!block) return ; + return ( + + ); + } + }, + { + label: 'Multisig', + key: 'id', + render: (value) => + value ? ( + + ) : ( + + ) }, ...getSharedMultisigConfigurationFields() ]; export const getMultisigAccountFields = (): MultisigCreatedField[] => [ + { + label: 'Address', + key: 'id', + render: (value) => + value ? ( + + ) : ( + + ) + }, ...getSharedMultisigConfigurationFields(), { label: 'Created At', key: 'timestamp', - render: (value) => formatTimestamp(value as string, true) + render: (value) => + value ? : }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as MultisigCreated['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Creation Event', @@ -125,7 +168,7 @@ export const getMultisigAccountFields = (): MultisigCreatedField[] => [ text="View creation event" /> ) : ( - '-' + ) } ]; diff --git a/src/components/features/multisig-created-listing/multisig-created-stats/MultisigCreatedStats.tsx b/src/components/features/multisig-created-listing/multisig-created-stats/MultisigCreatedStats.tsx deleted file mode 100644 index ba2eec3..0000000 --- a/src/components/features/multisig-created-listing/multisig-created-stats/MultisigCreatedStats.tsx +++ /dev/null @@ -1,63 +0,0 @@ -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 const MultisigCreatedStats: React.FC = () => { - const api = useApiClient(); - const { block } = useSearch({ - strict: false - }) as { block?: string }; - - const shouldHide = !!block; - - const { loading, data, error } = api.multisigCreated.useGetStats({ - pollInterval: DATA_POOL_INTERVAL, - skip: shouldHide - }); - - if (shouldHide) return null; - - const success = !loading && !error; - - return ( -
- - - Total Multisigs Created - - - {success && ( -

- {data?.allTime.total_multisigs_created.toLocaleString()} -

- )} - {loading && } - {error && ( -

Error: {error.message}

- )} -
-
- - - - Recent Multisigs Created (24H) - - - {success && ( -

- {data?.last24Hour.aggregate.totalCount.toLocaleString()} -

- )} - {loading && } - {error && ( -

Error: {error.message}

- )} -
-
-
- ); -}; diff --git a/src/components/features/multisig-created-listing/multisig-created-table/MultisigCreatedTable.tsx b/src/components/features/multisig-created-listing/multisig-created-table/MultisigCreatedTable.tsx index 726353f..ddc8ba7 100644 --- a/src/components/features/multisig-created-listing/multisig-created-table/MultisigCreatedTable.tsx +++ b/src/components/features/multisig-created-listing/multisig-created-table/MultisigCreatedTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigCreatedTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigCreatedTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-deposits-claimed-details/multisig-deposits-claimed-information/MultisigDepositsClaimedInformation.tsx b/src/components/features/multisig-deposits-claimed-details/multisig-deposits-claimed-information/MultisigDepositsClaimedInformation.tsx index 879bfec..8554755 100644 --- a/src/components/features/multisig-deposits-claimed-details/multisig-deposits-claimed-information/MultisigDepositsClaimedInformation.tsx +++ b/src/components/features/multisig-deposits-claimed-details/multisig-deposits-claimed-information/MultisigDepositsClaimedInformation.tsx @@ -5,9 +5,11 @@ 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigDepositsClaimed } from '@/schemas'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigDepositsClaimedInformationProps { hash: string; @@ -61,16 +63,16 @@ export const MultisigDepositsClaimedInformation: React.FC< { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => }, { label: 'Block', key: 'block', render: (value) => ( @@ -84,7 +86,7 @@ export const MultisigDepositsClaimedInformation: React.FC< ?.id; return multisigId ? ( diff --git a/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-stats/MultisigDepositsClaimedStats.tsx b/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-stats/MultisigDepositsClaimedStats.tsx index c04b31e..980e2d2 100644 --- a/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-stats/MultisigDepositsClaimedStats.tsx +++ b/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-stats/MultisigDepositsClaimedStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -24,7 +31,7 @@ export const MultisigDepositsClaimedStats: React.FC = () => { const success = !loading && !error; return ( -
+ Total Deposits Claimed @@ -36,9 +43,7 @@ export const MultisigDepositsClaimedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && }
@@ -53,11 +58,9 @@ export const MultisigDepositsClaimedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && } -
+ ); }; diff --git a/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-table/MultisigDepositsClaimedTable.tsx b/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-table/MultisigDepositsClaimedTable.tsx index 68289a2..5ef0280 100644 --- a/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-table/MultisigDepositsClaimedTable.tsx +++ b/src/components/features/multisig-deposits-claimed-listing/multisig-deposits-claimed-table/MultisigDepositsClaimedTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigDepositsClaimedTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigDepositsClaimedTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-details/MultisigDetailDataTabs.tsx b/src/components/features/multisig-details/MultisigDetailDataTabs.tsx new file mode 100644 index 0000000..2eaa29c --- /dev/null +++ b/src/components/features/multisig-details/MultisigDetailDataTabs.tsx @@ -0,0 +1,66 @@ +import { useNavigate, useParams, useSearch } from '@tanstack/react-router'; +import { parseAsInteger, useQueryState } from 'nuqs'; +import * as React from 'react'; + +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import type { MultisigDetailTab } from '@/constants/multisig-detail'; + +import { MultisigDetailProposals } from './multisig-proposals/MultisigDetailProposals'; +import { MultisigDetailTransactions } from './multisig-transactions/MultisigDetailTransactions'; +import { MultisigDetailStatusFilter } from './MultisigDetailStatusFilter'; + +interface Props { + walletId: string; +} + +export const MultisigDetailDataTabs: React.FC = ({ walletId }) => { + const navigate = useNavigate(); + const { id } = useParams({ from: '/multisig/$id' }); + const [, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); + const [, setOrderBy] = useQueryState('order_by'); + const { tab = 'transactions', status } = useSearch({ + from: '/multisig/$id' + }); + + const handleTabChange = (value: string) => { + const nextTab = value as MultisigDetailTab; + void setPage(1); + void setOrderBy(null); + void navigate({ + to: '/multisig/$id', + params: { id }, + search: { + tab: nextTab, + status: nextTab === 'proposals' ? status : 'all' + } + }); + }; + + return ( + + + + Transactions + + + Proposals + + + + + + + + + + + + + ); +}; diff --git a/src/components/features/multisig-details/MultisigDetailStatusFilter.tsx b/src/components/features/multisig-details/MultisigDetailStatusFilter.tsx new file mode 100644 index 0000000..ddd86be --- /dev/null +++ b/src/components/features/multisig-details/MultisigDetailStatusFilter.tsx @@ -0,0 +1,57 @@ +import { useNavigate, useParams, useSearch } from '@tanstack/react-router'; +import { parseAsInteger, useQueryState } from 'nuqs'; +import * as React from 'react'; + +import { Button } from '@/components/ui/button'; +import { + formatMultisigProposalStatusLabel, + MULTISIG_PROPOSAL_STATUSES, + type MultisigProposalStatusFilter +} from '@/constants/multisig-listing'; +import { cn } from '@/lib/utils'; + +export const MultisigDetailStatusFilter: React.FC = () => { + const navigate = useNavigate(); + const { id } = useParams({ from: '/multisig/$id' }); + const [, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); + const { status = 'all', tab } = useSearch({ + from: '/multisig/$id' + }); + + const handleStatusChange = (nextStatus: MultisigProposalStatusFilter) => { + void setPage(1); + void navigate({ + to: '/multisig/$id', + params: { id }, + search: { + tab: tab ?? 'proposals', + status: nextStatus + } + }); + }; + + return ( +
+ {MULTISIG_PROPOSAL_STATUSES.map((s) => { + const isActive = status === s; + return ( + + ); + })} +
+ ); +}; diff --git a/src/components/features/multisig-details/index.tsx b/src/components/features/multisig-details/index.tsx new file mode 100644 index 0000000..f895b90 --- /dev/null +++ b/src/components/features/multisig-details/index.tsx @@ -0,0 +1,32 @@ +import { notFound } from '@tanstack/react-router'; +import * as React from 'react'; + +import useApiClient from '@/api'; +import { ContentContainer } from '@/components/ui/content-container'; +import { SectionContainer } from '@/components/ui/section-container'; + +import { MultisigDetailDataTabs } from './MultisigDetailDataTabs'; +import { MultisigInformation } from './multisig-information/MultisigInformation'; + +interface Props { + id: string; +} + +export const MultisigDetails: React.FC = ({ id }) => { + const api = useApiClient(); + const query = api.multisigCreated.getById().useQuery(id); + const { loading, data } = query; + + if (!loading && !data?.multisig) throw notFound(); + + return ( + + +

Multisig Wallet

+ + + +
+
+ ); +}; diff --git a/src/components/features/multisig-details/multisig-information/MultisigInformation.tsx b/src/components/features/multisig-details/multisig-information/MultisigInformation.tsx new file mode 100644 index 0000000..d876bbb --- /dev/null +++ b/src/components/features/multisig-details/multisig-information/MultisigInformation.tsx @@ -0,0 +1,38 @@ +import type { QueryResult } from '@apollo/client'; +import * as React from 'react'; + +import { getMultisigAccountFields } from '@/components/features/multisig-created-details/multisig-created-fields'; +import { DataList } from '@/components/ui/composites/data-list/DataList'; +import type { MultisigByIdResponse, MultisigCreated } from '@/schemas'; + +export interface MultisigInformationProps { + query: QueryResult; +} + +export const MultisigInformation: React.FC = ({ + query +}) => { + const { data, loading } = query; + const multisig = data?.multisig; + + const information: Partial[] = [ + { + id: multisig?.id, + timestamp: multisig?.timestamp, + block: multisig?.block, + extrinsic: multisig?.extrinsic, + creator: multisig?.creator, + threshold: multisig?.threshold, + nonce: multisig?.nonce, + signers: multisig?.signers + } + ]; + + return ( + > + loading={loading} + data={information} + fields={getMultisigAccountFields()} + /> + ); +}; diff --git a/src/components/features/multisig-details/multisig-proposals/MultisigDetailProposals.tsx b/src/components/features/multisig-details/multisig-proposals/MultisigDetailProposals.tsx new file mode 100644 index 0000000..6ca3f3b --- /dev/null +++ b/src/components/features/multisig-details/multisig-proposals/MultisigDetailProposals.tsx @@ -0,0 +1,25 @@ +import React from 'react'; + +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; + +import { useMultisigDetailProposals } from './hook'; + +interface Props { + walletId: string; +} + +export const MultisigDetailProposals: React.FC = ({ walletId }) => { + const { getStatus, table, error } = useMultisigDetailProposals(walletId); + + return ( + + }} + withControls + /> + ); +}; diff --git a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/hook.tsx b/src/components/features/multisig-details/multisig-proposals/hook.tsx similarity index 63% rename from src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/hook.tsx rename to src/components/features/multisig-details/multisig-proposals/hook.tsx index 2dd39b0..9e1ba06 100644 --- a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/hook.tsx +++ b/src/components/features/multisig-details/multisig-proposals/hook.tsx @@ -2,21 +2,22 @@ import { useSearch } from '@tanstack/react-router'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useEffect, useMemo, useState } from 'react'; +import type { Multisig_Proposal_Bool_Exp } from '@/__generated__/graphql'; import useApiClient from '@/api'; -import { SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS'; +import { MULTISIG_PROPOSAL_COLUMNS } from '@/components/common/table-columns/MULTISIG_PROPOSAL_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import type { ScheduledReversibleTransactionSorts } from '@/constants/query-sorts'; +import type { MultisigProposalSorts } from '@/constants/query-sorts'; import { useOrderBy } from '@/hooks/useOrderBy'; import { useTableState } from '@/hooks/useTableState'; -import type { ScheduledReversibleTransaction } from '@/schemas'; +import type { MultisigProposal } from '@/schemas'; import { transformSortLiteral } from '@/utils/transform-sort'; -export const useScheduledReversibleTransactionsTable = () => { +export const useMultisigDetailProposals = (walletId: string) => { const api = useApiClient(); - const { accountId, block } = useSearch({ - strict: false - }) as any; + const { status } = useSearch({ + from: '/multisig/$id' + }); const { orderBy, @@ -27,41 +28,42 @@ export const useScheduledReversibleTransactionsTable = () => { paginationValue } = useTableState(null, QUERY_DEFAULT_LIMIT); - const orderByObject = useOrderBy( - orderBy ?? '' - ); + const orderByObject = useOrderBy(orderBy ?? ''); const sortingValue = transformSortLiteral(orderBy); + const where = useMemo((): Multisig_Proposal_Bool_Exp => { + const filters: Multisig_Proposal_Bool_Exp = { + multisig: { id: { _eq: walletId } } + }; + + if (status && status !== 'all') { + filters.status = { _eq: status }; + } + + return filters; + }, [walletId, status]); + const { loading, data, error: fetchError - } = api.scheduledReversibleTransactions.useGetAll({ + } = api.multisigProposals.useGetAll({ pollInterval: DATA_POOL_INTERVAL, variables: { orderBy: orderByObject, limit, offset: currentPageIndex * limit, - ...(accountId && { - where: { - OR: [{ from: { id_eq: accountId } }, { to: { id_eq: accountId } }] - } - }), - ...(block && { - where: { - block: { height_eq: Number(block) } - } - }) + where } }); - const columns = useMemo(() => SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const columns = useMemo(() => MULTISIG_PROPOSAL_COLUMNS, []); const [rowCount, setRowCount] = useState( data?.meta.aggregate.totalCount ?? 0 ); - const table = useReactTable({ - data: data?.scheduledReversibleTransactions ?? [], + const table = useReactTable({ + data: data?.multisigProposals ?? [], columns, getCoreRowModel: getCoreRowModel(), state: { @@ -92,7 +94,7 @@ export const useScheduledReversibleTransactionsTable = () => { }; useEffect(() => { - if (!loading && data?.meta.aggregate.totalCount) + if (!loading && data?.meta.aggregate.totalCount !== undefined) setRowCount(data.meta.aggregate.totalCount); }, [loading, data?.meta.aggregate.totalCount]); diff --git a/src/components/features/multisig-details/multisig-transactions/MultisigDetailTransactions.tsx b/src/components/features/multisig-details/multisig-transactions/MultisigDetailTransactions.tsx new file mode 100644 index 0000000..56c6e85 --- /dev/null +++ b/src/components/features/multisig-details/multisig-transactions/MultisigDetailTransactions.tsx @@ -0,0 +1,25 @@ +import React from 'react'; + +import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; + +import { useMultisigDetailTransactions } from './hook'; + +interface Props { + walletId: string; +} + +export const MultisigDetailTransactions: React.FC = ({ walletId }) => { + const { getStatus, table, error } = useMultisigDetailTransactions(walletId); + + return ( + + }} + withControls + /> + ); +}; diff --git a/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/hook.tsx b/src/components/features/multisig-details/multisig-transactions/hook.tsx similarity index 60% rename from src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/hook.tsx rename to src/components/features/multisig-details/multisig-transactions/hook.tsx index c51788c..4851d8c 100644 --- a/src/components/features/executed-reversible-transaction-listing/executed-reversible-transactions-table/hook.tsx +++ b/src/components/features/multisig-details/multisig-transactions/hook.tsx @@ -1,22 +1,18 @@ -import { useSearch } from '@tanstack/react-router'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useEffect, useMemo, useState } from 'react'; import useApiClient from '@/api'; -import { EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS } from '@/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS'; +import { UNIFIED_LIST_TRANSACTION_COLUMNS } from '@/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import type { ExecutedReversibleTransactionSorts } from '@/constants/query-sorts'; +import type { UnifiedListTransactionSorts } from '@/constants/query-sorts'; import { useOrderBy } from '@/hooks/useOrderBy'; import { useTableState } from '@/hooks/useTableState'; -import type { ExecutedReversibleTransaction } from '@/schemas'; +import type { UnifiedListTransaction } from '@/schemas'; import { transformSortLiteral } from '@/utils/transform-sort'; -export const useExecutedReversibleTransactionsTable = () => { +export const useMultisigDetailTransactions = (walletId: string) => { const api = useApiClient(); - const { accountId, block } = useSearch({ - strict: false - }) as any; const { orderBy, @@ -27,45 +23,44 @@ export const useExecutedReversibleTransactionsTable = () => { paginationValue } = useTableState(null, QUERY_DEFAULT_LIMIT); - const orderByObject = useOrderBy( - orderBy ?? '' - ); + const orderByObject = useOrderBy(orderBy ?? ''); const sortingValue = transformSortLiteral(orderBy); + const where = useMemo( + () => ({ + _or: [ + { from: { id: { _eq: walletId } } }, + { to: { id: { _eq: walletId } } } + ] + }), + [walletId] + ); + const { loading, data, error: fetchError - } = api.executedReversibleTransactions.useGetAll({ + } = api.unifiedTransactions.useGetAll({ pollInterval: DATA_POOL_INTERVAL, variables: { orderBy: orderByObject, limit, offset: currentPageIndex * limit, - ...(accountId && { - where: { - OR: [ - { scheduledTransfer: { from: { id_eq: accountId } } }, - { scheduledTransfer: { to: { id_eq: accountId } } } - ] - } - }), - ...(block && { - where: { - block: { height_eq: Number(block) } - } - }) + where } }); - const columns = useMemo(() => EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS, []); + const transactionColumns = useMemo( + () => UNIFIED_LIST_TRANSACTION_COLUMNS, + [] + ); const [rowCount, setRowCount] = useState( data?.meta.aggregate.totalCount ?? 0 ); - const table = useReactTable({ - data: data?.executedReversibleTransactions ?? [], - columns, + const table = useReactTable({ + data: data?.transactions ?? [], + columns: transactionColumns, getCoreRowModel: getCoreRowModel(), state: { sorting: sortingValue, @@ -95,7 +90,7 @@ export const useExecutedReversibleTransactionsTable = () => { }; useEffect(() => { - if (!loading && data?.meta.aggregate.totalCount) + if (!loading && data?.meta.aggregate.totalCount != null) setRowCount(data.meta.aggregate.totalCount); }, [loading, data?.meta.aggregate.totalCount]); diff --git a/src/components/features/multisig-listing/MultisigDataTabs.tsx b/src/components/features/multisig-listing/MultisigDataTabs.tsx new file mode 100644 index 0000000..9efb8a8 --- /dev/null +++ b/src/components/features/multisig-listing/MultisigDataTabs.tsx @@ -0,0 +1,65 @@ +import { useNavigate, useSearch } from '@tanstack/react-router'; +import { parseAsInteger, useQueryState } from 'nuqs'; +import * as React from 'react'; + +import { MultisigCreatedTable } from '@/components/features/multisig-created-listing/multisig-created-table/MultisigCreatedTable'; +import { MultisigProposalTable } from '@/components/features/multisig-proposal-listing/multisig-proposal-table/MultisigProposalTable'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import type { MultisigTab } from '@/constants/multisig-listing'; + +import { MultisigStatusFilter } from './MultisigStatusFilter'; + +export const MultisigDataTabs: React.FC = () => { + const navigate = useNavigate(); + const [, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); + const [, setOrderBy] = useQueryState('order_by'); + const { + tab = 'wallets', + status, + block + } = useSearch({ + from: '/multisig/' + }); + + const handleTabChange = (value: string) => { + const nextTab = value as MultisigTab; + void setPage(1); + void setOrderBy(null); + void navigate({ + to: '/multisig', + search: { + tab: nextTab, + status: nextTab === 'proposals' ? status ?? 'all' : 'all', + ...(block ? { block } : {}) + } + }); + }; + + return ( + + + + Wallets + + + Proposals + + + + + + + + + + + + + ); +}; diff --git a/src/components/features/multisig-created-listing/multisig-created-heading/MultisigCreatedHeading.tsx b/src/components/features/multisig-listing/MultisigHeading.tsx similarity index 63% rename from src/components/features/multisig-created-listing/multisig-created-heading/MultisigCreatedHeading.tsx rename to src/components/features/multisig-listing/MultisigHeading.tsx index f0fda1f..8116e54 100644 --- a/src/components/features/multisig-created-listing/multisig-created-heading/MultisigCreatedHeading.tsx +++ b/src/components/features/multisig-listing/MultisigHeading.tsx @@ -1,16 +1,16 @@ import { Link, useSearch } from '@tanstack/react-router'; import * as React from 'react'; -export const MultisigCreatedHeading: React.FC = () => { +export const MultisigHeading: React.FC = () => { const { block } = useSearch({ strict: false }) as { block?: string }; return (
-

Multisig Created

+

Multisig

{block ? ( -
+
In block {
) : ( -

- A list of all multisig wallets created on the network. +

+ On-chain multisig wallets and their proposal lifecycle

)}
diff --git a/src/components/features/multisig-listing/MultisigStats.tsx b/src/components/features/multisig-listing/MultisigStats.tsx new file mode 100644 index 0000000..459f1ef --- /dev/null +++ b/src/components/features/multisig-listing/MultisigStats.tsx @@ -0,0 +1,98 @@ +import { useSearch } from '@tanstack/react-router'; +import React from 'react'; + +import useApiClient from '@/api'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; +import { Skeleton } from '@/components/ui/skeleton'; +import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; + +export const MultisigStats: React.FC = () => { + const api = useApiClient(); + const { block } = useSearch({ + strict: false + }) as { block?: string }; + + const shouldHide = !!block; + + const walletsStats = api.multisigCreated.useGetStats({ + pollInterval: DATA_POOL_INTERVAL, + skip: shouldHide + }); + + const proposalsStats = api.multisigProposals.useGetStats({ + pollInterval: DATA_POOL_INTERVAL, + skip: shouldHide + }); + + if (shouldHide) return null; + + const walletsLoading = walletsStats.loading; + const walletsError = walletsStats.error; + const walletsSuccess = !walletsLoading && !walletsError; + + const proposalsLoading = proposalsStats.loading; + const proposalsError = proposalsStats.error; + const proposalsSuccess = !proposalsLoading && !proposalsError; + + return ( + + + + +

Total Wallets

+
+
+ + {walletsSuccess && ( +

+ {walletsStats.data?.allTime.total_multisigs_created.toLocaleString()} +

+ )} + {walletsLoading && } + {walletsError && } +
+
+ + + + +

Total Proposals

+
+
+ + {proposalsSuccess && ( +

+ {proposalsStats.data?.allTime.total_multisig_proposals.toLocaleString()} +

+ )} + {proposalsLoading && } + {proposalsError && } +
+
+ + + + +

Proposals (24h)

+
+
+ + {proposalsSuccess && ( +

+ {proposalsStats.data?.last24Hour.aggregate.totalCount.toLocaleString()} +

+ )} + {proposalsLoading && } + {proposalsError && } +
+
+
+ ); +}; diff --git a/src/components/features/multisig-listing/MultisigStatusFilter.tsx b/src/components/features/multisig-listing/MultisigStatusFilter.tsx new file mode 100644 index 0000000..f8d9c9a --- /dev/null +++ b/src/components/features/multisig-listing/MultisigStatusFilter.tsx @@ -0,0 +1,60 @@ +import { useNavigate, useSearch } from '@tanstack/react-router'; +import { parseAsInteger, useQueryState } from 'nuqs'; +import * as React from 'react'; + +import { Button } from '@/components/ui/button'; +import { + formatMultisigProposalStatusLabel, + MULTISIG_PROPOSAL_STATUSES, + type MultisigProposalStatusFilter +} from '@/constants/multisig-listing'; +import { cn } from '@/lib/utils'; + +export const MultisigStatusFilter: React.FC = () => { + const navigate = useNavigate(); + const [, setPage] = useQueryState('page', parseAsInteger.withDefault(1)); + const { + status = 'all', + tab, + block + } = useSearch({ + from: '/multisig/' + }); + + const handleStatusChange = (nextStatus: MultisigProposalStatusFilter) => { + void setPage(1); + void navigate({ + to: '/multisig', + search: { + tab: tab ?? 'proposals', + status: nextStatus, + ...(block ? { block } : {}) + } + }); + }; + + return ( +
+ {MULTISIG_PROPOSAL_STATUSES.map((s) => { + const isActive = status === s; + return ( + + ); + })} +
+ ); +}; diff --git a/src/components/features/multisig-proposal-cancelled-details/multisig-proposal-cancelled-information/MultisigProposalCancelledInformation.tsx b/src/components/features/multisig-proposal-cancelled-details/multisig-proposal-cancelled-information/MultisigProposalCancelledInformation.tsx index f04b8e4..0743930 100644 --- a/src/components/features/multisig-proposal-cancelled-details/multisig-proposal-cancelled-information/MultisigProposalCancelledInformation.tsx +++ b/src/components/features/multisig-proposal-cancelled-details/multisig-proposal-cancelled-information/MultisigProposalCancelledInformation.tsx @@ -6,14 +6,18 @@ import { DataList } from '@/components/ui/composites/data-list/DataList'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/ProposalIdLink'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalCancelled } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigProposalCancelledInformationProps { hash: string; } +const EmptyValue = () => ; + export const MultisigProposalCancelledInformation: React.FC< MultisigProposalCancelledInformationProps > = ({ hash }) => { @@ -45,35 +49,42 @@ export const MultisigProposalCancelledInformation: React.FC< { label: 'Extrinsic Hash', key: 'extrinsic', - render: (value) => - (value as MultisigProposalCancelled['extrinsic'])?.id ? ( - + render: (value) => { + const extrinsicId = ( + value as MultisigProposalCancelled['extrinsic'] + )?.id; + return extrinsicId ? ( + ) : ( - '-' - ) + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as + | MultisigProposalCancelled['block'] + | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Proposal', @@ -92,12 +103,12 @@ export const MultisigProposalCancelledInformation: React.FC< ?.multisig?.id; return multisigId ? ( ) : ( - '-' + ); } }, @@ -111,10 +122,10 @@ export const MultisigProposalCancelledInformation: React.FC< ) : ( - '-' + ); } }, @@ -129,10 +140,10 @@ export const MultisigProposalCancelledInformation: React.FC< ) : ( - '-' + ); } } diff --git a/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-stats/MultisigProposalCancelledStats.tsx b/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-stats/MultisigProposalCancelledStats.tsx index 05673f3..8da5099 100644 --- a/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-stats/MultisigProposalCancelledStats.tsx +++ b/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-stats/MultisigProposalCancelledStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -24,7 +31,7 @@ export const MultisigProposalCancelledStats: React.FC = () => { const success = !loading && !error; return ( -
+ Total Proposal Cancelled @@ -36,9 +43,7 @@ export const MultisigProposalCancelledStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && }
@@ -53,11 +58,9 @@ export const MultisigProposalCancelledStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && } -
+ ); }; diff --git a/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-table/MultisigProposalCancelledTable.tsx b/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-table/MultisigProposalCancelledTable.tsx index 4cf95fb..b76486d 100644 --- a/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-table/MultisigProposalCancelledTable.tsx +++ b/src/components/features/multisig-proposal-cancelled-listing/multisig-proposal-cancelled-table/MultisigProposalCancelledTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigProposalCancelledTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigProposalCancelledTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-proposal-created-details/multisig-proposal-created-information/MultisigProposalCreatedInformation.tsx b/src/components/features/multisig-proposal-created-details/multisig-proposal-created-information/MultisigProposalCreatedInformation.tsx index ea66f41..c36e3c8 100644 --- a/src/components/features/multisig-proposal-created-details/multisig-proposal-created-information/MultisigProposalCreatedInformation.tsx +++ b/src/components/features/multisig-proposal-created-details/multisig-proposal-created-information/MultisigProposalCreatedInformation.tsx @@ -6,14 +6,18 @@ import { DataList } from '@/components/ui/composites/data-list/DataList'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/ProposalIdLink'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalCreated } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigProposalCreatedInformationProps { hash: string; } +const EmptyValue = () => ; + export const MultisigProposalCreatedInformation: React.FC< MultisigProposalCreatedInformationProps > = ({ hash }) => { @@ -44,35 +48,39 @@ export const MultisigProposalCreatedInformation: React.FC< { label: 'Extrinsic Hash', key: 'extrinsic', - render: (value) => - (value as MultisigProposalCreated['extrinsic'])?.id ? ( - + render: (value) => { + const extrinsicId = (value as MultisigProposalCreated['extrinsic']) + ?.id; + return extrinsicId ? ( + ) : ( - '-' - ) + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as MultisigProposalCreated['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Proposal', @@ -91,12 +99,12 @@ export const MultisigProposalCreatedInformation: React.FC< ?.multisig?.id; return multisigId ? ( ) : ( - '-' + ); } }, @@ -110,10 +118,10 @@ export const MultisigProposalCreatedInformation: React.FC< ) : ( - '-' + ); } } diff --git a/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-stats/MultisigProposalCreatedStats.tsx b/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-stats/MultisigProposalCreatedStats.tsx index 17ddee5..a3e7bb8 100644 --- a/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-stats/MultisigProposalCreatedStats.tsx +++ b/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-stats/MultisigProposalCreatedStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -24,7 +31,7 @@ export const MultisigProposalCreatedStats: React.FC = () => { const success = !loading && !error; return ( -
+ Total Proposal Created @@ -36,9 +43,7 @@ export const MultisigProposalCreatedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && }
@@ -53,11 +58,9 @@ export const MultisigProposalCreatedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && } -
+ ); }; diff --git a/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-table/MultisigProposalCreatedTable.tsx b/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-table/MultisigProposalCreatedTable.tsx index 41c4472..4aa14d6 100644 --- a/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-table/MultisigProposalCreatedTable.tsx +++ b/src/components/features/multisig-proposal-created-listing/multisig-proposal-created-table/MultisigProposalCreatedTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigProposalCreatedTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigProposalCreatedTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-proposal-details/multisig-proposal-information/MultisigProposalInformation.tsx b/src/components/features/multisig-proposal-details/multisig-proposal-information/MultisigProposalInformation.tsx index ff0e363..9598880 100644 --- a/src/components/features/multisig-proposal-details/multisig-proposal-information/MultisigProposalInformation.tsx +++ b/src/components/features/multisig-proposal-details/multisig-proposal-information/MultisigProposalInformation.tsx @@ -3,9 +3,18 @@ import * as React from 'react'; import { useMemo } from 'react'; import useApiClient from '@/api'; +import { Badge, type BadgeProps } from '@/components/ui/badge'; 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 { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow +} from '@/components/ui/table'; import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import { TRANSACTION_TYPE_CONFIG } from '@/constants/transaction-types'; @@ -14,10 +23,11 @@ import type { MultisigProposalLifecycleEvent } from '@/schemas'; import type { UnifiedTransactionType } from '@/schemas/unified-transaction'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; import { getExtrinsicDetailPath } from '@/utils/get-extrinsic-detail-path'; import { getMultisigProposalEventHref } from '@/utils/get-multisig-proposal-event-href'; import { getMultisigProposalKind } from '@/utils/get-multisig-proposal-kind'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigProposalInformationProps { id: string; @@ -27,6 +37,27 @@ type LifecycleRow = MultisigProposalLifecycleEvent & { type: UnifiedTransactionType; }; +const EmptyValue = () => ; + +const statusBadgeVariant = ( + status: string | null | undefined +): BadgeProps['variant'] => { + switch (status?.toUpperCase()) { + case 'SCHEDULED': + return 'reversible'; + case 'APPROVED': + case 'READY': + return 'immediate'; + case 'EXECUTED': + return 'success'; + case 'CANCELLED': + case 'REMOVED': + return 'error'; + default: + return 'miner'; + } +}; + const LIFECYCLE_SECTIONS: { type: UnifiedTransactionType; key: @@ -50,10 +81,21 @@ const accountLink = (accountId?: string | null) => ) : ( - '-' + + ); + +const walletLink = (walletId?: string | null) => + walletId ? ( + + ) : ( + ); type ProposalField = { @@ -67,18 +109,35 @@ const BASE_PROPOSAL_FIELDS: ProposalField[] = [ label: 'ID', key: 'id', render: (value) => - value ? : '-' + value ? ( + + ) : ( + + ) }, { label: 'Status', key: 'status', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + + {String(value)} + + ) : ( + + ) }, { label: 'Deposit', key: 'deposit', render: (value) => - value != null ? formatMonetaryValue(String(value), 5) : '-' + value != null ? ( + + {formatMonetaryValue(String(value), 5)} + + ) : ( + + ) }, { label: 'Expiry Block', @@ -90,32 +149,39 @@ const BASE_PROPOSAL_FIELDS: ProposalField[] = [ text={String(value)} /> ) : ( - '-' + ) }, { label: 'Pallet / Call', key: 'pallet', render: (_value, item) => - item.pallet && item.call ? `${item.pallet}.${item.call}` : '-' + item.pallet && item.call ? ( + + {item.pallet}.{item.call} + + ) : ( + + ) }, { label: 'Created At', key: 'created_at', - render: (value) => formatTimestamp(value as string, true) + render: (value) => + value ? : }, { label: 'Creation Block', key: 'createdAtBlock', render: (value) => { - const block = value as MultisigProposal['createdAtBlock']; + const block = value as MultisigProposal['createdAtBlock'] | undefined; return block?.height != null ? ( ) : ( - '-' + ); } }, @@ -123,8 +189,10 @@ const BASE_PROPOSAL_FIELDS: ProposalField[] = [ label: 'Creation Extrinsic', key: 'createdExtrinsic', render: (value) => { - const extrinsic = value as MultisigProposal['createdExtrinsic']; - if (!extrinsic?.id) return '-'; + const extrinsic = value as + | MultisigProposal['createdExtrinsic'] + | undefined; + if (!extrinsic?.id) return ; const href = extrinsic.pallet && extrinsic.call ? getExtrinsicDetailPath({ @@ -134,7 +202,12 @@ const BASE_PROPOSAL_FIELDS: ProposalField[] = [ }) : undefined; return href ? ( - + ) : ( ); @@ -143,7 +216,7 @@ const BASE_PROPOSAL_FIELDS: ProposalField[] = [ { label: 'Multisig', key: 'multisig', - render: (value) => accountLink((value as MultisigProposal['multisig'])?.id) + render: (value) => walletLink((value as MultisigProposal['multisig'])?.id) }, { label: 'Proposer', @@ -155,7 +228,7 @@ const BASE_PROPOSAL_FIELDS: ProposalField[] = [ key: 'approvals', render: (value) => { const approvals = value as string[] | undefined; - if (!approvals?.length) return '-'; + if (!approvals?.length) return ; return (
{approvals.map((approver) => ( @@ -163,7 +236,7 @@ const BASE_PROPOSAL_FIELDS: ProposalField[] = [ key={approver} href={`${RESOURCES.accounts}/${approver}`} text={approver} - className="break-all" + textCopy={approver} /> ))}
@@ -183,7 +256,13 @@ const BALANCE_TRANSFER_FIELDS: ProposalField[] = [ label: 'Transfer Amount', key: 'transfer_amount', render: (value) => - value != null ? formatMonetaryValue(String(value), 5) : '-' + value != null ? ( + + {formatMonetaryValue(String(value), 5)} + + ) : ( + + ) } ]; @@ -198,34 +277,56 @@ const SCHEDULED_TRANSFER_FIELDS: ProposalField[] = [ label: 'Schedule Amount', key: 'schedule_amount', render: (value) => - value != null ? formatMonetaryValue(String(value), 5) : '-' + value != null ? ( + + {formatMonetaryValue(String(value), 5)} + + ) : ( + + ) }, { label: 'Delay Kind', key: 'delay_kind', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Delay Value', key: 'delay_value', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Schedule Asset ID', key: 'schedule_asset_id', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Tx ID', key: 'tx_id', render: (value) => { - if (!value) return '-'; + if (!value) return ; const txId = String(value); return ( ); @@ -237,12 +338,22 @@ const SET_HIGH_SECURITY_FIELDS: ProposalField[] = [ { label: 'Delay Value', key: 'delay_value', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Delay Kind', key: 'delay_kind', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Guardian', @@ -264,7 +375,12 @@ const TAIL_PROPOSAL_FIELDS: ProposalField[] = [ { label: 'Decode Error', key: 'decode_error', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + + ) : ( + + ) } ]; @@ -308,7 +424,7 @@ export const MultisigProposalInformation: React.FC< if (!loading && !data?.multisigProposal) throw notFound(); - const information: Partial[] = proposal ? [proposal] : []; + const information: Partial[] = [proposal ?? { id }]; const lifecycleRows: LifecycleRow[] = LIFECYCLE_SECTIONS.flatMap( ({ type, key }) => @@ -321,66 +437,69 @@ export const MultisigProposalInformation: React.FC< ); return ( - <> +
> loading={loading} data={information} fields={fields} /> -

Lifecycle Events

- {loading &&

Loading...

} - {!loading && lifecycleRows.length === 0 && ( -

- No lifecycle events found. -

- )} - {!loading && lifecycleRows.length > 0 && ( -
- - - - - - - - - - {lifecycleRows.map((row) => { - const config = TRANSACTION_TYPE_CONFIG[row.type]; - const eventHref = getMultisigProposalEventHref( - row.type, - row.extrinsic?.id - ); - return ( - - - - - - ); - })} - -
EventBlockTimestamp
- {eventHref ? ( - - ) : ( - config.label - )} - - {row.block?.height != null ? ( - - ) : ( - '-' - )} - - -
-
- )} - +
+

Lifecycle Events

+ + {loading &&

Loading...

} + {!loading && lifecycleRows.length === 0 && ( +

+ No lifecycle events found. +

+ )} + {!loading && lifecycleRows.length > 0 && ( +
+ + + + Event + Block + Timestamp + + + + {lifecycleRows.map((row) => { + const config = TRANSACTION_TYPE_CONFIG[row.type]; + const eventHref = getMultisigProposalEventHref( + row.type, + row.extrinsic?.id + ); + return ( + + + {eventHref ? ( + + ) : ( + config.label + )} + + + {row.block?.height != null ? ( + + ) : ( + + )} + + + + + + ); + })} + +
+
+ )} +
+
); }; diff --git a/src/components/features/multisig-proposal-executed-details/multisig-proposal-executed-information/MultisigProposalExecutedInformation.tsx b/src/components/features/multisig-proposal-executed-details/multisig-proposal-executed-information/MultisigProposalExecutedInformation.tsx index 0a7dc18..ad8454c 100644 --- a/src/components/features/multisig-proposal-executed-details/multisig-proposal-executed-information/MultisigProposalExecutedInformation.tsx +++ b/src/components/features/multisig-proposal-executed-details/multisig-proposal-executed-information/MultisigProposalExecutedInformation.tsx @@ -6,14 +6,18 @@ import { DataList } from '@/components/ui/composites/data-list/DataList'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/ProposalIdLink'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalExecuted } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigProposalExecutedInformationProps { hash: string; } +const EmptyValue = () => ; + export const MultisigProposalExecutedInformation: React.FC< MultisigProposalExecutedInformationProps > = ({ hash }) => { @@ -46,35 +50,41 @@ export const MultisigProposalExecutedInformation: React.FC< { label: 'Extrinsic Hash', key: 'extrinsic', - render: (value) => - (value as MultisigProposalExecuted['extrinsic'])?.id ? ( - + render: (value) => { + const extrinsicId = (value as MultisigProposalExecuted['extrinsic']) + ?.id; + return extrinsicId ? ( + ) : ( - '-' - ) + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as + | MultisigProposalExecuted['block'] + | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Proposal', @@ -93,12 +103,12 @@ export const MultisigProposalExecutedInformation: React.FC< ?.multisig?.id; return multisigId ? ( ) : ( - '-' + ); } }, @@ -112,10 +122,10 @@ export const MultisigProposalExecutedInformation: React.FC< ) : ( - '-' + ); } }, @@ -124,7 +134,7 @@ export const MultisigProposalExecutedInformation: React.FC< key: 'approvers', render: (value) => { const approvers = value as string[] | undefined; - if (!approvers?.length) return '-'; + if (!approvers?.length) return ; return (
{approvers.map((approver) => ( @@ -132,7 +142,7 @@ export const MultisigProposalExecutedInformation: React.FC< key={approver} href={`${RESOURCES.accounts}/${approver}`} text={approver} - className="break-all" + textCopy={approver} /> ))}
@@ -142,7 +152,12 @@ export const MultisigProposalExecutedInformation: React.FC< { label: 'Result', key: 'result', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) } ]} /> diff --git a/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-stats/MultisigProposalExecutedStats.tsx b/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-stats/MultisigProposalExecutedStats.tsx index 217e81e..f3b0aa4 100644 --- a/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-stats/MultisigProposalExecutedStats.tsx +++ b/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-stats/MultisigProposalExecutedStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -24,7 +31,7 @@ export const MultisigProposalExecutedStats: React.FC = () => { const success = !loading && !error; return ( -
+ Total Proposal Executed @@ -36,9 +43,7 @@ export const MultisigProposalExecutedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && }
@@ -53,11 +58,9 @@ export const MultisigProposalExecutedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && } -
+ ); }; diff --git a/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-table/MultisigProposalExecutedTable.tsx b/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-table/MultisigProposalExecutedTable.tsx index 3878e53..1243476 100644 --- a/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-table/MultisigProposalExecutedTable.tsx +++ b/src/components/features/multisig-proposal-executed-listing/multisig-proposal-executed-table/MultisigProposalExecutedTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigProposalExecutedTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigProposalExecutedTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-proposal-listing/multisig-proposal-heading/MultisigProposalHeading.tsx b/src/components/features/multisig-proposal-listing/multisig-proposal-heading/MultisigProposalHeading.tsx deleted file mode 100644 index a831e44..0000000 --- a/src/components/features/multisig-proposal-listing/multisig-proposal-heading/MultisigProposalHeading.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import * as React from 'react'; - -export const MultisigProposalHeading: React.FC = () => ( -
-

Multisig Proposals

-

- Browse on-chain multisig proposals and their current state. -

-
-); diff --git a/src/components/features/multisig-proposal-listing/multisig-proposal-stats/MultisigProposalStats.tsx b/src/components/features/multisig-proposal-listing/multisig-proposal-stats/MultisigProposalStats.tsx deleted file mode 100644 index 4eb5f9b..0000000 --- a/src/components/features/multisig-proposal-listing/multisig-proposal-stats/MultisigProposalStats.tsx +++ /dev/null @@ -1,63 +0,0 @@ -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 const MultisigProposalStats: React.FC = () => { - const api = useApiClient(); - const { block } = useSearch({ - strict: false - }) as { block?: string }; - - const shouldHide = !!block; - - const { loading, data, error } = api.multisigProposals.useGetStats({ - pollInterval: DATA_POOL_INTERVAL, - skip: shouldHide - }); - - if (shouldHide) return null; - - const success = !loading && !error; - - return ( -
- - - Total Multisig Proposals - - - {success && ( -

- {data?.allTime.total_multisig_proposals.toLocaleString()} -

- )} - {loading && } - {error && ( -

Error: {error.message}

- )} -
-
- - - - Recent Proposals (24H) - - - {success && ( -

- {data?.last24Hour.aggregate.totalCount.toLocaleString()} -

- )} - {loading && } - {error && ( -

Error: {error.message}

- )} -
-
-
- ); -}; diff --git a/src/components/features/multisig-proposal-listing/multisig-proposal-table/MultisigProposalTable.tsx b/src/components/features/multisig-proposal-listing/multisig-proposal-table/MultisigProposalTable.tsx index ffb3f36..d44de06 100644 --- a/src/components/features/multisig-proposal-listing/multisig-proposal-table/MultisigProposalTable.tsx +++ b/src/components/features/multisig-proposal-listing/multisig-proposal-table/MultisigProposalTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigProposalTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigProposalTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-proposal-listing/multisig-proposal-table/hook.tsx b/src/components/features/multisig-proposal-listing/multisig-proposal-table/hook.tsx index caecd39..93b3cfc 100644 --- a/src/components/features/multisig-proposal-listing/multisig-proposal-table/hook.tsx +++ b/src/components/features/multisig-proposal-listing/multisig-proposal-table/hook.tsx @@ -2,6 +2,7 @@ import { useSearch } from '@tanstack/react-router'; import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useEffect, useMemo, useState } from 'react'; +import type { Multisig_Proposal_Bool_Exp } from '@/__generated__/graphql'; import useApiClient from '@/api'; import { MULTISIG_PROPOSAL_COLUMNS } from '@/components/common/table-columns/MULTISIG_PROPOSAL_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -14,9 +15,9 @@ import { transformSortLiteral } from '@/utils/transform-sort'; export const useMultisigProposalTable = () => { const api = useApiClient(); - const { block } = useSearch({ + const { block, status } = useSearch({ strict: false - }) as { block?: string }; + }) as { block?: string; status?: string }; const { orderBy, @@ -30,6 +31,20 @@ export const useMultisigProposalTable = () => { const orderByObject = useOrderBy(orderBy ?? ''); const sortingValue = transformSortLiteral(orderBy); + const where = useMemo((): Multisig_Proposal_Bool_Exp | undefined => { + const filters: Multisig_Proposal_Bool_Exp = {}; + + if (block) { + filters.createdAtBlock = { height: { _eq: Number(block) } }; + } + + if (status && status !== 'all') { + filters.status = { _eq: status }; + } + + return Object.keys(filters).length > 0 ? filters : undefined; + }, [block, status]); + const { loading, data, @@ -40,11 +55,7 @@ export const useMultisigProposalTable = () => { orderBy: orderByObject, limit, offset: currentPageIndex * limit, - ...(block && { - where: { - createdAtBlock: { height: { _eq: Number(block) } } - } - }) + ...(where && { where }) } }); @@ -85,7 +96,7 @@ export const useMultisigProposalTable = () => { }; useEffect(() => { - if (!loading && data?.meta.aggregate.totalCount) + if (!loading && data?.meta.aggregate.totalCount !== undefined) setRowCount(data.meta.aggregate.totalCount); }, [loading, data?.meta.aggregate.totalCount]); diff --git a/src/components/features/multisig-proposal-ready-details/multisig-proposal-ready-information/MultisigProposalReadyInformation.tsx b/src/components/features/multisig-proposal-ready-details/multisig-proposal-ready-information/MultisigProposalReadyInformation.tsx index 0baa943..73ed4f7 100644 --- a/src/components/features/multisig-proposal-ready-details/multisig-proposal-ready-information/MultisigProposalReadyInformation.tsx +++ b/src/components/features/multisig-proposal-ready-details/multisig-proposal-ready-information/MultisigProposalReadyInformation.tsx @@ -6,14 +6,18 @@ import { DataList } from '@/components/ui/composites/data-list/DataList'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/ProposalIdLink'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalReady } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigProposalReadyInformationProps { hash: string; } +const EmptyValue = () => ; + export const MultisigProposalReadyInformation: React.FC< MultisigProposalReadyInformationProps > = ({ hash }) => { @@ -45,31 +49,39 @@ export const MultisigProposalReadyInformation: React.FC< { label: 'Extrinsic Hash', key: 'extrinsic', - render: (value) => - (value as MultisigProposalReady['extrinsic'])?.id ? ( - + render: (value) => { + const extrinsicId = (value as MultisigProposalReady['extrinsic']) + ?.id; + return extrinsicId ? ( + ) : ( - '-' - ) + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as MultisigProposalReady['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Proposal', @@ -83,7 +95,12 @@ export const MultisigProposalReadyInformation: React.FC< { label: 'Approvals Count', key: 'approvals_count', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Multisig', @@ -93,12 +110,12 @@ export const MultisigProposalReadyInformation: React.FC< ?.multisig?.id; return multisigId ? ( ) : ( - '-' + ); } }, @@ -112,10 +129,10 @@ export const MultisigProposalReadyInformation: React.FC< ) : ( - '-' + ); } } diff --git a/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-stats/MultisigProposalReadyStats.tsx b/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-stats/MultisigProposalReadyStats.tsx index f1c4b57..7f0c8eb 100644 --- a/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-stats/MultisigProposalReadyStats.tsx +++ b/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-stats/MultisigProposalReadyStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -24,7 +31,7 @@ export const MultisigProposalReadyStats: React.FC = () => { const success = !loading && !error; return ( -
+ Total Proposal Ready @@ -36,9 +43,7 @@ export const MultisigProposalReadyStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && }
@@ -53,11 +58,9 @@ export const MultisigProposalReadyStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && } -
+ ); }; diff --git a/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-table/MultisigProposalReadyTable.tsx b/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-table/MultisigProposalReadyTable.tsx index 9fbbf93..7339729 100644 --- a/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-table/MultisigProposalReadyTable.tsx +++ b/src/components/features/multisig-proposal-ready-listing/multisig-proposal-ready-table/MultisigProposalReadyTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigProposalReadyTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigProposalReadyTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-proposal-removed-details/multisig-proposal-removed-information/MultisigProposalRemovedInformation.tsx b/src/components/features/multisig-proposal-removed-details/multisig-proposal-removed-information/MultisigProposalRemovedInformation.tsx index 6e42546..724cff5 100644 --- a/src/components/features/multisig-proposal-removed-details/multisig-proposal-removed-information/MultisigProposalRemovedInformation.tsx +++ b/src/components/features/multisig-proposal-removed-details/multisig-proposal-removed-information/MultisigProposalRemovedInformation.tsx @@ -6,14 +6,18 @@ import { DataList } from '@/components/ui/composites/data-list/DataList'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/ProposalIdLink'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigProposalRemoved } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigProposalRemovedInformationProps { hash: string; } +const EmptyValue = () => ; + export const MultisigProposalRemovedInformation: React.FC< MultisigProposalRemovedInformationProps > = ({ hash }) => { @@ -45,35 +49,39 @@ export const MultisigProposalRemovedInformation: React.FC< { label: 'Extrinsic Hash', key: 'extrinsic', - render: (value) => - (value as MultisigProposalRemoved['extrinsic'])?.id ? ( - + render: (value) => { + const extrinsicId = (value as MultisigProposalRemoved['extrinsic']) + ?.id; + return extrinsicId ? ( + ) : ( - '-' - ) + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as MultisigProposalRemoved['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Proposal', @@ -92,12 +100,12 @@ export const MultisigProposalRemovedInformation: React.FC< ?.multisig?.id; return multisigId ? ( ) : ( - '-' + ); } }, @@ -111,10 +119,10 @@ export const MultisigProposalRemovedInformation: React.FC< ) : ( - '-' + ); } }, @@ -128,10 +136,10 @@ export const MultisigProposalRemovedInformation: React.FC< ) : ( - '-' + ); } } diff --git a/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-stats/MultisigProposalRemovedStats.tsx b/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-stats/MultisigProposalRemovedStats.tsx index 2dd7f33..6ed0d3e 100644 --- a/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-stats/MultisigProposalRemovedStats.tsx +++ b/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-stats/MultisigProposalRemovedStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -24,7 +31,7 @@ export const MultisigProposalRemovedStats: React.FC = () => { const success = !loading && !error; return ( -
+ Total Proposal Removed @@ -36,9 +43,7 @@ export const MultisigProposalRemovedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && }
@@ -53,11 +58,9 @@ export const MultisigProposalRemovedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && } -
+ ); }; diff --git a/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-table/MultisigProposalRemovedTable.tsx b/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-table/MultisigProposalRemovedTable.tsx index 26a66e2..1719e46 100644 --- a/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-table/MultisigProposalRemovedTable.tsx +++ b/src/components/features/multisig-proposal-removed-listing/multisig-proposal-removed-table/MultisigProposalRemovedTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigProposalRemovedTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigProposalRemovedTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/multisig-signer-approved-details/multisig-signer-approved-information/MultisigSignerApprovedInformation.tsx b/src/components/features/multisig-signer-approved-details/multisig-signer-approved-information/MultisigSignerApprovedInformation.tsx index 4bd242e..b75a2e2 100644 --- a/src/components/features/multisig-signer-approved-details/multisig-signer-approved-information/MultisigSignerApprovedInformation.tsx +++ b/src/components/features/multisig-signer-approved-details/multisig-signer-approved-information/MultisigSignerApprovedInformation.tsx @@ -6,14 +6,18 @@ import { DataList } from '@/components/ui/composites/data-list/DataList'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { ProposalIdLink } from '@/components/ui/composites/proposal-id-link/ProposalIdLink'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { MultisigSignerApproved } from '@/schemas'; -import { formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight } from '@/utils/formatter'; +import { getMultisigWalletHref } from '@/utils/get-multisig-wallet-href'; export interface MultisigSignerApprovedInformationProps { hash: string; } +const EmptyValue = () => ; + export const MultisigSignerApprovedInformation: React.FC< MultisigSignerApprovedInformationProps > = ({ hash }) => { @@ -46,33 +50,39 @@ export const MultisigSignerApprovedInformation: React.FC< { label: 'Extrinsic Hash', key: 'extrinsic', - render: (value) => - (value as MultisigSignerApproved['extrinsic'])?.id ? ( - + render: (value) => { + const extrinsicId = (value as MultisigSignerApproved['extrinsic']) + ?.id; + return extrinsicId ? ( + ) : ( - '-' - ) + + ); + } }, { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as MultisigSignerApproved['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { label: 'Approver', @@ -84,17 +94,22 @@ export const MultisigSignerApprovedInformation: React.FC< ) : ( - '-' + ); } }, { label: 'Approvals Count', key: 'approvals_count', - render: (value) => (value != null ? String(value) : '-') + render: (value) => + value != null ? ( + {String(value)} + ) : ( + + ) }, { label: 'Proposal', @@ -113,12 +128,12 @@ export const MultisigSignerApprovedInformation: React.FC< ?.multisig?.id; return multisigId ? ( ) : ( - '-' + ); } }, @@ -132,10 +147,10 @@ export const MultisigSignerApprovedInformation: React.FC< ) : ( - '-' + ); } } diff --git a/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-stats/MultisigSignerApprovedStats.tsx b/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-stats/MultisigSignerApprovedStats.tsx index c9e1c11..5ab94f3 100644 --- a/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-stats/MultisigSignerApprovedStats.tsx +++ b/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-stats/MultisigSignerApprovedStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -24,7 +31,7 @@ export const MultisigSignerApprovedStats: React.FC = () => { const success = !loading && !error; return ( -
+ Total Signer Approved @@ -36,9 +43,7 @@ export const MultisigSignerApprovedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && }
@@ -53,11 +58,9 @@ export const MultisigSignerApprovedStats: React.FC = () => {

)} {loading && } - {error && ( -

Error: {error.message}

- )} + {error && } -
+ ); }; diff --git a/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-table/MultisigSignerApprovedTable.tsx b/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-table/MultisigSignerApprovedTable.tsx index 4804446..c7b7dd2 100644 --- a/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-table/MultisigSignerApprovedTable.tsx +++ b/src/components/features/multisig-signer-approved-listing/multisig-signer-approved-table/MultisigSignerApprovedTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useMultisigSignerApprovedTable } from './hook'; @@ -12,7 +13,7 @@ export const MultisigSignerApprovedTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> 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 e9191eb..e59c0bb 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 @@ -5,9 +5,10 @@ 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 { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; import type { ScheduledReversibleTransactionResponse } from '@/schemas'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; export interface ScheduledReversibleTransactionInformationProps { txId: string; @@ -73,7 +74,7 @@ export const ScheduledReversibleTransactionInformation: React.FC< key: 'block', render: (value) => ( @@ -82,12 +83,12 @@ export const ScheduledReversibleTransactionInformation: React.FC< { label: 'Timestamp', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => }, { label: 'Scheduled At', key: 'scheduled_at', - render: (value) => formatTimestamp(value, true) + render: (value) => }, { label: 'From', 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 deleted file mode 100644 index 12b4e20..0000000 --- a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transaction-heading/ScheduledReversibleTransactionHeading.tsx +++ /dev/null @@ -1,36 +0,0 @@ -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 deleted file mode 100644 index 1c537ab..0000000 --- a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-stats/ScheduledReversibleTransactionsStats.tsx +++ /dev/null @@ -1,60 +0,0 @@ -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; - - const shouldHide = !!(accountId || block); - - const { loading, data, error } = - api.scheduledReversibleTransactions.useGetStats({ - pollInterval: DATA_POOL_INTERVAL, - skip: shouldHide - }); - - if (shouldHide) return null; - - const success = !loading && !error; - - return ( -
- - - -

Total Scheduled Transactions

-
-
- - {success &&

{data?.allTime.total_scheduled_transfers}

} - {loading && } - {error &&

Error: {error.message}

} -
-
- - - - -

Recent Scheduled Transactions (24H)

-
-
- - {success &&

{data?.last24Hour.aggregate.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 deleted file mode 100644 index 373479a..0000000 --- a/src/components/features/scheduled-reversible-transaction-listing/scheduled-reversible-transactions-table/ScheduledReversibleTransactionsTable.tsx +++ /dev/null @@ -1,20 +0,0 @@ -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/transaction-details/transaction-information/TransactionInformation.tsx b/src/components/features/transaction-details/transaction-information/TransactionInformation.tsx index d4ac530..5ed5e47 100644 --- a/src/components/features/transaction-details/transaction-information/TransactionInformation.tsx +++ b/src/components/features/transaction-details/transaction-information/TransactionInformation.tsx @@ -4,14 +4,15 @@ import * as React from 'react'; import useApiClient from '@/api'; import { EXTRINSIC_TRANSACTION_COLUMNS } from '@/components/common/table-columns/EXTRINSIC_TRANSACTION_COLUMNS'; +import { Badge } from '@/components/ui/badge'; import { DataList } from '@/components/ui/composites/data-list/DataList'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy'; import { TextWithCopy } from '@/components/ui/composites/text-with-copy/TextWithCopy'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; -import { cn } from '@/lib/utils'; import type { ExtrinsicDetail, ExtrinsicTransfer } from '@/schemas'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; import { isWormholeExtrinsic } from '@/utils/get-extrinsic-detail-path'; export interface TransactionInformationProps { @@ -25,7 +26,45 @@ export const TransactionInformation: React.FC = ({ const navigate = useNavigate(); const { data, loading } = api.transactions.getByHash().useQuery(hash); - const extrinsic = data?.extrinsics[0]; + const transfers: ExtrinsicTransfer[] = React.useMemo(() => { + if (!data) return []; + if (data.transfersByExtrinsic.length > 0) { + return data.transfersByExtrinsic.map( + ({ id, amount, timestamp, from, to, block }) => ({ + id, + amount, + timestamp, + from, + to, + block + }) + ); + } + return data.transfersById.map( + ({ id, amount, timestamp, from, to, block }) => ({ + id, + amount, + timestamp, + from, + to, + block + }) + ); + }, [data]); + + const extrinsic: ExtrinsicDetail | undefined = React.useMemo(() => { + if (!data) return undefined; + if (data.extrinsics[0]) return data.extrinsics[0]; + const fromTransfer = + data.transfersByExtrinsic[0]?.extrinsic ?? + data.transfersById[0]?.extrinsic; + return fromTransfer ?? undefined; + }, [data]); + + const primaryTransfer = transfers[0]; + const primaryId = extrinsic?.id ?? primaryTransfer?.id; + const primaryBlock = extrinsic?.block ?? primaryTransfer?.block; + const primaryTimestamp = extrinsic?.timestamp ?? primaryTransfer?.timestamp; const isRedirectingToWormhole = !loading && !!extrinsic && isWormholeExtrinsic(extrinsic); @@ -34,18 +73,17 @@ export const TransactionInformation: React.FC = ({ if (!isRedirectingToWormhole) return; navigate({ - to: '/wormhole/$id', - params: { id: hash }, + to: '/transactions/wormhole/$id', + params: { id: extrinsic.id }, replace: true }); - }, [isRedirectingToWormhole, hash, navigate]); + }, [isRedirectingToWormhole, extrinsic, navigate]); const extrinsicTransactionColumns = React.useMemo( () => EXTRINSIC_TRANSACTION_COLUMNS, [] ); - const transfers = data?.transfers ?? []; const table = useReactTable({ data: transfers, columns: extrinsicTransactionColumns, @@ -54,7 +92,15 @@ export const TransactionInformation: React.FC = ({ manualPagination: true }); - if (!loading && (!data || data.extrinsics.length === 0)) throw notFound(); + if ( + !loading && + (!data || + (data.extrinsics.length === 0 && + data.transfersByExtrinsic.length === 0 && + data.transfersById.length === 0)) + ) { + throw notFound(); + } if (isRedirectingToWormhole) { return null; @@ -62,54 +108,68 @@ export const TransactionInformation: React.FC = ({ const extrinsicInfo: Partial[] = [ { - id: extrinsic?.id, + id: primaryId, pallet: extrinsic?.pallet, call: extrinsic?.call, success: extrinsic?.success, fee: extrinsic?.fee, - timestamp: extrinsic?.timestamp, + timestamp: primaryTimestamp, signer: extrinsic?.signer, - block: extrinsic?.block + block: primaryBlock } ]; return (
- {/* Extrinsic Information */} > loading={loading} data={extrinsicInfo} fields={[ { - label: 'Extrinsic Hash', + label: 'Hash / ID', key: 'id', - render: (value) => ( - - ) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Call', key: 'pallet', - render: (_, item) => ( - - {item.pallet}.{item.call} - - ) + render: (_, item) => + item.pallet && item.call ? ( + + {item.pallet}.{item.call} + + ) : ( + + ) }, { label: 'Block', key: 'block', - render: (value) => ( - - ) + render: (value) => { + const block = value as ExtrinsicDetail['block'] | undefined; + if (!block) return ; + return ( + + ); + } }, { - label: 'Timestamp', + label: 'Time', key: 'timestamp', - render: (value) => formatTimestamp(value, true) + render: (value) => + value ? ( + + ) : ( + + ) }, { label: 'Signer', @@ -117,10 +177,11 @@ export const TransactionInformation: React.FC = ({ render: (value) => { const signer = value as ExtrinsicDetail['signer']; if (!signer) { - return unsigned; + return unsigned; } return ( = ({ { label: 'Fee', key: 'fee', - render: (value) => formatMonetaryValue(value) + render: (value) => + value != null ? ( + formatMonetaryValue(value) + ) : ( + + ) }, { label: 'Result', key: 'success', - render: (value) => ( - - {value ? 'Success' : 'Failed'} - - ) + render: (value) => + value == null ? ( + + ) : ( + + {value ? 'Success' : 'Failed'} + + ) } ]} /> - {/* Transfers Table */} {transfers.length > 0 && ( = () => { const { accountId, block } = useSearch({ strict: false - }) as any; + }) as { accountId?: string; block?: string }; return (
-

Immediate Transactions

+

Transactions

{block && ( -
+
In block - + {block}
)} {accountId && ( -
+
By - + {accountId}
diff --git a/src/components/features/transaction-listing/transactions-stats/TransactionsStats.tsx b/src/components/features/transaction-listing/transactions-stats/TransactionsStats.tsx index 150b89f..369c36e 100644 --- a/src/components/features/transaction-listing/transactions-stats/TransactionsStats.tsx +++ b/src/components/features/transaction-listing/transactions-stats/TransactionsStats.tsx @@ -2,7 +2,14 @@ import { useSearch } from '@tanstack/react-router'; import React from 'react'; import useApiClient from '@/api'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { + Card, + CardContent, + CardGroup, + CardHeader, + CardTitle +} from '@/components/ui/card'; +import { InlineFetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { Skeleton } from '@/components/ui/skeleton'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; @@ -12,11 +19,11 @@ export const TransactionsStats: React.FC = () => { const api = useApiClient(); const { accountId, block } = useSearch({ strict: false - }) as any; + }) as { accountId?: string; block?: string }; const shouldHide = !!(accountId || block); - const { loading, data, error } = api.transactions.useGetStats({ + const { loading, data, error } = api.unifiedTransactions.useGetStats({ pollInterval: DATA_POOL_INTERVAL, skip: shouldHide }); @@ -26,32 +33,36 @@ export const TransactionsStats: React.FC = () => { const success = !loading && !error; return ( -
+ -

Total Transactions

+

Total

- {success &&

{data?.allTime.total_immediate_transfers}

} + {success && ( +

{data?.allTime.aggregate.totalCount.toLocaleString()}

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-

Recent Transactions (24H)

+

Last 24h

- {success &&

{data?.last24Hour.aggregate.totalCount}

} + {success && ( +

{data?.last24Hour.aggregate.totalCount.toLocaleString()}

+ )} {loading && } - {error &&

Error: {error.message}

} + {error && }
-
+ ); }; diff --git a/src/components/features/transaction-listing/transactions-table/TransactionsTable.tsx b/src/components/features/transaction-listing/transactions-table/TransactionsTable.tsx index 56507c3..2967f1c 100644 --- a/src/components/features/transaction-listing/transactions-table/TransactionsTable.tsx +++ b/src/components/features/transaction-listing/transactions-table/TransactionsTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataTable } from '@/components/ui/composites/data-table/DataTable'; +import { FetchError } from '@/components/ui/composites/fetch-error/FetchError'; import { useTransactionsTable } from './hook'; @@ -12,7 +13,7 @@ export const TransactionsTable = () => { table={table} fetch={{ status: getStatus(), - errorFallback:

Error: {error && error.message}

+ errorFallback: }} withControls /> diff --git a/src/components/features/transaction-listing/transactions-table/hook.tsx b/src/components/features/transaction-listing/transactions-table/hook.tsx index 6aac804..ac651a9 100644 --- a/src/components/features/transaction-listing/transactions-table/hook.tsx +++ b/src/components/features/transaction-listing/transactions-table/hook.tsx @@ -3,20 +3,20 @@ import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; import { useEffect, useMemo, useState } from 'react'; import useApiClient from '@/api'; -import { TRANSACTION_COLUMNS } from '@/components/common/table-columns/TRANSACTION_COLUMNS'; +import { UNIFIED_LIST_TRANSACTION_COLUMNS } from '@/components/common/table-columns/UNIFIED_LIST_TRANSACTION_COLUMNS'; import { DATA_POOL_INTERVAL } from '@/constants/data-pool-interval'; import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit'; -import type { TransactionSorts } from '@/constants/query-sorts'; +import type { UnifiedListTransactionSorts } from '@/constants/query-sorts'; import { useOrderBy } from '@/hooks/useOrderBy'; import { useTableState } from '@/hooks/useTableState'; -import type { Transaction } from '@/schemas'; +import type { UnifiedListTransaction } from '@/schemas'; import { transformSortLiteral } from '@/utils/transform-sort'; export const useTransactionsTable = () => { const api = useApiClient(); const { accountId, block } = useSearch({ strict: false - }) as any; + }) as { accountId?: string; block?: string }; const { orderBy, @@ -27,38 +27,49 @@ export const useTransactionsTable = () => { paginationValue } = useTableState(null, QUERY_DEFAULT_LIMIT); - const orderByObject = useOrderBy(orderBy ?? ''); + const orderByObject = useOrderBy(orderBy ?? ''); const sortingValue = transformSortLiteral(orderBy); + const where = useMemo(() => { + if (accountId) { + return { + _or: [ + { from: { id: { _eq: accountId } } }, + { to: { id: { _eq: accountId } } } + ] + }; + } + if (block) { + return { + block_height: { _eq: Number(block) } + }; + } + return undefined; + }, [accountId, block]); + const { loading, data, error: fetchError - } = api.transactions.useGetAll({ + } = api.unifiedTransactions.useGetAll({ pollInterval: DATA_POOL_INTERVAL, variables: { orderBy: orderByObject, limit, offset: currentPageIndex * limit, - ...(accountId && { - where: { - OR: [{ to: { id_eq: accountId } }, { from: { id_eq: accountId } }] - } - }), - ...(block && { - where: { - block: { height_eq: Number(block) } - } - }) + where } }); - const transactionColumns = useMemo(() => TRANSACTION_COLUMNS, []); + const transactionColumns = useMemo( + () => UNIFIED_LIST_TRANSACTION_COLUMNS, + [] + ); const [rowCount, setRowCount] = useState( data?.meta.aggregate.totalCount ?? 0 ); - const table = useReactTable({ + const table = useReactTable({ data: data?.transactions ?? [], columns: transactionColumns, getCoreRowModel: getCoreRowModel(), @@ -90,7 +101,7 @@ export const useTransactionsTable = () => { }; useEffect(() => { - if (!loading && data?.meta.aggregate.totalCount) + if (!loading && data?.meta.aggregate.totalCount != null) setRowCount(data.meta.aggregate.totalCount); }, [loading, data?.meta.aggregate.totalCount]); diff --git a/src/components/features/wormhole/DepositPoolStats.tsx b/src/components/features/wormhole/DepositPoolStats.tsx deleted file mode 100644 index 3bb2476..0000000 --- a/src/components/features/wormhole/DepositPoolStats.tsx +++ /dev/null @@ -1,76 +0,0 @@ -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(); - - const stats = data?.depositPoolStatsById; - - if (loading) { - return ( - - - Deposit Pool - - -
-
-
-
- - - ); - } - - 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 - } - - return ( - - - Wormhole Deposit Pool - - -
-
-

Deposits Tracked

-

- {totalDeposits.toLocaleString()} -

-
-
-

Last Updated

-

- Block {stats.last_updated_block} -

-
-
-
-
- ); -}; diff --git a/src/components/features/wormhole/PrivacyScoreBadge.tsx b/src/components/features/wormhole/PrivacyScoreBadge.tsx index 77852cc..b8e6b13 100644 --- a/src/components/features/wormhole/PrivacyScoreBadge.tsx +++ b/src/components/features/wormhole/PrivacyScoreBadge.tsx @@ -1,35 +1,28 @@ -import { cn } from '@/lib/utils'; +import type { VariantProps } from 'class-variance-authority'; + +import { Badge, type badgeVariants } from '@/components/ui/badge'; interface PrivacyScoreBadgeProps { score: number; label: string; } -const labelColors: Record = { - Critical: 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400', - Weak: 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-400', - Moderate: - 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400', - Strong: - 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400', - 'Very Strong': - 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400' +type BadgeVariant = NonNullable['variant']>; + +const labelVariants: Record = { + Critical: 'error', + Weak: 'weak', + Moderate: 'moderate', + Strong: 'strong', + 'Very Strong': 'strong' }; export const PrivacyScoreBadge = ({ score, label }: PrivacyScoreBadgeProps) => { - const colorClass = - labelColors[label] ?? - 'bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-400'; + const variant = labelVariants[label] ?? 'miner'; return ( - - {score.toFixed(1)} bits - ({label}) - + + {score.toFixed(1)} bits ({label}) + ); }; diff --git a/src/components/features/wormhole/WormholeOutputDetails.tsx b/src/components/features/wormhole/WormholeOutputDetails.tsx index 4b69ff2..7aec886 100644 --- a/src/components/features/wormhole/WormholeOutputDetails.tsx +++ b/src/components/features/wormhole/WormholeOutputDetails.tsx @@ -1,13 +1,12 @@ import { notFound } from '@tanstack/react-router'; 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 { Skeleton } from '@/components/ui/skeleton'; +import { TimestampDisplay } from '@/components/ui/timestamp-display'; import { RESOURCES } from '@/constants/resources'; -import { formatMonetaryValue, formatTimestamp } from '@/utils/formatter'; +import { formatBlockHeight, formatMonetaryValue } from '@/utils/formatter'; import { PrivacyScoreBadge } from './PrivacyScoreBadge'; @@ -29,6 +28,12 @@ interface ExtrinsicInfo { poolSnapshot: string; } +interface ExitOutputInfo { + label: string; + amount: string; + exitAccountId: string; +} + export const WormholeOutputInformation = ({ id }: WormholeOutputDetailsProps) => { @@ -61,223 +66,215 @@ export const WormholeOutputInformation = ({ } ]; + const exitOutputItems: Partial[] = loading + ? [{ label: '', amount: '', exitAccountId: '' }] + : outputs.map((output, idx) => ({ + label: `Output ${idx + 1} of ${extrinsic!.output_count}`, + amount: output.amount, + exitAccountId: output.exitAccount.id + })); + return ( - <> -

Transaction Details

- > - loading={loading} - data={extrinsicInfo} - fields={[ - { - label: 'Extrinsic Hash', - key: 'extrinsic', - render: (value) => - value && (value as ExtrinsicInfo['extrinsic'])?.id ? ( - +
+

Transaction Details

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

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) => `${Number(value).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) => `${Number(value).toFixed(1)} bits`, - tooltip: - 'Score if the user had sacrificed 1% of the output for privacy.' - }, - { - label: 'With 5% sacrifice', - key: 'privacyScore5Pct', - render: (value) => `${Number(value).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 '-'; - } +
+

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) => `${Number(value).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) => `${Number(value).toFixed(1)} bits`, + tooltip: + 'Score if the user had sacrificed 1% of the output for privacy.' }, - tooltip: - 'Deposit pool bucket distribution at time of proof verification.' - } - ]} - /> + { + label: 'With 5% sacrifice', + key: 'privacyScore5Pct', + render: (value) => `${Number(value).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.' + } + ]} + /> +
{showExitOutputs && ( - <> -

Exit Outputs

+
+

Exit Outputs

- {(loading ? [null] : outputs).map((output, idx) => ( - - -
-
-
- {loading ? ( - - ) : ( - `Output ${idx + 1} of ${extrinsic!.output_count}` - )} -
- {loading ? ( - - ) : ( -
{formatMonetaryValue(output!.amount)}
- )} -
-
-
- Exit Account -
- {loading ? ( - - ) : ( -
- -
- )} -
-
-
-
+ {exitOutputItems.map((item, idx) => ( + > + key={loading ? 'loading' : outputs[idx]!.id} + loading={loading} + data={[item]} + fields={[ + { + label: loading + ? 'Output' + : (item.label as string) || `Output ${idx + 1}`, + key: 'amount', + render: (value) => formatMonetaryValue(value) + }, + { + label: 'Exit Account', + key: 'exitAccountId', + render: (value) => ( + + ) + } + ]} + /> ))}
- +
)} {showNullifiers && ( - <> -

Nullifiers

- - -

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

-
- {loading - ? Array.from({ length: 16 }, (_, idx) => ( -
-
-
-
- Nullifier {idx + 1} -
- -
-
-
- Hash (blake3) -
- -
-
-
- )) - : nullifiers.map( - ( - n: { nullifier: string; nullifier_hash: string }, - idx: number - ) => ( -
-
-
-
- Nullifier {idx + 1} -
-
- -
-
-
-
- Hash (blake3) -
-
- {n.nullifier_hash} -
-
-
-
- ) - )} -
-
-
- +
+

Nullifiers

+

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

+
+ {(loading + ? Array.from({ length: 16 }, (_, idx) => ({ + idx, + nullifier: '', + nullifier_hash: '' + })) + : nullifiers.map( + ( + n: { nullifier: string; nullifier_hash: string }, + idx: number + ) => ({ ...n, idx }) + ) + ).map(({ idx, nullifier, nullifier_hash }) => ( + ( + + ) + }, + { + label: 'Hash (blake3)', + key: 'nullifier_hash', + render: (value) => ( + + {value as string} + + ) + } + ]} + /> + ))} +
+
)} - +
); }; diff --git a/src/components/features/wormhole/WormholeOutputsTable.tsx b/src/components/features/wormhole/WormholeOutputsTable.tsx deleted file mode 100644 index 2d881e8..0000000 --- a/src/components/features/wormhole/WormholeOutputsTable.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { getCoreRowModel, useReactTable } from '@tanstack/react-table'; -import { useMemo } from 'react'; - -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'; -import { type WormholeExtrinsicSorts } from '@/constants/query-sorts'; -import { useOrderBy } from '@/hooks/useOrderBy'; -import { useTableState } from '@/hooks/useTableState'; -import { transformSortLiteral } from '@/utils/transform-sort'; - -export const WormholeOutputsTable = () => { - const api = useApiClient(); - const { - orderBy, - limit, - currentPageIndex, - handleChangeSorting, - handleChangePagination, - paginationValue - } = useTableState('timestamp:desc', QUERY_DEFAULT_LIMIT); - - const orderByObject = useOrderBy( - orderBy ?? 'timestamp:desc' - ); - const sortingValue = transformSortLiteral(orderBy); - - const { data, loading, error } = api.wormhole.useGetAll({ - pollInterval: DATA_POOL_INTERVAL, - variables: { - orderBy: orderByObject, - limit, - offset: currentPageIndex * limit, - where: { extrinsic: { id: { _is_null: false } } } - } - }); - - const rows: WormholeExtrinsicRow[] = useMemo( - () => data?.wormholeExtrinsics ?? [], - [data] - ); - const totalCount = data?.meta?.aggregate?.totalCount ?? 0; - - const table = useReactTable({ - data: rows, - columns: WORMHOLE_EXTRINSIC_COLUMNS, - getCoreRowModel: getCoreRowModel(), - manualSorting: true, - manualPagination: true, - rowCount: totalCount, - state: { - pagination: paginationValue, - sorting: sortingValue - }, - onPaginationChange: handleChangePagination, - onSortingChange: handleChangeSorting - }); - - const getStatus = () => { - if (loading) return 'loading' as const; - if (error) return 'error' as const; - return 'success' as const; - }; - - return ( - Error: {error.message}
: undefined - }} - withControls - /> - ); -}; diff --git a/src/components/layout/footer/Footer.tsx b/src/components/layout/footer/Footer.tsx index 5d7a675..d4cdfb9 100644 --- a/src/components/layout/footer/Footer.tsx +++ b/src/components/layout/footer/Footer.tsx @@ -4,8 +4,8 @@ export interface FooterProps {} export const Footer = () => { return ( -