Skip to content

feat: subgraph support for shutter disputekit in devnet #1966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
202 changes: 202 additions & 0 deletions subgraph/core-neo/subgraph.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
specVersion: 0.0.5
schema:
file: ./schema.graphql
features:
- fullTextSearch
dataSources:
- kind: ethereum
name: KlerosCore
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: KlerosCore
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- User
- Arbitrable
- TokenAndETHShift
- JurorTokensPerCourt
- Court
- Dispute
- Round
- Draw
- DisputeKit
- Counter
abis:
- name: SortitionModule
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleNeo.json
- name: DisputeKitClassic
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicNeo.json
- name: KlerosCore
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreNeo.json
eventHandlers:
- event: AppealDecision(indexed uint256,indexed address)
handler: handleAppealDecision
- event: DisputeCreation(indexed uint256,indexed address)
handler: handleDisputeCreation
receipt: true
- event: Draw(indexed address,indexed uint256,uint256,uint256)
handler: handleDraw
- event: NewPeriod(indexed uint256,uint8)
handler: handleNewPeriod
- event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
handler: handleCourtCreated
- event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4])
handler: handleCourtModified
- event: DisputeKitCreated(indexed uint256,indexed address)
handler: handleDisputeKitCreated
- event: DisputeKitEnabled(indexed uint96,indexed uint256,indexed bool)
handler: handleDisputeKitEnabled
- event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address)
handler: handleTokenAndETHShift
- event: Ruling(indexed address,indexed uint256,uint256)
handler: handleRuling
- event: AcceptedFeeToken(indexed address,indexed bool)
handler: handleAcceptedFeeToken
- event: CourtJump(indexed uint256,indexed uint256,indexed uint96,uint96)
handler: handleCourtJump
file: ./src/KlerosCore.ts
- kind: ethereum
name: PolicyRegistry
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: PolicyRegistry
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Court
abis:
- name: PolicyRegistry
file: ../../contracts/deployments/_PLACEHOLDER_/PolicyRegistry.json
eventHandlers:
- event: PolicyUpdate(indexed uint256,string,string)
handler: handlePolicyUpdate
file: ./src/PolicyRegistry.ts
- kind: ethereum
name: DisputeKitClassic
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: DisputeKitClassic
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ClassicDispute
- ClassicRound
- ClassicVote
- ClassicContribution
abis:
- name: DisputeKitClassic
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicNeo.json
- name: KlerosCore
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreNeo.json
eventHandlers:
- event: DisputeCreation(indexed uint256,uint256,bytes)
handler: handleDisputeCreation
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleContributionEvent
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleWithdrawal
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
handler: handleChoiceFunded
- event: VoteCast(indexed uint256,indexed address,uint256[],indexed uint256,string)
handler: handleVoteCast
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
handler: handleCommitCast
file: ./src/DisputeKitClassic.ts
- kind: ethereum
name: DisputeKitShutter
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: DisputeKitShutter
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ClassicDispute
- ClassicRound
- ClassicVote
- ClassicContribution
abis:
- name: DisputeKitShutter
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitShutter.json
- name: KlerosCore
# FIX: temporarily point to abi with event addition
file: ./abi-migrations/KlerosCore.json
eventHandlers:
- event: DisputeCreation(indexed uint256,uint256,bytes)
handler: handleDisputeCreation
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleContributionEvent
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleWithdrawal
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
handler: handleChoiceFunded
- event: VoteCast(indexed uint256,indexed address,uint256[],indexed uint256,string)
handler: handleVoteCast
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
handler: handleCommitCast
file: ./src/DisputeKitClassic.ts
- kind: ethereum
name: EvidenceModule
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: EvidenceModule
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ClassicEvidenceGroup
- ClassicEvidence
abis:
- name: EvidenceModule
file: ../../contracts/deployments/_PLACEHOLDER_/EvidenceModule.json
eventHandlers:
- event: Evidence(indexed uint256,indexed address,string)
handler: handleEvidenceEvent
file: ./src/EvidenceModule.ts
- kind: ethereum
name: SortitionModule
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: SortitionModule
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- JurorTokensPerCourt
abis:
- name: SortitionModule
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleNeo.json
eventHandlers:
- event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256)
handler: handleStakeDelayedAlreadyTransferredDeposited
- event: StakeDelayedAlreadyTransferredWithdrawn(indexed address,indexed uint96,uint256)
handler: handleStakeDelayedAlreadyTransferredWithdrawn
- event: StakeDelayedNotTransferred(indexed address,uint256,uint256)
handler: handleStakeDelayedNotTransferred
- event: StakeLocked(indexed address,uint256,bool)
handler: handleStakeLocked
- event: StakeSet(indexed address,uint256,uint256,uint256)
handler: handleStakeSet
file: ./src/SortitionModule.ts
1 change: 1 addition & 0 deletions subgraph/core-neo/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# THIS FILE IS AUTO-GENERATED BY update.sh FROM subgraph.template.yaml, ANY CHANGES WILL BE LOST.
specVersion: 0.0.5
schema:
file: ./schema.graphql
Expand Down
160 changes: 160 additions & 0 deletions subgraph/core-university/subgraph.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
specVersion: 0.0.5
schema:
file: ./schema.graphql
features:
- fullTextSearch
dataSources:
- kind: ethereum
name: KlerosCore
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: KlerosCore
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- User
- Arbitrable
- TokenAndETHShift
- JurorTokensPerCourt
- Court
- Dispute
- Round
- Draw
- DisputeKit
- Counter
abis:
- name: SortitionModule
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleUniversity.json
- name: DisputeKitClassic
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicUniversity.json
- name: KlerosCore
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreUniversity.json
eventHandlers:
- event: AppealDecision(indexed uint256,indexed address)
handler: handleAppealDecision
- event: DisputeCreation(indexed uint256,indexed address)
handler: handleDisputeCreation
receipt: true
- event: Draw(indexed address,indexed uint256,uint256,uint256)
handler: handleDraw
- event: NewPeriod(indexed uint256,uint8)
handler: handleNewPeriod
- event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
handler: handleCourtCreated
- event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4])
handler: handleCourtModified
- event: DisputeKitCreated(indexed uint256,indexed address)
handler: handleDisputeKitCreated
- event: DisputeKitEnabled(indexed uint96,indexed uint256,indexed bool)
handler: handleDisputeKitEnabled
- event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address)
handler: handleTokenAndETHShift
- event: Ruling(indexed address,indexed uint256,uint256)
handler: handleRuling
- event: AcceptedFeeToken(indexed address,indexed bool)
handler: handleAcceptedFeeToken
- event: CourtJump(indexed uint256,indexed uint256,indexed uint96,uint96)
handler: handleCourtJump
file: ./src/KlerosCore.ts
- kind: ethereum
name: PolicyRegistry
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: PolicyRegistry
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Court
abis:
- name: PolicyRegistry
file: ../../contracts/deployments/_PLACEHOLDER_/PolicyRegistry.json
eventHandlers:
- event: PolicyUpdate(indexed uint256,string,string)
handler: handlePolicyUpdate
file: ./src/PolicyRegistry.ts
- kind: ethereum
name: DisputeKitClassic
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: DisputeKitClassic
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ClassicDispute
- ClassicRound
- ClassicVote
- ClassicContribution
abis:
- name: DisputeKitClassic
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicUniversity.json
- name: KlerosCore
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreUniversity.json
eventHandlers:
- event: DisputeCreation(indexed uint256,uint256,bytes)
handler: handleDisputeCreation
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleContributionEvent
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleWithdrawal
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
handler: handleChoiceFunded
- event: VoteCast(indexed uint256,indexed address,uint256[],indexed uint256,string)
handler: handleVoteCast
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
handler: handleCommitCast
file: ./src/DisputeKitClassic.ts
- kind: ethereum
name: EvidenceModule
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: EvidenceModule
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ClassicEvidenceGroup
- ClassicEvidence
abis:
- name: EvidenceModule
file: ../../contracts/deployments/_PLACEHOLDER_/EvidenceModule.json
eventHandlers:
- event: Evidence(indexed uint256,indexed address,string)
handler: handleEvidenceEvent
file: ./src/EvidenceModule.ts
- kind: ethereum
name: SortitionModule
network: _PLACEHOLDER_
source:
address: "_PLACEHOLDER_"
abi: SortitionModule
startBlock: _PLACEHOLDER_
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- JurorTokensPerCourt
abis:
- name: SortitionModule
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleUniversity.json
eventHandlers:
- event: StakeLocked(indexed address,uint256,bool)
handler: handleStakeLocked
- event: StakeSet(indexed address,uint256,uint256,uint256)
handler: handleStakeSet
file: ./src/SortitionModule.ts
9 changes: 5 additions & 4 deletions subgraph/core-university/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# THIS FILE IS AUTO-GENERATED BY update.sh FROM subgraph.template.yaml, ANY CHANGES WILL BE LOST.
specVersion: 0.0.5
schema:
file: ./schema.graphql
Expand Down Expand Up @@ -64,9 +65,9 @@ dataSources:
name: PolicyRegistry
network: arbitrum-sepolia
source:
address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da"
address: "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b"
abi: PolicyRegistry
startBlock: 3084568
startBlock: 141215158
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down Expand Up @@ -119,9 +120,9 @@ dataSources:
name: EvidenceModule
network: arbitrum-sepolia
source:
address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09"
address: "0x990f44d19a5F46889801B31bf58e0536fBECf27C"
abi: EvidenceModule
startBlock: 3638735
startBlock: 141215177
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down
Loading