From e0c823feba3982dcb456986f981856639b894646 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Wed, 9 Apr 2025 22:45:00 +0530 Subject: [PATCH 1/3] fix(subgraph): subgraph-event-fix --- subgraph/core/abis/KlerosCore.json | 2048 +++++++++++++++++++++++ subgraph/core/abis/SortitionModule.json | 1097 ++++++++++++ subgraph/core/subgraph.yaml | 48 +- subgraph/temp-events-addition.txt | 120 ++ 4 files changed, 3295 insertions(+), 18 deletions(-) create mode 100644 subgraph/core/abis/KlerosCore.json create mode 100644 subgraph/core/abis/SortitionModule.json create mode 100644 subgraph/temp-events-addition.txt diff --git a/subgraph/core/abis/KlerosCore.json b/subgraph/core/abis/KlerosCore.json new file mode 100644 index 000000000..85e40ac2f --- /dev/null +++ b/subgraph/core/abis/KlerosCore.json @@ -0,0 +1,2048 @@ +{ + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "abi": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AppealFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "AppealPeriodNotPassed", + "type": "error" + }, + { + "inputs": [], + "name": "ArbitrationFeesNotEnough", + "type": "error" + }, + { + "inputs": [], + "name": "CannotDisableClassicDK", + "type": "error" + }, + { + "inputs": [], + "name": "CommitPeriodNotPassed", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeKitNotSupportedByCourt", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeKitOnly", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotAppealable", + "type": "error" + }, + { + "inputs": [], + "name": "DisputePeriodIsFinal", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeStillDrawing", + "type": "error" + }, + { + "inputs": [], + "name": "EvidenceNotPassedAndNotAppeal", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "GuardianOrGovernorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDisputKitParent", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidForkingCourtAsParent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "MinStakeLowerThanParentCourt", + "type": "error" + }, + { + "inputs": [], + "name": "MustSupportDisputeKitClassic", + "type": "error" + }, + { + "inputs": [], + "name": "NotEvidencePeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotExecutionPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "RulingAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SortitionModuleOnly", + "type": "error" + }, + { + "inputs": [], + "name": "StakingInTooManyCourts", + "type": "error" + }, + { + "inputs": [], + "name": "StakingLessThanCourtMinStake", + "type": "error" + }, + { + "inputs": [], + "name": "StakingNotPossibeInThisCourt", + "type": "error" + }, + { + "inputs": [], + "name": "StakingTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", + "type": "error" + }, + { + "inputs": [], + "name": "TokenNotAccepted", + "type": "error" + }, + { + "inputs": [], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "inputs": [], + "name": "UnstakingTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "UnsuccessfulCall", + "type": "error" + }, + { + "inputs": [], + "name": "UnsupportedDisputeKit", + "type": "error" + }, + { + "inputs": [], + "name": "VotePeriodNotPassed", + "type": "error" + }, + { + "inputs": [], + "name": "WhenNotPausedOnly", + "type": "error" + }, + { + "inputs": [], + "name": "WhenPausedOnly", + "type": "error" + }, + { + "inputs": [], + "name": "WrongDisputeKitIndex", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "AcceptedFeeToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealDecision", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealPossible", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_fromCourtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "_toCourtID", + "type": "uint96" + } + ], + "name": "CourtJump", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "CourtModified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "DisputeCreation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeKitID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IDisputeKit", + "name": "_disputeKitAddress", + "type": "address" + } + ], + "name": "DisputeKitCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeKitID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "DisputeKitEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_fromDisputeKitID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toDisputeKitID", + "type": "uint256" + } + ], + "name": "DisputeKitJump", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_voteID", + "type": "uint256" + } + ], + "name": "Draw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_pnkAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "LeftoverRewardSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "NewCurrencyRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum KlerosCoreBase.Period", + "name": "_period", + "type": "uint8" + } + ], + "name": "NewPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrableV2", + "name": "_arbitrable", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_roundID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_degreeOfCoherency", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_pnkAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_feeAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "TokenAndETHShift", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract IDisputeKit", + "name": "_disputeKitAddress", + "type": "address" + } + ], + "name": "addNewDisputeKit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "appeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "appealCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "appealPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_accepted", + "type": "bool" + } + ], + "name": "changeAcceptedFeeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "changeCourtParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint64", + "name": "_rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "_rateDecimals", + "type": "uint8" + } + ], + "name": "changeCurrencyRates", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guardian", + "type": "address" + } + ], + "name": "changeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jurorProsecutionModule", + "type": "address" + } + ], + "name": "changeJurorProsecutionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + } + ], + "name": "changePinakion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISortitionModule", + "name": "_sortitionModule", + "type": "address" + } + ], + "name": "changeSortitionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amountInEth", + "type": "uint256" + } + ], + "name": "convertEthToTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "courts", + "outputs": [ + { + "internalType": "uint96", + "name": "parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "disabled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "internalType": "bytes", + "name": "_sortitionExtraData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "createCourt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_feeAmount", + "type": "uint256" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "currencyRates", + "outputs": [ + { + "internalType": "bool", + "name": "feePaymentAccepted", + "type": "bool" + }, + { + "internalType": "uint64", + "name": "rateInEth", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "rateDecimals", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "currentRuling", + "outputs": [ + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "tied", + "type": "bool" + }, + { + "internalType": "bool", + "name": "overridden", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputeKits", + "outputs": [ + { + "internalType": "contract IDisputeKit", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "contract IArbitrableV2", + "name": "arbitrated", + "type": "address" + }, + { + "internalType": "enum KlerosCoreBase.Period", + "name": "period", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "ruled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "lastPeriodChange", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "draw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256[]", + "name": "_disputeKitIDs", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "enableDisputeKits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeGovernorProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "executeRuling", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getDisputeKitsLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getRoundInfo", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "disputeKitID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkAtStakePerJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFeesForJurors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nbVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "repartitions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkPenalties", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "drawnJurors", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "sumFeeRewardPaid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumPnkRewardPaid", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "drawIterations", + "type": "uint256" + } + ], + "internalType": "struct KlerosCoreBase.Round", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getTimesPerPeriod", + "outputs": [ + { + "internalType": "uint256[4]", + "name": "timesPerPeriod", + "type": "uint256[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "address", + "name": "_guardian", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + }, + { + "internalType": "address", + "name": "_jurorProsecutionModule", + "type": "address" + }, + { + "internalType": "contract IDisputeKit", + "name": "_disputeKit", + "type": "address" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256[4]", + "name": "_courtParameters", + "type": "uint256[4]" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "internalType": "bytes", + "name": "_sortitionExtraData", + "type": "bytes" + }, + { + "internalType": "contract ISortitionModule", + "name": "_sortitionModuleAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "isDisputeKitJumping", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_disputeKitID", + "type": "uint256" + } + ], + "name": "isSupported", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "jurorProsecutionModule", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "passPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pinakion", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + } + ], + "name": "setStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_alreadyTransferred", + "type": "bool" + } + ], + "name": "setStakeBySortitionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sortitionModule", + "outputs": [ + { + "internalType": "contract ISortitionModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "transactionIndex": 1, + "gasUsed": "5235914", + "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000004000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040008000000000000000000000000020000000000000010000800402000000000000008000000080000000000000000000000000800000000000000000000000080000000000000000000000000000000004008000000000000000000000000000000000100000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000000000000000000000000000000000000", + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb", + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + }, + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 1, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + }, + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000001" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + }, + { + "transactionIndex": 1, + "blockNumber": 3638878, + "transactionHash": "0x8375e2c27568a970ffbd7366397810482c8b64248add4a2c38b7c40cd63ee51d", + "address": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 3, + "blockHash": "0x103e109081f82664640683b59588786a8fdd7cf0b85e0a64711bb0aa33a8f8fb" + } + ], + "blockNumber": 3638878, + "cumulativeGasUsed": "5235914", + "status": 1, + "byzantium": true + }, + "args": [ + "0x91a373BBdE0532F86410682F362e2Cf685e95085", + "0x994b27af000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa22500000000000000000000000000000000000000000000000000000000000000000000000000000000000000009426f127116c3652a262ae1ea48391ac8f44d35b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000019cb28bab40c3585955798f5eeabd71eec14471c00000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"KlerosCoreProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220f7986614ab3701cfa061d2f115ca8a914d5e5325c28229769be4e4a76188109f64736f6c63430008180033", + "execute": { + "methodName": "initialize3", + "args": [] + }, + "implementation": "0xF5609e6F10fd25aCb4ddAF14874aD4BaF1956827", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/subgraph/core/abis/SortitionModule.json b/subgraph/core/abis/SortitionModule.json new file mode 100644 index 000000000..8f59c5480 --- /dev/null +++ b/subgraph/core/abis/SortitionModule.json @@ -0,0 +1,1097 @@ +{ + "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "abi": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDelegateCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "enum ISortitionModule.Phase", + "name": "_phase", + "type": "uint8" + } + ], + "name": "NewPhase", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferredDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferredWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedNotTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_unlock", + "type": "bool" + } + ], + "name": "StakeLocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" + } + ], + "name": "StakeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDrawingTime", + "type": "uint256" + } + ], + "name": "changeMaxDrawingTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minStakingTime", + "type": "uint256" + } + ], + "name": "changeMinStakingTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RNG", + "name": "_rng", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rngLookahead", + "type": "uint256" + } + ], + "name": "changeRandomNumberGenerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "core", + "outputs": [ + { + "internalType": "contract KlerosCore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "createDisputeHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "createTree", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delayedStakeReadIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delayedStakeWriteIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "delayedStakes", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "stake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "alreadyTransferred", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "disputesWithoutJurors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + } + ], + "name": "draw", + "outputs": [ + { + "internalType": "address", + "name": "drawnAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "executeDelayedStakes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "getJurorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "totalStaked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalLocked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "stakedInCourt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nbCourts", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + } + ], + "name": "getJurorCourtIDs", + "outputs": [ + { + "internalType": "uint96[]", + "name": "", + "type": "uint96[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "contract KlerosCore", + "name": "_core", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_minStakingTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxDrawingTime", + "type": "uint256" + }, + { + "internalType": "contract RNG", + "name": "_rng", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rngLookahead", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize3", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + } + ], + "name": "isJurorStaked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "jurors", + "outputs": [ + { + "internalType": "uint256", + "name": "stakedPnk", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockedPnk", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastPhaseChange", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "jurorAccount", + "type": "address" + }, + { + "internalType": "uint96", + "name": "courtId", + "type": "uint96" + } + ], + "name": "latestDelayedStakeIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + } + ], + "name": "lockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxDrawingTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minStakingTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_randomNumber", + "type": "uint256" + } + ], + "name": "notifyRandomNumber", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "passPhase", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + } + ], + "name": "penalizeStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "phase", + "outputs": [ + { + "internalType": "enum ISortitionModule.Phase", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "postDrawHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "randomNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "randomNumberRequestBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rng", + "outputs": [ + { + "internalType": "contract RNG", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rngLookahead", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "setJurorInactive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_alreadyTransferred", + "type": "bool" + } + ], + "name": "setStake", + "outputs": [ + { + "internalType": "uint256", + "name": "pnkDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkWithdrawal", + "type": "uint256" + }, + { + "internalType": "enum StakingResult", + "name": "stakingResult", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_ID", + "type": "bytes32" + } + ], + "name": "stakeOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "stakeOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_relativeAmount", + "type": "uint256" + } + ], + "name": "unlockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "transactionIndex": 2, + "gasUsed": "4675242", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000080000000800000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae", + "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 3638850, + "transactionHash": "0x6b82e5e6e508a7995dc9f85efaf52e02cece2d3a3d21d48f09551e33c1f8fd53", + "address": "0x19cb28BAB40C3585955798f5EEabd71Eec14471C", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 0, + "blockHash": "0x857666f5788ef3b02fdc024472ba4f415ecc2b99bfb574382311c73be9c019ae" + } + ], + "blockNumber": 3638850, + "cumulativeGasUsed": "5561170", + "status": 1, + "byzantium": true + }, + "args": [ + "0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3", + "0x54812d17000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000a54e7a16d7460e38a8f324ef46782fb520d58ce800000000000000000000000000000000000000000000000000000000000000b40000000000000000000000000000000000000000000000000000000000000258000000000000000000000000a995c172d286f8f4ee137cc662e2844e59cf48360000000000000000000000000000000000000000000000000000000000000014" + ], + "numDeployments": 2, + "solcInputHash": "acb39436d8539d1379a47e045a065e54", + "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"SortitionModuleProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x8edb830825d7fe8ef85d445b087fac3b41f626cd7d5b40ea583c3cba21528687\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait \\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from \\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220513bc6a745176e53721a26bca808387afe1464a5c3e66402a18c832c564fd1dc64736f6c63430008180033", + "execute": { + "methodName": "initialize3", + "args": [] + }, + "implementation": "0x45129beB9B84BFb07bA885085C1D60437494a93f", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index ed0a0ba18..078093f9c 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -8,9 +8,9 @@ dataSources: name: KlerosCore network: arbitrum-sepolia source: - address: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479" + address: "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8" abi: KlerosCore - startBlock: 95250346 + startBlock: 3638878 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -28,11 +28,12 @@ dataSources: - Counter abis: - name: SortitionModule - file: ../../contracts/deployments/arbitrumSepolia/SortitionModule.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json - name: DisputeKitClassic - file: ../../contracts/deployments/arbitrumSepolia/DisputeKitClassic.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore - file: ../../contracts/deployments/arbitrumSepolia/KlerosCore.json + # FIX: temporarily point to the abi with event addition. + file: ./abis/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -45,6 +46,9 @@ dataSources: handler: handleNewPeriod - event: CourtCreated(indexed uint96,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[]) handler: handleCourtCreated + # FIX: This is support for old signature + - 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) @@ -64,9 +68,9 @@ dataSources: name: PolicyRegistry network: arbitrum-sepolia source: - address: "0x2668c46A14af8997417138B064ca1bEB70769585" + address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da" abi: PolicyRegistry - startBlock: 95247698 + startBlock: 3084568 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -75,7 +79,7 @@ dataSources: - Court abis: - name: PolicyRegistry - file: ../../contracts/deployments/arbitrumSepolia/PolicyRegistry.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json eventHandlers: - event: PolicyUpdate(indexed uint256,string,string) handler: handlePolicyUpdate @@ -84,9 +88,9 @@ dataSources: name: DisputeKitClassic network: arbitrum-sepolia source: - address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94" + address: "0x9426F127116C3652A262AE1eA48391AC8F44D35b" abi: DisputeKitClassic - startBlock: 95247789 + startBlock: 3638835 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -98,9 +102,10 @@ dataSources: - ClassicContribution abis: - name: DisputeKitClassic - file: ../../contracts/deployments/arbitrumSepolia/DisputeKitClassic.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore - file: ../../contracts/deployments/arbitrumSepolia/KlerosCore.json + # FIX: temporarily point to abi with event addition + file: ./abis/KlerosCore.json eventHandlers: - event: DisputeCreation(indexed uint256,uint256,bytes) handler: handleDisputeCreation @@ -119,9 +124,9 @@ dataSources: name: EvidenceModule network: arbitrum-sepolia source: - address: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397" + address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09" abi: EvidenceModule - startBlock: 95247733 + startBlock: 3638735 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -131,7 +136,7 @@ dataSources: - ClassicEvidence abis: - name: EvidenceModule - file: ../../contracts/deployments/arbitrumSepolia/EvidenceModule.json + file: ../../contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json eventHandlers: - event: Evidence(indexed uint256,indexed address,string) handler: handleEvidenceEvent @@ -140,9 +145,9 @@ dataSources: name: SortitionModule network: arbitrum-sepolia source: - address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD" + address: "0x19cb28BAB40C3585955798f5EEabd71Eec14471C" abi: SortitionModule - startBlock: 95250316 + startBlock: 3638850 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -151,10 +156,14 @@ dataSources: - JurorTokensPerCourt abis: - name: SortitionModule - file: ../../contracts/deployments/arbitrumSepolia/SortitionModule.json + # FIX: temporarily point to abi with event addition + file: ./abis/SortitionModule.json eventHandlers: - event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256) handler: handleStakeDelayedAlreadyTransferredDeposited + # FIX: temporarily indexing old event name + - event: StakeDelayedAlreadyTransferred(indexed address,uint256,uint256) + handler: handleStakeDelayedAlreadyTransferredDeposited - event: StakeDelayedAlreadyTransferredWithdrawn(indexed address,indexed uint96,uint256) handler: handleStakeDelayedAlreadyTransferredWithdrawn - event: StakeDelayedNotTransferred(indexed address,uint256,uint256) @@ -163,4 +172,7 @@ dataSources: handler: handleStakeLocked - event: StakeSet(indexed address,uint256,uint256,uint256) handler: handleStakeSet + # FIX: old stake set signature + - event: StakeSet(indexed address,uint256,uint256) + handler: handleStakeSet file: ./src/SortitionModule.ts diff --git a/subgraph/temp-events-addition.txt b/subgraph/temp-events-addition.txt new file mode 100644 index 000000000..abf0ca62f --- /dev/null +++ b/subgraph/temp-events-addition.txt @@ -0,0 +1,120 @@ +// KlerosCore.json : for _courtID type change in CourtCreated + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_supportedDisputeKits", + "type": "uint256[]" + } + ], + "name": "CourtCreated", + "type": "event" + }, + + + +// Goes in SortitionModule.json : new param in StakeSet + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeSet", + "type": "event" + }, + + + +// Goes in SortitionModule.json: rename of StakeDelayedAlreadyTransferred => StakeDelayedAlreadyTransferredDeposited + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_courtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "StakeDelayedAlreadyTransferred", + "type": "event" + }, \ No newline at end of file From 95d67f375d320939c3c62b8ae597dd20f7d4f4c9 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Thu, 10 Apr 2025 03:05:19 +0200 Subject: [PATCH 2/3] chore: file renamings --- subgraph/core/subgraph.yaml | 6 +++--- subgraph/core/{abis => temp-abis}/KlerosCore.json | 0 subgraph/core/{abis => temp-abis}/SortitionModule.json | 0 ...p-events-addition.txt => temp-older-events-addition.txt} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename subgraph/core/{abis => temp-abis}/KlerosCore.json (100%) rename subgraph/core/{abis => temp-abis}/SortitionModule.json (100%) rename subgraph/{temp-events-addition.txt => temp-older-events-addition.txt} (100%) diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index 078093f9c..d08e8eb7a 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -33,7 +33,7 @@ dataSources: file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore # FIX: temporarily point to the abi with event addition. - file: ./abis/KlerosCore.json + file: ./temp-abis/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -105,7 +105,7 @@ dataSources: file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json - name: KlerosCore # FIX: temporarily point to abi with event addition - file: ./abis/KlerosCore.json + file: ./temp-abis/KlerosCore.json eventHandlers: - event: DisputeCreation(indexed uint256,uint256,bytes) handler: handleDisputeCreation @@ -157,7 +157,7 @@ dataSources: abis: - name: SortitionModule # FIX: temporarily point to abi with event addition - file: ./abis/SortitionModule.json + file: ./temp-abis/SortitionModule.json eventHandlers: - event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256) handler: handleStakeDelayedAlreadyTransferredDeposited diff --git a/subgraph/core/abis/KlerosCore.json b/subgraph/core/temp-abis/KlerosCore.json similarity index 100% rename from subgraph/core/abis/KlerosCore.json rename to subgraph/core/temp-abis/KlerosCore.json diff --git a/subgraph/core/abis/SortitionModule.json b/subgraph/core/temp-abis/SortitionModule.json similarity index 100% rename from subgraph/core/abis/SortitionModule.json rename to subgraph/core/temp-abis/SortitionModule.json diff --git a/subgraph/temp-events-addition.txt b/subgraph/temp-older-events-addition.txt similarity index 100% rename from subgraph/temp-events-addition.txt rename to subgraph/temp-older-events-addition.txt From bd4758a9f17e306dac0e7d74ac62e8f251e8ddb5 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Thu, 10 Apr 2025 03:27:54 +0200 Subject: [PATCH 3/3] fix: support for old stake delayed already transferred event --- subgraph/core/src/SortitionModule.ts | 6 ++++++ subgraph/core/subgraph.yaml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/subgraph/core/src/SortitionModule.ts b/subgraph/core/src/SortitionModule.ts index cd57881a5..4d4f8c895 100644 --- a/subgraph/core/src/SortitionModule.ts +++ b/subgraph/core/src/SortitionModule.ts @@ -1,5 +1,6 @@ import { SortitionModule, + StakeDelayedAlreadyTransferred, StakeDelayedAlreadyTransferredDeposited, StakeDelayedAlreadyTransferredWithdrawn, StakeDelayedNotTransferred, @@ -11,6 +12,11 @@ import { updateJurorDelayedStake, updateJurorStake } from "./entities/JurorToken import { ensureUser } from "./entities/User"; import { ZERO } from "./utils"; +// FIX: temporarily adding this handler for old event name "StakeDelayedAlreadyTransferred", delete when deploying new fresh-address contract. +export function handleStakeDelayedAlreadyTransferred(event: StakeDelayedAlreadyTransferred): void { + updateJurorDelayedStake(event.params._address.toHexString(), event.params._courtID.toString(), event.params._amount); +} + export function handleStakeDelayedAlreadyTransferredDeposited(event: StakeDelayedAlreadyTransferredDeposited): void { updateJurorDelayedStake(event.params._address.toHexString(), event.params._courtID.toString(), event.params._amount); } diff --git a/subgraph/core/subgraph.yaml b/subgraph/core/subgraph.yaml index d08e8eb7a..2c58f9fbd 100644 --- a/subgraph/core/subgraph.yaml +++ b/subgraph/core/subgraph.yaml @@ -163,7 +163,7 @@ dataSources: handler: handleStakeDelayedAlreadyTransferredDeposited # FIX: temporarily indexing old event name - event: StakeDelayedAlreadyTransferred(indexed address,uint256,uint256) - handler: handleStakeDelayedAlreadyTransferredDeposited + handler: handleStakeDelayedAlreadyTransferred - event: StakeDelayedAlreadyTransferredWithdrawn(indexed address,indexed uint96,uint256) handler: handleStakeDelayedAlreadyTransferredWithdrawn - event: StakeDelayedNotTransferred(indexed address,uint256,uint256)