Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
672 changes: 357 additions & 315 deletions bun.lock

Large diffs are not rendered by default.

21,140 changes: 0 additions & 21,140 deletions package-lock.json

This file was deleted.

472 changes: 452 additions & 20 deletions src/__generated__/gql.ts

Large diffs are not rendered by default.

23,143 changes: 17,432 additions & 5,711 deletions src/__generated__/graphql.ts

Large diffs are not rendered by default.

199 changes: 197 additions & 2 deletions src/api/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@ export const accounts = {
total_rewards
total_scheduled_transfers
}
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 } }
Expand Down Expand Up @@ -183,6 +201,183 @@ export const accounts = {
}
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(
Expand All @@ -195,7 +390,7 @@ export const accounts = {
block {
height
}
interceptor {
guardian {
id
free
frozen
Expand All @@ -210,7 +405,7 @@ export const accounts = {
beneficiaries: high_security_set_aggregate(
order_by: { timestamp: desc }
limit: $limit
where: { interceptor: { id: { _eq: $id } } }
where: { guardian: { id: { _eq: $id } } }
) {
nodes {
timestamp
Expand Down
6 changes: 2 additions & 4 deletions src/api/blocks.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { QueryHookOptions } from '@apollo/client';
import { gql, useQuery } from '@apollo/client';
import { endOfToday } from 'date-fns/endOfToday';
import { startOfToday } from 'date-fns/startOfToday';

import type { Block_Bool_Exp } from '@/__generated__/graphql';
import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit';
Expand All @@ -14,6 +12,7 @@ import type {
RecentBlocksResponse
} from '@/schemas';
import type { PaginatedQueryVariables } from '@/types/query';
import { useGetRecentDateRange } from '@/utils/get-recent-date-range';

export const blocks = {
useGetAll: (
Expand Down Expand Up @@ -157,8 +156,7 @@ export const blocks = {
};
},
getStats: () => {
const startDate = startOfToday().toISOString();
const endDate = endOfToday().toISOString();
const { startDate, endDate } = useGetRecentDateRange();

const QUERY = gql`
query GetBlockStats($startDate: timestamptz!, $endDate: timestamptz!) {
Expand Down
6 changes: 2 additions & 4 deletions src/api/cancelled-reversible-transactions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { QueryHookOptions } from '@apollo/client';
import { gql, useQuery } from '@apollo/client';
import { endOfToday } from 'date-fns/endOfToday';
import { startOfToday } from 'date-fns/startOfToday';

import type { Cancelled_Reversible_Transfer_Bool_Exp } from '@/__generated__/graphql';
import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit';
Expand All @@ -14,6 +12,7 @@ import type {
RecentCancelledReversibleTransactionsResponse
} from '@/schemas';
import type { PaginatedQueryVariables } from '@/types/query';
import { useGetRecentDateRange } from '@/utils/get-recent-date-range';

export const cancelledReversibleTransactions = {
useGetAll: (
Expand Down Expand Up @@ -159,8 +158,7 @@ export const cancelledReversibleTransactions = {
'variables'
>
) => {
const startDate = startOfToday().toISOString();
const endDate = endOfToday().toISOString();
const { startDate, endDate } = useGetRecentDateRange();

const GET_CANCELLED_REVERSIBLE_TRANSACTIONS_STATS = gql`
query GetCancelledReversibleTransactionsStats(
Expand Down
6 changes: 2 additions & 4 deletions src/api/errors.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { QueryHookOptions } from '@apollo/client';
import { gql, useQuery } from '@apollo/client';
import { endOfToday } from 'date-fns/endOfToday';
import { startOfToday } from 'date-fns/startOfToday';

import type { Error_Event_Bool_Exp } from '@/__generated__/graphql';
import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit';
Expand All @@ -14,6 +12,7 @@ import type {
RecentErrorEventsResponse
} from '@/schemas';
import type { PaginatedQueryVariables } from '@/types/query';
import { useGetRecentDateRange } from '@/utils/get-recent-date-range';

export const errors = {
useGetAll: (
Expand Down Expand Up @@ -119,8 +118,7 @@ export const errors = {
useGetStats: (
config?: Omit<QueryHookOptions<ErrorEventsStatsResponse>, 'variables'>
) => {
const startDate = startOfToday().toISOString();
const endDate = endOfToday().toISOString();
const { startDate, endDate } = useGetRecentDateRange();

const GET_ERROR_EVENTS_STATS = gql`
query GetErrorEventsStats(
Expand Down
6 changes: 2 additions & 4 deletions src/api/executed-reversible-transactions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { QueryHookOptions } from '@apollo/client';
import { gql, useQuery } from '@apollo/client';
import { endOfToday } from 'date-fns/endOfToday';
import { startOfToday } from 'date-fns/startOfToday';

import type { Executed_Reversible_Transfer_Bool_Exp } from '@/__generated__/graphql';
import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit';
Expand All @@ -14,6 +12,7 @@ import type {
RecentExecutedReversibleTransactionsResponse
} from '@/schemas';
import type { PaginatedQueryVariables } from '@/types/query';
import { useGetRecentDateRange } from '@/utils/get-recent-date-range';

export const executedReversibleTransactions = {
useGetAll: (
Expand Down Expand Up @@ -153,8 +152,7 @@ export const executedReversibleTransactions = {
'variables'
>
) => {
const startDate = startOfToday().toISOString();
const endDate = endOfToday().toISOString();
const { startDate, endDate } = useGetRecentDateRange();

const GET_EXECUTED_REVERSIBLE_TRANSACTIONS_STATS = gql`
query GetExecutedReversibleTransactionsStats(
Expand Down
12 changes: 5 additions & 7 deletions src/api/high-security-sets.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { QueryHookOptions } from '@apollo/client';
import { gql, useQuery } from '@apollo/client';
import { endOfToday } from 'date-fns/endOfToday';
import { startOfToday } from 'date-fns/startOfToday';

import type { High_Security_Set_Bool_Exp } from '@/__generated__/graphql';
import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit';
Expand All @@ -14,6 +12,7 @@ import type {
RecentHighSecuritySetsResponse
} from '@/schemas';
import type { PaginatedQueryVariables } from '@/types/query';
import { useGetRecentDateRange } from '@/utils/get-recent-date-range';

export const highSecuritySets = {
useGetAll: (
Expand Down Expand Up @@ -44,7 +43,7 @@ export const highSecuritySets = {
who {
id
}
interceptor {
guardian {
id
}
timestamp
Expand Down Expand Up @@ -99,7 +98,7 @@ export const highSecuritySets = {
who {
id
}
interceptor {
guardian {
id
}
timestamp
Expand All @@ -126,8 +125,7 @@ export const highSecuritySets = {
useGetStats: (
config?: Omit<QueryHookOptions<HighSecuritySetsStatsResponse>, 'variables'>
) => {
const startDate = startOfToday().toISOString();
const endDate = endOfToday().toISOString();
const { startDate, endDate } = useGetRecentDateRange();

const GET_HIGH_SECURITY_SETS_STATS = gql`
query GetHighSecuritySetsStats(
Expand Down Expand Up @@ -173,7 +171,7 @@ export const highSecuritySets = {
who {
id
}
interceptor {
guardian {
id
}
timestamp
Expand Down
Loading
Loading