From b517ea14e42fe7a919f37c8b70082387fb59a08f Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 11:14:29 +0530 Subject: [PATCH 1/8] chore: update subgraph config for redeployments --- relayer-subgraph-inbox/subgraph.yaml | 8 ++++---- veascan-subgraph-inbox/package.json | 2 +- veascan-subgraph-inbox/subgraph.yaml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/relayer-subgraph-inbox/subgraph.yaml b/relayer-subgraph-inbox/subgraph.yaml index e9dfd26d..435a1f79 100644 --- a/relayer-subgraph-inbox/subgraph.yaml +++ b/relayer-subgraph-inbox/subgraph.yaml @@ -32,9 +32,9 @@ dataSources: name: VeaInboxArbToEthTestnet network: arbitrum-sepolia source: - address: "0xE12daFE59Bc3A996362d54b37DFd2BA9279cAd06" + address: "0xAA4F00c86bf956C0Fae603D030CBc2dA7f8B7C5B" abi: VeaInboxArbToEthTestnet - startBlock: 77452741 + startBlock: 139057282 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -88,9 +88,9 @@ dataSources: name: VeaInboxArbToGnosisTestnet network: arbitrum-sepolia source: - address: "0x62403e9Fbac618301175C89fb21920e4FF235A6a" + address: "0xa0d410b202D69C36871d5135ce42fC7D379BBB1c" abi: VeaInboxArbToGnosisTestnet - startBlock: 129094170 + startBlock: 139057386 mapping: kind: ethereum/events apiVersion: 0.0.7 diff --git a/veascan-subgraph-inbox/package.json b/veascan-subgraph-inbox/package.json index eb7d8251..b08c6982 100644 --- a/veascan-subgraph-inbox/package.json +++ b/veascan-subgraph-inbox/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/veascan-subgraph-inbox", - "version": "0.2.1", + "version": "0.2.2", "license": "MIT", "engines": { "node": ">=18.0.0" diff --git a/veascan-subgraph-inbox/subgraph.yaml b/veascan-subgraph-inbox/subgraph.yaml index b26015f3..98677419 100644 --- a/veascan-subgraph-inbox/subgraph.yaml +++ b/veascan-subgraph-inbox/subgraph.yaml @@ -8,9 +8,9 @@ dataSources: name: VeaInboxArbToEthTestnet network: arbitrum-sepolia source: - address: "0xE12daFE59Bc3A996362d54b37DFd2BA9279cAd06" + address: "0xAA4F00c86bf956C0Fae603D030CBc2dA7f8B7C5B" abi: VeaInboxArbToEthTestnet - startBlock: 77452741 + startBlock: 139057282 mapping: kind: ethereum/events apiVersion: 0.0.7 From 7189f070f04a0aa7e29d83e941a8e5d6fa2fdba1 Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 11:20:11 +0530 Subject: [PATCH 2/8] chore(relayer-subgraph): update version --- relayer-subgraph-inbox/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relayer-subgraph-inbox/package.json b/relayer-subgraph-inbox/package.json index 5a99f63f..0c9683ad 100644 --- a/relayer-subgraph-inbox/package.json +++ b/relayer-subgraph-inbox/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/vea-relayer-subgraph-inbox", - "version": "0.2.3", + "version": "0.2.4", "license": "MIT", "engines": { "node": ">=18.0.0" From c463e50a0c6433b025d3965b78ff64db5243a42b Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 11:31:08 +0530 Subject: [PATCH 3/8] feat(veascan-subgraphs): event handle for VerificationStarted --- veascan-subgraph-outbox/package.json | 2 +- veascan-subgraph-outbox/schema.graphql | 9 ++++-- veascan-subgraph-outbox/src/VeaOutbox.ts | 35 ++++++++++++++++++++---- veascan-subgraph-outbox/subgraph.yaml | 10 +++++-- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/veascan-subgraph-outbox/package.json b/veascan-subgraph-outbox/package.json index 02f00d41..4ef3c99f 100644 --- a/veascan-subgraph-outbox/package.json +++ b/veascan-subgraph-outbox/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/veascan-subgraph-outbox", - "version": "0.2.3", + "version": "0.2.4", "license": "MIT", "engines": { "node": ">=18.0.0" diff --git a/veascan-subgraph-outbox/schema.graphql b/veascan-subgraph-outbox/schema.graphql index ecb43fd0..40e308e8 100644 --- a/veascan-subgraph-outbox/schema.graphql +++ b/veascan-subgraph-outbox/schema.graphql @@ -30,9 +30,12 @@ type Challenge @entity { type Verification @entity { id: ID! claim: Claim! - timestamp: BigInt! - caller: Bytes! # address - txHash: Bytes! + startTimestamp: BigInt + startCaller: Bytes # address + startTxHash: Bytes + verifiedTimestamp: BigInt + verifiedCaller: Bytes # address + verifiedTxHash: Bytes } type Message @entity { diff --git a/veascan-subgraph-outbox/src/VeaOutbox.ts b/veascan-subgraph-outbox/src/VeaOutbox.ts index 817c96c8..9562233e 100644 --- a/veascan-subgraph-outbox/src/VeaOutbox.ts +++ b/veascan-subgraph-outbox/src/VeaOutbox.ts @@ -4,6 +4,7 @@ import { Claimed, MessageRelayed, Verified, + VerificationStarted, } from "../generated/VeaOutboxArbToEthDevnet/VeaOutboxArbToEthDevnet"; import { Challenge, @@ -68,6 +69,27 @@ export function handleChallenged(event: Challenged): void { } } +export function handleVerificationStarted(event: VerificationStarted): void { + const ref = getRef(event.address); + for ( + let i = ref.totalClaims.minus(BigInt.fromI32(1)); + i.ge(BigInt.fromI32(0)); + i = i.minus(BigInt.fromI32(1)) + ) { + const claimId = event.address.toHexString() + "-" + i.toString(); + const claim = Claim.load(claimId); + if (claim && claim.epoch.equals(event.params._epoch)) { + const verification = new Verification(claim.id); + verification.claim = claim.id; + verification.startTimestamp = event.block.timestamp; + verification.startCaller = event.transaction.from; + verification.startTxHash = event.transaction.hash; + verification.save(); + break; + } + } +} + export function handleVerified(event: Verified): void { const ref = getRef(event.address); for ( @@ -81,11 +103,14 @@ export function handleVerified(event: Verified): void { claim.verified = true; claim.save(); - const verification = new Verification(claim.id); - verification.claim = claim.id; - verification.timestamp = event.block.timestamp; - verification.caller = event.transaction.from; - verification.txHash = event.transaction.hash; + let verification = Verification.load(claim.id); + if (!verification) { + verification = new Verification(claim.id); + verification.claim = claim.id; + } + verification.verifiedTimestamp = event.block.timestamp; + verification.verifiedCaller = event.transaction.from; + verification.verifiedTxHash = event.transaction.hash; verification.save(); break; } diff --git a/veascan-subgraph-outbox/subgraph.yaml b/veascan-subgraph-outbox/subgraph.yaml index 43bb35af..4ee86650 100644 --- a/veascan-subgraph-outbox/subgraph.yaml +++ b/veascan-subgraph-outbox/subgraph.yaml @@ -6,9 +6,9 @@ dataSources: name: VeaOutboxArbToEthTestnet network: sepolia source: - address: "0x209BFdC6B7c66b63A8382196Ba3d06619d0F12c9" + address: "0xC0574e973059e727E5E4bEB2e04F1D69F627faab" abi: VeaOutboxArbToEthTestnet - startBlock: 6636625 + startBlock: 8047848 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -18,6 +18,7 @@ dataSources: - Claimed - MessageRelayed - Verified + - VerificationStarted abis: - name: VeaOutboxArbToEthTestnet file: ../contracts/deployments/sepolia/VeaOutboxArbToEthTestnet.json @@ -30,6 +31,8 @@ dataSources: handler: handleMessageRelayed - event: Verified(uint256) handler: handleVerified + - event: VerificationStarted(indexed uint256) + handler: handleVerificationStarted file: ./src/VeaOutbox.ts - kind: ethereum name: VeaOutboxArbToEthDevnet @@ -47,6 +50,7 @@ dataSources: - Claimed - MessageRelayed - Verified + - VerificationStarted abis: - name: VeaOutboxArbToEthDevnet file: ../contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json @@ -59,4 +63,6 @@ dataSources: handler: handleMessageRelayed - event: Verified(uint256) handler: handleVerified + - event: VerificationStarted(indexed uint256) + handler: handleVerificationStarted file: ./src/VeaOutbox.ts From d06941a88fe769b43fdde07128e46e1e5da11906 Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 12:33:19 +0530 Subject: [PATCH 4/8] chore(veascan-inbox): rename taken to saved --- veascan-subgraph-inbox/package.json | 2 +- veascan-subgraph-inbox/schema.graphql | 2 +- veascan-subgraph-inbox/src/VeaInbox.ts | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/veascan-subgraph-inbox/package.json b/veascan-subgraph-inbox/package.json index b08c6982..9c6ca694 100644 --- a/veascan-subgraph-inbox/package.json +++ b/veascan-subgraph-inbox/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/veascan-subgraph-inbox", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "engines": { "node": ">=18.0.0" diff --git a/veascan-subgraph-inbox/schema.graphql b/veascan-subgraph-inbox/schema.graphql index c3b70391..c1548ef4 100644 --- a/veascan-subgraph-inbox/schema.graphql +++ b/veascan-subgraph-inbox/schema.graphql @@ -34,7 +34,7 @@ type Snapshot @entity { stateRootString: String messages: [Message!]! @derivedFrom(field: "snapshot") numberMessages: BigInt! - taken: Boolean! + saved: Boolean! resolving: Boolean! fallback: [Fallback!]! @derivedFrom(field: "snapshot") } diff --git a/veascan-subgraph-inbox/src/VeaInbox.ts b/veascan-subgraph-inbox/src/VeaInbox.ts index 30599eb4..ccf1e652 100644 --- a/veascan-subgraph-inbox/src/VeaInbox.ts +++ b/veascan-subgraph-inbox/src/VeaInbox.ts @@ -61,7 +61,7 @@ function getCurrentSnapshot(inboxAddress: Address): Snapshot { const snapshot = new Snapshot(snapshotId); snapshot.inbox = inboxAddress; snapshot.numberMessages = BigInt.fromI32(0); - snapshot.taken = false; + snapshot.saved = false; snapshot.resolving = false; snapshot.epoch = BigInt.fromI32(0); snapshot.epochString = "0"; @@ -84,7 +84,7 @@ function getCurrentSnapshot(inboxAddress: Address): Snapshot { ); snapshot.inbox = inboxAddress; snapshot.numberMessages = BigInt.fromI32(0); - snapshot.taken = false; + snapshot.saved = false; snapshot.resolving = false; snapshot.epoch = BigInt.fromI32(0); snapshot.epochString = "0"; @@ -127,7 +127,7 @@ export function handleSnapshotSaved(event: SnapshotSaved): void { const epoch = event.block.timestamp.div(epochPeriod); const stateRoot = contract.snapshots(epoch); const currentSnapshot = getCurrentSnapshot(event.address); - currentSnapshot.taken = true; + currentSnapshot.saved = true; currentSnapshot.caller = event.transaction.from; currentSnapshot.stateRoot = stateRoot; currentSnapshot.stateRootString = stateRoot.toHexString(); @@ -147,7 +147,7 @@ export function handleSnapshotSaved(event: SnapshotSaved): void { const newSnapshot = new Snapshot(snapshotId); newSnapshot.inbox = event.address; newSnapshot.numberMessages = BigInt.fromI32(0); - newSnapshot.taken = false; + newSnapshot.saved = false; newSnapshot.resolving = false; newSnapshot.save(); @@ -204,7 +204,7 @@ export function handleSnapshotSent(event: SnapshotSent): void { const inbox = VeaInboxArbToEthDevnet.bind(event.address); let currentSnapshot = getCurrentSnapshot(event.address); - currentSnapshot.taken = false; + currentSnapshot.saved = false; currentSnapshot.resolving = true; currentSnapshot.timestamp = epochSent.times(inbox.epochPeriod()); currentSnapshot.stateRoot = Bytes.fromHexString( @@ -225,7 +225,7 @@ export function handleSnapshotSent(event: SnapshotSent): void { const newSnapshot = new Snapshot(newSnapshotId); newSnapshot.inbox = event.address; newSnapshot.numberMessages = BigInt.fromI32(0); - newSnapshot.taken = false; + newSnapshot.saved = false; newSnapshot.resolving = false; // Initialize new snapshot fields with defaults. newSnapshot.epoch = BigInt.fromI32(0); From 062b1a63b02ff5f7f68b2ff3f570aabea72031f0 Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 13:05:37 +0530 Subject: [PATCH 5/8] chore(veascan-web): update gql queires for var renames --- veascan-web/src/gql/gql.ts | 54 ++++----- veascan-web/src/gql/graphql.ts | 203 +++++++++++++++++++-------------- 2 files changed, 147 insertions(+), 110 deletions(-) diff --git a/veascan-web/src/gql/gql.ts b/veascan-web/src/gql/gql.ts index 8d05ad83..1d473359 100644 --- a/veascan-web/src/gql/gql.ts +++ b/veascan-web/src/gql/gql.ts @@ -13,25 +13,25 @@ import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/ * Therefore it is highly recommended to use the babel or swc plugin for production. */ const documents = { - "\n query getSnapshot($epoch: BigInt!, $contract: String!) {\n snapshots(where: { epoch: $epoch, inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n": + "\n query getSnapshot($epoch: BigInt!, $contract: String!) {\n snapshots(where: { epoch: $epoch, inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n": types.GetSnapshotDocument, - '\n query getSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n': + '\n query getSnapshots($snapshotsPerPage: Int, $lastTimestamp: BigInt!, $contract: String!) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n': types.GetSnapshotsDocument, - '\n query getResolvingSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $resolving: Boolean = true\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n resolving: $resolving\n inbox: $contract\n }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n': + '\n query getResolvingSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $resolving: Boolean = true\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, resolving: $resolving, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n': types.GetResolvingSnapshotsDocument, - "\n query searchSnapshots(\n $snapshotsPerPage: Int\n $value: String!\n $contract: String!\n ) {\n snapshotQuery(\n text: $value\n first: $snapshotsPerPage\n where: { inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n": + "\n query searchSnapshots($snapshotsPerPage: Int, $value: String!, $contract: String!) {\n snapshotQuery(text: $value, first: $snapshotsPerPage, where: { inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n": types.SearchSnapshotsDocument, "\n query getMessages($skip: Int!, $snapshot: String!, $snapshotID: ID!) {\n messages(\n first: 5\n skip: $skip\n orderBy: timestamp\n orderDirection: desc\n where: { snapshot: $snapshot }\n ) {\n id\n txHash\n timestamp\n from\n to\n data\n }\n snapshot(id: $snapshotID) {\n numberMessages\n }\n }\n": types.GetMessagesDocument, - "\n query getClaim($epoch: BigInt!, $contract: String!) {\n claims(where: { epoch: $epoch, outbox: $contract }) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n": + "\n query getClaim($epoch: BigInt!, $contract: String!) {\n claims(where: { epoch: $epoch, outbox: $contract }) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n": types.GetClaimDocument, - "\n query getClaimedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n": + "\n query getClaimedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n": types.GetClaimedSnapshotsDocument, - "\n query getChallengedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n": + "\n query getChallengedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n": types.GetChallengedSnapshotsDocument, - "\n query getVerifiedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n": + "\n query getVerifiedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n": types.GetVerifiedSnapshotsDocument, - "\n query getResolvedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n": + "\n query getResolvedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n": types.GetResolvedSnapshotsDocument, "\n query getRelay($id: ID!) {\n message(id: $id) {\n timestamp\n txHash\n relayer\n proof\n }\n }\n": types.GetRelayDocument, @@ -55,26 +55,26 @@ export function graphql(source: string): unknown; * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: "\n query getSnapshot($epoch: BigInt!, $contract: String!) {\n snapshots(where: { epoch: $epoch, inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n" -): (typeof documents)["\n query getSnapshot($epoch: BigInt!, $contract: String!) {\n snapshots(where: { epoch: $epoch, inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n"]; + source: "\n query getSnapshot($epoch: BigInt!, $contract: String!) {\n snapshots(where: { epoch: $epoch, inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n" +): (typeof documents)["\n query getSnapshot($epoch: BigInt!, $contract: String!) {\n snapshots(where: { epoch: $epoch, inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: '\n query getSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n' -): (typeof documents)['\n query getSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n']; + source: '\n query getSnapshots($snapshotsPerPage: Int, $lastTimestamp: BigInt!, $contract: String!) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n' +): (typeof documents)['\n query getSnapshots($snapshotsPerPage: Int, $lastTimestamp: BigInt!, $contract: String!) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n']; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: '\n query getResolvingSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $resolving: Boolean = true\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n resolving: $resolving\n inbox: $contract\n }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n' -): (typeof documents)['\n query getResolvingSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $resolving: Boolean = true\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n resolving: $resolving\n inbox: $contract\n }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n']; + source: '\n query getResolvingSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $resolving: Boolean = true\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, resolving: $resolving, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n' +): (typeof documents)['\n query getResolvingSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $resolving: Boolean = true\n $contract: String!\n ) {\n snapshots(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: { timestamp_lte: $lastTimestamp, resolving: $resolving, inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n ref(id: "0") {\n currentSnapshotIndex\n }\n }\n']; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: "\n query searchSnapshots(\n $snapshotsPerPage: Int\n $value: String!\n $contract: String!\n ) {\n snapshotQuery(\n text: $value\n first: $snapshotsPerPage\n where: { inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n" -): (typeof documents)["\n query searchSnapshots(\n $snapshotsPerPage: Int\n $value: String!\n $contract: String!\n ) {\n snapshotQuery(\n text: $value\n first: $snapshotsPerPage\n where: { inbox: $contract }\n ) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n taken\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n"]; + source: "\n query searchSnapshots($snapshotsPerPage: Int, $value: String!, $contract: String!) {\n snapshotQuery(text: $value, first: $snapshotsPerPage, where: { inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n" +): (typeof documents)["\n query searchSnapshots($snapshotsPerPage: Int, $value: String!, $contract: String!) {\n snapshotQuery(text: $value, first: $snapshotsPerPage, where: { inbox: $contract }) {\n id\n epoch\n caller\n txHash\n timestamp\n stateRoot\n numberMessages\n saved\n resolving\n fallback(first: 1, orderBy: timestamp, orderDirection: desc) {\n executor\n timestamp\n txHash\n ticketId\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -85,32 +85,32 @@ export function graphql( * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: "\n query getClaim($epoch: BigInt!, $contract: String!) {\n claims(where: { epoch: $epoch, outbox: $contract }) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n" -): (typeof documents)["\n query getClaim($epoch: BigInt!, $contract: String!) {\n claims(where: { epoch: $epoch, outbox: $contract }) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n"]; + source: "\n query getClaim($epoch: BigInt!, $contract: String!) {\n claims(where: { epoch: $epoch, outbox: $contract }) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n" +): (typeof documents)["\n query getClaim($epoch: BigInt!, $contract: String!) {\n claims(where: { epoch: $epoch, outbox: $contract }) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: "\n query getClaimedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n" -): (typeof documents)["\n query getClaimedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n"]; + source: "\n query getClaimedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n" +): (typeof documents)["\n query getClaimedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: "\n query getChallengedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n" -): (typeof documents)["\n query getChallengedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n"]; + source: "\n query getChallengedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n" +): (typeof documents)["\n query getChallengedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: false\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: "\n query getVerifiedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n" -): (typeof documents)["\n query getVerifiedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n"]; + source: "\n query getVerifiedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n" +): (typeof documents)["\n query getVerifiedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: false\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: "\n query getResolvedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n" -): (typeof documents)["\n query getResolvedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n timestamp\n caller\n txHash\n }\n }\n }\n"]; + source: "\n query getResolvedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n" +): (typeof documents)["\n query getResolvedSnapshots(\n $snapshotsPerPage: Int\n $lastTimestamp: BigInt!\n $contract: String!\n ) {\n claims(\n first: $snapshotsPerPage\n orderBy: timestamp\n orderDirection: desc\n where: {\n timestamp_lte: $lastTimestamp\n verified: true\n challenged: true\n outbox: $contract\n }\n ) {\n id\n epoch\n timestamp\n stateroot\n bridger\n challenged\n verified\n txHash\n challenge {\n id\n timestamp\n challenger\n honest\n txHash\n }\n verification {\n verifiedTimestamp\n verifiedCaller\n verifiedTxHash\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/veascan-web/src/gql/graphql.ts b/veascan-web/src/gql/graphql.ts index 23fb25e1..0443c88b 100644 --- a/veascan-web/src/gql/graphql.ts +++ b/veascan-web/src/gql/graphql.ts @@ -274,10 +274,13 @@ export enum Claim_OrderBy { Timestamp = "timestamp", TxHash = "txHash", Verification = "verification", - VerificationCaller = "verification__caller", VerificationId = "verification__id", - VerificationTimestamp = "verification__timestamp", - VerificationTxHash = "verification__txHash", + VerificationStartCaller = "verification__startCaller", + VerificationStartTimestamp = "verification__startTimestamp", + VerificationStartTxHash = "verification__startTxHash", + VerificationVerifiedCaller = "verification__verifiedCaller", + VerificationVerifiedTimestamp = "verification__verifiedTimestamp", + VerificationVerifiedTxHash = "verification__verifiedTxHash", Verified = "verified", } @@ -375,9 +378,9 @@ export enum Fallback_OrderBy { SnapshotId = "snapshot__id", SnapshotNumberMessages = "snapshot__numberMessages", SnapshotResolving = "snapshot__resolving", + SnapshotSaved = "snapshot__saved", SnapshotStateRoot = "snapshot__stateRoot", SnapshotStateRootString = "snapshot__stateRootString", - SnapshotTaken = "snapshot__taken", SnapshotTimestamp = "snapshot__timestamp", SnapshotTxHash = "snapshot__txHash", TicketId = "ticketId", @@ -576,9 +579,9 @@ export enum Message_OrderBy { SnapshotId = "snapshot__id", SnapshotNumberMessages = "snapshot__numberMessages", SnapshotResolving = "snapshot__resolving", + SnapshotSaved = "snapshot__saved", SnapshotStateRoot = "snapshot__stateRoot", SnapshotStateRootString = "snapshot__stateRootString", - SnapshotTaken = "snapshot__taken", SnapshotTimestamp = "snapshot__timestamp", SnapshotTxHash = "snapshot__txHash", Timestamp = "timestamp", @@ -944,9 +947,9 @@ export type Snapshot = { messages: Array; numberMessages: Scalars["BigInt"]; resolving: Scalars["Boolean"]; + saved: Scalars["Boolean"]; stateRoot?: Maybe; stateRootString?: Maybe; - taken: Scalars["Boolean"]; timestamp?: Maybe; txHash?: Maybe; }; @@ -1053,6 +1056,10 @@ export type Snapshot_Filter = { resolving_in?: InputMaybe>; resolving_not?: InputMaybe; resolving_not_in?: InputMaybe>; + saved?: InputMaybe; + saved_in?: InputMaybe>; + saved_not?: InputMaybe; + saved_not_in?: InputMaybe>; stateRoot?: InputMaybe; stateRootString?: InputMaybe; stateRootString_contains?: InputMaybe; @@ -1083,10 +1090,6 @@ export type Snapshot_Filter = { stateRoot_not?: InputMaybe; stateRoot_not_contains?: InputMaybe; stateRoot_not_in?: InputMaybe>; - taken?: InputMaybe; - taken_in?: InputMaybe>; - taken_not?: InputMaybe; - taken_not_in?: InputMaybe>; timestamp?: InputMaybe; timestamp_gt?: InputMaybe; timestamp_gte?: InputMaybe; @@ -1118,36 +1121,29 @@ export enum Snapshot_OrderBy { Messages = "messages", NumberMessages = "numberMessages", Resolving = "resolving", + Saved = "saved", StateRoot = "stateRoot", StateRootString = "stateRootString", - Taken = "taken", Timestamp = "timestamp", TxHash = "txHash", } export type Verification = { __typename?: "Verification"; - caller: Scalars["Bytes"]; claim: Claim; id: Scalars["ID"]; - timestamp: Scalars["BigInt"]; - txHash: Scalars["Bytes"]; + startCaller?: Maybe; + startTimestamp?: Maybe; + startTxHash?: Maybe; + verifiedCaller?: Maybe; + verifiedTimestamp?: Maybe; + verifiedTxHash?: Maybe; }; export type Verification_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; - caller?: InputMaybe; - caller_contains?: InputMaybe; - caller_gt?: InputMaybe; - caller_gte?: InputMaybe; - caller_in?: InputMaybe>; - caller_lt?: InputMaybe; - caller_lte?: InputMaybe; - caller_not?: InputMaybe; - caller_not_contains?: InputMaybe; - caller_not_in?: InputMaybe>; claim?: InputMaybe; claim_?: InputMaybe; claim_contains?: InputMaybe; @@ -1178,28 +1174,65 @@ export type Verification_Filter = { id_not?: InputMaybe; id_not_in?: InputMaybe>; or?: InputMaybe>>; - timestamp?: InputMaybe; - timestamp_gt?: InputMaybe; - timestamp_gte?: InputMaybe; - timestamp_in?: InputMaybe>; - timestamp_lt?: InputMaybe; - timestamp_lte?: InputMaybe; - timestamp_not?: InputMaybe; - timestamp_not_in?: InputMaybe>; - txHash?: InputMaybe; - txHash_contains?: InputMaybe; - txHash_gt?: InputMaybe; - txHash_gte?: InputMaybe; - txHash_in?: InputMaybe>; - txHash_lt?: InputMaybe; - txHash_lte?: InputMaybe; - txHash_not?: InputMaybe; - txHash_not_contains?: InputMaybe; - txHash_not_in?: InputMaybe>; + startCaller?: InputMaybe; + startCaller_contains?: InputMaybe; + startCaller_gt?: InputMaybe; + startCaller_gte?: InputMaybe; + startCaller_in?: InputMaybe>; + startCaller_lt?: InputMaybe; + startCaller_lte?: InputMaybe; + startCaller_not?: InputMaybe; + startCaller_not_contains?: InputMaybe; + startCaller_not_in?: InputMaybe>; + startTimestamp?: InputMaybe; + startTimestamp_gt?: InputMaybe; + startTimestamp_gte?: InputMaybe; + startTimestamp_in?: InputMaybe>; + startTimestamp_lt?: InputMaybe; + startTimestamp_lte?: InputMaybe; + startTimestamp_not?: InputMaybe; + startTimestamp_not_in?: InputMaybe>; + startTxHash?: InputMaybe; + startTxHash_contains?: InputMaybe; + startTxHash_gt?: InputMaybe; + startTxHash_gte?: InputMaybe; + startTxHash_in?: InputMaybe>; + startTxHash_lt?: InputMaybe; + startTxHash_lte?: InputMaybe; + startTxHash_not?: InputMaybe; + startTxHash_not_contains?: InputMaybe; + startTxHash_not_in?: InputMaybe>; + verifiedCaller?: InputMaybe; + verifiedCaller_contains?: InputMaybe; + verifiedCaller_gt?: InputMaybe; + verifiedCaller_gte?: InputMaybe; + verifiedCaller_in?: InputMaybe>; + verifiedCaller_lt?: InputMaybe; + verifiedCaller_lte?: InputMaybe; + verifiedCaller_not?: InputMaybe; + verifiedCaller_not_contains?: InputMaybe; + verifiedCaller_not_in?: InputMaybe>; + verifiedTimestamp?: InputMaybe; + verifiedTimestamp_gt?: InputMaybe; + verifiedTimestamp_gte?: InputMaybe; + verifiedTimestamp_in?: InputMaybe>; + verifiedTimestamp_lt?: InputMaybe; + verifiedTimestamp_lte?: InputMaybe; + verifiedTimestamp_not?: InputMaybe; + verifiedTimestamp_not_in?: InputMaybe>; + verifiedTxHash?: InputMaybe; + verifiedTxHash_contains?: InputMaybe; + verifiedTxHash_gt?: InputMaybe; + verifiedTxHash_gte?: InputMaybe; + verifiedTxHash_in?: InputMaybe>; + verifiedTxHash_lt?: InputMaybe; + verifiedTxHash_lte?: InputMaybe; + verifiedTxHash_not?: InputMaybe; + verifiedTxHash_not_contains?: InputMaybe; + verifiedTxHash_not_in?: InputMaybe>; }; export enum Verification_OrderBy { - Caller = "caller", Claim = "claim", ClaimBridger = "claim__bridger", ClaimChallenged = "claim__challenged", @@ -1211,8 +1244,12 @@ export enum Verification_OrderBy { ClaimTxHash = "claim__txHash", ClaimVerified = "claim__verified", Id = "id", - Timestamp = "timestamp", - TxHash = "txHash", + StartCaller = "startCaller", + StartTimestamp = "startTimestamp", + StartTxHash = "startTxHash", + VerifiedCaller = "verifiedCaller", + VerifiedTimestamp = "verifiedTimestamp", + VerifiedTxHash = "verifiedTxHash", } export type _Block_ = { @@ -1267,7 +1304,7 @@ export type GetSnapshotQuery = { timestamp?: any | null; stateRoot?: any | null; numberMessages: any; - taken: boolean; + saved: boolean; resolving: boolean; fallback: Array<{ __typename?: "Fallback"; @@ -1296,7 +1333,7 @@ export type GetSnapshotsQuery = { timestamp?: any | null; stateRoot?: any | null; numberMessages: any; - taken: boolean; + saved: boolean; resolving: boolean; fallback: Array<{ __typename?: "Fallback"; @@ -1327,7 +1364,7 @@ export type GetResolvingSnapshotsQuery = { timestamp?: any | null; stateRoot?: any | null; numberMessages: any; - taken: boolean; + saved: boolean; resolving: boolean; fallback: Array<{ __typename?: "Fallback"; @@ -1357,7 +1394,7 @@ export type SearchSnapshotsQuery = { timestamp?: any | null; stateRoot?: any | null; numberMessages: any; - taken: boolean; + saved: boolean; resolving: boolean; fallback: Array<{ __typename?: "Fallback"; @@ -1416,9 +1453,9 @@ export type GetClaimQuery = { } | null; verification?: { __typename?: "Verification"; - timestamp: any; - caller: any; - txHash: any; + verifiedTimestamp?: any | null; + verifiedCaller?: any | null; + verifiedTxHash?: any | null; } | null; }>; }; @@ -1451,9 +1488,9 @@ export type GetClaimedSnapshotsQuery = { } | null; verification?: { __typename?: "Verification"; - timestamp: any; - caller: any; - txHash: any; + verifiedTimestamp?: any | null; + verifiedCaller?: any | null; + verifiedTxHash?: any | null; } | null; }>; }; @@ -1486,9 +1523,9 @@ export type GetChallengedSnapshotsQuery = { } | null; verification?: { __typename?: "Verification"; - timestamp: any; - caller: any; - txHash: any; + verifiedTimestamp?: any | null; + verifiedCaller?: any | null; + verifiedTxHash?: any | null; } | null; }>; }; @@ -1521,9 +1558,9 @@ export type GetVerifiedSnapshotsQuery = { } | null; verification?: { __typename?: "Verification"; - timestamp: any; - caller: any; - txHash: any; + verifiedTimestamp?: any | null; + verifiedCaller?: any | null; + verifiedTxHash?: any | null; } | null; }>; }; @@ -1556,9 +1593,9 @@ export type GetResolvedSnapshotsQuery = { } | null; verification?: { __typename?: "Verification"; - timestamp: any; - caller: any; - txHash: any; + verifiedTimestamp?: any | null; + verifiedCaller?: any | null; + verifiedTxHash?: any | null; } | null; }>; }; @@ -1661,7 +1698,7 @@ export const GetSnapshotDocument = { kind: "Field", name: { kind: "Name", value: "numberMessages" }, }, - { kind: "Field", name: { kind: "Name", value: "taken" } }, + { kind: "Field", name: { kind: "Name", value: "saved" } }, { kind: "Field", name: { kind: "Name", value: "resolving" } }, { kind: "Field", @@ -1822,7 +1859,7 @@ export const GetSnapshotsDocument = { kind: "Field", name: { kind: "Name", value: "numberMessages" }, }, - { kind: "Field", name: { kind: "Name", value: "taken" } }, + { kind: "Field", name: { kind: "Name", value: "saved" } }, { kind: "Field", name: { kind: "Name", value: "resolving" } }, { kind: "Field", @@ -2020,7 +2057,7 @@ export const GetResolvingSnapshotsDocument = { kind: "Field", name: { kind: "Name", value: "numberMessages" }, }, - { kind: "Field", name: { kind: "Name", value: "taken" } }, + { kind: "Field", name: { kind: "Name", value: "saved" } }, { kind: "Field", name: { kind: "Name", value: "resolving" } }, { kind: "Field", @@ -2194,7 +2231,7 @@ export const SearchSnapshotsDocument = { kind: "Field", name: { kind: "Name", value: "numberMessages" }, }, - { kind: "Field", name: { kind: "Name", value: "taken" } }, + { kind: "Field", name: { kind: "Name", value: "saved" } }, { kind: "Field", name: { kind: "Name", value: "resolving" } }, { kind: "Field", @@ -2494,15 +2531,15 @@ export const GetClaimDocument = { selections: [ { kind: "Field", - name: { kind: "Name", value: "timestamp" }, + name: { kind: "Name", value: "verifiedTimestamp" }, }, { kind: "Field", - name: { kind: "Name", value: "caller" }, + name: { kind: "Name", value: "verifiedCaller" }, }, { kind: "Field", - name: { kind: "Name", value: "txHash" }, + name: { kind: "Name", value: "verifiedTxHash" }, }, ], }, @@ -2666,15 +2703,15 @@ export const GetClaimedSnapshotsDocument = { selections: [ { kind: "Field", - name: { kind: "Name", value: "timestamp" }, + name: { kind: "Name", value: "verifiedTimestamp" }, }, { kind: "Field", - name: { kind: "Name", value: "caller" }, + name: { kind: "Name", value: "verifiedCaller" }, }, { kind: "Field", - name: { kind: "Name", value: "txHash" }, + name: { kind: "Name", value: "verifiedTxHash" }, }, ], }, @@ -2841,15 +2878,15 @@ export const GetChallengedSnapshotsDocument = { selections: [ { kind: "Field", - name: { kind: "Name", value: "timestamp" }, + name: { kind: "Name", value: "verifiedTimestamp" }, }, { kind: "Field", - name: { kind: "Name", value: "caller" }, + name: { kind: "Name", value: "verifiedCaller" }, }, { kind: "Field", - name: { kind: "Name", value: "txHash" }, + name: { kind: "Name", value: "verifiedTxHash" }, }, ], }, @@ -3016,15 +3053,15 @@ export const GetVerifiedSnapshotsDocument = { selections: [ { kind: "Field", - name: { kind: "Name", value: "timestamp" }, + name: { kind: "Name", value: "verifiedTimestamp" }, }, { kind: "Field", - name: { kind: "Name", value: "caller" }, + name: { kind: "Name", value: "verifiedCaller" }, }, { kind: "Field", - name: { kind: "Name", value: "txHash" }, + name: { kind: "Name", value: "verifiedTxHash" }, }, ], }, @@ -3191,15 +3228,15 @@ export const GetResolvedSnapshotsDocument = { selections: [ { kind: "Field", - name: { kind: "Name", value: "timestamp" }, + name: { kind: "Name", value: "verifiedTimestamp" }, }, { kind: "Field", - name: { kind: "Name", value: "caller" }, + name: { kind: "Name", value: "verifiedCaller" }, }, { kind: "Field", - name: { kind: "Name", value: "txHash" }, + name: { kind: "Name", value: "verifiedTxHash" }, }, ], }, From f21b077f6ae39bfc96c311986008d56f5c922744 Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 13:06:44 +0530 Subject: [PATCH 6/8] chore(veascan-web): update var names for verified & taken --- veascan-web/src/App.tsx | 2 +- .../AccordionTitle/ColoredLabel.tsx | 2 +- .../AccordionTitle/index.tsx | 4 +-- .../src/components/TxFilterHeader/index.tsx | 11 +++++-- veascan-web/src/hooks/queries/getInboxData.ts | 8 ++--- .../src/hooks/queries/getOutboxData.ts | 30 +++++++++---------- veascan-web/src/utils/mapDataForAccordion.tsx | 12 ++++---- 7 files changed, 37 insertions(+), 32 deletions(-) diff --git a/veascan-web/src/App.tsx b/veascan-web/src/App.tsx index 87d06835..a9ba6989 100644 --- a/veascan-web/src/App.tsx +++ b/veascan-web/src/App.tsx @@ -75,7 +75,7 @@ const App = () => { <> { - const { statusItems, statusFilter, setStatusFilter, debouncedSearch } = - useFiltersContext(); + const { + statusItems, + statusFilter, + setStatusFilter, + debouncedSearch, + network, + } = useFiltersContext(); const isSearchEmpty = debouncedSearch === ""; return ( - Latest Snapshots + Latest {network} Snapshots Epoch ID diff --git a/veascan-web/src/hooks/queries/getInboxData.ts b/veascan-web/src/hooks/queries/getInboxData.ts index d9dffb29..23e1aa34 100644 --- a/veascan-web/src/hooks/queries/getInboxData.ts +++ b/veascan-web/src/hooks/queries/getInboxData.ts @@ -10,7 +10,7 @@ export const getSnapshotQuery = graphql(` timestamp stateRoot numberMessages - taken + saved resolving fallback(first: 1, orderBy: timestamp, orderDirection: desc) { executor @@ -41,7 +41,7 @@ export const getSnapshotsQuery = graphql(` timestamp stateRoot numberMessages - taken + saved resolving fallback(first: 1, orderBy: timestamp, orderDirection: desc) { executor @@ -80,7 +80,7 @@ export const getResolvingSnapshotsQuery = graphql(` timestamp stateRoot numberMessages - taken + saved resolving fallback(first: 1, orderBy: timestamp, orderDirection: desc) { executor @@ -113,7 +113,7 @@ export const searchSnapshotsQuery = graphql(` timestamp stateRoot numberMessages - taken + saved resolving fallback(first: 1, orderBy: timestamp, orderDirection: desc) { executor diff --git a/veascan-web/src/hooks/queries/getOutboxData.ts b/veascan-web/src/hooks/queries/getOutboxData.ts index 3f3089bd..c527ff36 100644 --- a/veascan-web/src/hooks/queries/getOutboxData.ts +++ b/veascan-web/src/hooks/queries/getOutboxData.ts @@ -19,9 +19,9 @@ export const getClaimQuery = graphql(` txHash } verification { - timestamp - caller - txHash + verifiedTimestamp + verifiedCaller + verifiedTxHash } } } @@ -60,9 +60,9 @@ export const getClaimedSnapshotsQuery = graphql(` txHash } verification { - timestamp - caller - txHash + verifiedTimestamp + verifiedCaller + verifiedTxHash } } } @@ -101,9 +101,9 @@ export const getChallengedSnapshotsQuery = graphql(` txHash } verification { - timestamp - caller - txHash + verifiedTimestamp + verifiedCaller + verifiedTxHash } } } @@ -142,9 +142,9 @@ export const getVerifiedSnapshotsQuery = graphql(` txHash } verification { - timestamp - caller - txHash + verifiedTimestamp + verifiedCaller + verifiedTxHash } } } @@ -183,9 +183,9 @@ export const getResolvedSnapshotsQuery = graphql(` txHash } verification { - timestamp - caller - txHash + verifiedTimestamp + verifiedCaller + verifiedTxHash } } } diff --git a/veascan-web/src/utils/mapDataForAccordion.tsx b/veascan-web/src/utils/mapDataForAccordion.tsx index f33af945..c6fbe603 100644 --- a/veascan-web/src/utils/mapDataForAccordion.tsx +++ b/veascan-web/src/utils/mapDataForAccordion.tsx @@ -44,9 +44,9 @@ const calculateCurrentStatus = (status: IStatus): ClaimStatus => { }; export const mapDataForAccordion = ( - snapshotsData: [InboxData, OutboxData][] + snapshotsData: [InboxData, OutboxData][], + statusFilter: number ): IParsedData[] => { - const { statusFilter } = useFiltersContext(); const data = snapshotsData.map(([inboxData, outboxData]): IParsedData => { const bridgeInfo = bridges[inboxData?.bridgeId]; const transactions: ITxCard[] = [ @@ -107,17 +107,17 @@ export const mapDataForAccordion = ( caller: inboxData.fallback[0].executor, } : null, - outboxData?.verification?.txHash + outboxData?.verification?.verifiedTxHash ? { title: outboxData?.challenge?.txHash ? "Fallback Executor" : "Verifier", chain: bridgeInfo?.to, - txHash: outboxData.verification.txHash, + txHash: outboxData.verification.verifiedTxHash, timestamp: formatTimestampToHumanReadable( - outboxData.verification.timestamp + outboxData.verification.verifiedTimestamp ), - caller: outboxData.verification.caller, + caller: outboxData.verification.verifiedCaller, } : null, ].filter(Boolean) as ITxCard[]; From d8a6749f94fc2f6b0823325ec9c4ff3e6f7d2e5a Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 13:07:15 +0530 Subject: [PATCH 7/8] chore(veascan-web): remove unused import --- veascan-web/src/utils/mapDataForAccordion.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/veascan-web/src/utils/mapDataForAccordion.tsx b/veascan-web/src/utils/mapDataForAccordion.tsx index c6fbe603..d37749b4 100644 --- a/veascan-web/src/utils/mapDataForAccordion.tsx +++ b/veascan-web/src/utils/mapDataForAccordion.tsx @@ -2,7 +2,6 @@ import { ITxCard } from "components/SnapshotAccordion/AccordionBody/TxCard"; import { bridges } from "consts/bridges"; import { formatTimestampToHumanReadable } from "./formatTimestampToHumanReadable"; import { InboxData, OutboxData } from "hooks/useSnapshots"; -import { useFiltersContext } from "contexts/FiltersContext"; export interface IStatus { claimed: boolean; From 22fdfb6a5fba8f54f2f61e8db25c916c65365d79 Mon Sep 17 00:00:00 2001 From: Mani Brar Date: Mon, 21 Apr 2025 19:24:19 +0530 Subject: [PATCH 8/8] chore(veascan-inbox): refactor claim check --- veascan-subgraph-outbox/src/VeaOutbox.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/veascan-subgraph-outbox/src/VeaOutbox.ts b/veascan-subgraph-outbox/src/VeaOutbox.ts index 9562233e..53fdfd11 100644 --- a/veascan-subgraph-outbox/src/VeaOutbox.ts +++ b/veascan-subgraph-outbox/src/VeaOutbox.ts @@ -78,7 +78,7 @@ export function handleVerificationStarted(event: VerificationStarted): void { ) { const claimId = event.address.toHexString() + "-" + i.toString(); const claim = Claim.load(claimId); - if (claim && claim.epoch.equals(event.params._epoch)) { + if (claim?.epoch.equals(event.params._epoch)) { const verification = new Verification(claim.id); verification.claim = claim.id; verification.startTimestamp = event.block.timestamp; @@ -99,7 +99,7 @@ export function handleVerified(event: Verified): void { ) { const claimId = event.address.toHexString() + "-" + i.toString(); const claim = Claim.load(claimId); - if (claim && claim.epoch.equals(event.params._epoch)) { + if (claim?.epoch.equals(event.params._epoch)) { claim.verified = true; claim.save();