diff --git a/subgraph/package.json b/subgraph/package.json index 7d70d40d7..0957851e5 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -15,7 +15,7 @@ "create-local": "graph create --node http://localhost:8020/ kleros/kleros-v2-core-local", "remove-local": "graph remove --node http://localhost:8020/ kleros/kleros-v2-core-local", "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/kleros-v2-core-local --version-label v$(date +%s)", - "rebuild-deploy-local": "yarn update:local && yarn codegen && yarn create-local && yarn deploy-local", + "rebuild-deploy-local": "yarn update:local && yarn codegen && yarn build && yarn create-local && yarn deploy-local", "start-local-indexer": "docker compose -f ../services/graph-node/docker-compose.yml up -d && docker compose -f ../services/graph-node/docker-compose.yml logs -f", "stop-local-indexer": "docker compose -f ../services/graph-node/docker-compose.yml down && rm -rf ../services/graph-node/data" }, diff --git a/subgraph/src/entities/Round.ts b/subgraph/src/entities/Round.ts index 731f43773..8c67b1082 100644 --- a/subgraph/src/entities/Round.ts +++ b/subgraph/src/entities/Round.ts @@ -1,22 +1,22 @@ import { BigInt } from "@graphprotocol/graph-ts"; -import { KlerosCore__getRoundInfoResult } from "../../generated/KlerosCore/KlerosCore"; +import { KlerosCore__getRoundInfoResultValue0Struct } from "../../generated/KlerosCore/KlerosCore"; import { Round } from "../../generated/schema"; export function createRoundFromRoundInfo( disputeID: BigInt, roundIndex: BigInt, - roundInfo: KlerosCore__getRoundInfoResult + roundInfo: KlerosCore__getRoundInfoResultValue0Struct ): void { const roundID = `${disputeID.toString()}-${roundIndex.toString()}`; const round = new Round(roundID); - const feeToken = roundInfo.getFeeToken().toHexString(); + const feeToken = roundInfo.feeToken.toHexString(); round.feeToken = feeToken === "0x0000000000000000000000000000000000000000" ? null : feeToken; - round.disputeKit = roundInfo.getDisputeKitID().toString(); - round.tokensAtStakePerJuror = roundInfo.getPnkAtStakePerJuror(); - round.totalFeesForJurors = roundInfo.getTotalFeesForJurors(); - round.nbVotes = roundInfo.getNbVotes(); - round.repartitions = roundInfo.getRepartitions(); - round.penalties = roundInfo.getPnkPenalties(); + round.disputeKit = roundInfo.disputeKitID.toString(); + round.tokensAtStakePerJuror = roundInfo.pnkAtStakePerJuror; + round.totalFeesForJurors = roundInfo.totalFeesForJurors; + round.nbVotes = roundInfo.nbVotes; + round.repartitions = roundInfo.repartitions; + round.penalties = roundInfo.pnkPenalties; round.dispute = disputeID.toString(); round.save(); } diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml index fd19eb740..a9c38f627 100644 --- a/subgraph/subgraph.yaml +++ b/subgraph/subgraph.yaml @@ -6,9 +6,9 @@ dataSources: name: KlerosCore network: arbitrum-goerli source: - address: "0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509" + address: "0x813DCc76dbA91DD9f6bDD038aea0877FC95656bE" abi: KlerosCore - startBlock: 33640331 + startBlock: 43823780 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -26,9 +26,9 @@ dataSources: - Counter abis: - name: DisputeKitClassic - file: ../contracts/deployments/arbitrumGoerli/DisputeKitClassic.json + file: ../contracts/deployments/arbitrumGoerliDevnet/DisputeKitClassic.json - name: KlerosCore - file: ../contracts/deployments/arbitrumGoerli/KlerosCore.json + file: ../contracts/deployments/arbitrumGoerliDevnet/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -48,7 +48,7 @@ dataSources: handler: handleDisputeKitEnabled - event: StakeSet(indexed address,uint256,uint256) handler: handleStakeSet - - event: StakeDelayed(indexed address,uint256,uint256,uint256) + - event: StakeDelayed(indexed address,uint256,uint256) handler: handleStakeDelayed - event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address) handler: handleTokenAndETHShift @@ -61,9 +61,9 @@ dataSources: name: PolicyRegistry network: arbitrum-goerli source: - address: "0x4c129b9836E4CC3Cf6D833b39a4B7cfA25D86c86" + address: "0x0d7EeA661C1f9cB1AD389c9Df90B3beDE86a1529" abi: PolicyRegistry - startBlock: 33436566 + startBlock: 43823685 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -72,7 +72,7 @@ dataSources: - Court abis: - name: PolicyRegistry - file: ../contracts/deployments/arbitrumGoerli/PolicyRegistry.json + file: ../contracts/deployments/arbitrumGoerliDevnet/PolicyRegistry.json eventHandlers: - event: PolicyUpdate(indexed uint256,string,string) handler: handlePolicyUpdate @@ -81,9 +81,9 @@ dataSources: name: DisputeKitClassic network: arbitrum-goerli source: - address: "0x439f92b61783A752462527f9dA9C6c6180C9253a" + address: "0x6394A70cADD1376FdE5C38bA331761256DDd03E2" abi: DisputeKitClassic - startBlock: 34139950 + startBlock: 43823737 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -97,9 +97,9 @@ dataSources: - ClassicContribution abis: - name: DisputeKitClassic - file: ../contracts/deployments/arbitrumGoerli/DisputeKitClassic.json + file: ../contracts/deployments/arbitrumGoerliDevnet/DisputeKitClassic.json - name: KlerosCore - file: ../contracts/deployments/arbitrumGoerli/KlerosCore.json + file: ../contracts/deployments/arbitrumGoerliDevnet/KlerosCore.json eventHandlers: - event: DisputeCreation(indexed uint256,uint256,bytes) handler: handleDisputeCreation