Skip to content

Commit e66d90b

Browse files
Mani BrarMani Brar
authored andcommitted
chore(veascan-subgraph): add outbox support for arbToGnosis
1 parent 739d18a commit e66d90b

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

veascan-subgraph-outbox/src/VeaOutbox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
MessageRelayed,
66
Verified,
77
VerificationStarted,
8-
} from "../generated/VeaOutboxArbToEthDevnet/VeaOutboxArbToEthDevnet";
8+
} from "../generated/VeaOutboxArbToGnosisDevnet/VeaOutboxArbToGnosisDevnet";
99
import {
1010
Challenge,
1111
Claim,
@@ -78,7 +78,7 @@ export function handleVerificationStarted(event: VerificationStarted): void {
7878
) {
7979
const claimId = event.address.toHexString() + "-" + i.toString();
8080
const claim = Claim.load(claimId);
81-
if (claim?.epoch.equals(event.params._epoch)) {
81+
if (claim && claim.epoch.equals(event.params._epoch)) {
8282
const verification = new Verification(claim.id);
8383
verification.claim = claim.id;
8484
verification.startTimestamp = event.block.timestamp;
@@ -99,7 +99,7 @@ export function handleVerified(event: Verified): void {
9999
) {
100100
const claimId = event.address.toHexString() + "-" + i.toString();
101101
const claim = Claim.load(claimId);
102-
if (claim?.epoch.equals(event.params._epoch)) {
102+
if (claim && claim.epoch.equals(event.params._epoch)) {
103103
claim.verified = true;
104104
claim.save();
105105

veascan-subgraph-outbox/subgraph.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ schema:
33
file: ./schema.graphql
44
dataSources:
55
- kind: ethereum
6-
name: VeaOutboxArbToEthTestnet
7-
network: sepolia
6+
name: VeaOutboxArbToGnosisDevnet
7+
network: gnosis-chiado
88
source:
9-
address: "0xC0574e973059e727E5E4bEB2e04F1D69F627faab"
10-
abi: VeaOutboxArbToEthTestnet
11-
startBlock: 8047848
9+
address: "0xE24B2838962207F585F4fa5C5bE3e1AcA43a1a1B"
10+
abi: VeaOutboxArbToGnosisDevnet
11+
startBlock: 14598540
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7
@@ -18,10 +18,9 @@ dataSources:
1818
- Claimed
1919
- MessageRelayed
2020
- Verified
21-
- VerificationStarted
2221
abis:
23-
- name: VeaOutboxArbToEthTestnet
24-
file: ../contracts/deployments/sepolia/VeaOutboxArbToEthTestnet.json
22+
- name: VeaOutboxArbToGnosisDevnet
23+
file: ../contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json
2524
eventHandlers:
2625
- event: Challenged(indexed uint256,indexed address)
2726
handler: handleChallenged
@@ -35,12 +34,12 @@ dataSources:
3534
handler: handleVerificationStarted
3635
file: ./src/VeaOutbox.ts
3736
- kind: ethereum
38-
name: VeaOutboxArbToEthDevnet
39-
network: sepolia
37+
name: VeaOutboxArbToGnosisTestnet
38+
network: gnosis-chiado
4039
source:
41-
address: "0xb1f5125b52CE23D3763AC1C9ACEf0668825A66c0"
42-
abi: VeaOutboxArbToEthDevnet
43-
startBlock: 7825233
40+
address: "0x1c35dF16AAde8Fcf1D56Bca00B3c8Ef451113DfC"
41+
abi: VeaOutboxArbToGnosisTestnet
42+
startBlock: 15109734
4443
mapping:
4544
kind: ethereum/events
4645
apiVersion: 0.0.7
@@ -50,10 +49,9 @@ dataSources:
5049
- Claimed
5150
- MessageRelayed
5251
- Verified
53-
- VerificationStarted
5452
abis:
55-
- name: VeaOutboxArbToEthDevnet
56-
file: ../contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json
53+
- name: VeaOutboxArbToGnosisTestnet
54+
file: ../contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json
5755
eventHandlers:
5856
- event: Challenged(indexed uint256,indexed address)
5957
handler: handleChallenged

0 commit comments

Comments
 (0)