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
176 changes: 88 additions & 88 deletions src/__generated__/gql.ts

Large diffs are not rendered by default.

2,220 changes: 1,769 additions & 451 deletions src/__generated__/graphql.ts

Large diffs are not rendered by default.

57 changes: 53 additions & 4 deletions src/api/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { startOfToday } from 'date-fns/startOfToday';
import { subDays } from 'date-fns/subDays';

import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit';
import { QUERY_UNIFIED_LIMIT } from '@/constants/query-unified-limit';
import type { AccountSorts } from '@/constants/query-sorts';
import { ACCOUNT_SORTS } from '@/constants/query-sorts';
import type {
Expand Down Expand Up @@ -64,14 +65,18 @@ export const accounts = {
orderBy: timestamp_DESC
first: $limit
where: {
extrinsicHash_isNull: false
extrinsic_isNull: false
AND: { from: { id_eq: $id }, OR: { to: { id_eq: $id } } }
}
) {
edges {
node {
fee
extrinsicHash
extrinsic {
id
pallet
call
}
block {
height
}
Expand All @@ -95,7 +100,11 @@ export const accounts = {
) {
edges {
node {
extrinsicHash
extrinsic {
id
pallet
call
}
timestamp
status
amount
Expand Down Expand Up @@ -141,6 +150,10 @@ export const accounts = {
) {
edges {
node {
timestamp
block {
height
}
interceptor {
id
free
Expand All @@ -159,6 +172,10 @@ export const accounts = {
) {
edges {
node {
timestamp
block {
height
}
who {
id
free
Expand All @@ -170,6 +187,38 @@ export const accounts = {

totalCount
}
wormholeOutputs: wormholeOutputs(
orderBy: wormholeExtrinsic_timestamp_DESC
limit: $limit
where: { exitAccount: { id_eq: $id } }
) {
id
amount
exitAccount {
id
}
wormholeExtrinsic {
id
extrinsic {
id
pallet
call
}
totalAmount
outputCount
timestamp
block {
height
}
outputs {
id
exitAccount {
id
}
amount
}
}
}
}
`;

Expand All @@ -179,7 +228,7 @@ export const accounts = {
...config,
variables: {
id,
limit: QUERY_DEFAULT_LIMIT
limit: QUERY_UNIFIED_LIMIT
}
})
};
Expand Down
83 changes: 76 additions & 7 deletions src/api/blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { gql, useQuery } from '@apollo/client';
import type { BlockWhereInput } from '@/__generated__/graphql';
import { QUERY_DEFAULT_LIMIT } from '@/constants/query-default-limit';
import { QUERY_RECENT_LIMIT } from '@/constants/query-recent-limit';
import { QUERY_UNIFIED_LIMIT } from '@/constants/query-unified-limit';
import type { BlockSorts } from '@/constants/query-sorts';
import { BLOCK_SORTS } from '@/constants/query-sorts';
import type {
Expand Down Expand Up @@ -38,6 +39,9 @@ export const blocks = {
height
reward
timestamp
extrinsics {
id
}
}
meta: blocksConnection(orderBy: id_ASC) {
totalCount
Expand Down Expand Up @@ -73,6 +77,9 @@ export const blocks = {
height
reward
timestamp
extrinsics {
id
}
}
}
`;
Expand All @@ -97,22 +104,40 @@ export const blocks = {
height
reward
timestamp
extrinsics(orderBy: indexInBlock_ASC) {
id
pallet
call
success
fee
timestamp
indexInBlock
signer {
id
}
}
}
miners: minerRewards(
minerRewards(
where: {
block: { height_eq: $height }
OR: { block: { hash_eq: $hash } }
}
) {
reward
timestamp
miner {
id
}
block {
height
hash
}
}
transactions: transfersConnection(
orderBy: timestamp_DESC
first: $limit
where: {
extrinsicHash_isNull: false
extrinsic_isNull: false
AND: {
block: { height_eq: $height }
OR: { block: { hash_eq: $hash } }
Expand All @@ -122,7 +147,11 @@ export const blocks = {
edges {
node {
fee
extrinsicHash
extrinsic {
id
pallet
call
}
block {
height
}
Expand All @@ -149,7 +178,11 @@ export const blocks = {
) {
edges {
node {
extrinsicHash
extrinsic {
id
pallet
call
}
timestamp
status
amount
Expand Down Expand Up @@ -177,7 +210,11 @@ export const blocks = {
) {
edges {
node {
extrinsicHash
extrinsic {
id
pallet
call
}
timestamp
delay
block {
Expand Down Expand Up @@ -208,7 +245,11 @@ export const blocks = {
errorModule
errorName
errorType
extrinsicHash
extrinsic {
id
pallet
call
}
timestamp
block {
height
Expand All @@ -218,6 +259,34 @@ export const blocks = {

totalCount
}
wormholeExtrinsics(
orderBy: timestamp_DESC
limit: $limit
where: {
block: { height_eq: $height }
OR: { block: { hash_eq: $hash } }
}
) {
id
extrinsic {
id
pallet
call
}
totalAmount
outputCount
timestamp
block {
height
}
outputs {
id
exitAccount {
id
}
amount
}
}
}
`;

Expand All @@ -230,7 +299,7 @@ export const blocks = {
variables: {
height: !isHash ? Number(id) : -1,
hash: isHash ? id : '',
limit: QUERY_DEFAULT_LIMIT
limit: QUERY_UNIFIED_LIMIT
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/chain-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const chainStatus = {
) {
transactions: transfersConnection(
orderBy: id_ASC
where: { extrinsicHash_isNull: false }
where: { extrinsic_isNull: false }
) {
totalCount
}
Expand Down
20 changes: 16 additions & 4 deletions src/api/errors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export const errors = {
errorModule
errorName
errorType
extrinsicHash
extrinsic {
id
pallet
call
}
id
timestamp
block {
Expand Down Expand Up @@ -86,7 +90,11 @@ export const errors = {
errorModule
errorName
errorType
extrinsicHash
extrinsic {
id
pallet
call
}
id
timestamp
block {
Expand Down Expand Up @@ -138,12 +146,16 @@ export const errors = {
getByHash: () => {
const GET_ERROR_EVENT_BY_HASH = gql`
query GetErrorEventByHash($hash: String!) {
errorEvents: errorEvents(where: { extrinsicHash_eq: $hash }) {
errorEvents: errorEvents(where: { extrinsic: { id_eq: $hash } }) {
errorDocs
errorModule
errorName
errorType
extrinsicHash
extrinsic {
id
pallet
call
}
id
timestamp
block {
Expand Down
20 changes: 16 additions & 4 deletions src/api/high-security-sets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export const highSecuritySets = {
where: $where
) {
id
extrinsicHash
extrinsic {
id
pallet
call
}
who {
id
}
Expand Down Expand Up @@ -87,7 +91,11 @@ export const highSecuritySets = {
where: $where
) {
id
extrinsicHash
extrinsic {
id
pallet
call
}
who {
id
}
Expand Down Expand Up @@ -152,9 +160,13 @@ export const highSecuritySets = {
getByHash: () => {
const QUERY = gql`
query GetHighSecuritySetByHash($hash: String!) {
highSecuritySets(where: { extrinsicHash_eq: $hash }) {
highSecuritySets(where: { extrinsic: { id_eq: $hash } }) {
id
extrinsicHash
extrinsic {
id
pallet
call
}
who {
id
}
Expand Down
Loading