Skip to content

Commit 8a7394e

Browse files
committed
feat(subgraph): implement court name on the subgraph
1 parent 9b0fd23 commit 8a7394e

File tree

4 files changed

+9
-48
lines changed

4 files changed

+9
-48
lines changed

subgraph/schema.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ enum Period {
99
type Court @entity {
1010
id: ID!
1111
policy: String
12+
name: String
1213
hiddenVotes: Boolean!
1314
parent: Court
1415
children: [Court!]! @derivedFrom(field: "parent")

subgraph/scripts/update.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ function update() #file #dataSourceIndex
1717
update "$SCRIPT_DIR/../../contracts/deployments/arbitrumGoerli/KlerosCore.json" 0
1818
update "$SCRIPT_DIR/../../contracts/deployments/arbitrumGoerli/PolicyRegistry.json" 1
1919
update "$SCRIPT_DIR/../../contracts/deployments/arbitrumGoerli/DisputeKitClassic.json" 2
20-
update "$SCRIPT_DIR/../../contracts/deployments/arbitrumGoerli/HomeGatewayToEthereum.json" 3

subgraph/src/PolicyRegistry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export function handlePolicyUpdate(event: PolicyUpdate): void {
66
const court = Court.load(courtID);
77
if (court) {
88
court.policy = event.params._policy;
9+
court.name = event.params._courtName;
910
court.save();
1011
}
1112
}

subgraph/subgraph.yaml

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ dataSources:
66
name: KlerosCore
77
network: arbitrum-goerli
88
source:
9-
address: "0xdfea19B51cDe76Aa659bB72401AC14FFCFe42Cde"
9+
address: "0x4d7858e73a8842b5e6422D08a3349924dD062AbB"
1010
abi: KlerosCore
11-
startBlock: 997981
11+
startBlock: 4027978
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.6
@@ -56,9 +56,9 @@ dataSources:
5656
name: PolicyRegistry
5757
network: arbitrum-goerli
5858
source:
59-
address: "0x76262035D1b280cC0b08024177b837893bcAd3DA"
59+
address: "0xAF0F49Fe110b48bd512F00d51D141F023c9a9106"
6060
abi: PolicyRegistry
61-
startBlock: 133630
61+
startBlock: 4027973
6262
mapping:
6363
kind: ethereum/events
6464
apiVersion: 0.0.6
@@ -69,16 +69,16 @@ dataSources:
6969
- name: PolicyRegistry
7070
file: ../contracts/deployments/arbitrumGoerli/PolicyRegistry.json
7171
eventHandlers:
72-
- event: PolicyUpdate(indexed uint256,string)
72+
- event: PolicyUpdate(indexed uint256,string,string)
7373
handler: handlePolicyUpdate
7474
file: ./src/PolicyRegistry.ts
7575
- kind: ethereum
7676
name: DisputeKitClassic
7777
network: arbitrum-goerli
7878
source:
79-
address: "0xA2c538AA05BBCc44c213441f6f3777223D2BF9e5"
79+
address: "0xde31F2245d164620d08f5b0f8D43dCe8B9708373"
8080
abi: DisputeKitClassic
81-
startBlock: 133630
81+
startBlock: 4027976
8282
mapping:
8383
kind: ethereum/events
8484
apiVersion: 0.0.6
@@ -95,43 +95,3 @@ dataSources:
9595
- event: Justification(indexed uint256,indexed address,indexed uint256,string)
9696
handler: handleJustificationEvent
9797
file: ./src/DisputeKitClassic.ts
98-
- kind: ethereum
99-
name: HomeGateway
100-
network: arbitrum-goerli
101-
source:
102-
address: "0xed12799915180a257985631fbD2ead261eD838cf"
103-
abi: HomeGateway
104-
startBlock: 998359
105-
mapping:
106-
kind: ethereum/events
107-
apiVersion: 0.0.6
108-
language: wasm/assemblyscript
109-
entities:
110-
- GatewayDispute
111-
abis:
112-
- name: HomeGateway
113-
file: ../contracts/deployments/arbitrumGoerli/HomeGatewayToEthereum.json
114-
eventHandlers:
115-
- event: Dispute(indexed address,indexed uint256,uint256,uint256)
116-
handler: handleDisputeEvent
117-
file: ./src/HomeGateway.ts
118-
- kind: ethereum
119-
name: FastBridgeSender
120-
network: arbitrum-goerli
121-
source:
122-
address: "0x4d18b9792e0D8F5aF696E71dBEDff8fcBEed6e8C"
123-
abi: FastBridgeSender
124-
startBlock: 998358
125-
mapping:
126-
kind: ethereum/events
127-
apiVersion: 0.0.6
128-
language: wasm/assemblyscript
129-
entities:
130-
- OutgoingMessage
131-
abis:
132-
- name: FastBridgeSender
133-
file: ../contracts/deployments/arbitrumGoerli/FastBridgeSender.json
134-
eventHandlers:
135-
- event: BatchOutgoing(indexed uint256,uint256,uint256,bytes32)
136-
handler: handleBatchOutgoing
137-
file: ./src/FastBridgeSender.ts

0 commit comments

Comments
 (0)