diff --git a/contracts/README.md b/contracts/README.md index 4f5d6d657..1e6ff14c3 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -74,7 +74,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [WrappedPinakionV2](https://gnosis-chiado.blockscout.com/address/0xD75E27A56AaF9eE7F8d9A472a8C2EF2f65a764dd) - [xKlerosLiquidV2](https://gnosis-chiado.blockscout.com/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879) -### Devnet +### V2 Devnet (unstable) #### Arbitrum Sepolia @@ -84,25 +84,26 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments - [DAI](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5) - [DAIFaucet](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E) - [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1), [implementation](https://sepolia.arbiscan.io/address/0xc4cC0274E55a9818f8cF42640B1De61d269425ad) -- [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5), [implementation](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) +- [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0x82F2089442979A6b56c80274D144575980092F91), [implementation](https://sepolia.arbiscan.io/address/0x602ADa1cE706404BFb5417e497cdDae934436081) - [DisputeKitGated: proxy](https://sepolia.arbiscan.io/address/0x677dA30B4b27D129354DdA1e219Bcc86802132d1), [implementation](https://sepolia.arbiscan.io/address/0xA27EedcEA916BC1ab91720cE70c56666E854F55e) - [DisputeKitGatedShutter: proxy](https://sepolia.arbiscan.io/address/0xd86b84eb36Cd48f3f384b4490F255b494385F429), [implementation](https://sepolia.arbiscan.io/address/0x56199F9E5C0ef9251A251a41597A971141199EDF) - [DisputeKitShutter: proxy](https://sepolia.arbiscan.io/address/0xfE0a958bc744Bb9E224E1822625B53134ac5CB69), [implementation](https://sepolia.arbiscan.io/address/0x6582CE0FdB29B5673E6650e34728C784BafB2139) - [DisputeResolver](https://sepolia.arbiscan.io/address/0x71f8537e925C753Fe88DA7e69Ae423f9f3a9A292) - [DisputeResolverRuler](https://sepolia.arbiscan.io/address/0xAEB1bbaE58125BA5F32349c69e4274d15dfD6EC3) -- [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) +- [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D) - [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f), [implementation](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) +- [DisputeTemplateRegistryUniversity: proxy](https://sepolia.arbiscan.io/address/0x75A5D16e9A699162506E4d79D68CF646e6600ba1), [implementation](https://sepolia.arbiscan.io/address/0xC3f638389635bF33E019c845FdaF2ed9bca3DF67) - [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49), [implementation](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) - [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9), [implementation](https://sepolia.arbiscan.io/address/0xaBf1AA1D08F98ED800938B1B086d0904c5BF4f0E) - [KlerosCoreRuler: proxy](https://sepolia.arbiscan.io/address/0x0630e4248a17b506809009F5D88E2f5bEE584c83), [implementation](https://sepolia.arbiscan.io/address/0xb8bF3A32730cEc3B0a8516b87246ceE24ca2eaCF) - [KlerosCoreSnapshotProxy](https://sepolia.arbiscan.io/address/0xF924ac62b20901914c101Fa089Da1FB6A0585138) -- [KlerosCoreUniversity: proxy](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6), [implementation](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) +- [KlerosCoreUniversity: proxy](https://sepolia.arbiscan.io/address/0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f), [implementation](https://sepolia.arbiscan.io/address/0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0) - [KlerosV2NeoEarlyUser](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F) - [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225) - [PNKFaucet](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD) - [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0xd8681dBF525ecBda2F799BFddB96840065075e8A), [implementation](https://sepolia.arbiscan.io/address/0x472846F88D1356bb483a88f97B55026654Fc5deD) - [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663), [implementation](https://sepolia.arbiscan.io/address/0x8a26445989c944C58503275ad87Ab4d7b17d4F1e) -- [SortitionModuleUniversity: proxy](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79), [implementation](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) +- [SortitionModuleUniversity: proxy](https://sepolia.arbiscan.io/address/0x9f55804177e7E44E558616cD7d06B865788214cA), [implementation](https://sepolia.arbiscan.io/address/0x270e3D63d3d275604df0a1Bd312E1255DCd96936) - [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E) - [WETH](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138) - [WETHFaucet](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd) diff --git a/contracts/deploy/00-home-chain-arbitration-university.ts b/contracts/deploy/00-home-chain-arbitration-university.ts index 2aa5f747b..057e69cfe 100644 --- a/contracts/deploy/00-home-chain-arbitration-university.ts +++ b/contracts/deploy/00-home-chain-arbitration-university.ts @@ -24,10 +24,17 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true }); + const disputeTemplateRegistry = await deployUpgradable(deployments, "DisputeTemplateRegistryUniversity", { + from: deployer, + contract: "DisputeTemplateRegistry", + args: [deployer], + log: true, + }); + const disputeKit = await deployUpgradable(deployments, "DisputeKitClassicUniversity", { from: deployer, contract: "DisputeKitClassic", - args: [deployer, ZeroAddress, weth.target], + args: [deployer, ZeroAddress, weth.target, 1], log: true, }); @@ -80,16 +87,10 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) console.error("Failed to change currency rates for token, with error:", e); } - const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistry", { - from: deployer, - args: [deployer], - log: true, - }); - await deploy("DisputeResolverUniversity", { from: deployer, contract: "DisputeResolver", - args: [core.target, disputeTemplateRegistry.target], + args: [core.target, disputeTemplateRegistry.address], log: true, }); }; diff --git a/contracts/deployments/arbitrumSepoliaDevnet.ts b/contracts/deployments/arbitrumSepoliaDevnet.ts index bd581ea30..037880be7 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet.ts +++ b/contracts/deployments/arbitrumSepoliaDevnet.ts @@ -4221,7 +4221,7 @@ export default { ], }, DisputeKitClassicUniversity: { - address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + address: "0x82F2089442979A6b56c80274D144575980092F91", abi: [ { stateMutability: "payable", @@ -4236,11 +4236,61 @@ export default { name: "AlreadyInitialized", type: "error", }, + { + inputs: [], + name: "AppealFeeIsAlreadyPaid", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodIsOver", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodIsOverForLoser", + type: "error", + }, + { + inputs: [], + name: "ChoiceOutOfBounds", + type: "error", + }, + { + inputs: [], + name: "CoreIsPaused", + type: "error", + }, + { + inputs: [], + name: "DisputeJumpedToParentDK", + type: "error", + }, + { + inputs: [], + name: "DisputeNotResolved", + type: "error", + }, + { + inputs: [], + name: "EmptyCommit", + type: "error", + }, + { + inputs: [], + name: "EmptyVoteIDs", + type: "error", + }, { inputs: [], name: "FailedDelegateCall", type: "error", }, + { + inputs: [], + name: "HashDoesNotMatchHiddenVoteCommitment", + type: "error", + }, { inputs: [ { @@ -4252,11 +4302,41 @@ export default { name: "InvalidImplementation", type: "error", }, + { + inputs: [], + name: "JurorHasToOwnTheVote", + type: "error", + }, + { + inputs: [], + name: "KlerosCoreOnly", + type: "error", + }, + { + inputs: [], + name: "NotActiveForCoreDisputeID", + type: "error", + }, + { + inputs: [], + name: "NotCommitPeriod", + type: "error", + }, { inputs: [], name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "NotVotePeriod", + type: "error", + }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, { inputs: [], name: "UUPSUnauthorizedCallContext", @@ -4273,6 +4353,16 @@ export default { name: "UUPSUnsupportedProxiableUUID", type: "error", }, + { + inputs: [], + name: "UnsuccessfulCall", + type: "error", + }, + { + inputs: [], + name: "VoteAlreadyCast", + type: "error", + }, { anonymous: false, inputs: [ @@ -4517,19 +4607,6 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [], name: "WINNER_STAKE_MULTIPLIER", @@ -4650,15 +4727,28 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_jumpDisputeKitID", + type: "uint256", + }, + ], + name: "changeJumpDisputeKitID", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { internalType: "address payable", - name: "_governor", + name: "_owner", type: "address", }, ], - name: "changeGovernor", + name: "changeOwner", outputs: [], stateMutability: "nonpayable", type: "function", @@ -4676,6 +4766,25 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "coreDisputeID", + type: "uint256", + }, + ], + name: "coreDisputeIDToActive", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -4714,7 +4823,7 @@ export default { }, { internalType: "uint256", - name: "_nbVotes", + name: "", type: "uint256", }, ], @@ -4801,10 +4910,34 @@ export default { name: "drawnAddress", type: "address", }, + { + internalType: "uint96", + name: "fromSubcourtID", + type: "uint96", + }, ], stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "earlyCourtJump", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, { inputs: [ { @@ -4823,7 +4956,7 @@ export default { type: "bytes", }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", type: "function", @@ -4898,14 +5031,58 @@ export default { type: "uint256", }, ], - name: "getDegreeOfCoherence", + name: "getDegreeOfCoherencePenalty", outputs: [ + { + internalType: "uint256", + name: "pnkCoherence", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voteID", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, { internalType: "uint256", name: "", type: "uint256", }, ], + name: "getDegreeOfCoherenceReward", + outputs: [ + { + internalType: "uint256", + name: "pnkCoherence", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeCoherence", + type: "uint256", + }, + ], stateMutability: "view", type: "function", }, @@ -4928,6 +5105,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "getJumpDisputeKitID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -4940,42 +5130,60 @@ export default { name: "_coreRoundID", type: "uint256", }, + ], + name: "getLocalDisputeRoundID", + outputs: [ { internalType: "uint256", - name: "_choice", + name: "localDisputeID", type: "uint256", }, - ], - name: "getRoundInfo", - outputs: [ { internalType: "uint256", - name: "winningChoice", + name: "localRoundID", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "tied", - type: "bool", + internalType: "contract IDisputeKit", + name: "", + type: "address", }, { internalType: "uint256", - name: "totalVoted", + name: "_currentNbVotes", type: "uint256", }, + ], + name: "getNbVotesAfterAppeal", + outputs: [ { internalType: "uint256", - name: "totalCommited", + name: "", type: "uint256", }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ { internalType: "uint256", - name: "nbVoters", + name: "_localDisputeID", type: "uint256", }, + ], + name: "getNumberOfRounds", + outputs: [ { internalType: "uint256", - name: "choiceCount", + name: "", type: "uint256", }, ], @@ -4996,29 +5204,83 @@ export default { }, { internalType: "uint256", - name: "_voteID", + name: "_choice", type: "uint256", }, ], - name: "getVoteInfo", + name: "getRoundInfo", outputs: [ { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256", + name: "winningChoice", + type: "uint256", }, { - internalType: "bytes32", - name: "commit", - type: "bytes32", + internalType: "bool", + name: "tied", + type: "bool", }, { internalType: "uint256", - name: "choice", + name: "totalVoted", type: "uint256", }, { - internalType: "bool", + internalType: "uint256", + name: "totalCommitted", + type: "uint256", + }, + { + internalType: "uint256", + name: "nbVoters", + type: "uint256", + }, + { + internalType: "uint256", + name: "choiceCount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voteID", + type: "uint256", + }, + ], + name: "getVoteInfo", + outputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "commit", + type: "bytes32", + }, + { + internalType: "uint256", + name: "choice", + type: "uint256", + }, + { + internalType: "bool", name: "voted", type: "bool", }, @@ -5027,13 +5289,29 @@ export default { type: "function", }, { - inputs: [], - name: "governor", + inputs: [ + { + internalType: "uint256", + name: "_choice", + type: "uint256", + }, + { + internalType: "uint256", + name: "_salt", + type: "uint256", + }, + { + internalType: "string", + name: "", + type: "string", + }, + ], + name: "hashVote", outputs: [ { - internalType: "address", + internalType: "bytes32", name: "", - type: "address", + type: "bytes32", }, ], stateMutability: "view", @@ -5043,7 +5321,7 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, { @@ -5051,12 +5329,41 @@ export default { name: "_core", type: "address", }, + { + internalType: "address", + name: "_wNative", + type: "address", + }, + { + internalType: "uint256", + name: "_jumpDisputeKitID", + type: "uint256", + }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + ], + name: "isAppealFunded", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -5086,6 +5393,32 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "jumpDisputeKitID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [], name: "proxiableUUID", @@ -5099,6 +5432,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "singleDrawPerJuror", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -5117,6 +5463,32 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "wNative", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -5170,7 +5542,7 @@ export default { ], }, DisputeKitClassicUniversity_Implementation: { - address: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", + address: "0x602ADa1cE706404BFb5417e497cdDae934436081", abi: [ { inputs: [], @@ -5182,11 +5554,61 @@ export default { name: "AlreadyInitialized", type: "error", }, + { + inputs: [], + name: "AppealFeeIsAlreadyPaid", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodIsOver", + type: "error", + }, + { + inputs: [], + name: "AppealPeriodIsOverForLoser", + type: "error", + }, + { + inputs: [], + name: "ChoiceOutOfBounds", + type: "error", + }, + { + inputs: [], + name: "CoreIsPaused", + type: "error", + }, + { + inputs: [], + name: "DisputeJumpedToParentDK", + type: "error", + }, + { + inputs: [], + name: "DisputeNotResolved", + type: "error", + }, + { + inputs: [], + name: "EmptyCommit", + type: "error", + }, + { + inputs: [], + name: "EmptyVoteIDs", + type: "error", + }, { inputs: [], name: "FailedDelegateCall", type: "error", }, + { + inputs: [], + name: "HashDoesNotMatchHiddenVoteCommitment", + type: "error", + }, { inputs: [ { @@ -5198,11 +5620,41 @@ export default { name: "InvalidImplementation", type: "error", }, + { + inputs: [], + name: "JurorHasToOwnTheVote", + type: "error", + }, + { + inputs: [], + name: "KlerosCoreOnly", + type: "error", + }, + { + inputs: [], + name: "NotActiveForCoreDisputeID", + type: "error", + }, + { + inputs: [], + name: "NotCommitPeriod", + type: "error", + }, { inputs: [], name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "NotVotePeriod", + type: "error", + }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, { inputs: [], name: "UUPSUnauthorizedCallContext", @@ -5219,6 +5671,16 @@ export default { name: "UUPSUnsupportedProxiableUUID", type: "error", }, + { + inputs: [], + name: "UnsuccessfulCall", + type: "error", + }, + { + inputs: [], + name: "VoteAlreadyCast", + type: "error", + }, { anonymous: false, inputs: [ @@ -5465,7 +5927,7 @@ export default { }, { inputs: [], - name: "ONE_BASIS_POINT", + name: "WINNER_STAKE_MULTIPLIER", outputs: [ { internalType: "uint256", @@ -5477,23 +5939,10 @@ export default { type: "function", }, { - inputs: [], - name: "WINNER_STAKE_MULTIPLIER", - outputs: [ + inputs: [ { internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_coreDisputeID", + name: "_coreDisputeID", type: "uint256", }, ], @@ -5596,15 +6045,28 @@ export default { stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_jumpDisputeKitID", + type: "uint256", + }, + ], + name: "changeJumpDisputeKitID", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { internalType: "address payable", - name: "_governor", + name: "_owner", type: "address", }, ], - name: "changeGovernor", + name: "changeOwner", outputs: [], stateMutability: "nonpayable", type: "function", @@ -5622,6 +6084,25 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "coreDisputeID", + type: "uint256", + }, + ], + name: "coreDisputeIDToActive", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -5660,7 +6141,7 @@ export default { }, { internalType: "uint256", - name: "_nbVotes", + name: "", type: "uint256", }, ], @@ -5747,10 +6228,34 @@ export default { name: "drawnAddress", type: "address", }, + { + internalType: "uint96", + name: "fromSubcourtID", + type: "uint96", + }, ], stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "earlyCourtJump", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, { inputs: [ { @@ -5769,7 +6274,7 @@ export default { type: "bytes", }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", type: "function", @@ -5844,14 +6349,58 @@ export default { type: "uint256", }, ], - name: "getDegreeOfCoherence", + name: "getDegreeOfCoherencePenalty", outputs: [ + { + internalType: "uint256", + name: "pnkCoherence", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voteID", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, { internalType: "uint256", name: "", type: "uint256", }, ], + name: "getDegreeOfCoherenceReward", + outputs: [ + { + internalType: "uint256", + name: "pnkCoherence", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeCoherence", + type: "uint256", + }, + ], stateMutability: "view", type: "function", }, @@ -5874,6 +6423,91 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "getJumpDisputeKitID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_coreRoundID", + type: "uint256", + }, + ], + name: "getLocalDisputeRoundID", + outputs: [ + { + internalType: "uint256", + name: "localDisputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "localRoundID", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IDisputeKit", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "_currentNbVotes", + type: "uint256", + }, + ], + name: "getNbVotesAfterAppeal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_localDisputeID", + type: "uint256", + }, + ], + name: "getNumberOfRounds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -5911,7 +6545,7 @@ export default { }, { internalType: "uint256", - name: "totalCommited", + name: "totalCommitted", type: "uint256", }, { @@ -5973,13 +6607,29 @@ export default { type: "function", }, { - inputs: [], - name: "governor", + inputs: [ + { + internalType: "uint256", + name: "_choice", + type: "uint256", + }, + { + internalType: "uint256", + name: "_salt", + type: "uint256", + }, + { + internalType: "string", + name: "", + type: "string", + }, + ], + name: "hashVote", outputs: [ { - internalType: "address", + internalType: "bytes32", name: "", - type: "address", + type: "bytes32", }, ], stateMutability: "view", @@ -5989,7 +6639,7 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, { @@ -5997,12 +6647,41 @@ export default { name: "_core", type: "address", }, + { + internalType: "address", + name: "_wNative", + type: "address", + }, + { + internalType: "uint256", + name: "_jumpDisputeKitID", + type: "uint256", + }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_coreDisputeID", + type: "uint256", + }, + ], + name: "isAppealFunded", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -6034,27 +6713,66 @@ export default { }, { inputs: [], - name: "proxiableUUID", + name: "jumpDisputeKitID", outputs: [ { - internalType: "bytes32", + internalType: "uint256", name: "", - type: "bytes32", + type: "uint256", }, ], stateMutability: "view", type: "function", }, { - inputs: [ + inputs: [], + name: "owner", + outputs: [ { internalType: "address", - name: "newImplementation", + name: "", type: "address", }, - { - internalType: "bytes", - name: "data", + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "singleDrawPerJuror", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", type: "bytes", }, ], @@ -6063,6 +6781,32 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "wNative", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -6100,7 +6844,7 @@ export default { ], }, DisputeKitClassicUniversity_Proxy: { - address: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + address: "0x82F2089442979A6b56c80274D144575980092F91", abi: [ { inputs: [ @@ -15279,7 +16023,7 @@ export default { ], }, DisputeResolverUniversity: { - address: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", + address: "0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D", abi: [ { inputs: [ @@ -15297,6 +16041,31 @@ export default { stateMutability: "nonpayable", type: "constructor", }, + { + inputs: [], + name: "ArbitratorOnly", + type: "error", + }, + { + inputs: [], + name: "DisputeAlreadyRuled", + type: "error", + }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, + { + inputs: [], + name: "RulingOutOfBounds", + type: "error", + }, + { + inputs: [], + name: "ShouldBeAtLeastTwoRulingOptions", + type: "error", + }, { anonymous: false, inputs: [ @@ -15324,12 +16093,6 @@ export default { name: "_templateId", type: "uint256", }, - { - indexed: false, - internalType: "string", - name: "_templateUri", - type: "string", - }, ], name: "DisputeRequest", type: "event", @@ -15408,11 +16171,11 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, ], - name: "changeGovernor", + name: "changeOwner", outputs: [], stateMutability: "nonpayable", type: "function", @@ -15464,35 +16227,6 @@ export default { stateMutability: "payable", type: "function", }, - { - inputs: [ - { - internalType: "bytes", - name: "_arbitratorExtraData", - type: "bytes", - }, - { - internalType: "string", - name: "_disputeTemplateUri", - type: "string", - }, - { - internalType: "uint256", - name: "_numberOfRulingOptions", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [ - { - internalType: "uint256", - name: "disputeID", - type: "uint256", - }, - ], - stateMutability: "payable", - type: "function", - }, { inputs: [ { @@ -15529,7 +16263,7 @@ export default { }, { inputs: [], - name: "governor", + name: "owner", outputs: [ { internalType: "address", @@ -15833,13 +16567,16 @@ export default { }, ], }, - DisputeTemplateRegistry_Implementation: { - address: "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", + DisputeTemplateRegistryUniversity: { + address: "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", abi: [ { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", }, { inputs: [], @@ -15867,6 +16604,11 @@ export default { name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, { inputs: [], name: "UUPSUnauthorizedCallContext", @@ -15944,33 +16686,20 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, ], - name: "changeGovernor", + name: "changeOwner", outputs: [], stateMutability: "nonpayable", type: "function", }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, ], @@ -15981,9 +16710,15 @@ export default { }, { inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", type: "function", }, { @@ -16072,11 +16807,6 @@ export default { stateMutability: "view", type: "function", }, - ], - }, - DisputeTemplateRegistry_Proxy: { - address: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", - abi: [ { inputs: [ { @@ -16093,26 +16823,15 @@ export default { stateMutability: "nonpayable", type: "constructor", }, - { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", - }, ], }, - EvidenceModule: { - address: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", + DisputeTemplateRegistryUniversity_Implementation: { + address: "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", abi: [ { - stateMutability: "payable", - type: "fallback", - }, - { - stateMutability: "payable", - type: "receive", + inputs: [], + stateMutability: "nonpayable", + type: "constructor", }, { inputs: [], @@ -16140,6 +16859,11 @@ export default { name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, { inputs: [], name: "UUPSUnauthorizedCallContext", @@ -16162,23 +16886,29 @@ export default { { indexed: true, internalType: "uint256", - name: "_externalDisputeID", + name: "_templateId", type: "uint256", }, { indexed: true, - internalType: "address", - name: "_party", - type: "address", + internalType: "string", + name: "_templateTag", + type: "string", }, { indexed: false, internalType: "string", - name: "_evidence", + name: "_templateData", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_templateDataMappings", type: "string", }, ], - name: "Evidence", + name: "DisputeTemplate", type: "event", }, { @@ -16208,23 +16938,23 @@ export default { type: "event", }, { - inputs: [], - name: "governor", - outputs: [ + inputs: [ { internalType: "address", - name: "", + name: "_owner", type: "address", }, ], - stateMutability: "view", + name: "changeOwner", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, ], @@ -16235,9 +16965,15 @@ export default { }, { inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", type: "function", }, { @@ -16256,26 +16992,550 @@ export default { { inputs: [ { - internalType: "uint256", - name: "_externalDisputeID", - type: "uint256", + internalType: "string", + name: "_templateTag", + type: "string", }, { internalType: "string", - name: "_evidence", + name: "_templateData", type: "string", }, - ], - name: "submitEvidence", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "newImplementation", + internalType: "string", + name: "_templateDataMappings", + type: "string", + }, + ], + name: "setDisputeTemplate", + outputs: [ + { + internalType: "uint256", + name: "templateId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "templates", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + 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", + }, + ], + }, + DisputeTemplateRegistryUniversity_Proxy: { + address: "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", + 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", + }, + ], + }, + DisputeTemplateRegistry_Implementation: { + address: "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", + abi: [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + 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: true, + internalType: "uint256", + name: "_templateId", + type: "uint256", + }, + { + indexed: true, + internalType: "string", + name: "_templateTag", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_templateData", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_templateDataMappings", + type: "string", + }, + ], + name: "DisputeTemplate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + 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: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_templateTag", + type: "string", + }, + { + internalType: "string", + name: "_templateData", + type: "string", + }, + { + internalType: "string", + name: "_templateDataMappings", + type: "string", + }, + ], + name: "setDisputeTemplate", + outputs: [ + { + internalType: "uint256", + name: "templateId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "templates", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + 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", + }, + ], + }, + DisputeTemplateRegistry_Proxy: { + address: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", + 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", + }, + ], + }, + EvidenceModule: { + address: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", + 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: true, + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "_party", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "_evidence", + type: "string", + }, + ], + name: "Evidence", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_externalDisputeID", + type: "uint256", + }, + { + internalType: "string", + name: "_evidence", + type: "string", + }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", type: "address", }, { @@ -21727,7 +22987,7 @@ export default { ], }, KlerosCoreUniversity: { - address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + address: "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", abi: [ { stateMutability: "payable", @@ -21762,11 +23022,6 @@ export default { name: "ArbitrationFeesNotEnough", type: "error", }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, { inputs: [], name: "CannotDisableClassicDK", @@ -21777,11 +23032,6 @@ export default { name: "CommitPeriodNotPassed", type: "error", }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, { inputs: [], name: "DisputeKitNotSupportedByCourt", @@ -21817,16 +23067,6 @@ export default { name: "FailedDelegateCall", type: "error", }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, { inputs: [], name: "InstructorOnly", @@ -21883,6 +23123,16 @@ export default { name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, + { + inputs: [], + name: "OwnerOrInstructorOnly", + type: "error", + }, { inputs: [], name: "RulingAlreadyExecuted", @@ -21905,7 +23155,7 @@ export default { }, { inputs: [], - name: "StakingNotPossibeInThisCourt", + name: "StakingNotPossibleInThisCourt", type: "error", }, { @@ -21913,6 +23163,11 @@ export default { name: "StakingTransferFailed", type: "error", }, + { + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", + }, { inputs: [], name: "TokenNotAccepted", @@ -22026,9 +23281,9 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", + internalType: "uint96", name: "_courtID", - type: "uint256", + type: "uint96", }, { indexed: true, @@ -22303,6 +23558,12 @@ export default { { anonymous: false, inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, { indexed: true, internalType: "uint256", @@ -22318,13 +23579,62 @@ export default { { indexed: false, internalType: "uint256", - name: "_pnkAmount", + name: "_degreeOfCoherencyPnk", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_feeAmount", + name: "_degreeOfCoherencyFee", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_amountPnk", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "_amountFee", + type: "int256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", + }, + ], + name: "JurorRewardPenalty", + 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: "_amountPnk", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amountFee", type: "uint256", }, { @@ -22383,76 +23693,27 @@ export default { }, { 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", - }, + inputs: [ { indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "contract IArbitrableV2", + name: "_arbitrable", + type: "address", }, { indexed: true, internalType: "uint256", - name: "_roundID", + name: "_disputeID", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_degreeOfCoherency", + name: "_ruling", 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", + name: "Ruling", type: "event", }, { @@ -22677,12 +23938,12 @@ export default { { inputs: [ { - internalType: "address payable", - name: "_governor", + internalType: "address", + name: "_instructor", type: "address", }, ], - name: "changeGovernor", + name: "changeInstructor", outputs: [], stateMutability: "nonpayable", type: "function", @@ -22691,11 +23952,11 @@ export default { inputs: [ { internalType: "address", - name: "_instructor", + name: "_jurorProsecutionModule", type: "address", }, ], - name: "changeInstructor", + name: "changeJurorProsecutionModule", outputs: [], stateMutability: "nonpayable", type: "function", @@ -22703,12 +23964,12 @@ export default { { inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", + internalType: "address payable", + name: "_owner", type: "address", }, ], - name: "changeJurorProsecutionModule", + name: "changeOwner", outputs: [], stateMutability: "nonpayable", type: "function", @@ -22803,11 +24064,6 @@ export default { name: "jurorsForCourtJump", type: "uint256", }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, ], stateMutability: "view", type: "function", @@ -23116,7 +24372,7 @@ export default { type: "bytes", }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", type: "function", @@ -23185,6 +24441,30 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_round", + type: "uint256", + }, + ], + name: "getPnkAtStakePerJuror", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -23237,6 +24517,11 @@ export default { name: "drawnJurors", type: "address[]", }, + { + internalType: "uint96[]", + name: "drawnJurorFromCourtIDs", + type: "uint96[]", + }, { internalType: "uint256", name: "sumFeeRewardPaid", @@ -23257,6 +24542,11 @@ export default { name: "drawIterations", type: "uint256", }, + { + internalType: "uint256[10]", + name: "__gap", + type: "uint256[10]", + }, ], internalType: "struct KlerosCoreUniversity.Round", name: "", @@ -23285,24 +24575,11 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, { @@ -23420,6 +24697,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -23494,11 +24784,6 @@ export default { name: "_newStake", type: "uint256", }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, ], name: "setStakeBySortitionModule", outputs: [], @@ -23518,6 +24803,24 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "transferBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -23536,6 +24839,19 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -23555,7 +24871,7 @@ export default { ], }, KlerosCoreUniversity_Implementation: { - address: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", + address: "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", abi: [ { inputs: [], @@ -23587,11 +24903,6 @@ export default { name: "ArbitrationFeesNotEnough", type: "error", }, - { - inputs: [], - name: "ArraysLengthMismatch", - type: "error", - }, { inputs: [], name: "CannotDisableClassicDK", @@ -23602,11 +24913,6 @@ export default { name: "CommitPeriodNotPassed", type: "error", }, - { - inputs: [], - name: "DepthLevelMax", - type: "error", - }, { inputs: [], name: "DisputeKitNotSupportedByCourt", @@ -23642,16 +24948,6 @@ export default { name: "FailedDelegateCall", type: "error", }, - { - inputs: [], - name: "GovernorOnly", - type: "error", - }, - { - inputs: [], - name: "GovernorOrInstructorOnly", - type: "error", - }, { inputs: [], name: "InstructorOnly", @@ -23708,6 +25004,16 @@ export default { name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, + { + inputs: [], + name: "OwnerOrInstructorOnly", + type: "error", + }, { inputs: [], name: "RulingAlreadyExecuted", @@ -23730,7 +25036,7 @@ export default { }, { inputs: [], - name: "StakingNotPossibeInThisCourt", + name: "StakingNotPossibleInThisCourt", type: "error", }, { @@ -23738,6 +25044,11 @@ export default { name: "StakingTransferFailed", type: "error", }, + { + inputs: [], + name: "StakingZeroWhenNoStake", + type: "error", + }, { inputs: [], name: "TokenNotAccepted", @@ -23851,9 +25162,9 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", + internalType: "uint96", name: "_courtID", - type: "uint256", + type: "uint96", }, { indexed: true, @@ -24128,6 +25439,12 @@ export default { { anonymous: false, inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, { indexed: true, internalType: "uint256", @@ -24143,15 +25460,27 @@ export default { { indexed: false, internalType: "uint256", - name: "_pnkAmount", + name: "_degreeOfCoherencyPnk", type: "uint256", }, { indexed: false, internalType: "uint256", - name: "_feeAmount", + name: "_degreeOfCoherencyFee", type: "uint256", }, + { + indexed: false, + internalType: "int256", + name: "_amountPnk", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "_amountFee", + type: "int256", + }, { indexed: false, internalType: "contract IERC20", @@ -24159,7 +25488,7 @@ export default { type: "address", }, ], - name: "LeftoverRewardSent", + name: "JurorRewardPenalty", type: "event", }, { @@ -24167,24 +25496,36 @@ export default { inputs: [ { indexed: true, - internalType: "contract IERC20", - name: "_feeToken", - type: "address", + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_roundID", + type: "uint256", }, { indexed: false, - internalType: "uint64", - name: "_rateInEth", - type: "uint64", + internalType: "uint256", + name: "_amountPnk", + type: "uint256", }, { indexed: false, - internalType: "uint8", - name: "_rateDecimals", - type: "uint8", + internalType: "uint256", + name: "_amountFee", + type: "uint256", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, ], - name: "NewCurrencyRate", + name: "LeftoverRewardSent", type: "event", }, { @@ -24192,43 +25533,43 @@ export default { inputs: [ { indexed: true, - internalType: "uint256", - name: "_disputeID", - type: "uint256", + internalType: "contract IERC20", + name: "_feeToken", + type: "address", }, { indexed: false, - internalType: "enum KlerosCoreUniversity.Period", - name: "_period", + internalType: "uint64", + name: "_rateInEth", + type: "uint64", + }, + { + indexed: false, + internalType: "uint8", + name: "_rateDecimals", type: "uint8", }, ], - name: "NewPeriod", + name: "NewCurrencyRate", 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", + { + indexed: false, + internalType: "enum KlerosCoreUniversity.Period", + name: "_period", + type: "uint8", }, ], - name: "Ruling", + name: "NewPeriod", type: "event", }, { @@ -24236,8 +25577,8 @@ export default { inputs: [ { indexed: true, - internalType: "address", - name: "_account", + internalType: "contract IArbitrableV2", + name: "_arbitrable", type: "address", }, { @@ -24246,38 +25587,14 @@ export default { name: "_disputeID", type: "uint256", }, - { - indexed: true, - internalType: "uint256", - name: "_roundID", - type: "uint256", - }, { indexed: false, internalType: "uint256", - name: "_degreeOfCoherency", + name: "_ruling", 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", + name: "Ruling", type: "event", }, { @@ -24502,12 +25819,12 @@ export default { { inputs: [ { - internalType: "address payable", - name: "_governor", + internalType: "address", + name: "_instructor", type: "address", }, ], - name: "changeGovernor", + name: "changeInstructor", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24516,11 +25833,11 @@ export default { inputs: [ { internalType: "address", - name: "_instructor", + name: "_jurorProsecutionModule", type: "address", }, ], - name: "changeInstructor", + name: "changeJurorProsecutionModule", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24528,12 +25845,12 @@ export default { { inputs: [ { - internalType: "address", - name: "_jurorProsecutionModule", + internalType: "address payable", + name: "_owner", type: "address", }, ], - name: "changeJurorProsecutionModule", + name: "changeOwner", outputs: [], stateMutability: "nonpayable", type: "function", @@ -24628,11 +25945,6 @@ export default { name: "jurorsForCourtJump", type: "uint256", }, - { - internalType: "bool", - name: "disabled", - type: "bool", - }, ], stateMutability: "view", type: "function", @@ -24941,7 +26253,7 @@ export default { type: "bytes", }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", type: "function", @@ -25010,6 +26322,30 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_disputeID", + type: "uint256", + }, + { + internalType: "uint256", + name: "_round", + type: "uint256", + }, + ], + name: "getPnkAtStakePerJuror", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -25062,6 +26398,11 @@ export default { name: "drawnJurors", type: "address[]", }, + { + internalType: "uint96[]", + name: "drawnJurorFromCourtIDs", + type: "uint96[]", + }, { internalType: "uint256", name: "sumFeeRewardPaid", @@ -25082,6 +26423,11 @@ export default { name: "drawIterations", type: "uint256", }, + { + internalType: "uint256[10]", + name: "__gap", + type: "uint256[10]", + }, ], internalType: "struct KlerosCoreUniversity.Round", name: "", @@ -25110,24 +26456,11 @@ export default { stateMutability: "view", type: "function", }, - { - inputs: [], - name: "governor", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, { @@ -25245,6 +26578,19 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -25319,11 +26665,6 @@ export default { name: "_newStake", type: "uint256", }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, ], name: "setStakeBySortitionModule", outputs: [], @@ -25343,6 +26684,24 @@ export default { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "transferBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -25361,10 +26720,23 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, ], }, KlerosCoreUniversity_Proxy: { - address: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + address: "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", abi: [ { inputs: [ @@ -30005,7 +31377,7 @@ export default { ], }, SortitionModuleUniversity: { - address: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + address: "0x9f55804177e7E44E558616cD7d06B865788214cA", abi: [ { stateMutability: "payable", @@ -30036,11 +31408,26 @@ export default { name: "InvalidImplementation", type: "error", }, + { + inputs: [], + name: "KlerosCoreOnly", + type: "error", + }, + { + inputs: [], + name: "NotEligibleForWithdrawal", + type: "error", + }, { inputs: [], name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, { inputs: [], name: "UUPSUnauthorizedCallContext", @@ -30070,6 +31457,44 @@ export default { name: "Initialized", type: "event", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "LeftoverPNK", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "LeftoverPNKWithdrawn", + type: "event", + }, { anonymous: false, inputs: [ @@ -30129,6 +31554,12 @@ export default { name: "_amount", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "_amountAllCourts", + type: "uint256", + }, ], name: "StakeSet", type: "event", @@ -30180,9 +31611,9 @@ export default { { inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { internalType: "bytes", @@ -30201,40 +31632,89 @@ export default { outputs: [ { internalType: "uint256", - name: "", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "draw", + outputs: [ + { + internalType: "address", + name: "drawnAddress", + type: "address", + }, + { + internalType: "uint96", + name: "fromSubcourtID", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_iterations", type: "uint256", }, ], - stateMutability: "view", + name: "executeDelayedStakes", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "address", + name: "_account", + type: "address", }, { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, ], - name: "draw", - outputs: [ + name: "forcedUnstake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "drawnAddress", + name: "_account", type: "address", }, ], - stateMutability: "view", + name: "forcedUnstakeAllCourts", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -30296,15 +31776,21 @@ export default { type: "function", }, { - inputs: [], - name: "governor", - outputs: [ + inputs: [ { internalType: "address", - name: "", + name: "_juror", type: "address", }, ], + name: "getJurorLeftoverPNK", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", type: "function", }, @@ -30312,7 +31798,7 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, { @@ -30388,32 +31874,21 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "owner", + outputs: [ { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", + inputs: [], + name: "passPhase", outputs: [], stateMutability: "nonpayable", type: "function", @@ -30456,8 +31931,28 @@ export default { name: "_account", type: "address", }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_pnkDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_pnkWithdrawal", + type: "uint256", + }, + { + internalType: "uint256", + name: "_newStake", + type: "uint256", + }, ], - name: "setJurorInactive", + name: "setStake", outputs: [], stateMutability: "nonpayable", type: "function", @@ -30476,31 +31971,55 @@ export default { }, { internalType: "uint256", - name: "_newStake", + name: "_penalty", type: "uint256", }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, ], - name: "setStake", + name: "setStakePenalty", outputs: [ { internalType: "uint256", - name: "pnkDeposit", + name: "pnkBalance", type: "uint256", }, { internalType: "uint256", - name: "pnkWithdrawal", + name: "newCourtStake", type: "uint256", }, { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", + internalType: "uint256", + name: "availablePenalty", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_reward", + type: "uint256", + }, + ], + name: "setStakeReward", + outputs: [ + { + internalType: "bool", + name: "success", + type: "bool", }, ], stateMutability: "nonpayable", @@ -30555,6 +32074,76 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_newStake", + type: "uint256", + }, + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + name: "validateStake", + outputs: [ + { + internalType: "uint256", + name: "pnkDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkWithdrawal", + type: "uint256", + }, + { + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "withdrawLeftoverPNK", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -30574,7 +32163,7 @@ export default { ], }, SortitionModuleUniversity_Implementation: { - address: "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", + address: "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", abi: [ { inputs: [], @@ -30602,11 +32191,26 @@ export default { name: "InvalidImplementation", type: "error", }, + { + inputs: [], + name: "KlerosCoreOnly", + type: "error", + }, + { + inputs: [], + name: "NotEligibleForWithdrawal", + type: "error", + }, { inputs: [], name: "NotInitializing", type: "error", }, + { + inputs: [], + name: "OwnerOnly", + type: "error", + }, { inputs: [], name: "UUPSUnauthorizedCallContext", @@ -30628,12 +32232,50 @@ export default { inputs: [ { indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "LeftoverPNK", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", }, ], - name: "Initialized", + name: "LeftoverPNKWithdrawn", type: "event", }, { @@ -30695,6 +32337,12 @@ export default { name: "_amount", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "_amountAllCourts", + type: "uint256", + }, ], name: "StakeSet", type: "event", @@ -30746,9 +32394,9 @@ export default { { inputs: [ { - internalType: "bytes32", - name: "_key", - type: "bytes32", + internalType: "uint96", + name: "_courtID", + type: "uint96", }, { internalType: "bytes", @@ -30777,9 +32425,9 @@ export default { { inputs: [ { - internalType: "bytes32", + internalType: "uint96", name: "", - type: "bytes32", + type: "uint96", }, { internalType: "uint256", @@ -30799,10 +32447,59 @@ export default { name: "drawnAddress", type: "address", }, + { + internalType: "uint96", + name: "fromSubcourtID", + type: "uint96", + }, ], stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "_iterations", + type: "uint256", + }, + ], + name: "executeDelayedStakes", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + ], + name: "forcedUnstake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "forcedUnstakeAllCourts", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -30862,15 +32559,21 @@ export default { type: "function", }, { - inputs: [], - name: "governor", - outputs: [ + inputs: [ { internalType: "address", - name: "", + name: "_juror", type: "address", }, ], + name: "getJurorLeftoverPNK", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", type: "function", }, @@ -30878,7 +32581,7 @@ export default { inputs: [ { internalType: "address", - name: "_governor", + name: "_owner", type: "address", }, { @@ -30954,32 +32657,21 @@ export default { type: "function", }, { - inputs: [ + inputs: [], + name: "owner", + outputs: [ { - internalType: "uint256", - name: "_randomNumber", - type: "uint256", + internalType: "address", + name: "", + type: "address", }, ], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_relativeAmount", - type: "uint256", - }, - ], - name: "penalizeStake", + inputs: [], + name: "passPhase", outputs: [], stateMutability: "nonpayable", type: "function", @@ -31022,8 +32714,28 @@ export default { name: "_account", type: "address", }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_pnkDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_pnkWithdrawal", + type: "uint256", + }, + { + internalType: "uint256", + name: "_newStake", + type: "uint256", + }, ], - name: "setJurorInactive", + name: "setStake", outputs: [], stateMutability: "nonpayable", type: "function", @@ -31042,31 +32754,55 @@ export default { }, { internalType: "uint256", - name: "_newStake", + name: "_penalty", type: "uint256", }, - { - internalType: "bool", - name: "_alreadyTransferred", - type: "bool", - }, ], - name: "setStake", + name: "setStakePenalty", outputs: [ { internalType: "uint256", - name: "pnkDeposit", + name: "pnkBalance", type: "uint256", }, { internalType: "uint256", - name: "pnkWithdrawal", + name: "newCourtStake", type: "uint256", }, { - internalType: "enum StakingResult", - name: "stakingResult", - type: "uint8", + internalType: "uint256", + name: "availablePenalty", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_reward", + type: "uint256", + }, + ], + name: "setStakeReward", + outputs: [ + { + internalType: "bool", + name: "success", + type: "bool", }, ], stateMutability: "nonpayable", @@ -31121,10 +32857,80 @@ export default { stateMutability: "payable", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint96", + name: "_courtID", + type: "uint96", + }, + { + internalType: "uint256", + name: "_newStake", + type: "uint256", + }, + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + name: "validateStake", + outputs: [ + { + internalType: "uint256", + name: "pnkDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "pnkWithdrawal", + type: "uint256", + }, + { + internalType: "enum StakingResult", + name: "stakingResult", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "withdrawLeftoverPNK", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, ], }, SortitionModuleUniversity_Proxy: { - address: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + address: "0x9f55804177e7E44E558616cD7d06B865788214cA", abi: [ { inputs: [ @@ -32953,7 +34759,7 @@ export default { ], }, VeaInboxArbToEthTestnet: { - address: "0xE12daFE59Bc3A996362d54b37DFd2BA9279cAd06", + address: "0xAA4F00c86bf956C0Fae603D030CBc2dA7f8B7C5B", abi: [ { inputs: [ @@ -33502,7 +35308,7 @@ export default { ], }, VeaInboxArbToGnosisTestnet: { - address: "0x62403e9Fbac618301175C89fb21920e4FF235A6a", + address: "0xa0d410b202D69C36871d5135ce42fC7D379BBB1c", abi: [ { inputs: [ diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json index 19f34b347..baac41f51 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json @@ -1,5 +1,5 @@ { - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + "address": "0x82F2089442979A6b56c80274D144575980092F91", "abi": [ { "stateMutability": "payable", @@ -14,11 +14,61 @@ "name": "AlreadyInitialized", "type": "error" }, + { + "inputs": [], + "name": "AppealFeeIsAlreadyPaid", + "type": "error" + }, + { + "inputs": [], + "name": "AppealPeriodIsOver", + "type": "error" + }, + { + "inputs": [], + "name": "AppealPeriodIsOverForLoser", + "type": "error" + }, + { + "inputs": [], + "name": "ChoiceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "CoreIsPaused", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeJumpedToParentDK", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotResolved", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyCommit", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyVoteIDs", + "type": "error" + }, { "inputs": [], "name": "FailedDelegateCall", "type": "error" }, + { + "inputs": [], + "name": "HashDoesNotMatchHiddenVoteCommitment", + "type": "error" + }, { "inputs": [ { @@ -30,11 +80,41 @@ "name": "InvalidImplementation", "type": "error" }, + { + "inputs": [], + "name": "JurorHasToOwnTheVote", + "type": "error" + }, + { + "inputs": [], + "name": "KlerosCoreOnly", + "type": "error" + }, + { + "inputs": [], + "name": "NotActiveForCoreDisputeID", + "type": "error" + }, + { + "inputs": [], + "name": "NotCommitPeriod", + "type": "error" + }, { "inputs": [], "name": "NotInitializing", "type": "error" }, + { + "inputs": [], + "name": "NotVotePeriod", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerOnly", + "type": "error" + }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", @@ -51,6 +131,16 @@ "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, + { + "inputs": [], + "name": "UnsuccessfulCall", + "type": "error" + }, + { + "inputs": [], + "name": "VoteAlreadyCast", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -295,19 +385,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "WINNER_STAKE_MULTIPLIER", @@ -428,15 +505,28 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_jumpDisputeKitID", + "type": "uint256" + } + ], + "name": "changeJumpDisputeKitID", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { "internalType": "address payable", - "name": "_governor", + "name": "_owner", "type": "address" } ], - "name": "changeGovernor", + "name": "changeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -454,6 +544,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "coreDisputeID", + "type": "uint256" + } + ], + "name": "coreDisputeIDToActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -492,7 +601,7 @@ }, { "internalType": "uint256", - "name": "_nbVotes", + "name": "", "type": "uint256" } ], @@ -578,11 +687,35 @@ "internalType": "address", "name": "drawnAddress", "type": "address" + }, + { + "internalType": "uint96", + "name": "fromSubcourtID", + "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "earlyCourtJump", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [ { @@ -601,7 +734,7 @@ "type": "bytes" } ], - "name": "executeGovernorProposal", + "name": "executeOwnerProposal", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -676,14 +809,58 @@ "type": "uint256" } ], - "name": "getDegreeOfCoherence", + "name": "getDegreeOfCoherencePenalty", "outputs": [ + { + "internalType": "uint256", + "name": "pnkCoherence", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_coreRoundID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_voteID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", "type": "uint256" } ], + "name": "getDegreeOfCoherenceReward", + "outputs": [ + { + "internalType": "uint256", + "name": "pnkCoherence", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeCoherence", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, @@ -706,6 +883,91 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getJumpDisputeKitID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_coreRoundID", + "type": "uint256" + } + ], + "name": "getLocalDisputeRoundID", + "outputs": [ + { + "internalType": "uint256", + "name": "localDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "localRoundID", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IDisputeKit", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_currentNbVotes", + "type": "uint256" + } + ], + "name": "getNbVotesAfterAppeal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_localDisputeID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -743,7 +1005,7 @@ }, { "internalType": "uint256", - "name": "totalCommited", + "name": "totalCommitted", "type": "uint256" }, { @@ -805,13 +1067,29 @@ "type": "function" }, { - "inputs": [], - "name": "governor", + "inputs": [ + { + "internalType": "uint256", + "name": "_choice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_salt", + "type": "uint256" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "hashVote", "outputs": [ { - "internalType": "address", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], "stateMutability": "view", @@ -821,13 +1099,23 @@ "inputs": [ { "internalType": "address", - "name": "_governor", + "name": "_owner", "type": "address" }, { "internalType": "contract KlerosCore", "name": "_core", "type": "address" + }, + { + "internalType": "address", + "name": "_wNative", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_jumpDisputeKitID", + "type": "uint256" } ], "name": "initialize", @@ -835,6 +1123,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + } + ], + "name": "isAppealFunded", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -864,6 +1171,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "jumpDisputeKitID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -877,6 +1210,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "singleDrawPerJuror", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -895,6 +1241,32 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wNative", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -946,52 +1318,54 @@ "type": "constructor" } ], - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", + "transactionHash": "0xbc5117fa79c44f4304b16dfe26f072d80a71dce7cf9986f10f363c6e20457bd5", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "transactionIndex": 1, - "gasUsed": "189732", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000004000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90", - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", + "contractAddress": "0x82F2089442979A6b56c80274D144575980092F91", + "transactionIndex": 2, + "gasUsed": "205891", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000080000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x11a1f340150df5f9ad32caef5cb1157e97be0914fb56af4c3835a86a743a5184", + "transactionHash": "0xbc5117fa79c44f4304b16dfe26f072d80a71dce7cf9986f10f363c6e20457bd5", "logs": [ { - "transactionIndex": 1, - "blockNumber": 96308536, - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + "transactionIndex": 2, + "blockNumber": 193533776, + "transactionHash": "0xbc5117fa79c44f4304b16dfe26f072d80a71dce7cf9986f10f363c6e20457bd5", + "address": "0x82F2089442979A6b56c80274D144575980092F91", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90" + "logIndex": 4, + "blockHash": "0x11a1f340150df5f9ad32caef5cb1157e97be0914fb56af4c3835a86a743a5184" } ], - "blockNumber": 96308536, - "cumulativeGasUsed": "189732", + "blockNumber": 193533776, + "cumulativeGasUsed": "320063", "status": 1, "byzantium": true }, "args": [ - "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" + "0x602ADa1cE706404BFb5417e497cdDae934436081", + "0xcf756fdf000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000000000000000000000000000000000000000000000000000000000000000000003829a2486d53ee984a0ca2d76552715726b771380000000000000000000000000000000000000000000000000000000000000001" ], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "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\":\"DisputeKitClassicUniversityProxy\"},\"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 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\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\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 */\\ncontract UUPSProxy {\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\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 */\\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 /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\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 /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":{},\"notice\":\"Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 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 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\":\"0x3160bd320b23c6ec0c21862b455c3044a9b33654ae84a1b6cd76255626c9154b\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122078e638e186ffb95282090eae06b37667016702ebe14876894d9cb231ea135b1264736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122078e638e186ffb95282090eae06b37667016702ebe14876894d9cb231ea135b1264736f6c634300081e0033", "execute": { "methodName": "initialize", "args": [ "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x0000000000000000000000000000000000000000" + "0x0000000000000000000000000000000000000000", + "0x3829A2486d53ee984a0ca2D76552715726b77138", + 1 ] }, - "implementation": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", + "implementation": "0x602ADa1cE706404BFb5417e497cdDae934436081", "devdoc": { "kind": "dev", "methods": {}, @@ -1000,6 +1374,7 @@ "userdoc": { "kind": "user", "methods": {}, + "notice": "Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers", "version": 1 }, "storageLayout": { diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json index 3ac36edd4..dd3e3b270 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", + "address": "0x602ADa1cE706404BFb5417e497cdDae934436081", "abi": [ { "inputs": [], @@ -11,11 +11,61 @@ "name": "AlreadyInitialized", "type": "error" }, + { + "inputs": [], + "name": "AppealFeeIsAlreadyPaid", + "type": "error" + }, + { + "inputs": [], + "name": "AppealPeriodIsOver", + "type": "error" + }, + { + "inputs": [], + "name": "AppealPeriodIsOverForLoser", + "type": "error" + }, + { + "inputs": [], + "name": "ChoiceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "CoreIsPaused", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeJumpedToParentDK", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeNotResolved", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyCommit", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyVoteIDs", + "type": "error" + }, { "inputs": [], "name": "FailedDelegateCall", "type": "error" }, + { + "inputs": [], + "name": "HashDoesNotMatchHiddenVoteCommitment", + "type": "error" + }, { "inputs": [ { @@ -27,11 +77,41 @@ "name": "InvalidImplementation", "type": "error" }, + { + "inputs": [], + "name": "JurorHasToOwnTheVote", + "type": "error" + }, + { + "inputs": [], + "name": "KlerosCoreOnly", + "type": "error" + }, + { + "inputs": [], + "name": "NotActiveForCoreDisputeID", + "type": "error" + }, + { + "inputs": [], + "name": "NotCommitPeriod", + "type": "error" + }, { "inputs": [], "name": "NotInitializing", "type": "error" }, + { + "inputs": [], + "name": "NotVotePeriod", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerOnly", + "type": "error" + }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", @@ -48,6 +128,16 @@ "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, + { + "inputs": [], + "name": "UnsuccessfulCall", + "type": "error" + }, + { + "inputs": [], + "name": "VoteAlreadyCast", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -292,19 +382,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "ONE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "WINNER_STAKE_MULTIPLIER", @@ -425,15 +502,28 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_jumpDisputeKitID", + "type": "uint256" + } + ], + "name": "changeJumpDisputeKitID", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { "internalType": "address payable", - "name": "_governor", + "name": "_owner", "type": "address" } ], - "name": "changeGovernor", + "name": "changeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -451,6 +541,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "coreDisputeID", + "type": "uint256" + } + ], + "name": "coreDisputeIDToActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -489,7 +598,7 @@ }, { "internalType": "uint256", - "name": "_nbVotes", + "name": "", "type": "uint256" } ], @@ -575,11 +684,35 @@ "internalType": "address", "name": "drawnAddress", "type": "address" + }, + { + "internalType": "uint96", + "name": "fromSubcourtID", + "type": "uint96" } ], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "earlyCourtJump", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [ { @@ -598,7 +731,7 @@ "type": "bytes" } ], - "name": "executeGovernorProposal", + "name": "executeOwnerProposal", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -673,14 +806,58 @@ "type": "uint256" } ], - "name": "getDegreeOfCoherence", + "name": "getDegreeOfCoherencePenalty", "outputs": [ + { + "internalType": "uint256", + "name": "pnkCoherence", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_coreRoundID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_voteID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", "type": "uint256" } ], + "name": "getDegreeOfCoherenceReward", + "outputs": [ + { + "internalType": "uint256", + "name": "pnkCoherence", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeCoherence", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, @@ -703,6 +880,91 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getJumpDisputeKitID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_coreRoundID", + "type": "uint256" + } + ], + "name": "getLocalDisputeRoundID", + "outputs": [ + { + "internalType": "uint256", + "name": "localDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "localRoundID", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IDisputeKit", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_currentNbVotes", + "type": "uint256" + } + ], + "name": "getNbVotesAfterAppeal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_localDisputeID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -740,7 +1002,7 @@ }, { "internalType": "uint256", - "name": "totalCommited", + "name": "totalCommitted", "type": "uint256" }, { @@ -802,29 +1064,55 @@ "type": "function" }, { - "inputs": [], - "name": "governor", - "outputs": [ + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", + "internalType": "uint256", + "name": "_choice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_salt", + "type": "uint256" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "hashVote", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_governor", + "name": "_owner", "type": "address" }, { "internalType": "contract KlerosCore", "name": "_core", "type": "address" + }, + { + "internalType": "address", + "name": "_wNative", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_jumpDisputeKitID", + "type": "uint256" } ], "name": "initialize", @@ -832,6 +1120,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_coreDisputeID", + "type": "uint256" + } + ], + "name": "isAppealFunded", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -861,6 +1168,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "jumpDisputeKitID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "proxiableUUID", @@ -874,6 +1207,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "singleDrawPerJuror", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -892,6 +1238,32 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wNative", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -927,41 +1299,41 @@ "type": "function" } ], - "transactionHash": "0x89ac5a2ce88c22071edfaf2f092cb26862b52facde1274b9a495dccdd03a41d9", + "transactionHash": "0x140fcdeaa468903f80081c238adf55c9e98ed99dfccc7d9c3e5f1b0fe90cf644", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", + "contractAddress": "0x602ADa1cE706404BFb5417e497cdDae934436081", "transactionIndex": 2, - "gasUsed": "3665145", - "logsBloom": "0x00000800000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9c2007f9245166eb377461ad5c2dd50dfa7e21fc79284f7d7591fb8348960fe3", - "transactionHash": "0x89ac5a2ce88c22071edfaf2f092cb26862b52facde1274b9a495dccdd03a41d9", + "gasUsed": "2891480", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa1d507b667521779bef446125f900ce13bca11861cf05645709556422aad0f04", + "transactionHash": "0x140fcdeaa468903f80081c238adf55c9e98ed99dfccc7d9c3e5f1b0fe90cf644", "logs": [ { "transactionIndex": 2, - "blockNumber": 96308519, - "transactionHash": "0x89ac5a2ce88c22071edfaf2f092cb26862b52facde1274b9a495dccdd03a41d9", - "address": "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", + "blockNumber": 193533768, + "transactionHash": "0x140fcdeaa468903f80081c238adf55c9e98ed99dfccc7d9c3e5f1b0fe90cf644", + "address": "0x602ADa1cE706404BFb5417e497cdDae934436081", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 6, - "blockHash": "0x9c2007f9245166eb377461ad5c2dd50dfa7e21fc79284f7d7591fb8348960fe3" + "logIndex": 1, + "blockHash": "0xa1d507b667521779bef446125f900ce13bca11861cf05645709556422aad0f04" } ], - "blockNumber": 96308519, - "cumulativeGasUsed": "3756092", + "blockNumber": 193533768, + "cumulativeGasUsed": "3568712", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ONE_BASIS_POINT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"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\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nbVotes\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"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\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"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\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommited\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"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\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"details\":\"To be emitted when a choice is fully funded for an appeal.\",\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"details\":\"To be emitted when a vote commitment is cast.\",\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when a funding contribution is made.\",\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"details\":\"Emitted when casting a vote to provide the justification of juror's choice.\",\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"To be emitted when the contributed funds are withdrawn.\",\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their commits for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"Returns true if all of the jurors have cast their votes for the last round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commit. Note that justification string is a part of the commit.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"details\":\"Changes the `core` storage variable.\",\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Number of votes for this dispute.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_nonce\":\"Nonce of the drawing iteration.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"details\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\",\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"details\":\"Gets the number of jurors who are eligible to a reward in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"_0\":\"The degree of coherence in basis points.\"}},\"initialize(address,address)\":{\"details\":\"Initializer.\",\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_governor\":\"The governor's address.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"details\":\"Returns true if the specified voter was active in this round.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"title\":\"DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./KlerosCoreBase.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title KlerosCore\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\ncontract KlerosCore is KlerosCoreBase, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) external reinitializer(1) {\\n _initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress\\n );\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0x1dc9311f4df8d5c707be5fc0f0e87574b2ca4a4957eb0ffecdf2153a8eace1d2\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreBase\\n/// Core arbitrator contract for Kleros v2.\\n/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\\nabstract contract KlerosCoreBase is IArbitratorV2 {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event Paused();\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrGovernor() {\\n if (guardian != msg.sender && governor != msg.sender) revert GuardianOrGovernorOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function _initialize(\\n address _governor,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress\\n ) internal {\\n governor = _governor;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(bytes32(uint256(FORKING_COURT)), _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(uint256(GENERAL_COURT)), _sortitionExtraData);\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Pause staking and reward execution. Can only be done by guardian or governor.\\n function pause() external onlyByGuardianOrGovernor whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @dev Unpause staking and reward execution. Can only be done by governor.\\n function unpause() external onlyByGovernor whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByGovernor {\\n guardian = _guardian;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(bytes32(courtID), _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external virtual whenNotPaused {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal virtual returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n function draw(uint256 _disputeID, uint256 _iterations) external {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n address drawnAddress = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// Note: Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n _params.pnkPenaltiesInRound += penalty;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n sortitionModule.penalizeStake(account, penalty);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(penalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (!disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive, unstake them.\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Give back the locked PNKs in case the juror fully unstaked earlier.\\n if (!sortitionModule.isJurorStaked(account)) {\\n pinakion.safeTransfer(account, pnkLocked);\\n }\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs were already transferred to/from the staking contract.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibeInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error GuardianOrGovernorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error DepthLevelMax();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error ArraysLengthMismatch();\\n error StakingInTooManyCourts();\\n error StakingNotPossibeInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n}\\n\",\"keccak256\":\"0x7435f0d24fde25165d4de404cbd4040339be136bac507196bfed0bb1f9f493f4\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"../KlerosCore.sol\\\";\\nimport \\\"../interfaces/IDisputeKit.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is IDisputeKit, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n uint256 nbVotes; // Maximal number of votes this dispute can get.\\n }\\n\\n struct Vote {\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n bool voted; // True if the vote has been cast.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n uint256 public constant ONE_BASIS_POINT = 10000; // One basis point, for scaling.\\n\\n address public governor; // The governor of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @dev To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @dev To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @dev To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n require(!disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped, \\\"Dispute jumped to a parent DK!\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer.\\n /// @param _governor The governor's address.\\n /// @param _core The KlerosCore arbitrator.\\n function initialize(address _governor, KlerosCore _core) external reinitializer(1) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the governor can perform upgrades (`onlyByGovernor`)\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n require(success, \\\"Unsuccessful call\\\");\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByGovernor {\\n core = KlerosCore(_core);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Number of votes for this dispute.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.nbVotes = _nbVotes;\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _nonce Nonce of the drawing iteration.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.\\n\\n // TODO: Handle the situation when no one has staked yet.\\n drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);\\n\\n if (_postDrawCheck(_coreDisputeID, drawnAddress)) {\\n round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @dev Sets the caller's commit for the specified votes. It can be called multiple times during the\\n /// commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commit. Note that justification string is a part of the commit.\\n function castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) external notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.commit, \\\"The dispute should be in Commit period.\\\");\\n require(_commit != bytes32(0), \\\"Empty commit.\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @dev Sets the caller's choices for the specified votes.\\n /// `O(n)` where\\n /// `n` is the number of votes.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n require(period == KlerosCoreBase.Period.vote, \\\"The dispute should be in Vote period.\\\");\\n require(_voteIDs.length > 0, \\\"No voteID provided\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"Choice out of bounds\\\");\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , , ) = core.courts(courtID);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n require(round.votes[_voteIDs[i]].account == msg.sender, \\\"The caller has to own the vote.\\\");\\n require(\\n !hiddenVotes || round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _salt)),\\n \\\"The commit must match the choice in courts with hidden votes.\\\"\\n );\\n require(!round.votes[_voteIDs[i]].voted, \\\"Vote already cast.\\\");\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, msg.sender, _voteIDs, _choice, _justification);\\n }\\n\\n /// @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n require(_choice <= dispute.numberOfChoices, \\\"There is no such ruling to fund.\\\");\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n require(\\n block.timestamp - appealPeriodStart <\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT,\\n \\\"Appeal period is over for loser\\\"\\n );\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n require(!round.hasPaid[_choice], \\\"Appeal fee is already paid.\\\");\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.nbVotes = core.getNumberOfVotes(_coreDisputeID);\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).send(msg.value - contribution);\\n }\\n\\n /// @dev Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// Note that withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n require(isRuled, \\\"Dispute should be resolved.\\\");\\n require(!core.paused(), \\\"Core is paused\\\");\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.send(amount); // Deliberate use of send to prevent reverting fallback. It's the user's responsibility to accept ETH.\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCoreBase.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalVoted == round.votes.length;\\n }\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Checks that the chosen address satisfies certain conditions for being drawn.\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return Whether the address can be drawn or not.\\n function _postDrawCheck(uint256 _coreDisputeID, address _juror) internal view returns (bool) {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n uint256 lockedAmountPerJuror = core\\n .getRoundInfo(_coreDisputeID, core.getNumberOfRounds(_coreDisputeID) - 1)\\n .pnkAtStakePerJuror;\\n (uint256 totalStaked, uint256 totalLocked, , ) = core.sortitionModule().getJurorBalance(_juror, courtID);\\n return totalStaked >= totalLocked + lockedAmountPerJuror;\\n }\\n}\\n\",\"keccak256\":\"0xde57a6569422626bf1ec215f3442ede6c13df57f6f5d27da3bc8cd8bc3d313cd\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xb9590d05f9df08dd0ed027b2eb40c7b1885b7574a121b1b0b7da0920429bb4d5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked\\n}\\n\",\"keccak256\":\"0x486016fb74cc91439c2ec918e97a79190ab4eed223987d516986fff8eaeecfbf\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\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\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613ec76200010360003960008181611588015281816115b101526117a90152613ec76000f3fe6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613174565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613174565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613174565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131a2565b610785565b34801561029857600080fd5b506102ac6102a73660046131df565b610c10565b005b6102ac6102bc366004613218565b610d0d565b6102ac6102cf366004613327565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613174565b6117fa565b6040516101b3939291906133c6565b34801561032457600080fd5b506102ac610333366004613432565b6118c0565b34801561034457600080fd5b50610358610353366004613174565b611bc5565b6040516101b39190613484565b34801561037157600080fd5b506102216103803660046134c8565b611c89565b34801561039157600080fd5b506103a56103a0366004613503565b611dce565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613174565b611e86565b3480156103fe57600080fd5b506102ac61040d36600461352f565b611efd565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613587565b611fc9565b34801561045457600080fd5b506102ac61046336600461361f565b61269a565b34801561047457600080fd5b50610488610483366004613503565b6126e6565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461363c565b6127ac565b3480156104f657600080fd5b506101a7610505366004613503565b612981565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613218565b612a1c565b34801561054c57600080fd5b5061022161055b366004613218565b612d25565b34801561056c57600080fd5b506102ac61057b36600461361f565b612e78565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136c3565b600091825260208220600590910201805490925082906105e6906001906136ef565b815481106105f6576105f66136c3565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136c3565b60009182526020822060059091020180549092508290610665906001906136ef565b81548110610675576106756136c3565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610716919061372e565b5090935060049250610726915050565b81600481111561073857610738613795565b0361077b57600061074888611bc5565b905080516001036107795780600081518110610766576107666136c3565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f7919061372e565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137ab565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136c3565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137c6565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613802565b610a939190613819565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136c3565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136c3565b9060005260206000200154815260200190815260200160002054610b28919061383b565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613802565b610b679190613819565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136c3565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b81526004016108469061384e565b600083815260036020526040812054600280549091908110610d8957610d896136c3565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613885565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137c6565b50509050868103610f30576127109150610fb1565b612710611388610f4086866136ef565b610f4a9190613802565b610f549190613819565b610f5e85426136ef565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc4906001906136ef565b81548110610fd457610fd46136c3565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138a9565b61106191906136ef565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138a9565b905060006127106111448784613802565b61114e9190613819565b611158908361383b565b60008c8152600686016020526040812054919250908211156112095760008c8152600686016020526040902054349061119190846136ef565b116111b65760008c81526006860160205260409020546111b190836136ef565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061383b565b909155505060008c81526006860160205260408120805483929061125a90849061383b565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061383b565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156115375782856009015461134991906136ef565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137ab565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161383b565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138a9565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b8152600401611504939291906138fc565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d83346136ef565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ec4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e728339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138a9565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e7283398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e728339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b031683604051611733919061399b565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e7283398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138c2565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136c3565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611986919061372e565b5090935060019250611996915050565b8160048111156119a8576119a8613795565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136c3565b60009182526020822060059091020180549092508290611a88906001906136ef565b81548110611a9857611a986136c3565b90600052602060002090600c0201905060005b86811015611b5e573382898984818110611ac757611ac76136c3565b9050602002013581548110611ade57611ade6136c3565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139b7565b8582898984818110611b2957611b296136c3565b9050602002013581548110611b4057611b406136c3565b60009182526020909120600160049092020181019190915501611aab565b5086869050816005016000828254611b76919061383b565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bb3908b908b908b90613a20565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611beb57611beb6136c3565b60009182526020822060059091020180549092508290611c0d906001906136ef565b81548110611c1d57611c1d6136c3565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c7b57602002820191906000526020600020905b815481526020019060010190808311611c67575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cad57611cad6136c3565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce157611ce16136c3565b90600052602060002090600c02016000018681548110611d0357611d036136c3565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8591906137c6565b506003850154919350915060ff168015611da957508183600201541480611da95750805b15611dbc57612710945050505050611dc5565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611dff57611dff6136c3565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3357611e336136c3565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eaa57611eaa6136c3565b60009182526020822060059091020180549092508290611ecc906001906136ef565b81548110611edc57611edc6136c3565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f275760405162461bcd60e51b815260040161084690613a44565b6000836001600160a01b03168383604051611f42919061399b565b60006040518083038185875af1925050503d8060008114611f7f576040519150601f19603f3d011682016040523d82523d6000602084013e611f84565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611fed57611fed6136c3565b600091825260209091206002600590920201015460ff16156120215760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f919061372e565b509093506002925061209f915050565b8160048111156120b1576120b1613795565b1461210c5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561214e5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b600088815260036020526040812054600280549091908110612172576121726136c3565b9060005260206000209060050201905080600101548611156121cd5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e0906001906136ef565b815481106121f0576121f06136c3565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f919061372e565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190613a86565b505050505091505060005b8a8110156125605733848d8d84818110612315576123156136c3565b905060200201358154811061232c5761232c6136c3565b60009182526020909120600490910201546001600160a01b0316146123635760405162461bcd60e51b8152600401610846906139b7565b8115806123d6575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123ab576123ab6136c3565b90506020020135815481106123c2576123c26136c3565b906000526020600020906004020160010154145b6124485760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c8381811061245b5761245b6136c3565b9050602002013581548110612472576124726136c3565b600091825260209091206003600490920201015460ff16156124cb5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124df576124df6136c3565b90506020020135815481106124f6576124f66136c3565b60009182526020909120600260049092020101556001848d8d8481811061251f5761251f6136c3565b9050602002013581548110612536576125366136c3565b60009182526020909120600490910201600301805460ff19169115159190911790556001016122f9565b508a8a9050836004016000828254612578919061383b565b90915550506000898152600284016020526040812080548c929061259d90849061383b565b9091555050600183015489036125cc57600383015460ff16156125c75760038301805460ff191690555b612645565b60018301546000908152600284016020526040808220548b83529120540361260e57600383015460ff166125c75760038301805460ff19166001179055612645565b60018301546000908152600284016020526040808220548b83529120541115612645576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161268493929190613af0565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126c45760405162461bcd60e51b815260040161084690613a44565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612714576127146136c3565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612748576127486136c3565b90600052602060002090600c0201600001878154811061276a5761276a6136c3565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127d65760405162461bcd60e51b815260040161084690613b20565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612861858783613bb4565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128dc91906138a9565b6128e691906136ef565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061296f908a908a908a90613c74565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129a5576129a56136c3565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129d9576129d96136c3565b90600052602060002090600c020160000184815481106129fb576129fb6136c3565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a495760405162461bcd60e51b815260040161084690613b20565b600083815260036020526040902054600280548592908110612a6d57612a6d6136c3565b600091825260209091206002600590920201015460ff1615612aa15760405162461bcd60e51b81526004016108469061384e565b600084815260036020526040812054600280549091908110612ac557612ac56136c3565b60009182526020822060059091020180549092508290612ae7906001906136ef565b81548110612af757612af76136c3565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b809190613caa565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061372e565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c7b9190613caa565b9650612c878988612ef1565b15612d1457604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d19565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d4957612d496136c3565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d7d57612d7d6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0091906137c6565b5091509150826004015460001480612e2f575080158015612e2f57506000828152600284016020526040902054155b15612e41576000945050505050612e72565b8015612e56575050600401549150612e729050565b506000908152600290910160205260409020549150612e729050565b92915050565b6000546001600160a01b03163314612ea25760405162461bcd60e51b815260040161084690613a44565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612eee5760405162461bcd60e51b815260040161084690613a44565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f63919061372e565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe691906138a9565b612ff091906136ef565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613031573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130599190810190613d5a565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d99190613caa565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131549190613e3b565b5050915091508281613166919061383b565b909110159695505050505050565b60006020828403121561318657600080fd5b5035919050565b6001600160a01b0381168114612eee57600080fd5b600080600080608085870312156131b857600080fd5b8435935060208501356131ca8161318d565b93969395505050506040820135916060013590565b600080604083850312156131f257600080fd5b82356131fd8161318d565b9150602083013561320d8161318d565b809150509250929050565b6000806040838503121561322b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132735761327361323a565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132a1576132a161323a565b604052919050565b60006001600160401b038311156132c2576132c261323a565b6132d5601f8401601f1916602001613279565b90508281528383830111156132e957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261331157600080fd5b613320838335602085016132a9565b9392505050565b6000806040838503121561333a57600080fd5b82356133458161318d565b915060208301356001600160401b0381111561336057600080fd5b61336c85828601613300565b9150509250929050565b60005b83811015613391578181015183820152602001613379565b50506000910152565b600081518084526133b2816020860160208601613376565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dc5606083018461339a565b60008083601f8401126133f957600080fd5b5081356001600160401b0381111561341057600080fd5b6020830191508360208260051b850101111561342b57600080fd5b9250929050565b6000806000806060858703121561344857600080fd5b8435935060208501356001600160401b0381111561346557600080fd5b613471878288016133e7565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134bc578351835292840192918401916001016134a0565b50909695505050505050565b600080600080600060a086880312156134e057600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561351857600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561354457600080fd5b833561354f8161318d565b92506020840135915060408401356001600160401b0381111561357157600080fd5b61357d86828701613300565b9150509250925092565b60008060008060008060a087890312156135a057600080fd5b8635955060208701356001600160401b03808211156135be57600080fd5b6135ca8a838b016133e7565b9097509550604089013594506060890135935060808901359150808211156135f157600080fd5b508701601f8101891361360357600080fd5b613612898235602084016132a9565b9150509295509295509295565b60006020828403121561363157600080fd5b81356133208161318d565b60008060008060006080868803121561365457600080fd5b853594506020860135935060408601356001600160401b038082111561367957600080fd5b818801915088601f83011261368d57600080fd5b81358181111561369c57600080fd5b8960208285010111156136ae57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e7257612e726136d9565b80516001600160601b038116811461371957600080fd5b919050565b8051801515811461371957600080fd5b600080600080600060a0868803121561374657600080fd5b61374f86613702565b9450602086015161375f8161318d565b60408701519094506005811061377457600080fd5b92506137826060870161371e565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137bd57600080fd5b6133208261371e565b6000806000606084860312156137db57600080fd5b835192506137eb6020850161371e565b91506137f96040850161371e565b90509250925092565b8082028115828204841417612e7257612e726136d9565b60008261383657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e7257612e726136d9565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561389857600080fd5b505080516020909101519092909150565b6000602082840312156138bb57600080fd5b5051919050565b600181811c908216806138d657607f821691505b6020821081036138f657634e487b7160e01b600052602260045260246000fd5b50919050565b83815260006020846020840152606060408401526000845461391d816138c2565b806060870152608060018084166000811461393f576001811461395b5761398b565b60ff19851660808a0152608084151560051b8a0101955061398b565b89600052602060002060005b858110156139825781548b8201860152908301908801613967565b8a016080019650505b50939a9950505050505050505050565b600082516139ad818460208701613376565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613a0757600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a346040830185876139ee565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613aa157600080fd5b613aaa88613702565b9650613ab86020890161371e565b955060408801519450606088015193506080880151925060a08801519150613ae260c0890161371e565b905092959891949750929550565b604081526000613b046040830185876139ee565b8281036020840152613b16818561339a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611797576000816000526020600020601f850160051c81016020861015613b8d5750805b601f850160051c820191505b81811015613bac57828155600101613b99565b505050505050565b6001600160401b03831115613bcb57613bcb61323a565b613bdf83613bd983546138c2565b83613b64565b6000601f841160018114613c135760008515613bfb5750838201355b600019600387901b1c1916600186901b178355613c6d565b600083815260209020601f19861690835b82811015613c445786850135825560209485019460019092019101613c24565b5086821015613c615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613cbc57600080fd5b81516133208161318d565b600082601f830112613cd857600080fd5b815160206001600160401b03821115613cf357613cf361323a565b8160051b613d02828201613279565b9283528481018201928281019087851115613d1c57600080fd5b83870192505b84831015613d44578251613d358161318d565b82529183019190830190613d22565b979650505050505050565b80516137198161318d565b600060208284031215613d6c57600080fd5b81516001600160401b0380821115613d8357600080fd5b908301906101608286031215613d9857600080fd5b613da0613250565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613de857600080fd5b613df487828601613cc7565b60c08301525060e0838101519082015261010080840151908201526101209150613e1f828401613d4f565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e5157600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ece2f97e5f37049420403eea1739d27d704a432100da66c99ed49ffe1796440264736f6c63430008180033", - "deployedBytecode": "0x6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613174565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613174565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613174565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131a2565b610785565b34801561029857600080fd5b506102ac6102a73660046131df565b610c10565b005b6102ac6102bc366004613218565b610d0d565b6102ac6102cf366004613327565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613174565b6117fa565b6040516101b3939291906133c6565b34801561032457600080fd5b506102ac610333366004613432565b6118c0565b34801561034457600080fd5b50610358610353366004613174565b611bc5565b6040516101b39190613484565b34801561037157600080fd5b506102216103803660046134c8565b611c89565b34801561039157600080fd5b506103a56103a0366004613503565b611dce565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613174565b611e86565b3480156103fe57600080fd5b506102ac61040d36600461352f565b611efd565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613587565b611fc9565b34801561045457600080fd5b506102ac61046336600461361f565b61269a565b34801561047457600080fd5b50610488610483366004613503565b6126e6565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461363c565b6127ac565b3480156104f657600080fd5b506101a7610505366004613503565b612981565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b366004613218565b612a1c565b34801561054c57600080fd5b5061022161055b366004613218565b612d25565b34801561056c57600080fd5b506102ac61057b36600461361f565b612e78565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136c3565b600091825260208220600590910201805490925082906105e6906001906136ef565b815481106105f6576105f66136c3565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136c3565b60009182526020822060059091020180549092508290610665906001906136ef565b81548110610675576106756136c3565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610716919061372e565b5090935060049250610726915050565b81600481111561073857610738613795565b0361077b57600061074888611bc5565b905080516001036107795780600081518110610766576107666136c3565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f7919061372e565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137ab565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136c3565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137c6565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613802565b610a939190613819565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136c3565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136c3565b9060005260206000200154815260200190815260200160002054610b28919061383b565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613802565b610b679190613819565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136c3565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b81526004016108469061384e565b600083815260036020526040812054600280549091908110610d8957610d896136c3565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613885565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137c6565b50509050868103610f30576127109150610fb1565b612710611388610f4086866136ef565b610f4a9190613802565b610f549190613819565b610f5e85426136ef565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc4906001906136ef565b81548110610fd457610fd46136c3565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138a9565b61106191906136ef565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138a9565b905060006127106111448784613802565b61114e9190613819565b611158908361383b565b60008c8152600686016020526040812054919250908211156112095760008c8152600686016020526040902054349061119190846136ef565b116111b65760008c81526006860160205260409020546111b190836136ef565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061383b565b909155505060008c81526006860160205260408120805483929061125a90849061383b565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061383b565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a850154600110156115375782856009015461134991906136ef565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137ab565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161383b565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138a9565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b8152600401611504939291906138fc565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d83346136ef565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ec4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e728339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138a9565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e7283398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e728339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b031683604051611733919061399b565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e7283398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138c2565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138c2565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136c3565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611986919061372e565b5090935060019250611996915050565b8160048111156119a8576119a8613795565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136c3565b60009182526020822060059091020180549092508290611a88906001906136ef565b81548110611a9857611a986136c3565b90600052602060002090600c0201905060005b86811015611b5e573382898984818110611ac757611ac76136c3565b9050602002013581548110611ade57611ade6136c3565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139b7565b8582898984818110611b2957611b296136c3565b9050602002013581548110611b4057611b406136c3565b60009182526020909120600160049092020181019190915501611aab565b5086869050816005016000828254611b76919061383b565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bb3908b908b908b90613a20565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611beb57611beb6136c3565b60009182526020822060059091020180549092508290611c0d906001906136ef565b81548110611c1d57611c1d6136c3565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c7b57602002820191906000526020600020905b815481526020019060010190808311611c67575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cad57611cad6136c3565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce157611ce16136c3565b90600052602060002090600c02016000018681548110611d0357611d036136c3565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8591906137c6565b506003850154919350915060ff168015611da957508183600201541480611da95750805b15611dbc57612710945050505050611dc5565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611dff57611dff6136c3565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3357611e336136c3565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eaa57611eaa6136c3565b60009182526020822060059091020180549092508290611ecc906001906136ef565b81548110611edc57611edc6136c3565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f275760405162461bcd60e51b815260040161084690613a44565b6000836001600160a01b03168383604051611f42919061399b565b60006040518083038185875af1925050503d8060008114611f7f576040519150601f19603f3d011682016040523d82523d6000602084013e611f84565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611fed57611fed6136c3565b600091825260209091206002600590920201015460ff16156120215760405162461bcd60e51b81526004016108469061384e565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa15801561206b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208f919061372e565b509093506002925061209f915050565b8160048111156120b1576120b1613795565b1461210c5760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b8561214e5760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b600088815260036020526040812054600280549091908110612172576121726136c3565b9060005260206000209060050201905080600101548611156121cd5760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e0906001906136ef565b815481106121f0576121f06136c3565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa15801561224b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226f919061372e565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ee9190613a86565b505050505091505060005b8a8110156125605733848d8d84818110612315576123156136c3565b905060200201358154811061232c5761232c6136c3565b60009182526020909120600490910201546001600160a01b0316146123635760405162461bcd60e51b8152600401610846906139b7565b8115806123d6575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123ab576123ab6136c3565b90506020020135815481106123c2576123c26136c3565b906000526020600020906004020160010154145b6124485760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c8381811061245b5761245b6136c3565b9050602002013581548110612472576124726136c3565b600091825260209091206003600490920201015460ff16156124cb5760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124df576124df6136c3565b90506020020135815481106124f6576124f66136c3565b60009182526020909120600260049092020101556001848d8d8481811061251f5761251f6136c3565b9050602002013581548110612536576125366136c3565b60009182526020909120600490910201600301805460ff19169115159190911790556001016122f9565b508a8a9050836004016000828254612578919061383b565b90915550506000898152600284016020526040812080548c929061259d90849061383b565b9091555050600183015489036125cc57600383015460ff16156125c75760038301805460ff191690555b612645565b60018301546000908152600284016020526040808220548b83529120540361260e57600383015460ff166125c75760038301805460ff19166001179055612645565b60018301546000908152600284016020526040808220548b83529120541115612645576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161268493929190613af0565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126c45760405162461bcd60e51b815260040161084690613a44565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612714576127146136c3565b600091825260208083208a8452600360059093020191820190526040822054815491935083918110612748576127486136c3565b90600052602060002090600c0201600001878154811061276a5761276a6136c3565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127d65760405162461bcd60e51b815260040161084690613b20565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612861858783613bb4565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128dc91906138a9565b6128e691906136ef565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab581089061296f908a908a908a90613c74565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129a5576129a56136c3565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129d9576129d96136c3565b90600052602060002090600c020160000184815481106129fb576129fb6136c3565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a495760405162461bcd60e51b815260040161084690613b20565b600083815260036020526040902054600280548592908110612a6d57612a6d6136c3565b600091825260209091206002600590920201015460ff1615612aa15760405162461bcd60e51b81526004016108469061384e565b600084815260036020526040812054600280549091908110612ac557612ac56136c3565b60009182526020822060059091020180549092508290612ae7906001906136ef565b81548110612af757612af76136c3565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b809190613caa565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf3919061372e565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c7b9190613caa565b9650612c878988612ef1565b15612d1457604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d19565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d4957612d496136c3565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d7d57612d7d6136c3565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0091906137c6565b5091509150826004015460001480612e2f575080158015612e2f57506000828152600284016020526040902054155b15612e41576000945050505050612e72565b8015612e56575050600401549150612e729050565b506000908152600290910160205260409020549150612e729050565b92915050565b6000546001600160a01b03163314612ea25760405162461bcd60e51b815260040161084690613a44565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612eee5760405162461bcd60e51b815260040161084690613a44565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f63919061372e565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe691906138a9565b612ff091906136ef565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613031573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130599190810190613d5a565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d99190613caa565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131549190613e3b565b5050915091508281613166919061383b565b909110159695505050505050565b60006020828403121561318657600080fd5b5035919050565b6001600160a01b0381168114612eee57600080fd5b600080600080608085870312156131b857600080fd5b8435935060208501356131ca8161318d565b93969395505050506040820135916060013590565b600080604083850312156131f257600080fd5b82356131fd8161318d565b9150602083013561320d8161318d565b809150509250929050565b6000806040838503121561322b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132735761327361323a565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132a1576132a161323a565b604052919050565b60006001600160401b038311156132c2576132c261323a565b6132d5601f8401601f1916602001613279565b90508281528383830111156132e957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261331157600080fd5b613320838335602085016132a9565b9392505050565b6000806040838503121561333a57600080fd5b82356133458161318d565b915060208301356001600160401b0381111561336057600080fd5b61336c85828601613300565b9150509250929050565b60005b83811015613391578181015183820152602001613379565b50506000910152565b600081518084526133b2816020860160208601613376565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dc5606083018461339a565b60008083601f8401126133f957600080fd5b5081356001600160401b0381111561341057600080fd5b6020830191508360208260051b850101111561342b57600080fd5b9250929050565b6000806000806060858703121561344857600080fd5b8435935060208501356001600160401b0381111561346557600080fd5b613471878288016133e7565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134bc578351835292840192918401916001016134a0565b50909695505050505050565b600080600080600060a086880312156134e057600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561351857600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561354457600080fd5b833561354f8161318d565b92506020840135915060408401356001600160401b0381111561357157600080fd5b61357d86828701613300565b9150509250925092565b60008060008060008060a087890312156135a057600080fd5b8635955060208701356001600160401b03808211156135be57600080fd5b6135ca8a838b016133e7565b9097509550604089013594506060890135935060808901359150808211156135f157600080fd5b508701601f8101891361360357600080fd5b613612898235602084016132a9565b9150509295509295509295565b60006020828403121561363157600080fd5b81356133208161318d565b60008060008060006080868803121561365457600080fd5b853594506020860135935060408601356001600160401b038082111561367957600080fd5b818801915088601f83011261368d57600080fd5b81358181111561369c57600080fd5b8960208285010111156136ae57600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e7257612e726136d9565b80516001600160601b038116811461371957600080fd5b919050565b8051801515811461371957600080fd5b600080600080600060a0868803121561374657600080fd5b61374f86613702565b9450602086015161375f8161318d565b60408701519094506005811061377457600080fd5b92506137826060870161371e565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137bd57600080fd5b6133208261371e565b6000806000606084860312156137db57600080fd5b835192506137eb6020850161371e565b91506137f96040850161371e565b90509250925092565b8082028115828204841417612e7257612e726136d9565b60008261383657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e7257612e726136d9565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b6000806040838503121561389857600080fd5b505080516020909101519092909150565b6000602082840312156138bb57600080fd5b5051919050565b600181811c908216806138d657607f821691505b6020821081036138f657634e487b7160e01b600052602260045260246000fd5b50919050565b83815260006020846020840152606060408401526000845461391d816138c2565b806060870152608060018084166000811461393f576001811461395b5761398b565b60ff19851660808a0152608084151560051b8a0101955061398b565b89600052602060002060005b858110156139825781548b8201860152908301908801613967565b8a016080019650505b50939a9950505050505050505050565b600082516139ad818460208701613376565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b81835260006001600160fb1b03831115613a0757600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a346040830185876139ee565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613aa157600080fd5b613aaa88613702565b9650613ab86020890161371e565b955060408801519450606088015193506080880151925060a08801519150613ae260c0890161371e565b905092959891949750929550565b604081526000613b046040830185876139ee565b8281036020840152613b16818561339a565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f821115611797576000816000526020600020601f850160051c81016020861015613b8d5750805b601f850160051c820191505b81811015613bac57828155600101613b99565b505050505050565b6001600160401b03831115613bcb57613bcb61323a565b613bdf83613bd983546138c2565b83613b64565b6000601f841160018114613c135760008515613bfb5750838201355b600019600387901b1c1916600186901b178355613c6d565b600083815260209020601f19861690835b82811015613c445786850135825560209485019460019092019101613c24565b5086821015613c615760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613cbc57600080fd5b81516133208161318d565b600082601f830112613cd857600080fd5b815160206001600160401b03821115613cf357613cf361323a565b8160051b613d02828201613279565b9283528481018201928281019087851115613d1c57600080fd5b83870192505b84831015613d44578251613d358161318d565b82529183019190830190613d22565b979650505050505050565b80516137198161318d565b600060208284031215613d6c57600080fd5b81516001600160401b0380821115613d8357600080fd5b908301906101608286031215613d9857600080fd5b613da0613250565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613de857600080fd5b613df487828601613cc7565b60c08301525060e0838101519082015261010080840151908201526101209150613e1f828401613d4f565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e5157600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220ece2f97e5f37049420403eea1739d27d704a432100da66c99ed49ffe1796440264736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeeIsAlreadyPaid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodIsOver\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodIsOverForLoser\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChoiceOutOfBounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CoreIsPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeJumpedToParentDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeNotResolved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyCommit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyVoteIDs\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HashDoesNotMatchHiddenVoteCommitment\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"JurorHasToOwnTheVote\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KlerosCoreOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotActiveForCoreDisputeID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCommitPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotVotePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsuccessfulCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VoteAlreadyCast\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"ChoiceFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"CommitCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"VoteCast\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LOSER_APPEAL_PERIOD_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LOSER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WINNER_STAKE_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areCommitsAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"areVotesAllCast\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"_commit\",\"type\":\"bytes32\"}],\"name\":\"castCommit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_voteIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_justification\",\"type\":\"string\"}],\"name\":\"castVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"changeCore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_jumpDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"changeJumpDisputeKitID\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"coreDisputeIDToLocal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"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\":\"disputes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"jumped\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromSubcourtID\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"earlyCourtJump\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeOwnerProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getCoherentCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherencePenalty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkCoherence\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getDegreeOfCoherenceReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkCoherence\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeCoherence\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"getFundedChoices\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedChoices\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getJumpDisputeKitID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"}],\"name\":\"getLocalDisputeRoundID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"localDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"localRoundID\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_currentNbVotes\",\"type\":\"uint256\"}],\"name\":\"getNbVotesAfterAppeal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningChoice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalVoted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCommitted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVoters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"choiceCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"getVoteInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"commit\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"choice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salt\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"hashVote\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_jumpDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"}],\"name\":\"isAppealFunded\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"isVoteActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jumpDisputeKitID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"singleDrawPerJuror\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_coreRoundID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"params\":{\"_choice\":\"The choice that is being funded.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"params\":{\"_commit\":\"The commitment of the juror.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"The address of the juror casting the vote commitment.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"params\":{\"_amount\":\"The amount contributed.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}},\"DisputeCreation(uint256,uint256,bytes)\":{\"params\":{\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_extraData\":\"The extra data for the dispute.\",\"_numberOfChoices\":\"The number of choices available in the dispute.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"params\":{\"_choice\":\"The choice juror voted for.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_juror\":\"Address of the juror.\",\"_justification\":\"Justification of the choice.\",\"_voteIDs\":\"The identifiers of the votes in the dispute.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"params\":{\"_amount\":\"The amount withdrawn.\",\"_choice\":\"The choice that is being funded.\",\"_contributor\":\"The address of the contributor.\",\"_coreDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_coreRoundID\":\"The identifier of the round in the Arbitrator contract.\"}}},\"kind\":\"dev\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their commits for the last round.\"}},\"areVotesAllCast(uint256)\":{\"details\":\"This function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether all of the jurors have cast their votes for the last round.\"}},\"castCommit(uint256,uint256[],bytes32)\":{\"details\":\"It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.\",\"params\":{\"_commit\":\"The commitment hash.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"details\":\"`O(n)` where `n` is the number of votes.\",\"params\":{\"_choice\":\"The choice.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_justification\":\"Justification of the choice.\",\"_salt\":\"The salt for the commit if the votes were hidden.\",\"_voteIDs\":\"The IDs of the votes.\"}},\"changeCore(address)\":{\"params\":{\"_core\":\"The new value for the `core` storage variable.\"}},\"changeJumpDisputeKitID(uint256)\":{\"params\":{\"_jumpDisputeKitID\":\"The new value for the `jumpDisputeKitID` storage variable.\"}},\"changeOwner(address)\":{\"params\":{\"_owner\":\"The new value for the `owner` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"details\":\"Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_extraData\":\"Additional info about the dispute, for possible use in future dispute kits.\",\"_nbVotes\":\"Maximal number of votes this dispute can get. Added for future-proofing.\",\"_numberOfChoices\":\"Number of choices of the dispute\"}},\"currentRuling(uint256)\":{\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,uint256)\":{\"details\":\"Access restricted to Kleros Core only.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_nonce\":\"Nonce.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"earlyCourtJump(uint256)\":{\"details\":\"Returns true if the dispute is jumping to a parent court.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the dispute is jumping to a parent court or not.\"}},\"executeOwnerProposal(address,uint256,bytes)\":{\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"fundAppeal(uint256,uint256)\":{\"params\":{\"_choice\":\"A choice that receives funding.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\"}},\"getCoherentCount(uint256,uint256)\":{\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of coherent jurors.\"}},\"getDegreeOfCoherencePenalty(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"This function is called by Kleros Core in order to determine the amount of the penalty.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_feePerJuror\":\"The fee per juror.\",\"_pnkAtStakePerJuror\":\"The PNK at stake per juror.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"pnkCoherence\":\"The degree of coherence in basis points for the dispute PNK reward.\"}},\"getDegreeOfCoherenceReward(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"This function is called by Kleros Core in order to determine the amount of the reward.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_feePerJuror\":\"The fee per juror.\",\"_pnkAtStakePerJuror\":\"The PNK at stake per juror.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"feeCoherence\":\"The degree of coherence in basis points for the dispute fee reward.\",\"pnkCoherence\":\"The degree of coherence in basis points for the dispute PNK reward.\"}},\"getFundedChoices(uint256)\":{\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\"},\"returns\":{\"fundedChoices\":\"Fully funded rulings.\"}},\"getJumpDisputeKitID()\":{\"returns\":{\"_0\":\"The ID of the dispute kit in Kleros Core disputeKits array.\"}},\"getLocalDisputeRoundID(uint256,uint256)\":{\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\"},\"returns\":{\"localDisputeID\":\"The ID of the dispute in the Dispute Kit.\",\"localRoundID\":\"The ID of the round in the Dispute Kit.\"}},\"getNbVotesAfterAppeal(address,uint256)\":{\"params\":{\"_currentNbVotes\":\"The number of votes before the appeal.\",\"_previousDisputeKit\":\"The previous Dispute Kit.\"},\"returns\":{\"_0\":\"The number of votes after the appeal.\"}},\"getNumberOfRounds(uint256)\":{\"params\":{\"_localDisputeID\":\"The ID of the dispute in the Dispute Kit.\"},\"returns\":{\"_0\":\"The number of rounds in the dispute.\"}},\"getRoundInfo(uint256,uint256,uint256)\":{\"params\":{\"_choice\":\"The choice to query.\",\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"choiceCount\":\"Number of votes cast for the queried choice.\",\"nbVoters\":\"Total number of voters in this round.\",\"tied\":\"Whether it's a tie or not.\",\"totalCommitted\":\"Number of jurors who cast the commit already (only relevant for hidden votes).\",\"totalVoted\":\"Number of jurors who cast the vote already.\",\"winningChoice\":\"The winning choice of this round.\"}},\"getVoteInfo(uint256,uint256,uint256)\":{\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core.\",\"_coreRoundID\":\"The ID of the round in Kleros Core.\",\"_voteID\":\"The ID of the vote.\"},\"returns\":{\"account\":\"The address of the juror who cast the vote.\",\"choice\":\"The choice that got the vote.\",\"commit\":\"The commit of the vote.\",\"voted\":\"Whether the vote was cast or not.\"}},\"hashVote(uint256,uint256,string)\":{\"details\":\"The unused parameters may be used by overriding contracts.\",\"params\":{\"_choice\":\"The choice being voted for\",\"_salt\":\"A random salt for commitment\"},\"returns\":{\"_0\":\"bytes32 The hash of the encoded vote parameters\"}},\"initialize(address,address,address,uint256)\":{\"params\":{\"_core\":\"The KlerosCore arbitrator.\",\"_jumpDisputeKitID\":\"The ID of the dispute kit to switch to after the court jump.\",\"_owner\":\"The owner's address.\",\"_wNative\":\"The wrapped native token address, typically wETH.\"}},\"isAppealFunded(uint256)\":{\"details\":\"This function is to be called directly by the core contract and is not for off-chain usage.\",\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\"},\"returns\":{\"_0\":\"Whether the appeal funding is finished.\"}},\"isVoteActive(uint256,uint256,uint256)\":{\"params\":{\"_coreDisputeID\":\"The ID of the dispute in Kleros Core, not in the Dispute Kit.\",\"_coreRoundID\":\"The ID of the round in Kleros Core, not in the Dispute Kit.\",\"_voteID\":\"The ID of the voter.\"},\"returns\":{\"_0\":\"Whether the voter was active or not.\"}},\"proxiableUUID()\":{\"details\":\"IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"details\":\"Withdrawals are not possible if the core contract is paused.\",\"params\":{\"_beneficiary\":\"The address whose rewards to withdraw.\",\"_choice\":\"The ruling option that the caller wants to withdraw from.\",\"_coreDisputeID\":\"Index of the dispute in Kleros Core contract.\",\"_coreRoundID\":\"The round in the Kleros Core contract the caller wants to withdraw from.\"},\"returns\":{\"amount\":\"The withdrawn amount.\"}}},\"stateVariables\":{\"version\":{\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"DisputeKitClassic\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}],\"UUPSUnauthorizedCallContext()\":[{\"notice\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"notice\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"ChoiceFunded(uint256,uint256,uint256)\":{\"notice\":\"To be emitted when a choice is fully funded for an appeal.\"},\"CommitCast(uint256,address,uint256[],bytes32)\":{\"notice\":\"To be emitted when a vote commitment is cast.\"},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"notice\":\"To be emitted when a funding contribution is made.\"},\"DisputeCreation(uint256,uint256,bytes)\":{\"notice\":\"To be emitted when a dispute is created.\"},\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"},\"VoteCast(uint256,address,uint256[],uint256,string)\":{\"notice\":\"Emitted when casting a vote to provide the justification of juror's choice.\"},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"notice\":\"To be emitted when the contributed funds are withdrawn.\"}},\"kind\":\"user\",\"methods\":{\"areCommitsAllCast(uint256)\":{\"notice\":\"Returns true if all of the jurors have cast their commits for the last round.\"},\"areVotesAllCast(uint256)\":{\"notice\":\"Returns true if all of the jurors have cast their votes for the last round.\"},\"castCommit(uint256,uint256[],bytes32)\":{\"notice\":\"Sets the caller's commit for the specified votes.\"},\"castVote(uint256,uint256[],uint256,uint256,string)\":{\"notice\":\"Sets the caller's choices for the specified votes.\"},\"changeCore(address)\":{\"notice\":\"Changes the `core` storage variable.\"},\"changeJumpDisputeKitID(uint256)\":{\"notice\":\"Changes the dispute kit ID used for the jump.\"},\"changeOwner(address)\":{\"notice\":\"Changes the `owner` storage variable.\"},\"createDispute(uint256,uint256,bytes,uint256)\":{\"notice\":\"Creates a local dispute and maps it to the dispute ID in the Core contract.\"},\"currentRuling(uint256)\":{\"notice\":\"Gets the current ruling of a specified dispute.\"},\"draw(uint256,uint256)\":{\"notice\":\"Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\"},\"executeOwnerProposal(address,uint256,bytes)\":{\"notice\":\"Allows the owner to call anything on behalf of the contract.\"},\"fundAppeal(uint256,uint256)\":{\"notice\":\"Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.\"},\"getCoherentCount(uint256,uint256)\":{\"notice\":\"Gets the number of jurors who are eligible to a reward in this round.\"},\"getDegreeOfCoherencePenalty(uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Gets the degree of coherence of a particular voter.\"},\"getDegreeOfCoherenceReward(uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Gets the degree of coherence of a particular voter.\"},\"getFundedChoices(uint256)\":{\"notice\":\"Returns the rulings that were fully funded in the latest appeal round.\"},\"getJumpDisputeKitID()\":{\"notice\":\"Returns the dispute kit ID to be used after court jump by Kleros Core.\"},\"getLocalDisputeRoundID(uint256,uint256)\":{\"notice\":\"Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\"},\"getNbVotesAfterAppeal(address,uint256)\":{\"notice\":\"Returns the number of votes after the appeal.\"},\"getNumberOfRounds(uint256)\":{\"notice\":\"Returns the number of rounds in a dispute.\"},\"getRoundInfo(uint256,uint256,uint256)\":{\"notice\":\"Returns the info of the specified round in the core contract.\"},\"getVoteInfo(uint256,uint256,uint256)\":{\"notice\":\"Returns the vote information for a given vote ID.\"},\"hashVote(uint256,uint256,string)\":{\"notice\":\"Computes the hash of a vote using ABI encoding\"},\"initialize(address,address,address,uint256)\":{\"notice\":\"Initializer.\"},\"isAppealFunded(uint256)\":{\"notice\":\"Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\"},\"isVoteActive(uint256,uint256,uint256)\":{\"notice\":\"Returns true if the specified voter was active in this round.\"},\"proxiableUUID()\":{\"notice\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade.\"},\"upgradeToAndCall(address,bytes)\":{\"notice\":\"Upgrade mechanism including access control and UUPS-compliance.\"},\"version()\":{\"notice\":\"Returns the version of the implementation.\"},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"notice\":\"Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\"}},\"notice\":\"Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":\"DisputeKitClassic\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity >=0.6.2;\\n\\nimport {IERC165} from \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC-721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n * a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC-721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\\n * {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n * a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the address zero.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf78f05f3b8c9f75570e85300d7b4600d7f6f6a198449273f31d44c1641adb46f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\"},\"src/arbitration/KlerosCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"./interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"./interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModule} from \\\"./interfaces/ISortitionModule.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\nimport {SafeSend} from \\\"../libraries/SafeSend.sol\\\";\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCore\\n/// @notice Core arbitrator contract for Kleros v2.\\n/// @dev This contract trusts the PNK token, the dispute kits and the sortition module contracts.\\ncontract KlerosCore is IArbitratorV2, Initializable, UUPSProxiable {\\n using SafeERC20 for IERC20;\\n using SafeSend for address payable;\\n\\n string public constant override version = \\\"2.0.0\\\";\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds; // Rounds of the dispute.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint96[] drawnJurorFromCourtIDs; // The courtIDs where the juror was drawn from, possibly their stake in a subcourt.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted; // True if this token is supported as payment method.\\n uint64 rateInEth; // Rate of the fee token in ETH.\\n uint8 rateDecimals; // Decimals of the fee token rate.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public owner; // The owner of the contract.\\n address public guardian; // The guardian able to pause asset withdrawals.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModule public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n bool public paused; // Whether asset withdrawals are paused.\\n address public wNative; // The wrapped native token for safeSend().\\n mapping(address => bool) public arbitrableWhitelist; // Arbitrable whitelist.\\n bool public arbitrableWhitelistEnabled; // Whether the arbitrable whitelist is enabled.\\n IERC721 public jurorNft; // Eligible jurors NFT.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when period is passed.\\n /// @param _disputeID ID of the related dispute.\\n /// @param _period The new period.\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n\\n /// @notice Emitted when appeal period starts.\\n /// @param _disputeID ID of the related dispute.\\n /// @param _arbitrable The arbitrable contract.\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @notice Emitted when the dispute is successfully appealed.\\n /// @param _disputeID ID of the related dispute.\\n /// @param _arbitrable The arbitrable contract.\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @notice Emitted when an address is successfully drawn.\\n /// @param _address The drawn address.\\n /// @param _disputeID ID of the related dispute.\\n /// @param _roundID ID of the related round.\\n /// @param _voteID ID of the vote given to the drawn juror.\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n\\n /// @notice Emitted when a new court is created.\\n /// @param _courtID ID of the new court.\\n /// @param _parent ID of the parent court.\\n /// @param _hiddenVotes Whether the court has hidden votes or not.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n\\n /// @notice Emitted when court's parameters are changed.\\n /// @param _courtID ID of the court.\\n /// @param _hiddenVotes Whether the court has hidden votes or not.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n\\n /// @notice Emitted when a dispute kit is created.\\n /// @param _disputeKitID ID of the new dispute kit.\\n /// @param _disputeKitAddress Address of the new dispute kit.\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n\\n /// @notice Emitted when a dispute kit is enabled/disabled in a court.\\n /// @param _courtID ID of the related court.\\n /// @param _disputeKitID ID of the dispute kit.\\n /// @param _enable Whether the dispute kit has been enabled or disabled.\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n\\n /// @notice Emitted when a dispute jumps to a new court.\\n /// @param _disputeID ID of the dispute.\\n /// @param _roundID ID of the round.\\n /// @param _fromCourtID ID of the previous court.\\n /// @param _toCourtID ID of the new court.\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n\\n /// @notice Emitted when a dispute jumps to a new dispute kit.\\n /// @param _disputeID ID of the dispute.\\n /// @param _roundID ID of the round.\\n /// @param _fromDisputeKitID ID of the previous dispute kit.\\n /// @param _toDisputeKitID ID of the new dispute kit.\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n\\n /// @notice Emitted when juror's balance shifts after penalties/rewards has been processed.\\n /// @param _account Juror's address.\\n /// @param _disputeID ID of the dispute.\\n /// @param _roundID ID of the round.\\n /// @param _degreeOfCoherencyPnk Juror's degree of coherency in this round applied to PNK.\\n /// @param _degreeOfCoherencyFee Juror's degree of coherency in this round applied to the dispute fee.\\n /// @param _amountPnk Amount of PNK shifted.\\n /// @param _amountFee Amount of fee shifted.\\n /// @param _feeToken Address of the fee token.\\n event JurorRewardPenalty(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherencyPnk,\\n uint256 _degreeOfCoherencyFee,\\n int256 _amountPnk,\\n int256 _amountFee,\\n IERC20 _feeToken\\n );\\n\\n /// @notice Emitted when leftover reward sent to owner.\\n /// @param _disputeID ID of the dispute.\\n /// @param _roundID ID of the round.\\n /// @param _amountPnk Amount of PNK sent.\\n /// @param _amountFee Amount of fee sent.\\n /// @param _feeToken Address of the fee token.\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _amountPnk,\\n uint256 _amountFee,\\n IERC20 _feeToken\\n );\\n\\n /// @notice Emitted when this contract is paused.\\n event Paused();\\n\\n /// @notice Emitted when this contract is unpaused.\\n event Unpaused();\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByOwner() {\\n if (owner != msg.sender) revert OwnerOnly();\\n _;\\n }\\n\\n modifier onlyByGuardianOrOwner() {\\n if (guardian != msg.sender && owner != msg.sender) revert GuardianOrOwnerOnly();\\n _;\\n }\\n\\n modifier whenPaused() {\\n if (!paused) revert WhenPausedOnly();\\n _;\\n }\\n\\n modifier whenNotPaused() {\\n if (paused) revert WhenNotPausedOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializer (constructor equivalent for upgradable contracts).\\n /// @param _owner The owner's address.\\n /// @param _guardian The guardian's address.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionExtraData The extra data for sortition module.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n /// @param _jurorNft NFT contract to vet the jurors.\\n function initialize(\\n address _owner,\\n address _guardian,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n ISortitionModule _sortitionModuleAddress,\\n address _wNative,\\n IERC721 _jurorNft\\n ) external initializer {\\n owner = _owner;\\n guardian = _guardian;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n wNative = _wNative;\\n jurorNft = _jurorNft;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n sortitionModule.createTree(FORKING_COURT, _sortitionExtraData);\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(GENERAL_COURT, _sortitionExtraData);\\n\\n uint256[] memory supportedDisputeKits = new uint256[](1);\\n supportedDisputeKits[0] = DISPUTE_KIT_CLASSIC;\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n supportedDisputeKits\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the owner can perform upgrades (`onlyByOwner`)\\n function _authorizeUpgrade(address) internal view override onlyByOwner {\\n // NOP\\n }\\n\\n /// @notice Pause staking and reward execution. Can only be done by guardian or owner.\\n function pause() external onlyByGuardianOrOwner whenNotPaused {\\n paused = true;\\n emit Paused();\\n }\\n\\n /// @notice Unpause staking and reward execution. Can only be done by owner.\\n function unpause() external onlyByOwner whenPaused {\\n paused = false;\\n emit Unpaused();\\n }\\n\\n /// @notice Allows the owner to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @notice Changes the `owner` storage variable.\\n /// @param _owner The new value for the `owner` storage variable.\\n function changeOwner(address payable _owner) external onlyByOwner {\\n owner = _owner;\\n }\\n\\n /// @notice Changes the `guardian` storage variable.\\n /// @param _guardian The new value for the `guardian` storage variable.\\n function changeGuardian(address _guardian) external onlyByOwner {\\n guardian = _guardian;\\n }\\n\\n /// @notice Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByOwner {\\n pinakion = _pinakion;\\n }\\n\\n /// @notice Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByOwner {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @notice Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModule _sortitionModule) external onlyByOwner {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @notice Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByOwner {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @notice Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _sortitionExtraData Extra data for sortition module.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n bytes memory _sortitionExtraData,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByOwner {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint96 courtID = uint96(courts.length);\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(uint96(courtID), _supportedDisputeKits[i], true);\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n sortitionModule.createTree(courtID, _sortitionExtraData);\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n /// @notice Changes the parameters of the court.\\n /// @param _courtID ID of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByOwner {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @notice Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByOwner {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @notice Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByOwner {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @notice Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByOwner {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n /// @notice Changes the `jurorNft` storage variable.\\n /// @param _jurorNft The new value for the `jurorNft` storage variable.\\n function changeJurorNft(IERC721 _jurorNft) external onlyByOwner {\\n jurorNft = _jurorNft;\\n }\\n\\n /// @notice Adds or removes an arbitrable from whitelist.\\n /// @param _arbitrable Arbitrable address.\\n /// @param _allowed Whether add or remove permission.\\n function changeArbitrableWhitelist(address _arbitrable, bool _allowed) external onlyByOwner {\\n arbitrableWhitelist[_arbitrable] = _allowed;\\n }\\n\\n /// @notice Enables or disables the arbitrable whitelist.\\n function changeArbitrableWhitelistEnabled(bool _enabled) external onlyByOwner {\\n arbitrableWhitelistEnabled = _enabled;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external whenNotPaused {\\n if (address(jurorNft) != address(0) && jurorNft.balanceOf(msg.sender) == 0) revert NotEligibleForStaking();\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @notice Sets the stake of a specified account in a court without delaying stake changes, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, true, OnError.Return);\\n }\\n\\n /// @notice Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n if (arbitrableWhitelistEnabled && !arbitrableWhitelist[msg.sender]) revert ArbitrableNotWhitelisted();\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @notice Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n // Note that we do not want to pass to Voting period if all the commits are cast because it breaks the Shutter auto-reveal currently.\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @notice Draws jurors for the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _iterations The number of iterations to run.\\n /// @return nbDrawnJurors The total number of jurors drawn in the round.\\n function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n uint256 startIndex = round.drawIterations; // for gas: less storage reads\\n uint256 i;\\n while (i < _iterations && round.drawnJurors.length < round.nbVotes) {\\n (address drawnAddress, uint96 fromSubcourtID) = disputeKit.draw(_disputeID, startIndex + i++);\\n if (drawnAddress == address(0)) {\\n continue;\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n round.drawnJurorFromCourtIDs.push(fromSubcourtID != 0 ? fromSubcourtID : dispute.courtID);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n }\\n round.drawIterations += i;\\n return round.drawnJurors.length;\\n }\\n\\n /// @notice Appeals the ruling of a specified dispute.\\n /// @dev Access restricted to the Dispute Kit for this `_disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n (uint96 newCourtID, uint256 newDisputeKitID, bool courtJump, ) = _getCourtAndDisputeKitJumps(\\n dispute,\\n round,\\n courts[dispute.courtID],\\n _disputeID\\n );\\n if (courtJump) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = _calculatePnkAtStake(court.minStake, court.alpha);\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @dev Reward distributions are forbidden during pause.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external whenNotPaused {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Note: Check-Effect-Interaction pattern is compromised here, but in the current state it doesn't cause any issues.\\n }\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 coherence = disputeKit.getDegreeOfCoherencePenalty(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Extra check to guard against degree exceeding 1, though it should be ensured by the dispute kit.\\n if (coherence > ONE_BASIS_POINT) {\\n coherence = ONE_BASIS_POINT;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ONE_BASIS_POINT - coherence)) / ONE_BASIS_POINT;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n uint96 penalizedInCourtID = round.drawnJurorFromCourtIDs[_params.repartition];\\n (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) = sortitionModule.setStakePenalty(\\n account,\\n penalizedInCourtID,\\n penalty\\n );\\n if (availablePenalty != 0) {\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit JurorRewardPenalty(\\n account,\\n _params.disputeID,\\n _params.round,\\n coherence,\\n 0,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n }\\n\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive or their balance is can't cover penalties anymore, unstake them from all courts.\\n sortitionModule.forcedUnstakeAllCourts(account);\\n } else if (newCourtStake < courts[penalizedInCourtID].minStake) {\\n // The juror's balance fell below the court minStake, unstake them from the court.\\n sortitionModule.forcedUnstake(account, penalizedInCourtID);\\n }\\n\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the owner.\\n _transferFeeToken(round.feeToken, payable(owner), round.totalFeesForJurors);\\n pinakion.safeTransfer(owner, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n (uint256 pnkCoherence, uint256 feeCoherence) = disputeKit.getDegreeOfCoherenceReward(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Extra check to guard against degree exceeding 1, though it should be ensured by the dispute kit.\\n if (pnkCoherence > ONE_BASIS_POINT) {\\n pnkCoherence = ONE_BASIS_POINT;\\n }\\n if (feeCoherence > ONE_BASIS_POINT) {\\n feeCoherence = ONE_BASIS_POINT;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = _applyCoherence(round.pnkAtStakePerJuror, pnkCoherence);\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Compute the rewards\\n uint256 pnkReward = _applyCoherence(_params.pnkPenaltiesInRound / _params.coherentCount, pnkCoherence);\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = _applyCoherence(round.totalFeesForJurors / _params.coherentCount, feeCoherence);\\n round.sumFeeRewardPaid += feeReward;\\n\\n if (feeReward != 0) {\\n // Transfer the fee reward\\n _transferFeeToken(round.feeToken, payable(account), feeReward);\\n }\\n if (pnkReward != 0) {\\n // Stake the PNK reward if possible, bypasses delayed stakes and other checks done by validateStake()\\n if (!sortitionModule.setStakeReward(account, dispute.courtID, pnkReward)) {\\n pinakion.safeTransfer(account, pnkReward);\\n }\\n }\\n if (pnkReward != 0 || feeReward != 0) {\\n emit JurorRewardPenalty(\\n account,\\n _params.disputeID,\\n _params.round,\\n pnkCoherence,\\n feeCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n }\\n\\n // Transfer any residual rewards to the owner. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(owner, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n _transferFeeToken(round.feeToken, payable(owner), leftoverFeeReward);\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @notice Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @notice Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n (, uint256 newDisputeKitID, bool courtJump, ) = _getCourtAndDisputeKitJumps(dispute, round, court, _disputeID);\\n\\n uint256 nbVotesAfterAppeal = disputeKits[newDisputeKitID].getNbVotesAfterAppeal(\\n disputeKits[round.disputeKitID],\\n round.nbVotes\\n );\\n\\n if (courtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * nbVotesAfterAppeal;\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * nbVotesAfterAppeal;\\n }\\n }\\n\\n /// @notice Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @notice Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @notice Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @notice Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @notice Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @notice Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @notice Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @notice Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (!_isCourtJumping(round, court, _disputeID)) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n /// @notice Returns the length of disputeKits array.\\n /// @return disputeKits length.\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n /// @notice Converts ETH into tokens.\\n /// @param _toToken The token to convert ETH into.\\n /// @param _amountInEth ETH amount.\\n /// @return Amount of tokens.\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @notice Returns true if the round is jumping to a parent court.\\n /// @param _round The round to check.\\n /// @param _court The court to check.\\n /// @return Whether the round is jumping to a parent court or not.\\n function _isCourtJumping(\\n Round storage _round,\\n Court storage _court,\\n uint256 _disputeID\\n ) internal view returns (bool) {\\n return\\n disputeKits[_round.disputeKitID].earlyCourtJump(_disputeID) || _round.nbVotes >= _court.jurorsForCourtJump;\\n }\\n\\n /// @notice Checks whether a dispute will jump to new court/DK, and returns new court and DK.\\n /// @param _dispute Dispute data.\\n /// @param _round Round ID.\\n /// @param _court Current court ID.\\n /// @param _disputeID Dispute ID.\\n /// @return newCourtID Court ID after jump.\\n /// @return newDisputeKitID Dispute kit ID after jump.\\n /// @return courtJump Whether the dispute jumps to a new court or not.\\n /// @return disputeKitJump Whether the dispute jumps to a new dispute kit or not.\\n function _getCourtAndDisputeKitJumps(\\n Dispute storage _dispute,\\n Round storage _round,\\n Court storage _court,\\n uint256 _disputeID\\n ) internal view returns (uint96 newCourtID, uint256 newDisputeKitID, bool courtJump, bool disputeKitJump) {\\n newCourtID = _dispute.courtID;\\n newDisputeKitID = _round.disputeKitID;\\n\\n if (!_isCourtJumping(_round, _court, _disputeID)) return (newCourtID, newDisputeKitID, false, false);\\n\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n courtJump = true;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // The current Dispute Kit is not compatible with the new court, jump to another Dispute Kit.\\n newDisputeKitID = disputeKits[_round.disputeKitID].getJumpDisputeKitID();\\n if (newDisputeKitID == NULL_DISPUTE_KIT || !courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // The new Dispute Kit is not defined or still not compatible, fall back to `DisputeKitClassic` which is always supported.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n disputeKitJump = true;\\n }\\n }\\n\\n /// @notice Internal function to transfer fee tokens (ETH or ERC20)\\n /// @param _feeToken The token to transfer (NATIVE_CURRENCY for ETH).\\n /// @param _recipient The recipient address.\\n /// @param _amount The amount to transfer.\\n function _transferFeeToken(IERC20 _feeToken, address payable _recipient, uint256 _amount) internal {\\n if (_feeToken == NATIVE_CURRENCY) {\\n _recipient.safeSend(_amount, wNative);\\n } else {\\n _feeToken.safeTransfer(_recipient, _amount);\\n }\\n }\\n\\n /// @notice Applies degree of coherence to an amount\\n /// @param _amount The base amount to apply coherence to.\\n /// @param _coherence The degree of coherence in basis points.\\n /// @return The amount after applying the degree of coherence.\\n function _applyCoherence(uint256 _amount, uint256 _coherence) internal pure returns (uint256) {\\n return (_amount * _coherence) / ONE_BASIS_POINT;\\n }\\n\\n /// @notice Calculates PNK at stake per juror based on court parameters\\n /// @param _minStake The minimum stake for the court.\\n /// @param _alpha The alpha parameter for the court in basis points.\\n /// @return The amount of PNK at stake per juror.\\n function _calculatePnkAtStake(uint256 _minStake, uint256 _alpha) internal pure returns (uint256) {\\n return (_minStake * _alpha) / ONE_BASIS_POINT;\\n }\\n\\n /// @notice Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @notice If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _noDelay True if the stake change should not be delayed.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _noDelay,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake,\\n _noDelay\\n );\\n if (stakingResult != StakingResult.Successful && stakingResult != StakingResult.Delayed) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n } else if (stakingResult == StakingResult.Delayed) {\\n return true;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @notice It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n if (_result == StakingResult.CannotStakeMoreThanMaxStakePerJuror) revert StakingMoreThanMaxStakePerJuror();\\n if (_result == StakingResult.CannotStakeMoreThanMaxTotalStaked) revert StakingMoreThanMaxTotalStaked();\\n }\\n\\n /// @notice Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// @dev If `_extraData` contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error OwnerOnly();\\n error GuardianOrOwnerOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error NotEligibleForStaking();\\n error StakingMoreThanMaxStakePerJuror();\\n error StakingMoreThanMaxTotalStaked();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrableNotWhitelisted();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error WhenNotPausedOnly();\\n error WhenPausedOnly();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0xcb6d1b26b8a595effc86f8d19a42aef42a20c23c28d361b084c62e0a332e3cf3\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {DisputeKitClassicBase, KlerosCore} from \\\"./DisputeKitClassicBase.sol\\\";\\n\\n/// @title DisputeKitClassic\\n/// @notice Dispute kit implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\ncontract DisputeKitClassic is DisputeKitClassicBase {\\n string public constant override version = \\\"2.0.0\\\";\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializer.\\n /// @param _owner The owner's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump.\\n function initialize(\\n address _owner,\\n KlerosCore _core,\\n address _wNative,\\n uint256 _jumpDisputeKitID\\n ) external initializer {\\n __DisputeKitClassicBase_initialize(_owner, _core, _wNative, _jumpDisputeKitID);\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the owner can perform upgrades (`onlyByOwner`)\\n function _authorizeUpgrade(address) internal view override onlyByOwner {\\n // NOP\\n }\\n}\\n\",\"keccak256\":\"0xf87fdd5b448a31b915bd881760a7c1ac1ad697d051d1357b5831476125256237\",\"license\":\"MIT\"},\"src/arbitration/dispute-kits/DisputeKitClassicBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {KlerosCore, IDisputeKit, ISortitionModule} from \\\"../KlerosCore.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {SafeSend} from \\\"../../libraries/SafeSend.sol\\\";\\nimport {ONE_BASIS_POINT, DISPUTE_KIT_CLASSIC} from \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title DisputeKitClassicBase\\n/// @notice Abstract Dispute kit classic implementation of the Kleros v1 features including:\\n/// - a drawing system: proportional to staked PNK,\\n/// - a vote aggregation system: plurality,\\n/// - an incentive system: equal split between coherent votes,\\n/// - an appeal system: fund 2 choices only, vote on any choice.\\nabstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxiable {\\n using SafeSend for address payable;\\n\\n // ************************************* //\\n // * Structs * //\\n // ************************************* //\\n\\n struct Dispute {\\n Round[] rounds; // Rounds of the dispute. 0 is the default round, and [1, ..n] are the appeal rounds.\\n uint256 numberOfChoices; // The number of choices jurors have when voting. This does not include choice `0` which is reserved for \\\"refuse to arbitrate\\\".\\n bool jumped; // True if dispute jumped to a parent dispute kit and won't be handled by this DK anymore.\\n mapping(uint256 => uint256) coreRoundIDToLocal; // Maps id of the round in the core contract to the index of the round of related local dispute.\\n bytes extraData; // Extradata for the dispute.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Round {\\n Vote[] votes; // Former votes[_appeal][].\\n uint256 winningChoice; // The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.\\n mapping(uint256 => uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.\\n bool tied; // True if there is a tie, false otherwise.\\n uint256 totalVoted; // Former uint[_appeal] votesInEachRound.\\n uint256 totalCommitted; // Former commitsInRound.\\n mapping(uint256 choiceId => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 choiceId => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address account => mapping(uint256 choiceId => uint256)) contributions; // Maps contributors to their contributions for each choice.\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the ruling that ultimately wins a dispute.\\n uint256[] fundedChoices; // Stores the choices that are fully funded.\\n mapping(address drawnAddress => bool) alreadyDrawn; // True if the address has already been drawn, false by default.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Vote {\\n bool voted; // True if the vote has been cast.\\n address account; // The address of the juror.\\n bytes32 commit; // The commit of the juror. For courts with hidden votes.\\n uint256 choice; // The choice of the juror.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant WINNER_STAKE_MULTIPLIER = 10000; // Multiplier of the appeal cost that the winner has to pay as fee stake for a round in basis points. Default is 1x of appeal fee.\\n uint256 public constant LOSER_STAKE_MULTIPLIER = 20000; // Multiplier of the appeal cost that the loser has to pay as fee stake for a round in basis points. Default is 2x of appeal fee.\\n uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for the choice that wasn't voted for in the previous round, in basis points. Default is 1/2 of original appeal period.\\n\\n address public owner; // The owner of the contract.\\n KlerosCore public core; // The Kleros Core arbitrator\\n Dispute[] public disputes; // Array of the locally created disputes.\\n mapping(uint256 => uint256) public coreDisputeIDToLocal; // Maps the dispute ID in Kleros Core to the local dispute ID.\\n bool public singleDrawPerJuror; // Whether each juror can only draw once per dispute, false by default.\\n mapping(uint256 coreDisputeID => bool) public coreDisputeIDToActive; // True if this dispute kit is active for this core dispute ID.\\n address public wNative; // The wrapped native token for safeSend().\\n uint256 public jumpDisputeKitID; // The ID of the dispute kit in Kleros Core disputeKits array that the dispute should switch to after the court jump, in case the new court doesn't support this dispute kit.\\n\\n uint256[50] private __gap; // Reserved slots for future upgrades.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _numberOfChoices The number of choices available in the dispute.\\n /// @param _extraData The extra data for the dispute.\\n event DisputeCreation(uint256 indexed _coreDisputeID, uint256 _numberOfChoices, bytes _extraData);\\n\\n /// @notice To be emitted when a vote commitment is cast.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror The address of the juror casting the vote commitment.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _commit The commitment of the juror.\\n event CommitCast(uint256 indexed _coreDisputeID, address indexed _juror, uint256[] _voteIDs, bytes32 _commit);\\n\\n /// @notice To be emitted when a funding contribution is made.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount contributed.\\n event Contribution(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @notice To be emitted when the contributed funds are withdrawn.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n /// @param _contributor The address of the contributor.\\n /// @param _amount The amount withdrawn.\\n event Withdrawal(\\n uint256 indexed _coreDisputeID,\\n uint256 indexed _coreRoundID,\\n uint256 _choice,\\n address indexed _contributor,\\n uint256 _amount\\n );\\n\\n /// @notice To be emitted when a choice is fully funded for an appeal.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _coreRoundID The identifier of the round in the Arbitrator contract.\\n /// @param _choice The choice that is being funded.\\n event ChoiceFunded(uint256 indexed _coreDisputeID, uint256 indexed _coreRoundID, uint256 indexed _choice);\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByOwner() {\\n if (owner != msg.sender) revert OwnerOnly();\\n _;\\n }\\n\\n modifier onlyByCore() {\\n if (address(core) != msg.sender) revert KlerosCoreOnly();\\n _;\\n }\\n\\n modifier notJumped(uint256 _coreDisputeID) {\\n if (disputes[coreDisputeIDToLocal[_coreDisputeID]].jumped) revert DisputeJumpedToParentDK();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @notice Initializer.\\n /// @param _owner The owner's address.\\n /// @param _core The KlerosCore arbitrator.\\n /// @param _wNative The wrapped native token address, typically wETH.\\n /// @param _jumpDisputeKitID The ID of the dispute kit to switch to after the court jump.\\n function __DisputeKitClassicBase_initialize(\\n address _owner,\\n KlerosCore _core,\\n address _wNative,\\n uint256 _jumpDisputeKitID\\n ) internal onlyInitializing {\\n owner = _owner;\\n core = _core;\\n wNative = _wNative;\\n jumpDisputeKitID = _jumpDisputeKitID;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @notice Allows the owner to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @notice Changes the `owner` storage variable.\\n /// @param _owner The new value for the `owner` storage variable.\\n function changeOwner(address payable _owner) external onlyByOwner {\\n owner = _owner;\\n }\\n\\n /// @notice Changes the `core` storage variable.\\n /// @param _core The new value for the `core` storage variable.\\n function changeCore(address _core) external onlyByOwner {\\n core = KlerosCore(_core);\\n }\\n\\n /// @notice Changes the dispute kit ID used for the jump.\\n /// @param _jumpDisputeKitID The new value for the `jumpDisputeKitID` storage variable.\\n function changeJumpDisputeKitID(uint256 _jumpDisputeKitID) external onlyByOwner {\\n jumpDisputeKitID = _jumpDisputeKitID;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc IDisputeKit\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 /*_nbVotes*/\\n ) external override onlyByCore {\\n uint256 localDisputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.numberOfChoices = _numberOfChoices;\\n dispute.extraData = _extraData;\\n dispute.jumped = false; // Possibly true if this DK has jumped in a previous round.\\n\\n // New round in the Core should be created before the dispute creation in DK.\\n dispute.coreRoundIDToLocal[core.getNumberOfRounds(_coreDisputeID) - 1] = dispute.rounds.length;\\n\\n Round storage round = dispute.rounds.push();\\n round.tied = true;\\n\\n coreDisputeIDToLocal[_coreDisputeID] = localDisputeID;\\n coreDisputeIDToActive[_coreDisputeID] = true;\\n emit DisputeCreation(_coreDisputeID, _numberOfChoices, _extraData);\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external override onlyByCore notJumped(_coreDisputeID) returns (address drawnAddress, uint96 fromSubcourtID) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n\\n ISortitionModule sortitionModule = core.sortitionModule();\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (drawnAddress, fromSubcourtID) = sortitionModule.draw(courtID, _coreDisputeID, _nonce);\\n if (drawnAddress == address(0)) {\\n // Sortition can return 0 address if no one has staked yet.\\n return (drawnAddress, fromSubcourtID);\\n }\\n\\n if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {\\n Vote storage vote = round.votes.push();\\n vote.account = drawnAddress;\\n round.alreadyDrawn[drawnAddress] = true;\\n } else {\\n drawnAddress = address(0);\\n }\\n }\\n\\n /// @notice Sets the caller's commit for the specified votes.\\n ///\\n /// @dev It can be called multiple times during the commit period, each call overrides the commits of the previous one.\\n /// `O(n)` where `n` is the number of votes.\\n ///\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _commit The commitment hash.\\n function castCommit(uint256 _coreDisputeID, uint256[] calldata _voteIDs, bytes32 _commit) external {\\n _castCommit(_coreDisputeID, _voteIDs, _commit);\\n }\\n\\n function _castCommit(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n bytes32 _commit\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n if (period != KlerosCore.Period.commit) revert NotCommitPeriod();\\n if (_commit == bytes32(0)) revert EmptyCommit();\\n if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID();\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n if (round.votes[_voteIDs[i]].account != msg.sender) revert JurorHasToOwnTheVote();\\n round.votes[_voteIDs[i]].commit = _commit;\\n }\\n round.totalCommitted += _voteIDs.length;\\n emit CommitCast(_coreDisputeID, msg.sender, _voteIDs, _commit);\\n }\\n\\n /// @notice Sets the caller's choices for the specified votes.\\n ///\\n /// @dev `O(n)` where `n` is the number of votes.\\n ///\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _voteIDs The IDs of the votes.\\n /// @param _choice The choice.\\n /// @param _salt The salt for the commit if the votes were hidden.\\n /// @param _justification Justification of the choice.\\n function castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification\\n ) external {\\n _castVote(_coreDisputeID, _voteIDs, _choice, _salt, _justification, msg.sender);\\n }\\n\\n function _castVote(\\n uint256 _coreDisputeID,\\n uint256[] calldata _voteIDs,\\n uint256 _choice,\\n uint256 _salt,\\n string memory _justification,\\n address _juror\\n ) internal notJumped(_coreDisputeID) {\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n if (period != KlerosCore.Period.vote) revert NotVotePeriod();\\n if (_voteIDs.length == 0) revert EmptyVoteIDs();\\n if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID();\\n\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n if (_choice > dispute.numberOfChoices) revert ChoiceOutOfBounds();\\n\\n uint256 localRoundID = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[localRoundID];\\n {\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , ) = core.courts(courtID);\\n bytes32 actualVoteHash = hashVote(_choice, _salt, _justification);\\n\\n // Save the votes.\\n for (uint256 i = 0; i < _voteIDs.length; i++) {\\n if (round.votes[_voteIDs[i]].account != _juror) revert JurorHasToOwnTheVote();\\n if (hiddenVotes && _getExpectedVoteHash(localDisputeID, localRoundID, _voteIDs[i]) != actualVoteHash)\\n revert HashDoesNotMatchHiddenVoteCommitment();\\n if (round.votes[_voteIDs[i]].voted) revert VoteAlreadyCast();\\n round.votes[_voteIDs[i]].choice = _choice;\\n round.votes[_voteIDs[i]].voted = true;\\n }\\n } // Workaround stack too deep\\n\\n round.totalVoted += _voteIDs.length;\\n\\n round.counts[_choice] += _voteIDs.length;\\n if (_choice == round.winningChoice) {\\n if (round.tied) round.tied = false;\\n } else {\\n // Voted for another choice.\\n if (round.counts[_choice] == round.counts[round.winningChoice]) {\\n // Tie.\\n if (!round.tied) round.tied = true;\\n } else if (round.counts[_choice] > round.counts[round.winningChoice]) {\\n // New winner.\\n round.winningChoice = _choice;\\n round.tied = false;\\n }\\n }\\n emit VoteCast(_coreDisputeID, _juror, _voteIDs, _choice, _justification);\\n }\\n\\n /// @notice Manages contributions, and appeals a dispute if at least two choices are fully funded.\\n /// Note that the surplus deposit will be reimbursed.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _choice A choice that receives funding.\\n function fundAppeal(uint256 _coreDisputeID, uint256 _choice) external payable notJumped(_coreDisputeID) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n if (_choice > dispute.numberOfChoices) revert ChoiceOutOfBounds();\\n if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID();\\n\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n if (block.timestamp < appealPeriodStart || block.timestamp >= appealPeriodEnd) revert AppealPeriodIsOver();\\n\\n uint256 multiplier;\\n (uint256 ruling, , ) = this.currentRuling(_coreDisputeID);\\n if (ruling == _choice) {\\n multiplier = WINNER_STAKE_MULTIPLIER;\\n } else {\\n if (\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT\\n ) {\\n revert AppealPeriodIsOverForLoser();\\n }\\n multiplier = LOSER_STAKE_MULTIPLIER;\\n }\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n uint256 coreRoundID = core.getNumberOfRounds(_coreDisputeID) - 1;\\n\\n if (round.hasPaid[_choice]) revert AppealFeeIsAlreadyPaid();\\n uint256 appealCost = core.appealCost(_coreDisputeID);\\n uint256 totalCost = appealCost + (appealCost * multiplier) / ONE_BASIS_POINT;\\n\\n // Take up to the amount necessary to fund the current round at the current costs.\\n uint256 contribution;\\n if (totalCost > round.paidFees[_choice]) {\\n contribution = totalCost - round.paidFees[_choice] > msg.value // Overflows and underflows will be managed on the compiler level.\\n ? msg.value\\n : totalCost - round.paidFees[_choice];\\n emit Contribution(_coreDisputeID, coreRoundID, _choice, msg.sender, contribution);\\n }\\n\\n round.contributions[msg.sender][_choice] += contribution;\\n round.paidFees[_choice] += contribution;\\n if (round.paidFees[_choice] >= totalCost) {\\n round.feeRewards += round.paidFees[_choice];\\n round.fundedChoices.push(_choice);\\n round.hasPaid[_choice] = true;\\n emit ChoiceFunded(_coreDisputeID, coreRoundID, _choice);\\n }\\n\\n if (round.fundedChoices.length > 1) {\\n // At least two sides are fully funded.\\n round.feeRewards = round.feeRewards - appealCost;\\n\\n if (core.isDisputeKitJumping(_coreDisputeID)) {\\n // Don't create a new round in case of a jump, and remove local dispute from the flow.\\n dispute.jumped = true;\\n } else {\\n // Don't subtract 1 from length since both round arrays haven't been updated yet.\\n dispute.coreRoundIDToLocal[coreRoundID + 1] = dispute.rounds.length;\\n\\n Round storage newRound = dispute.rounds.push();\\n newRound.tied = true;\\n }\\n core.appeal{value: appealCost}(_coreDisputeID, dispute.numberOfChoices, dispute.extraData);\\n }\\n\\n if (msg.value > contribution) payable(msg.sender).safeSend(msg.value - contribution, wNative);\\n }\\n\\n /// @notice Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n /// @dev Withdrawals are not possible if the core contract is paused.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core contract.\\n /// @param _beneficiary The address whose rewards to withdraw.\\n /// @param _coreRoundID The round in the Kleros Core contract the caller wants to withdraw from.\\n /// @param _choice The ruling option that the caller wants to withdraw from.\\n /// @return amount The withdrawn amount.\\n function withdrawFeesAndRewards(\\n uint256 _coreDisputeID,\\n address payable _beneficiary,\\n uint256 _coreRoundID,\\n uint256 _choice\\n ) external returns (uint256 amount) {\\n (, , , bool isRuled, ) = core.disputes(_coreDisputeID);\\n if (!isRuled) revert DisputeNotResolved();\\n if (core.paused()) revert CoreIsPaused();\\n if (!coreDisputeIDToActive[_coreDisputeID]) revert NotActiveForCoreDisputeID();\\n\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 finalRuling, , ) = core.currentRuling(_coreDisputeID);\\n\\n if (!round.hasPaid[_choice]) {\\n // Allow to reimburse if funding was unsuccessful for this ruling option.\\n amount = round.contributions[_beneficiary][_choice];\\n } else {\\n // Funding was successful for this ruling option.\\n if (_choice == finalRuling) {\\n // This ruling option is the ultimate winner.\\n amount = round.paidFees[_choice] > 0\\n ? (round.contributions[_beneficiary][_choice] * round.feeRewards) / round.paidFees[_choice]\\n : 0;\\n } else if (!round.hasPaid[finalRuling]) {\\n // The ultimate winner was not funded in this round. In this case funded ruling option(s) are reimbursed.\\n amount =\\n (round.contributions[_beneficiary][_choice] * round.feeRewards) /\\n (round.paidFees[round.fundedChoices[0]] + round.paidFees[round.fundedChoices[1]]);\\n }\\n }\\n round.contributions[_beneficiary][_choice] = 0;\\n\\n if (amount != 0) {\\n _beneficiary.safeSend(amount, wNative);\\n emit Withdrawal(_coreDisputeID, _coreRoundID, _choice, _beneficiary, amount);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Computes the hash of a vote using ABI encoding\\n /// @dev The unused parameters may be used by overriding contracts.\\n /// @param _choice The choice being voted for\\n /// @param _salt A random salt for commitment\\n /// @return bytes32 The hash of the encoded vote parameters\\n function hashVote(\\n uint256 _choice,\\n uint256 _salt,\\n string memory /*_justification*/\\n ) public view virtual returns (bytes32) {\\n return keccak256(abi.encodePacked(_choice, _salt));\\n }\\n\\n /// @notice Returns the rulings that were fully funded in the latest appeal round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @return fundedChoices Fully funded rulings.\\n function getFundedChoices(uint256 _coreDisputeID) public view returns (uint256[] memory fundedChoices) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage lastRound = dispute.rounds[dispute.rounds.length - 1];\\n return lastRound.fundedChoices;\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function currentRuling(\\n uint256 _coreDisputeID\\n ) external view override returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n tied = round.tied;\\n ruling = tied ? 0 : round.winningChoice;\\n (, , KlerosCore.Period period, , ) = core.disputes(_coreDisputeID);\\n // Override the final ruling if only one side funded the appeals.\\n if (period == KlerosCore.Period.execution) {\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n if (fundedChoices.length == 1) {\\n ruling = fundedChoices[0];\\n tied = false;\\n overridden = true;\\n }\\n }\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function getDegreeOfCoherenceReward(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256 pnkCoherence, uint256 feeCoherence) {\\n uint256 coherence = _getDegreeOfCoherence(_coreDisputeID, _coreRoundID, _voteID);\\n return (coherence, coherence);\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function getDegreeOfCoherencePenalty(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 /* _feePerJuror */,\\n uint256 /* _pnkAtStakePerJuror */\\n ) external view override returns (uint256 pnkCoherence) {\\n return _getDegreeOfCoherence(_coreDisputeID, _coreRoundID, _voteID);\\n }\\n\\n function _getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) internal view returns (uint256 coherence) {\\n // In this contract this degree can be either 0 or 1, but in other dispute kits this value can be something in between.\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (vote.voted && (vote.choice == winningChoice || tied)) {\\n return ONE_BASIS_POINT;\\n } else {\\n return 0;\\n }\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view override returns (uint256) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage currentRound = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n (uint256 winningChoice, bool tied, ) = core.currentRuling(_coreDisputeID);\\n\\n if (currentRound.totalVoted == 0 || (!tied && currentRound.counts[winningChoice] == 0)) {\\n return 0;\\n } else if (tied) {\\n return currentRound.totalVoted;\\n } else {\\n return currentRound.counts[winningChoice];\\n }\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function areCommitsAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n return round.totalCommitted == round.votes.length;\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function areVotesAllCast(uint256 _coreDisputeID) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n\\n (uint96 courtID, , , , ) = core.disputes(_coreDisputeID);\\n (, bool hiddenVotes, , , , ) = core.courts(courtID);\\n uint256 expectedTotalVoted = hiddenVotes ? round.totalCommitted : round.votes.length;\\n\\n return round.totalVoted == expectedTotalVoted;\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function isAppealFunded(uint256 _coreDisputeID) external view override returns (bool) {\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = core.appealPeriod(_coreDisputeID);\\n\\n uint256[] memory fundedChoices = getFundedChoices(_coreDisputeID);\\n // Uses block.timestamp from the current tx when called by the core contract.\\n return (fundedChoices.length == 0 &&\\n block.timestamp - appealPeriodStart >=\\n ((appealPeriodEnd - appealPeriodStart) * LOSER_APPEAL_PERIOD_MULTIPLIER) / ONE_BASIS_POINT);\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function earlyCourtJump(uint256 /* _coreDisputeID */) external pure override returns (bool) {\\n return false;\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function getNbVotesAfterAppeal(\\n IDisputeKit /* _previousDisputeKit */,\\n uint256 _currentNbVotes\\n ) external pure override returns (uint256) {\\n return (_currentNbVotes * 2) + 1;\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function getJumpDisputeKitID() external view override returns (uint256) {\\n // Fall back to classic DK in case the jump ID is not defined.\\n return jumpDisputeKitID == 0 ? DISPUTE_KIT_CLASSIC : jumpDisputeKitID;\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function isVoteActive(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (bool) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return vote.voted;\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n override\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommitted,\\n uint256 nbVoters,\\n uint256 choiceCount\\n )\\n {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Round storage round = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]];\\n return (\\n round.winningChoice,\\n round.tied,\\n round.totalVoted,\\n round.totalCommitted,\\n round.votes.length,\\n round.counts[_choice]\\n );\\n }\\n\\n /// @notice Returns the number of rounds in a dispute.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return The number of rounds in the dispute.\\n function getNumberOfRounds(uint256 _localDisputeID) external view returns (uint256) {\\n return disputes[_localDisputeID].rounds.length;\\n }\\n\\n /// @notice Returns the local dispute ID and round ID for a given core dispute ID and core round ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @return localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @return localRoundID The ID of the round in the Dispute Kit.\\n function getLocalDisputeRoundID(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID\\n ) external view returns (uint256 localDisputeID, uint256 localRoundID) {\\n localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n localRoundID = disputes[localDisputeID].coreRoundIDToLocal[_coreRoundID];\\n }\\n\\n /// @inheritdoc IDisputeKit\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view override returns (address account, bytes32 commit, uint256 choice, bool voted) {\\n Dispute storage dispute = disputes[coreDisputeIDToLocal[_coreDisputeID]];\\n Vote storage vote = dispute.rounds[dispute.coreRoundIDToLocal[_coreRoundID]].votes[_voteID];\\n return (vote.account, vote.commit, vote.choice, vote.voted);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @notice Returns the expected vote hash for a given vote.\\n /// @param _localDisputeID The ID of the dispute in the Dispute Kit.\\n /// @param _localRoundID The ID of the round in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @return The expected vote hash.\\n function _getExpectedVoteHash(\\n uint256 _localDisputeID,\\n uint256 _localRoundID,\\n uint256 _voteID\\n ) internal view virtual returns (bytes32) {\\n return disputes[_localDisputeID].rounds[_localRoundID].votes[_voteID].commit;\\n }\\n\\n /// @notice Checks that the chosen address satisfies certain conditions for being drawn.\\n ///\\n /// @dev No need to check the minStake requirement here because of the implicit staking in parent courts.\\n /// minStake is checked directly during staking process however it's possible for the juror to get drawn\\n /// while having < minStake if it is later increased by governance.\\n /// This issue is expected and harmless.\\n ///\\n /// @param _coreDisputeID ID of the dispute in the core contract.\\n /// @param _juror Chosen address.\\n /// @return result Whether the address passes the check or not.\\n function _postDrawCheck(\\n Round storage /*_round*/,\\n uint256 _coreDisputeID,\\n address _juror\\n ) internal view virtual returns (bool result) {\\n if (singleDrawPerJuror) {\\n uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];\\n Dispute storage dispute = disputes[localDisputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n result = !round.alreadyDrawn[_juror];\\n } else {\\n result = true;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error OwnerOnly();\\n error KlerosCoreOnly();\\n error DisputeJumpedToParentDK();\\n error UnsuccessfulCall();\\n error NotCommitPeriod();\\n error EmptyCommit();\\n error NotActiveForCoreDisputeID();\\n error JurorHasToOwnTheVote();\\n error NotVotePeriod();\\n error EmptyVoteIDs();\\n error ChoiceOutOfBounds();\\n error HashDoesNotMatchHiddenVoteCommitment();\\n error VoteAlreadyCast();\\n error AppealPeriodIsOver();\\n error AppealPeriodIsOverForLoser();\\n error AppealFeeIsAlreadyPaid();\\n error DisputeNotResolved();\\n error CoreIsPaused();\\n}\\n\",\"keccak256\":\"0x15d38f814fc59844571eddbfddad77730cc541f8b86cd094139f4c8771dde011\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation which calls `arbitrator.createDispute{value: _fee}(_choices,_extraData)`.\\ninterface IArbitrableV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created to link the correct template to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId\\n );\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Give a ruling for a dispute.\\n ///\\n /// @dev This is a callback function for the arbitrator to provide the ruling to this contract.\\n /// Only the arbitrator must be allowed to call this function.\\n /// Ruling 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n ///\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x3afa29a93847399c8705103350b69bb70706b2075ca41b39d523b007e69e23db\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// @notice Arbitrator interface for the Kleros V2 protocol.\\n/// @dev Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\ninterface IArbitratorV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @notice To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @notice To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in ETH.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @notice Create a dispute and pay for the fees in a supported ERC20 token.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in the supported ERC20 token.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @notice Compute the cost of arbitration denominated in `_feeToken`.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @notice Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x65ba87c5309cd6e6562e569f79778ca423c9be7b0a44b9407e5bd2bdf8fdc3b0\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// @notice An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// @dev It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @notice Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// @dev Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. Added for future-proofing.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @notice Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// @dev Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external returns (address drawnAddress, uint96 fromSubcourtID);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @notice Gets the degree of coherence of a particular voter.\\n /// @dev This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward.\\n /// @return feeCoherence The degree of coherence in basis points for the dispute fee reward.\\n function getDegreeOfCoherenceReward(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256 pnkCoherence, uint256 feeCoherence);\\n\\n /// @notice Gets the degree of coherence of a particular voter.\\n /// @dev This function is called by Kleros Core in order to determine the amount of the penalty.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward.\\n function getDegreeOfCoherencePenalty(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256 pnkCoherence);\\n\\n /// @notice Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @notice Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns true if all of the jurors have cast their votes for the last round.\\n /// @dev This function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @dev This function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the dispute is jumping to a parent court.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the dispute is jumping to a parent court or not.\\n function earlyCourtJump(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns the number of votes after the appeal.\\n /// @param _previousDisputeKit The previous Dispute Kit.\\n /// @param _currentNbVotes The number of votes before the appeal.\\n /// @return The number of votes after the appeal.\\n function getNbVotesAfterAppeal(\\n IDisputeKit _previousDisputeKit,\\n uint256 _currentNbVotes\\n ) external view returns (uint256);\\n\\n /// @notice Returns the dispute kit ID to be used after court jump by Kleros Core.\\n /// @return The ID of the dispute kit in Kleros Core disputeKits array.\\n function getJumpDisputeKitID() external view returns (uint256);\\n\\n /// @notice Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n /// @notice Returns the info of the specified round in the core contract.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _choice The choice to query.\\n /// @return winningChoice The winning choice of this round.\\n /// @return tied Whether it's a tie or not.\\n /// @return totalVoted Number of jurors who cast the vote already.\\n /// @return totalCommited Number of jurors who cast the commit already (only relevant for hidden votes).\\n /// @return nbVoters Total number of voters in this round.\\n /// @return choiceCount Number of votes cast for the queried choice.\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n /// @notice Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n /// @return choice The choice that got the vote.\\n /// @return voted Whether the vote was cast or not.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0x1f12d2574dffd9bf83cf33a54aa4abbbfa4203251a0f962edd8e5c3b370408bc\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title ISortitionModule\\n/// @notice Interface for the SortitionModule contract.\\ninterface ISortitionModule {\\n // ************************************* //\\n // * Enums * //\\n // ************************************* //\\n\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when the phase is changed.\\n /// @param _phase The new phase.\\n event NewPhase(Phase _phase);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Passes the phase.\\n function passPhase() external;\\n\\n /// @notice Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external;\\n\\n /// @notice Create a sortition sum tree at the specified key.\\n /// @param _courtID The ID of the court.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(uint96 _courtID, bytes memory _extraData) external;\\n\\n /// @notice Validate the specified juror's new stake for a court.\\n /// @dev No state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _noDelay True if the stake change should not be delayed.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _noDelay\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n /// @notice Update the state of the stakes, called by KC at the end of setStake flow.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _pnkDeposit The amount of PNK to be deposited.\\n /// @param _pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @param _newStake The new stake.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n /// @notice Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _penalty The amount of PNK to be deducted.\\n /// @return pnkBalance The updated total PNK balance of the juror, including the penalty.\\n /// @return newCourtStake The updated stake of the juror in the court.\\n /// @return availablePenalty The amount of PNK that was actually deducted.\\n function setStakePenalty(\\n address _account,\\n uint96 _courtID,\\n uint256 _penalty\\n ) external returns (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty);\\n\\n /// @notice Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _reward The amount of PNK to be deposited as a reward.\\n /// @return success True if the reward was added successfully.\\n function setStakeReward(address _account, uint96 _courtID, uint256 _reward) external returns (bool success);\\n\\n /// @notice Unstakes the inactive juror from all courts.\\n ///\\n /// @dev `O(n * (p * log_k(j)) )` where\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The juror to unstake.\\n function forcedUnstakeAllCourts(address _account) external;\\n\\n /// @notice Unstakes the inactive juror from a specific court.\\n ///\\n /// @dev `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The juror to unstake.\\n /// @param _courtID The ID of the court.\\n function forcedUnstake(address _account, uint96 _courtID) external;\\n\\n /// @notice Locks the tokens of the drawn juror.\\n /// @param _account The address of the juror.\\n /// @param _relativeAmount The amount to lock.\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n /// @notice Unlocks the tokens of the drawn juror.\\n /// @param _account The address of the juror.\\n /// @param _relativeAmount The amount to unlock.\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n /// @notice Triggers the state changes after dispute creation.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _roundID The ID of the round.\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n /// @notice Triggers the state changes after drawing.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _roundID The ID of the round.\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n /// @notice Gives back the locked PNKs in case the juror fully unstaked earlier.\\n ///\\n /// @dev that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance\\n /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked).\\n /// In this case the juror can use this function to withdraw the leftover tokens.\\n /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\\n ///\\n /// @param _account The juror whose PNK to withdraw.\\n function withdrawLeftoverPNK(address _account) external;\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Draw an ID from a tree using a number.\\n ///\\n /// @dev that this function reverts if the sum of all values in the tree is 0.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n ///\\n /// @param _courtID The ID of the court.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _nonce Nonce to hash with random number.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint96 _courtID,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external view returns (address drawnAddress, uint96 fromSubcourtID);\\n\\n /// @notice Gets the balance of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return totalStakedPnk The total amount of tokens staked including locked tokens and penalty deductions. Equivalent to the effective stake in the General court.\\n /// @return totalLocked The total amount of tokens locked in disputes.\\n /// @return stakedInCourt The amount of tokens staked in the specified court including locked tokens and penalty deductions.\\n /// @return nbCourts The number of courts the juror has directly staked in.\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStakedPnk, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n /// @notice Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n /// @notice Checks if the juror is staked in any court.\\n /// @param _juror The address of the juror.\\n /// @return Whether the juror is staked or not.\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n /// @notice Checks if the juror has any leftover PNK in the contract.\\n /// @param _juror The address of the juror.\\n /// @return Whether the juror has leftover PNK.\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3eeff4281ddf3c731c6503094bbbcc80d8015e3a60a27c8cadadfffdf1bf5437\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\n// Units\\nuint256 constant ONE_BASIS_POINT = 10000;\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0xb8c96c842259ca1384e8450dfb214f0fcd604829c84293dd3f8981f3421b66c9\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n///\\n/// @notice Wrappers around ERC20 operations\\n///\\n/// @dev Throws on failure (when the token contract returns false).\\n/// Tokens that return no value (and instead revert or throw on failure) are also supported.\\n/// Non-reverting calls are assumed to be successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @notice Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @notice Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @notice Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x36b92f984484f9dfd63a40ccb1c1e23cde0085db36ec8adb7afe7e98ef667bd7\",\"license\":\"MIT\"},\"src/libraries/SafeSend.sol\":{\"content\":\"/**\\n * @authors: [@andreimvp]\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\n * @auditors: []\\n * @bounties: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity ^0.8.24;\\n\\ninterface WethLike {\\n function deposit() external payable;\\n\\n function transfer(address dst, uint256 wad) external;\\n}\\n\\nlibrary SafeSend {\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\n if (_to.send(_value)) return;\\n\\n WethLike(_wethLike).deposit{value: _value}();\\n WethLike(_wethLike).transfer(_to, _value); /// forge-lint: disable-line(erc20-unchecked-transfer)\\n }\\n}\\n\",\"keccak256\":\"0xd4d5b25d0eb7f7965ea7a9e3d3d6bc13368de9aaf882543a75dc9c57c85e9283\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `initializer()`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0xdad09e5f773fa6940dbd8c28480f602a7eaa3c70d3da9d06df140187cbf5dad4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @notice This contract implements an upgradeability mechanism designed for UUPS proxies.\\n///\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @notice Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @notice The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @notice The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @notice The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// @dev IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @notice Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\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\",\"keccak256\":\"0xa369061748e8a7b02873d597d4c78a2a09328111f04a97428b1c209e82cf5414\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a080604052346100c157306080525f5160206133bf5f395f51905f525460ff8160401c166100b3576002600160401b03196001600160401b03821601610060575b6040516132f990816100c682396080518181816117f601526118a60152f35b6001600160401b0319166001600160401b039081175f5160206133bf5f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80610041565b62dc149f60e41b5f5260045ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c9081630855bbe914612836575080630baa64d1146127e25780631200aabc146127b8578063149a5dc0146127a55780631c3db16d146126755780631cc3423a146126335780632621b9a2146126115780632d68efc9146125eb578063362c34791461222d5780634b2f0ea014611ad65780634e514a1b14611ab95780634f1ef2861461185557806352d1902d146117db57806354fd4d501461177a578063564a565d1461166e5780635c92e2f6146113fc57806365540b961461139a57806369f3f041146113095780636a8c9194146112725780636d4cd8ea1461111e57806372d610d9146110e35780637c04034e14610b915780638da5cb5b14610b6b5780638e42646014610b145780639146cd4714610aaf5780639d61ab6e14610a86578063a0d216d114610a68578063a6f9dae114610a11578063a7cc08fe14610997578063b34bfaa81461097a578063b6ede5401461067a578063b70020d61461064b578063ba66fde7146105f4578063be467604146105d7578063cf756fdf14610380578063d2b8035a146102ee578063da3beb8c146102cc578063e349ad30146102af578063f2f4eb2614610288578063f32ab92714610246578063f8abee10146102175763fc6f8f16146101ec575f80fd5b3461021457602036600319011261021457602061020a6004356129ee565b5054604051908152f35b80fd5b50346102145760203660031901126102145760ff60406020926004358152600584522054166040519015158152f35b50346102145760409081610259366129b4565b92908152600360205260038282205493610272856129ee565b5090835201602052205482519182526020820152f35b503461021457806003193601126102145760206001600160a01b0360015416604051908152f35b503461021457806003193601126102145760206040516127108152f35b50346102145760206102e66102e0366129b4565b90612fd2565b604051908152f35b5034610214576102fd366129b4565b916001600160a01b0360015416330361037257818152600360205260ff600261032960408420546129ee565b500154166103635760406bffffffffffffffffffffffff61034a8585612cec565b6001600160a01b03849392935193168352166020820152f35b8063070f7fa560e51b60049252fd5b80628448c760e31b60049252fd5b50346102145760803660031901126102145761039a61299e565b6024356001600160a01b0381168091036105d3576044356001600160a01b0381168091036105cf577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e549160ff8360401c16159267ffffffffffffffff811684806105c5575b1590816105a7575b5061057f5767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5583610540575b507ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e549360ff8560401c1615610518576001600160a01b03166001600160a01b03198654161785556001600160a01b031960015416176001556001600160a01b031960065416176006556064356007556104bc575080f35b68ff000000000000000019167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6004867fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e555f610444565b6004867f0dc149f0000000000000000000000000000000000000000000000000000000008152fd5b303b159150816105ba575b50155f610408565b60019150145f6105b2565b5060018110610400565b8380fd5b8280fd5b503461021457806003193601126102145760206040516113888152f35b50346102145760ff61063e604061063860209461061036612a73565b94918391935260038852610626828220546129ee565b50928152600383018852205490612ae1565b50612cd3565b5054166040519015158152f35b50346102145780600319360112610214575060075480610672575060206001604051908152f35b6020906102e6565b50346102145760803660031901126102145760043560443560243567ffffffffffffffff82116105cf57366023830112156105cf57816004013567ffffffffffffffff8111610976573660248285010111610976576001600160a01b0360015416330361096857600254680100000000000000008110156109545760018101600255610705816129ee565b508360018201556004810161071a8154612a0a565b601f811161090f575b508388601f82116001146108a6578991610898575b508460011b905f198660031b1c19161790555b6002810160ff1981541690558054602460206001600160a01b036001541660405192838092637e37c78b60e11b82528c60048301525afa90811561088d578991610857575b505f198101908111610843576107dd606095937fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108989795936003938c5283820160205260408c2055612bca565b5001600160ff1982541617905586885260036020526040882055858752600560205260408720600160ff1982541617905580602460405195869485526040602086015282604086015201848401378181018301879052601f01601f19168101030190a280f35b602489634e487b7160e01b81526011600452fd5b90506020813d602011610885575b816108726020938361291c565b8101031261088157515f610790565b5f80fd5b3d9150610865565b6040513d8b823e3d90fd5b60249150870101355f610738565b828a5260208a20915085601f1981168b5b8a8282106108f2575050106108d6575b5050600184811b01905561074b565b8701602401355f19600387901b60f8161c191690555f806108c7565b8401602401358555600190940193602093840193899350016108b7565b81895260208920601f860160051c8101916020871061094a575b601f0160051c01905b81811061093f5750610723565b898155600101610932565b9091508190610929565b602486634e487b7160e01b81526041600452fd5b600485628448c760e31b8152fd5b8480fd5b50346102145780600319360112610214576020604051614e208152f35b5034610214576109db60406106386080936109b136612a73565b94918391935260036020526109c8828220546129ee565b5092815260038301602052205490612ae1565b5060ff815460026001840154930154604051936001600160a01b038360081c168552602085015260408401521615156060820152f35b503461021457602036600319011261021457610a2b61299e565b815490336001600160a01b03831603610a59576001600160a01b036001600160a01b03199116911617815580f35b600483630b2db9b760e31b8152fd5b50346102145780600319360112610214576020600754604051908152f35b5034610214576040610aa2610a9a366128fa565b5050916130b9565b8151908082526020820152f35b5034610214576040366003190112610214576004356001600160a01b0381160361021457602435908160011b9180830460021490151715610b005760018201809211610b0057602082604051908152f35b80634e487b7160e01b602492526011600452fd5b503461021457602036600319011261021457610b2e61299e565b6001600160a01b038254163303610b5c576001600160a01b03166001600160a01b0319600154161760015580f35b600482630b2db9b760e31b8152fd5b50346102145780600319360112610214576001600160a01b036020915416604051908152f35b50346102145760a03660031901126102145760043560243567ffffffffffffffff81116105d357610bc6903690600401612a42565b90916044359260843567ffffffffffffffff81116110df57610bec90369060040161295a565b92828652600360205260ff6002610c0660408920546129ee565b500154166110d0576001600160a01b036001541660405163564a565d60e01b815284600482015260a081602481855afa9081156110c55788916110a1575b50600581101561108d5760020361106557811561103d57838752600560205260ff6040882054161561102e578387526003602052604087205490610c87826129ee565b50906001820154881161101f5781545f1981019290831161100b5782610cac91612ae1565b509260405163564a565d60e01b815287600482015260a081602481865afa908b8215610fff5760c0926bffffffffffffffffffffffff9260249291610fcc575b506040519586938492630fad06e960e11b84521660048301525afa918215610fc1578a92610f8a575b50610d226064358a612b6e565b908a5b868110610e6b575050505050908160047fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a4949301610d64838254612bbd565b905560028101908789528160205260408920610d81848254612bbd565b90558760018201928354908183145f14610de7575050506003915001805460ff8116610dda575b50505b610dd4610dc5604051938493604085526040850191613286565b828103602084015233966129ca565b0390a480f35b60ff191690555f80610da8565b828c528060205260408c2054828d528160205260408d2054145f14610e31575050506003915001805460ff811615610e21575b5050610dab565b60ff191660011790555f80610e1a565b828c528060205260408c2054918c5260205260408b205410610e56575b505050610dab565b600392550160ff1981541690555f8087610e4e565b610e80610e7982898b613276565b3587612cd3565b506001600160a01b0333915460081c1603610f7b578380610f4b575b610f235760ff610eb7610eb0838a8c613276565b3588612cd3565b505416610efb57808b6002610ed9610ed26001958c8e613276565b358a612cd3565b500155610eea610eb0828a8c613276565b50805460ff19168317905501610d25565b60048c7fb3808bab000000000000000000000000000000000000000000000000000000008152fd5b60048c7f953075a3000000000000000000000000000000000000000000000000000000008152fd5b50826001610f71610f5d848b8d613276565b3561063889610f6b886129ee565b50612ae1565b5001541415610e9c565b60048c638016bef760e01b8152fd5b610fad91925060c03d60c011610fba575b610fa5818361291c565b810190612c97565b505050509050905f610d15565b503d610f9b565b6040513d8c823e3d90fd5b610fee915060a03d60a011610ff8575b610fe6818361291c565b810190612b20565b505050505f610cec565b503d610fdc565b604051903d90823e3d90fd5b60248a634e487b7160e01b81526011600452fd5b600489637cd5012560e11b8152fd5b6004876333f97f8960e01b8152fd5b6004877fb7a08e6e000000000000000000000000000000000000000000000000000000008152fd5b6004877febd6a5e7000000000000000000000000000000000000000000000000000000008152fd5b602488634e487b7160e01b81526021600452fd5b6110ba915060a03d60a011610ff857610fe6818361291c565b50509150505f610c44565b6040513d8a823e3d90fd5b60048663070f7fa560e51b8152fd5b8580fd5b5034610214576020366003190112610214576001600160a01b03815416330361110f5760043560075580f35b80630b2db9b760e31b60049252fd5b503461021457602036600319011261021457600435808252600360205261114860408320546129ee565b5080545f1981019190821161125e579061116191612ae1565b50906001600160a01b0360015416906040519063564a565d60e01b8252600482015260a081602481855afa80156112535760246bffffffffffffffffffffffff9160c0938791611230575b506040519485938492630fad06e960e11b84521660048301525afa908115611225579260209381926111fe575b5050156111f45760046005820154915b015414604051908152f35b60048154916111e9565b61121891925060c03d60c011610fba57610fa5818361291c565b505050509050905f6111d9565b6040513d85823e3d90fd5b611249915060a03d60a011610ff857610fe6818361291c565b505050505f6111ac565b6040513d86823e3d90fd5b602484634e487b7160e01b81526011600452fd5b50346102145760603660031901126102145761128c61299e565b60443567ffffffffffffffff81116105d3576112ac90369060040161295a565b906001600160a01b038354163303610a5957818392916020849351920190602435905af16112d8612bf0565b50156112e15780f35b807f44125e5e0000000000000000000000000000000000000000000000000000000060049252fd5b50346102145761134a60c09161131e36612a73565b93918352600360205261133460408420546129ee565b5090835260038101602052604083205490612ae1565b509160018301549260ff60038201541692604060048301549160026005850154948054968352016020522054936040519586521515602086015260408501526060840152608083015260a0820152f35b5034610214576020366003190112610214576113b7600435612c1f565b90604051918291602083016020845282518091526020604085019301915b8181106113e3575050500390f35b82518452859450602093840193909201916001016113d5565b50346102145760603660031901126102145760043560243567ffffffffffffffff81116105d357611431903690600401612a42565b60449291923592828552600360205260ff600261145160408820546129ee565b5001541661165f57602460a06001600160a01b03600154166040519283809263564a565d60e01b82528860048301525afa908115611654578691611630575b50600581101561161c576001036115f45783156115cc57828552600560205260ff604086205416156115bd5782855260036020526114d160408620546129ee565b5080545f198101919082116115a957906114ea91612ae1565b50855b83811061154d57507f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089291600561153e920161152a848254612bbd565b905560405192604084526040840191613286565b9360208201528033940390a380f35b61156261155b828686613276565b3583612cd3565b506001600160a01b0333915460081c160361159a578086600161159161158a82958989613276565b3586612cd3565b500155016114ed565b600487638016bef760e01b8152fd5b602487634e487b7160e01b81526011600452fd5b6004856333f97f8960e01b8152fd5b6004857f37b5b73d000000000000000000000000000000000000000000000000000000008152fd5b6004857f97ab7f79000000000000000000000000000000000000000000000000000000008152fd5b602486634e487b7160e01b81526021600452fd5b611649915060a03d60a011610ff857610fe6818361291c565b50509150505f611490565b6040513d88823e3d90fd5b60048563070f7fa560e51b8152fd5b50346102145760203660031901126102145760043560025481101561177657611696906129ee565b5090600182015490600460ff60028501541693019060405191818154916116bc83612a0a565b808652926001811690811561174c575060011461170b575b505050906116e78161170793038261291c565b6040519384938452151560208401526060604084015260608301906129ca565b0390f35b815260208120939250905b808210611732575090915081016020016116e7826117076116d4565b919260018160209254838588010152019101909291611716565b869550611707969350602092506116e794915060ff191682840152151560051b82010192936116d4565b5080fd5b50346102145780600319360112610214575061170760405161179d60408261291c565b600581527f322e302e3000000000000000000000000000000000000000000000000000000060208201526040519182916020835260208301906129ca565b50346102145780600319360112610214576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036118465760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b8063703e46dd60e11b60049252fd5b5060403660031901126102145761186a61299e565b9060243567ffffffffffffffff81116117765761188b90369060040161295a565b6001600160a01b038254163303610b5c576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115611a84575b50611a75576001600160a01b03831690604051937f52d1902d000000000000000000000000000000000000000000000000000000008552602085600481865afa80958596611a41575b5061194b57602484847f0c760937000000000000000000000000000000000000000000000000000000008252600452fd5b90917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8503611a1557839450817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a2815190816119ce575b5050505080f35b6020849301905af46119de612bf0565b50156119ed57805f80806119c7565b807f736436ba0000000000000000000000000000000000000000000000000000000060049252fd5b602484867faa1d49a4000000000000000000000000000000000000000000000000000000008252600452fd5b9095506020813d602011611a6d575b81611a5d6020938361291c565b810103126109765751945f61191a565b3d9150611a50565b60048263703e46dd60e11b8152fd5b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614155f6118d1565b503461021457602036600319011261021457602090604051908152f35b50611ae0366129b4565b90805f52600360205260ff6002611afa60405f20546129ee565b5001541661221e57805f526003602052611b1760405f20546129ee565b509060018201908154841161220f57805f52600560205260ff60405f20541615612200576001600160a01b036001541660405163afe15cfb60e01b8152826004820152604081602481855afa908115611e61575f905f926121ce575b5080421080156121c4575b61219c57604051631c3db16d60e01b8152846004820152606081602481305afa8015611e615788915f9161216b575b5003612106575050612710945b84545f1981019081116120be57611bd19086612ae1565b5060405191637e37c78b60e11b8352846004840152602083602481875afa928315611e61575f936120d2575b505f1983018381116120be576007830198825f528960205260ff60405f205416612096576020602496604051978880927f59ec827e0000000000000000000000000000000000000000000000000000000082528b60048301525afa958615611e61575f96612060575b50612710611c77611c7e9288612ab0565b0486612bbd565b985f996006850190845f528160205260405f20548111611fea575b6001600160a01b0333165f526008860160205260405f20855f5260205260405f20611cc58d8254612bbd565b9055845f528160205260405f20611cdd8d8254612bbd565b9055845f528160205260405f20541015611f34575b505050506001600a82015411611d37575b505050505050803411611d14575080f35b611d21611d349134612aa3565b6001600160a01b03600654169033613173565b80f35b600901611d45838254612aa3565b9055602460206001600160a01b0360015416604051928380927f19b815290000000000000000000000000000000000000000000000000000000082528860048301525afa908115611e61575f91611efa575b5015611ecc575060028401805460ff191660011790555b60046001600160a01b036001541693549401833b15610881576040519485937fc356990200000000000000000000000000000000000000000000000000000000855260048501526024840152606060448401525f90805490611e0f82612a0a565b918260648701526001811690815f14611ea75750600114611e6c575b50505f939183809203925af18015611e6157611e4c575b8080808080611d03565b611e599192505f9061291c565b5f905f611e42565b6040513d5f823e3d90fd5b5f908152602081209092505b818310611e8d57505082016084018183611e2b565b805460848489010152869450602090920191600101611e78565b60ff191660848088019190915292151560051b86019092019250839150849050611e2b565b8454905f526003850160205260405f20556003611ee885612bca565b5001805460ff19166001179055611dae565b90506020813d602011611f2c575b81611f156020938361291c565b8101031261088157611f2690612b13565b5f611d97565b3d9150611f08565b835f5260205260405f2054611f4e60098601918254612bbd565b9055600a8401805468010000000000000000811015611fd65760018101808355811015611fc25784915f5260205f200155825f5260205260405f20600160ff19825416179055857fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea0095f80a45f808080611cf2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b9a50835f528060205261200160405f20548c612aa3565b34101561204557349a5b8b604051908682526020820152848a7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c060403394a4611c99565b835f528060205261205a60405f20548c612aa3565b9a61200b565b9095506020813d60201161208e575b8161207c6020938361291c565b81010312610881575194612710611c66565b3d915061206f565b7fbcdf54db000000000000000000000000000000000000000000000000000000005f5260045ffd5b634e487b7160e01b5f52601160045260245ffd5b9092506020813d6020116120fe575b816120ee6020938361291c565b810103126108815751915f611bfd565b3d91506120e1565b8061211461211a9242612aa3565b92612aa3565b61138881029080820461138814901517156120be576127109004111561214357614e2094611bba565b7f508aa06c000000000000000000000000000000000000000000000000000000005f5260045ffd5b61218d915060603d606011612195575b612185818361291c565b810190612b94565b50505f611bad565b503d61217b565b7f13e72a50000000000000000000000000000000000000000000000000000000005f5260045ffd5b5081421015611b7e565b90506121f2915060403d6040116121f9575b6121ea818361291c565b810190612a8d565b905f611b73565b503d6121e0565b6333f97f8960e01b5f5260045ffd5b637cd5012560e11b5f5260045ffd5b63070f7fa560e51b5f5260045ffd5b34610881576080366003190112610881576024356004356001600160a01b03821680830361088157604435606435925f936001600160a01b03600154169460405163564a565d60e01b815283600482015260a0816024818a5afa908115611e61575f916125c7575b501561259f576040517f5c975abb0000000000000000000000000000000000000000000000000000000081526020816004818a5afa908115611e61575f91612565575b5061253d57825f52600560205260ff60405f2054161561220057825f5260036020526024606061232461230e60405f20546129ee565b50875f526003810160205260405f205490612ae1565b509760405192838092631c3db16d60e01b82528860048301525afa908115611e61575f9161251c575b506007870190835f528160205260ff60405f205416155f146123ff57505050602095845f5260088601875260405f20825f528752600860405f2054965b865f5201875260405f20825f5287525f6040812055856123af575b8686604051908152f35b7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae916123ea604092886001600160a01b036006541691613173565b81519081528688820152a482808080806123a5565b83810361246d5750505060209560068601825f5280885260405f205415155f146124645761245e600891875f528289018a5260405f20855f528a5261244d60405f205460098b015490612ab0565b90855f528a5260405f205490612ac3565b9661238a565b5060085f61245e565b5f9792975260205260ff60405f2054161561248e575b95600860209761238a565b9450835f526008850160205260405f20815f526020526124b760405f2054600987015490612ab0565b956006860196600a870197885415611fc257885f5260205f20545f528060205260405f205491895460011015611fc25761250c6008936125129360209c5f5260018d5f2001545f528c5260405f205490612bbd565b90612ac3565b9691975050612483565b612535915060603d60601161219557612185818361291c565b50508861234d565b7f88226c22000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506020813d602011612597575b816125806020938361291c565b810103126108815761259190612b13565b886122d8565b3d9150612573565b7f8a7dc9ee000000000000000000000000000000000000000000000000000000005f5260045ffd5b6125e0915060a03d60a011610ff857610fe6818361291c565b509250505088612295565b34610881575f3660031901126108815760206001600160a01b0360065416604051908152f35b34610881575f36600319011261088157602060ff600454166040519015158152f35b346108815760603660031901126108815760443567ffffffffffffffff81116108815761266490369060040161295a565b5060206102e6602435600435612b6e565b34610881576020366003190112610881576004355f90805f5260036020526126a060405f20546129ee565b5080545f1981019081116120be576126b791612ae1565b50600381015460ff169290831561279c57505f5b91602460a06001600160a01b03600154166040519283809263564a565d60e01b82528660048301525afa908115611e61575f91612778575b5060058110156127645760041461272f575b506060926040519283521515602083015215156040820152f35b61273890612c1f565b9283516001811461274b575b5092612715565b9250505015611fc2576020015160609060015f84612744565b634e487b7160e01b5f52602160045260245ffd5b612791915060a03d60a011610ff857610fe6818361291c565b505091505085612703565b600101546126cb565b346108815760206102e6610a9a366128fa565b34610881576020366003190112610881576004355f526003602052602060405f2054604051908152f35b34610881576020366003190112610881576004355f52600360205261280a60405f20546129ee565b5080545f198101919082116120be5760209161282591612ae1565b506005810154905414604051908152f35b3461088157602036600319011261088157600435906040816024816001600160a01b036001541663afe15cfb60e01b82528660048301525afa918215611e61575f915f936128d3575b5061288990612c1f565b5115908161289f575b6020826040519015158152f35b6128ae91506121148142612aa3565b9061138882029180830461138814901517156120be5761271060209204111582612892565b6128f2919350612889925060403d6040116121f9576121ea818361291c565b92909161287f565b60a0906003190112610881576004359060243590604435906064359060843590565b90601f8019910116810190811067ffffffffffffffff821117611fd657604052565b67ffffffffffffffff8111611fd657601f01601f191660200190565b81601f82011215610881576020813591016129748261293e565b92612982604051948561291c565b8284528282011161088157815f92602092838601378301015290565b600435906001600160a01b038216820361088157565b6040906003190112610881576004359060243590565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600254811015611fc25760025f52600f60205f20910201905f90565b90600182811c92168015612a38575b6020831014612a2457565b634e487b7160e01b5f52602260045260245ffd5b91607f1691612a19565b9181601f840112156108815782359167ffffffffffffffff8311610881576020808501948460051b01011161088157565b606090600319011261088157600435906024359060443590565b9190826040910312610881576020825192015190565b919082039182116120be57565b818102929181159184041417156120be57565b8115612acd570490565b634e487b7160e01b5f52601260045260245ffd5b8054821015611fc2575f52601660205f20910201905f90565b51906bffffffffffffffffffffffff8216820361088157565b5190811515820361088157565b908160a091031261088157612b3481612afa565b9160208201516001600160a01b038116810361088157916040810151600581101561088157916080612b6860608401612b13565b92015190565b906040519060208201928352604082015260408152612b8e60608261291c565b51902090565b9081606091031261088157805191612bba6040612bb360208501612b13565b9301612b13565b90565b919082018092116120be57565b805468010000000000000000811015611fd657612bec91600182018155612ae1565b9091565b3d15612c1a573d90612c018261293e565b91612c0f604051938461291c565b82523d5f602084013e565b606090565b5f526003602052612c3360405f20546129ee565b5080545f198101919082116120be57600a91612c4e91612ae1565b5001604051808260208294549384815201905f5260205f20925f5b818110612c7e575050612bba9250038261291c565b8454835260019485019486945060209093019201612c69565b91908260c091031261088157612cac82612afa565b91612cb960208201612b13565b9160408201519160608101519160a0608083015192015190565b8054821015611fc2575f52600d60205f20910201905f90565b9091815f526003602052612d0360405f20546129ee565b5080545f1981019081116120be57612d1a91612ae1565b506001600160a01b03600154166040517f2e1daf2f000000000000000000000000000000000000000000000000000000008152602081600481855afa908115611e61575f91612f8d575b5060a06024926040519384809263564a565d60e01b82528960048301525afa918215611e61576040926bffffffffffffffffffffffff926064925f92612f5f575b506001600160a01b03908551998a9586947fd045e0020000000000000000000000000000000000000000000000000000000086521660048501528960248501526044840152165afa928315611e61575f945f94612f0c575b5083856001600160a01b03811615612f0457505060045460ff1615612efc575f526003602052612e3060405f20546129ee565b5080545f198101919082116120be57600b91612e4b91612ae1565b506001600160a01b0386165f520160205260ff60405f205416155b15612ef65780549068010000000000000000821015611fd657612e91826001600b9401835582612cd3565b5080547fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff008860081b1691161790556001600160a01b0385165f520160205260405f20600160ff19825416179055565b505f9250565b506001612e66565b955093505050565b945092506040843d604011612f57575b81612f296040938361291c565b81010312610881578351936001600160a01b0385168503610881576020612f509101612afa565b925f612dfd565b3d9150612f1c565b6001600160a01b03919250612f829060a03d60a011610ff857610fe6818361291c565b505050509190612da5565b90506020813d602011612fca575b81612fa86020938361291c565b810103126108815751906001600160a01b0382168203610881579060a0612d64565b3d9150612f9b565b9061300290825f526003602052612fec60405f20546129ee565b50905f526003810160205260405f205490612ae1565b5060606001600160a01b036001541692602460405180958193631c3db16d60e01b835260048301525afa918215611e61575f905f93613094575b5060048201549283158015613075575b1561305957505050505f90565b1561306357505090565b600292505f520160205260405f205490565b508015801561304c5750815f526002830160205260405f20541561304c565b90506130b091925060603d60601161219557612185818361291c565b5091905f61303c565b916106386130d692845f526003602052612fec60405f20546129ee565b509060606001600160a01b036001541691602460405180948193631c3db16d60e01b835260048301525afa908115611e61575f905f92613150575b5060ff8354169283613131575b5050505f1461312d5761271090565b5f90565b600201541491508115613148575b505f808061311e565b90505f61313f565b905061316b915060603d60601161219557612185818361291c565b50905f613111565b6001600160a01b0316905f925f8284811561326c575b5f92839283928392f1613266576001600160a01b031691823b15610881576040517fd0e30db00000000000000000000000000000000000000000000000000000000081525f8160048186885af18015611e6157613251575b50823b156105cf5790604484928360405195869485937fa9059cbb000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561324657613234575050565b61323f82809261291c565b6102145750565b6040513d84823e3d90fd5b61325e9194505f9061291c565b5f925f6131e1565b50505050565b6108fc9250613189565b9190811015611fc25760051b0190565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116108815760209260051b80928483013701019056fea2646970667358221220b5aaba208006c2770b2a559bb6595fe7390db7c206ee67f59edf25055757c98c64736f6c634300081e0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e", + "deployedBytecode": "0x6080806040526004361015610012575f80fd5b5f905f3560e01c9081630855bbe914612836575080630baa64d1146127e25780631200aabc146127b8578063149a5dc0146127a55780631c3db16d146126755780631cc3423a146126335780632621b9a2146126115780632d68efc9146125eb578063362c34791461222d5780634b2f0ea014611ad65780634e514a1b14611ab95780634f1ef2861461185557806352d1902d146117db57806354fd4d501461177a578063564a565d1461166e5780635c92e2f6146113fc57806365540b961461139a57806369f3f041146113095780636a8c9194146112725780636d4cd8ea1461111e57806372d610d9146110e35780637c04034e14610b915780638da5cb5b14610b6b5780638e42646014610b145780639146cd4714610aaf5780639d61ab6e14610a86578063a0d216d114610a68578063a6f9dae114610a11578063a7cc08fe14610997578063b34bfaa81461097a578063b6ede5401461067a578063b70020d61461064b578063ba66fde7146105f4578063be467604146105d7578063cf756fdf14610380578063d2b8035a146102ee578063da3beb8c146102cc578063e349ad30146102af578063f2f4eb2614610288578063f32ab92714610246578063f8abee10146102175763fc6f8f16146101ec575f80fd5b3461021457602036600319011261021457602061020a6004356129ee565b5054604051908152f35b80fd5b50346102145760203660031901126102145760ff60406020926004358152600584522054166040519015158152f35b50346102145760409081610259366129b4565b92908152600360205260038282205493610272856129ee565b5090835201602052205482519182526020820152f35b503461021457806003193601126102145760206001600160a01b0360015416604051908152f35b503461021457806003193601126102145760206040516127108152f35b50346102145760206102e66102e0366129b4565b90612fd2565b604051908152f35b5034610214576102fd366129b4565b916001600160a01b0360015416330361037257818152600360205260ff600261032960408420546129ee565b500154166103635760406bffffffffffffffffffffffff61034a8585612cec565b6001600160a01b03849392935193168352166020820152f35b8063070f7fa560e51b60049252fd5b80628448c760e31b60049252fd5b50346102145760803660031901126102145761039a61299e565b6024356001600160a01b0381168091036105d3576044356001600160a01b0381168091036105cf577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e549160ff8360401c16159267ffffffffffffffff811684806105c5575b1590816105a7575b5061057f5767ffffffffffffffff1981166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5583610540575b507ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e549360ff8560401c1615610518576001600160a01b03166001600160a01b03198654161785556001600160a01b031960015416176001556001600160a01b031960065416176006556064356007556104bc575080f35b68ff000000000000000019167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b6004867fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e555f610444565b6004867f0dc149f0000000000000000000000000000000000000000000000000000000008152fd5b303b159150816105ba575b50155f610408565b60019150145f6105b2565b5060018110610400565b8380fd5b8280fd5b503461021457806003193601126102145760206040516113888152f35b50346102145760ff61063e604061063860209461061036612a73565b94918391935260038852610626828220546129ee565b50928152600383018852205490612ae1565b50612cd3565b5054166040519015158152f35b50346102145780600319360112610214575060075480610672575060206001604051908152f35b6020906102e6565b50346102145760803660031901126102145760043560443560243567ffffffffffffffff82116105cf57366023830112156105cf57816004013567ffffffffffffffff8111610976573660248285010111610976576001600160a01b0360015416330361096857600254680100000000000000008110156109545760018101600255610705816129ee565b508360018201556004810161071a8154612a0a565b601f811161090f575b508388601f82116001146108a6578991610898575b508460011b905f198660031b1c19161790555b6002810160ff1981541690558054602460206001600160a01b036001541660405192838092637e37c78b60e11b82528c60048301525afa90811561088d578991610857575b505f198101908111610843576107dd606095937fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab58108989795936003938c5283820160205260408c2055612bca565b5001600160ff1982541617905586885260036020526040882055858752600560205260408720600160ff1982541617905580602460405195869485526040602086015282604086015201848401378181018301879052601f01601f19168101030190a280f35b602489634e487b7160e01b81526011600452fd5b90506020813d602011610885575b816108726020938361291c565b8101031261088157515f610790565b5f80fd5b3d9150610865565b6040513d8b823e3d90fd5b60249150870101355f610738565b828a5260208a20915085601f1981168b5b8a8282106108f2575050106108d6575b5050600184811b01905561074b565b8701602401355f19600387901b60f8161c191690555f806108c7565b8401602401358555600190940193602093840193899350016108b7565b81895260208920601f860160051c8101916020871061094a575b601f0160051c01905b81811061093f5750610723565b898155600101610932565b9091508190610929565b602486634e487b7160e01b81526041600452fd5b600485628448c760e31b8152fd5b8480fd5b50346102145780600319360112610214576020604051614e208152f35b5034610214576109db60406106386080936109b136612a73565b94918391935260036020526109c8828220546129ee565b5092815260038301602052205490612ae1565b5060ff815460026001840154930154604051936001600160a01b038360081c168552602085015260408401521615156060820152f35b503461021457602036600319011261021457610a2b61299e565b815490336001600160a01b03831603610a59576001600160a01b036001600160a01b03199116911617815580f35b600483630b2db9b760e31b8152fd5b50346102145780600319360112610214576020600754604051908152f35b5034610214576040610aa2610a9a366128fa565b5050916130b9565b8151908082526020820152f35b5034610214576040366003190112610214576004356001600160a01b0381160361021457602435908160011b9180830460021490151715610b005760018201809211610b0057602082604051908152f35b80634e487b7160e01b602492526011600452fd5b503461021457602036600319011261021457610b2e61299e565b6001600160a01b038254163303610b5c576001600160a01b03166001600160a01b0319600154161760015580f35b600482630b2db9b760e31b8152fd5b50346102145780600319360112610214576001600160a01b036020915416604051908152f35b50346102145760a03660031901126102145760043560243567ffffffffffffffff81116105d357610bc6903690600401612a42565b90916044359260843567ffffffffffffffff81116110df57610bec90369060040161295a565b92828652600360205260ff6002610c0660408920546129ee565b500154166110d0576001600160a01b036001541660405163564a565d60e01b815284600482015260a081602481855afa9081156110c55788916110a1575b50600581101561108d5760020361106557811561103d57838752600560205260ff6040882054161561102e578387526003602052604087205490610c87826129ee565b50906001820154881161101f5781545f1981019290831161100b5782610cac91612ae1565b509260405163564a565d60e01b815287600482015260a081602481865afa908b8215610fff5760c0926bffffffffffffffffffffffff9260249291610fcc575b506040519586938492630fad06e960e11b84521660048301525afa918215610fc1578a92610f8a575b50610d226064358a612b6e565b908a5b868110610e6b575050505050908160047fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a4949301610d64838254612bbd565b905560028101908789528160205260408920610d81848254612bbd565b90558760018201928354908183145f14610de7575050506003915001805460ff8116610dda575b50505b610dd4610dc5604051938493604085526040850191613286565b828103602084015233966129ca565b0390a480f35b60ff191690555f80610da8565b828c528060205260408c2054828d528160205260408d2054145f14610e31575050506003915001805460ff811615610e21575b5050610dab565b60ff191660011790555f80610e1a565b828c528060205260408c2054918c5260205260408b205410610e56575b505050610dab565b600392550160ff1981541690555f8087610e4e565b610e80610e7982898b613276565b3587612cd3565b506001600160a01b0333915460081c1603610f7b578380610f4b575b610f235760ff610eb7610eb0838a8c613276565b3588612cd3565b505416610efb57808b6002610ed9610ed26001958c8e613276565b358a612cd3565b500155610eea610eb0828a8c613276565b50805460ff19168317905501610d25565b60048c7fb3808bab000000000000000000000000000000000000000000000000000000008152fd5b60048c7f953075a3000000000000000000000000000000000000000000000000000000008152fd5b50826001610f71610f5d848b8d613276565b3561063889610f6b886129ee565b50612ae1565b5001541415610e9c565b60048c638016bef760e01b8152fd5b610fad91925060c03d60c011610fba575b610fa5818361291c565b810190612c97565b505050509050905f610d15565b503d610f9b565b6040513d8c823e3d90fd5b610fee915060a03d60a011610ff8575b610fe6818361291c565b810190612b20565b505050505f610cec565b503d610fdc565b604051903d90823e3d90fd5b60248a634e487b7160e01b81526011600452fd5b600489637cd5012560e11b8152fd5b6004876333f97f8960e01b8152fd5b6004877fb7a08e6e000000000000000000000000000000000000000000000000000000008152fd5b6004877febd6a5e7000000000000000000000000000000000000000000000000000000008152fd5b602488634e487b7160e01b81526021600452fd5b6110ba915060a03d60a011610ff857610fe6818361291c565b50509150505f610c44565b6040513d8a823e3d90fd5b60048663070f7fa560e51b8152fd5b8580fd5b5034610214576020366003190112610214576001600160a01b03815416330361110f5760043560075580f35b80630b2db9b760e31b60049252fd5b503461021457602036600319011261021457600435808252600360205261114860408320546129ee565b5080545f1981019190821161125e579061116191612ae1565b50906001600160a01b0360015416906040519063564a565d60e01b8252600482015260a081602481855afa80156112535760246bffffffffffffffffffffffff9160c0938791611230575b506040519485938492630fad06e960e11b84521660048301525afa908115611225579260209381926111fe575b5050156111f45760046005820154915b015414604051908152f35b60048154916111e9565b61121891925060c03d60c011610fba57610fa5818361291c565b505050509050905f6111d9565b6040513d85823e3d90fd5b611249915060a03d60a011610ff857610fe6818361291c565b505050505f6111ac565b6040513d86823e3d90fd5b602484634e487b7160e01b81526011600452fd5b50346102145760603660031901126102145761128c61299e565b60443567ffffffffffffffff81116105d3576112ac90369060040161295a565b906001600160a01b038354163303610a5957818392916020849351920190602435905af16112d8612bf0565b50156112e15780f35b807f44125e5e0000000000000000000000000000000000000000000000000000000060049252fd5b50346102145761134a60c09161131e36612a73565b93918352600360205261133460408420546129ee565b5090835260038101602052604083205490612ae1565b509160018301549260ff60038201541692604060048301549160026005850154948054968352016020522054936040519586521515602086015260408501526060840152608083015260a0820152f35b5034610214576020366003190112610214576113b7600435612c1f565b90604051918291602083016020845282518091526020604085019301915b8181106113e3575050500390f35b82518452859450602093840193909201916001016113d5565b50346102145760603660031901126102145760043560243567ffffffffffffffff81116105d357611431903690600401612a42565b60449291923592828552600360205260ff600261145160408820546129ee565b5001541661165f57602460a06001600160a01b03600154166040519283809263564a565d60e01b82528860048301525afa908115611654578691611630575b50600581101561161c576001036115f45783156115cc57828552600560205260ff604086205416156115bd5782855260036020526114d160408620546129ee565b5080545f198101919082116115a957906114ea91612ae1565b50855b83811061154d57507f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f089291600561153e920161152a848254612bbd565b905560405192604084526040840191613286565b9360208201528033940390a380f35b61156261155b828686613276565b3583612cd3565b506001600160a01b0333915460081c160361159a578086600161159161158a82958989613276565b3586612cd3565b500155016114ed565b600487638016bef760e01b8152fd5b602487634e487b7160e01b81526011600452fd5b6004856333f97f8960e01b8152fd5b6004857f37b5b73d000000000000000000000000000000000000000000000000000000008152fd5b6004857f97ab7f79000000000000000000000000000000000000000000000000000000008152fd5b602486634e487b7160e01b81526021600452fd5b611649915060a03d60a011610ff857610fe6818361291c565b50509150505f611490565b6040513d88823e3d90fd5b60048563070f7fa560e51b8152fd5b50346102145760203660031901126102145760043560025481101561177657611696906129ee565b5090600182015490600460ff60028501541693019060405191818154916116bc83612a0a565b808652926001811690811561174c575060011461170b575b505050906116e78161170793038261291c565b6040519384938452151560208401526060604084015260608301906129ca565b0390f35b815260208120939250905b808210611732575090915081016020016116e7826117076116d4565b919260018160209254838588010152019101909291611716565b869550611707969350602092506116e794915060ff191682840152151560051b82010192936116d4565b5080fd5b50346102145780600319360112610214575061170760405161179d60408261291c565b600581527f322e302e3000000000000000000000000000000000000000000000000000000060208201526040519182916020835260208301906129ca565b50346102145780600319360112610214576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036118465760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b8063703e46dd60e11b60049252fd5b5060403660031901126102145761186a61299e565b9060243567ffffffffffffffff81116117765761188b90369060040161295a565b6001600160a01b038254163303610b5c576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115611a84575b50611a75576001600160a01b03831690604051937f52d1902d000000000000000000000000000000000000000000000000000000008552602085600481865afa80958596611a41575b5061194b57602484847f0c760937000000000000000000000000000000000000000000000000000000008252600452fd5b90917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8503611a1557839450817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a2815190816119ce575b5050505080f35b6020849301905af46119de612bf0565b50156119ed57805f80806119c7565b807f736436ba0000000000000000000000000000000000000000000000000000000060049252fd5b602484867faa1d49a4000000000000000000000000000000000000000000000000000000008252600452fd5b9095506020813d602011611a6d575b81611a5d6020938361291c565b810103126109765751945f61191a565b3d9150611a50565b60048263703e46dd60e11b8152fd5b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614155f6118d1565b503461021457602036600319011261021457602090604051908152f35b50611ae0366129b4565b90805f52600360205260ff6002611afa60405f20546129ee565b5001541661221e57805f526003602052611b1760405f20546129ee565b509060018201908154841161220f57805f52600560205260ff60405f20541615612200576001600160a01b036001541660405163afe15cfb60e01b8152826004820152604081602481855afa908115611e61575f905f926121ce575b5080421080156121c4575b61219c57604051631c3db16d60e01b8152846004820152606081602481305afa8015611e615788915f9161216b575b5003612106575050612710945b84545f1981019081116120be57611bd19086612ae1565b5060405191637e37c78b60e11b8352846004840152602083602481875afa928315611e61575f936120d2575b505f1983018381116120be576007830198825f528960205260ff60405f205416612096576020602496604051978880927f59ec827e0000000000000000000000000000000000000000000000000000000082528b60048301525afa958615611e61575f96612060575b50612710611c77611c7e9288612ab0565b0486612bbd565b985f996006850190845f528160205260405f20548111611fea575b6001600160a01b0333165f526008860160205260405f20855f5260205260405f20611cc58d8254612bbd565b9055845f528160205260405f20611cdd8d8254612bbd565b9055845f528160205260405f20541015611f34575b505050506001600a82015411611d37575b505050505050803411611d14575080f35b611d21611d349134612aa3565b6001600160a01b03600654169033613173565b80f35b600901611d45838254612aa3565b9055602460206001600160a01b0360015416604051928380927f19b815290000000000000000000000000000000000000000000000000000000082528860048301525afa908115611e61575f91611efa575b5015611ecc575060028401805460ff191660011790555b60046001600160a01b036001541693549401833b15610881576040519485937fc356990200000000000000000000000000000000000000000000000000000000855260048501526024840152606060448401525f90805490611e0f82612a0a565b918260648701526001811690815f14611ea75750600114611e6c575b50505f939183809203925af18015611e6157611e4c575b8080808080611d03565b611e599192505f9061291c565b5f905f611e42565b6040513d5f823e3d90fd5b5f908152602081209092505b818310611e8d57505082016084018183611e2b565b805460848489010152869450602090920191600101611e78565b60ff191660848088019190915292151560051b86019092019250839150849050611e2b565b8454905f526003850160205260405f20556003611ee885612bca565b5001805460ff19166001179055611dae565b90506020813d602011611f2c575b81611f156020938361291c565b8101031261088157611f2690612b13565b5f611d97565b3d9150611f08565b835f5260205260405f2054611f4e60098601918254612bbd565b9055600a8401805468010000000000000000811015611fd65760018101808355811015611fc25784915f5260205f200155825f5260205260405f20600160ff19825416179055857fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea0095f80a45f808080611cf2565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52604160045260245ffd5b9a50835f528060205261200160405f20548c612aa3565b34101561204557349a5b8b604051908682526020820152848a7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c060403394a4611c99565b835f528060205261205a60405f20548c612aa3565b9a61200b565b9095506020813d60201161208e575b8161207c6020938361291c565b81010312610881575194612710611c66565b3d915061206f565b7fbcdf54db000000000000000000000000000000000000000000000000000000005f5260045ffd5b634e487b7160e01b5f52601160045260245ffd5b9092506020813d6020116120fe575b816120ee6020938361291c565b810103126108815751915f611bfd565b3d91506120e1565b8061211461211a9242612aa3565b92612aa3565b61138881029080820461138814901517156120be576127109004111561214357614e2094611bba565b7f508aa06c000000000000000000000000000000000000000000000000000000005f5260045ffd5b61218d915060603d606011612195575b612185818361291c565b810190612b94565b50505f611bad565b503d61217b565b7f13e72a50000000000000000000000000000000000000000000000000000000005f5260045ffd5b5081421015611b7e565b90506121f2915060403d6040116121f9575b6121ea818361291c565b810190612a8d565b905f611b73565b503d6121e0565b6333f97f8960e01b5f5260045ffd5b637cd5012560e11b5f5260045ffd5b63070f7fa560e51b5f5260045ffd5b34610881576080366003190112610881576024356004356001600160a01b03821680830361088157604435606435925f936001600160a01b03600154169460405163564a565d60e01b815283600482015260a0816024818a5afa908115611e61575f916125c7575b501561259f576040517f5c975abb0000000000000000000000000000000000000000000000000000000081526020816004818a5afa908115611e61575f91612565575b5061253d57825f52600560205260ff60405f2054161561220057825f5260036020526024606061232461230e60405f20546129ee565b50875f526003810160205260405f205490612ae1565b509760405192838092631c3db16d60e01b82528860048301525afa908115611e61575f9161251c575b506007870190835f528160205260ff60405f205416155f146123ff57505050602095845f5260088601875260405f20825f528752600860405f2054965b865f5201875260405f20825f5287525f6040812055856123af575b8686604051908152f35b7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae916123ea604092886001600160a01b036006541691613173565b81519081528688820152a482808080806123a5565b83810361246d5750505060209560068601825f5280885260405f205415155f146124645761245e600891875f528289018a5260405f20855f528a5261244d60405f205460098b015490612ab0565b90855f528a5260405f205490612ac3565b9661238a565b5060085f61245e565b5f9792975260205260ff60405f2054161561248e575b95600860209761238a565b9450835f526008850160205260405f20815f526020526124b760405f2054600987015490612ab0565b956006860196600a870197885415611fc257885f5260205f20545f528060205260405f205491895460011015611fc25761250c6008936125129360209c5f5260018d5f2001545f528c5260405f205490612bbd565b90612ac3565b9691975050612483565b612535915060603d60601161219557612185818361291c565b50508861234d565b7f88226c22000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506020813d602011612597575b816125806020938361291c565b810103126108815761259190612b13565b886122d8565b3d9150612573565b7f8a7dc9ee000000000000000000000000000000000000000000000000000000005f5260045ffd5b6125e0915060a03d60a011610ff857610fe6818361291c565b509250505088612295565b34610881575f3660031901126108815760206001600160a01b0360065416604051908152f35b34610881575f36600319011261088157602060ff600454166040519015158152f35b346108815760603660031901126108815760443567ffffffffffffffff81116108815761266490369060040161295a565b5060206102e6602435600435612b6e565b34610881576020366003190112610881576004355f90805f5260036020526126a060405f20546129ee565b5080545f1981019081116120be576126b791612ae1565b50600381015460ff169290831561279c57505f5b91602460a06001600160a01b03600154166040519283809263564a565d60e01b82528660048301525afa908115611e61575f91612778575b5060058110156127645760041461272f575b506060926040519283521515602083015215156040820152f35b61273890612c1f565b9283516001811461274b575b5092612715565b9250505015611fc2576020015160609060015f84612744565b634e487b7160e01b5f52602160045260245ffd5b612791915060a03d60a011610ff857610fe6818361291c565b505091505085612703565b600101546126cb565b346108815760206102e6610a9a366128fa565b34610881576020366003190112610881576004355f526003602052602060405f2054604051908152f35b34610881576020366003190112610881576004355f52600360205261280a60405f20546129ee565b5080545f198101919082116120be5760209161282591612ae1565b506005810154905414604051908152f35b3461088157602036600319011261088157600435906040816024816001600160a01b036001541663afe15cfb60e01b82528660048301525afa918215611e61575f915f936128d3575b5061288990612c1f565b5115908161289f575b6020826040519015158152f35b6128ae91506121148142612aa3565b9061138882029180830461138814901517156120be5761271060209204111582612892565b6128f2919350612889925060403d6040116121f9576121ea818361291c565b92909161287f565b60a0906003190112610881576004359060243590604435906064359060843590565b90601f8019910116810190811067ffffffffffffffff821117611fd657604052565b67ffffffffffffffff8111611fd657601f01601f191660200190565b81601f82011215610881576020813591016129748261293e565b92612982604051948561291c565b8284528282011161088157815f92602092838601378301015290565b600435906001600160a01b038216820361088157565b6040906003190112610881576004359060243590565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600254811015611fc25760025f52600f60205f20910201905f90565b90600182811c92168015612a38575b6020831014612a2457565b634e487b7160e01b5f52602260045260245ffd5b91607f1691612a19565b9181601f840112156108815782359167ffffffffffffffff8311610881576020808501948460051b01011161088157565b606090600319011261088157600435906024359060443590565b9190826040910312610881576020825192015190565b919082039182116120be57565b818102929181159184041417156120be57565b8115612acd570490565b634e487b7160e01b5f52601260045260245ffd5b8054821015611fc2575f52601660205f20910201905f90565b51906bffffffffffffffffffffffff8216820361088157565b5190811515820361088157565b908160a091031261088157612b3481612afa565b9160208201516001600160a01b038116810361088157916040810151600581101561088157916080612b6860608401612b13565b92015190565b906040519060208201928352604082015260408152612b8e60608261291c565b51902090565b9081606091031261088157805191612bba6040612bb360208501612b13565b9301612b13565b90565b919082018092116120be57565b805468010000000000000000811015611fd657612bec91600182018155612ae1565b9091565b3d15612c1a573d90612c018261293e565b91612c0f604051938461291c565b82523d5f602084013e565b606090565b5f526003602052612c3360405f20546129ee565b5080545f198101919082116120be57600a91612c4e91612ae1565b5001604051808260208294549384815201905f5260205f20925f5b818110612c7e575050612bba9250038261291c565b8454835260019485019486945060209093019201612c69565b91908260c091031261088157612cac82612afa565b91612cb960208201612b13565b9160408201519160608101519160a0608083015192015190565b8054821015611fc2575f52600d60205f20910201905f90565b9091815f526003602052612d0360405f20546129ee565b5080545f1981019081116120be57612d1a91612ae1565b506001600160a01b03600154166040517f2e1daf2f000000000000000000000000000000000000000000000000000000008152602081600481855afa908115611e61575f91612f8d575b5060a06024926040519384809263564a565d60e01b82528960048301525afa918215611e61576040926bffffffffffffffffffffffff926064925f92612f5f575b506001600160a01b03908551998a9586947fd045e0020000000000000000000000000000000000000000000000000000000086521660048501528960248501526044840152165afa928315611e61575f945f94612f0c575b5083856001600160a01b03811615612f0457505060045460ff1615612efc575f526003602052612e3060405f20546129ee565b5080545f198101919082116120be57600b91612e4b91612ae1565b506001600160a01b0386165f520160205260ff60405f205416155b15612ef65780549068010000000000000000821015611fd657612e91826001600b9401835582612cd3565b5080547fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff008860081b1691161790556001600160a01b0385165f520160205260405f20600160ff19825416179055565b505f9250565b506001612e66565b955093505050565b945092506040843d604011612f57575b81612f296040938361291c565b81010312610881578351936001600160a01b0385168503610881576020612f509101612afa565b925f612dfd565b3d9150612f1c565b6001600160a01b03919250612f829060a03d60a011610ff857610fe6818361291c565b505050509190612da5565b90506020813d602011612fca575b81612fa86020938361291c565b810103126108815751906001600160a01b0382168203610881579060a0612d64565b3d9150612f9b565b9061300290825f526003602052612fec60405f20546129ee565b50905f526003810160205260405f205490612ae1565b5060606001600160a01b036001541692602460405180958193631c3db16d60e01b835260048301525afa918215611e61575f905f93613094575b5060048201549283158015613075575b1561305957505050505f90565b1561306357505090565b600292505f520160205260405f205490565b508015801561304c5750815f526002830160205260405f20541561304c565b90506130b091925060603d60601161219557612185818361291c565b5091905f61303c565b916106386130d692845f526003602052612fec60405f20546129ee565b509060606001600160a01b036001541691602460405180948193631c3db16d60e01b835260048301525afa908115611e61575f905f92613150575b5060ff8354169283613131575b5050505f1461312d5761271090565b5f90565b600201541491508115613148575b505f808061311e565b90505f61313f565b905061316b915060603d60601161219557612185818361291c565b50905f613111565b6001600160a01b0316905f925f8284811561326c575b5f92839283928392f1613266576001600160a01b031691823b15610881576040517fd0e30db00000000000000000000000000000000000000000000000000000000081525f8160048186885af18015611e6157613251575b50823b156105cf5790604484928360405195869485937fa9059cbb000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561324657613234575050565b61323f82809261291c565b6102145750565b6040513d84823e3d90fd5b61325e9194505f9061291c565b5f925f6131e1565b50505050565b6108fc9250613189565b9190811015611fc25760051b0190565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116108815760209260051b80928483013701019056fea2646970667358221220b5aaba208006c2770b2a559bb6595fe7390db7c206ee67f59edf25055757c98c64736f6c634300081e0033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -973,21 +1345,10 @@ { "details": "The contract is not initializing." } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } ] }, "events": { "ChoiceFunded(uint256,uint256,uint256)": { - "details": "To be emitted when a choice is fully funded for an appeal.", "params": { "_choice": "The choice that is being funded.", "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", @@ -995,7 +1356,6 @@ } }, "CommitCast(uint256,address,uint256[],bytes32)": { - "details": "To be emitted when a vote commitment is cast.", "params": { "_commit": "The commitment of the juror.", "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", @@ -1004,7 +1364,6 @@ } }, "Contribution(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when a funding contribution is made.", "params": { "_amount": "The amount contributed.", "_choice": "The choice that is being funded.", @@ -1014,7 +1373,6 @@ } }, "DisputeCreation(uint256,uint256,bytes)": { - "details": "To be emitted when a dispute is created.", "params": { "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", "_extraData": "The extra data for the dispute.", @@ -1030,7 +1388,6 @@ } }, "VoteCast(uint256,address,uint256[],uint256,string)": { - "details": "Emitted when casting a vote to provide the justification of juror's choice.", "params": { "_choice": "The choice juror voted for.", "_coreDisputeID": "The identifier of the dispute in the Arbitrator contract.", @@ -1040,7 +1397,6 @@ } }, "Withdrawal(uint256,uint256,uint256,address,uint256)": { - "details": "To be emitted when the contributed funds are withdrawn.", "params": { "_amount": "The amount withdrawn.", "_choice": "The choice that is being funded.", @@ -1053,33 +1409,32 @@ "kind": "dev", "methods": { "areCommitsAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their commits for the last round.", "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." }, "returns": { "_0": "Whether all of the jurors have cast their commits for the last round." } }, "areVotesAllCast(uint256)": { - "details": "Returns true if all of the jurors have cast their votes for the last round.", + "details": "This function is to be called directly by the core contract and is not for off-chain usage.", "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." }, "returns": { "_0": "Whether all of the jurors have cast their votes for the last round." } }, "castCommit(uint256,uint256[],bytes32)": { - "details": "Sets the caller's commit for the specified votes. It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", + "details": "It can be called multiple times during the commit period, each call overrides the commits of the previous one. `O(n)` where `n` is the number of votes.", "params": { - "_commit": "The commit. Note that justification string is a part of the commit.", + "_commit": "The commitment hash.", "_coreDisputeID": "The ID of the dispute in Kleros Core.", "_voteIDs": "The IDs of the votes." } }, "castVote(uint256,uint256[],uint256,uint256,string)": { - "details": "Sets the caller's choices for the specified votes. `O(n)` where `n` is the number of votes.", + "details": "`O(n)` where `n` is the number of votes.", "params": { "_choice": "The choice.", "_coreDisputeID": "The ID of the dispute in Kleros Core.", @@ -1089,33 +1444,35 @@ } }, "changeCore(address)": { - "details": "Changes the `core` storage variable.", "params": { "_core": "The new value for the `core` storage variable." } }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", + "changeJumpDisputeKitID(uint256)": { + "params": { + "_jumpDisputeKitID": "The new value for the `jumpDisputeKitID` storage variable." + } + }, + "changeOwner(address)": { "params": { - "_governor": "The new value for the `governor` storage variable." + "_owner": "The new value for the `owner` storage variable." } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createDispute(uint256,uint256,bytes,uint256)": { - "details": "Creates a local dispute and maps it to the dispute ID in the Core contract. Note: Access restricted to Kleros Core only.", + "details": "Access restricted to Kleros Core only.", "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", "_extraData": "Additional info about the dispute, for possible use in future dispute kits.", - "_nbVotes": "Number of votes for this dispute.", + "_nbVotes": "Maximal number of votes this dispute can get. Added for future-proofing.", "_numberOfChoices": "Number of choices of the dispute" } }, "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core." + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." }, "returns": { "overridden": "Whether the ruling was overridden by appeal funding or not.", @@ -1124,17 +1481,25 @@ } }, "draw(uint256,uint256)": { - "details": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core. Note: Access restricted to Kleros Core only.", + "details": "Access restricted to Kleros Core only.", "params": { - "_coreDisputeID": "The ID of the dispute in Kleros Core.", - "_nonce": "Nonce of the drawing iteration." + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", + "_nonce": "Nonce." }, "returns": { "drawnAddress": "The drawn address." } }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", + "earlyCourtJump(uint256)": { + "details": "Returns true if the dispute is jumping to a parent court.", + "params": { + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." + }, + "returns": { + "_0": "Whether the dispute is jumping to a parent court or not." + } + }, + "executeOwnerProposal(address,uint256,bytes)": { "params": { "_amount": "The value sent with the call.", "_data": "The data sent with the call.", @@ -1142,14 +1507,12 @@ } }, "fundAppeal(uint256,uint256)": { - "details": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed.", "params": { "_choice": "A choice that receives funding.", "_coreDisputeID": "Index of the dispute in Kleros Core." } }, "getCoherentCount(uint256,uint256)": { - "details": "Gets the number of jurors who are eligible to a reward in this round.", "params": { "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." @@ -1158,26 +1521,129 @@ "_0": "The number of coherent jurors." } }, - "getDegreeOfCoherence(uint256,uint256,uint256,uint256,uint256)": { - "details": "Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.", + "getDegreeOfCoherencePenalty(uint256,uint256,uint256,uint256,uint256)": { + "details": "This function is called by Kleros Core in order to determine the amount of the penalty.", "params": { "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", + "_feePerJuror": "The fee per juror.", + "_pnkAtStakePerJuror": "The PNK at stake per juror.", "_voteID": "The ID of the vote." }, "returns": { - "_0": "The degree of coherence in basis points." + "pnkCoherence": "The degree of coherence in basis points for the dispute PNK reward." } }, - "initialize(address,address)": { - "details": "Initializer.", + "getDegreeOfCoherenceReward(uint256,uint256,uint256,uint256,uint256)": { + "details": "This function is called by Kleros Core in order to determine the amount of the reward.", + "params": { + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", + "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", + "_feePerJuror": "The fee per juror.", + "_pnkAtStakePerJuror": "The PNK at stake per juror.", + "_voteID": "The ID of the vote." + }, + "returns": { + "feeCoherence": "The degree of coherence in basis points for the dispute fee reward.", + "pnkCoherence": "The degree of coherence in basis points for the dispute PNK reward." + } + }, + "getFundedChoices(uint256)": { + "params": { + "_coreDisputeID": "The ID of the dispute in Kleros Core." + }, + "returns": { + "fundedChoices": "Fully funded rulings." + } + }, + "getJumpDisputeKitID()": { + "returns": { + "_0": "The ID of the dispute kit in Kleros Core disputeKits array." + } + }, + "getLocalDisputeRoundID(uint256,uint256)": { + "params": { + "_coreDisputeID": "The ID of the dispute in Kleros Core.", + "_coreRoundID": "The ID of the round in Kleros Core." + }, + "returns": { + "localDisputeID": "The ID of the dispute in the Dispute Kit.", + "localRoundID": "The ID of the round in the Dispute Kit." + } + }, + "getNbVotesAfterAppeal(address,uint256)": { + "params": { + "_currentNbVotes": "The number of votes before the appeal.", + "_previousDisputeKit": "The previous Dispute Kit." + }, + "returns": { + "_0": "The number of votes after the appeal." + } + }, + "getNumberOfRounds(uint256)": { + "params": { + "_localDisputeID": "The ID of the dispute in the Dispute Kit." + }, + "returns": { + "_0": "The number of rounds in the dispute." + } + }, + "getRoundInfo(uint256,uint256,uint256)": { + "params": { + "_choice": "The choice to query.", + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", + "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit." + }, + "returns": { + "choiceCount": "Number of votes cast for the queried choice.", + "nbVoters": "Total number of voters in this round.", + "tied": "Whether it's a tie or not.", + "totalCommitted": "Number of jurors who cast the commit already (only relevant for hidden votes).", + "totalVoted": "Number of jurors who cast the vote already.", + "winningChoice": "The winning choice of this round." + } + }, + "getVoteInfo(uint256,uint256,uint256)": { + "params": { + "_coreDisputeID": "The ID of the dispute in Kleros Core.", + "_coreRoundID": "The ID of the round in Kleros Core.", + "_voteID": "The ID of the vote." + }, + "returns": { + "account": "The address of the juror who cast the vote.", + "choice": "The choice that got the vote.", + "commit": "The commit of the vote.", + "voted": "Whether the vote was cast or not." + } + }, + "hashVote(uint256,uint256,string)": { + "details": "The unused parameters may be used by overriding contracts.", + "params": { + "_choice": "The choice being voted for", + "_salt": "A random salt for commitment" + }, + "returns": { + "_0": "bytes32 The hash of the encoded vote parameters" + } + }, + "initialize(address,address,address,uint256)": { "params": { "_core": "The KlerosCore arbitrator.", - "_governor": "The governor's address." + "_jumpDisputeKitID": "The ID of the dispute kit to switch to after the court jump.", + "_owner": "The owner's address.", + "_wNative": "The wrapped native token address, typically wETH." + } + }, + "isAppealFunded(uint256)": { + "details": "This function is to be called directly by the core contract and is not for off-chain usage.", + "params": { + "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit." + }, + "returns": { + "_0": "Whether the appeal funding is finished." } }, "isVoteActive(uint256,uint256,uint256)": { - "details": "Returns true if the specified voter was active in this round.", "params": { "_coreDisputeID": "The ID of the dispute in Kleros Core, not in the Dispute Kit.", "_coreRoundID": "The ID of the round in Kleros Core, not in the Dispute Kit.", @@ -1188,17 +1654,17 @@ } }, "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." + "details": "IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." }, "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", + "details": "Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", "params": { "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", "newImplementation": "Address of the new implementation contract." } }, "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { - "details": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved. Note that withdrawals are not possible if the core contract is paused.", + "details": "Withdrawals are not possible if the core contract is paused.", "params": { "_beneficiary": "The address whose rewards to withdraw.", "_choice": "The ruling option that the caller wants to withdraw from.", @@ -1210,7 +1676,15 @@ } } }, - "title": "DisputeKitClassic Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", + "stateVariables": { + "version": { + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, + "title": "DisputeKitClassic", "version": 1 }, "userdoc": { @@ -1224,50 +1698,210 @@ { "notice": "The `implementation` is not UUPS-compliant" } + ], + "UUPSUnauthorizedCallContext()": [ + { + "notice": "The call is from an unauthorized context." + } + ], + "UUPSUnsupportedProxiableUUID(bytes32)": [ + { + "notice": "The storage `slot` is unsupported as a UUID." + } ] }, "events": { + "ChoiceFunded(uint256,uint256,uint256)": { + "notice": "To be emitted when a choice is fully funded for an appeal." + }, + "CommitCast(uint256,address,uint256[],bytes32)": { + "notice": "To be emitted when a vote commitment is cast." + }, + "Contribution(uint256,uint256,uint256,address,uint256)": { + "notice": "To be emitted when a funding contribution is made." + }, + "DisputeCreation(uint256,uint256,bytes)": { + "notice": "To be emitted when a dispute is created." + }, "Upgraded(address)": { "notice": "Emitted when the `implementation` has been successfully upgraded." + }, + "VoteCast(uint256,address,uint256[],uint256,string)": { + "notice": "Emitted when casting a vote to provide the justification of juror's choice." + }, + "Withdrawal(uint256,uint256,uint256,address,uint256)": { + "notice": "To be emitted when the contributed funds are withdrawn." } }, "kind": "user", - "methods": {}, + "methods": { + "areCommitsAllCast(uint256)": { + "notice": "Returns true if all of the jurors have cast their commits for the last round." + }, + "areVotesAllCast(uint256)": { + "notice": "Returns true if all of the jurors have cast their votes for the last round." + }, + "castCommit(uint256,uint256[],bytes32)": { + "notice": "Sets the caller's commit for the specified votes." + }, + "castVote(uint256,uint256[],uint256,uint256,string)": { + "notice": "Sets the caller's choices for the specified votes." + }, + "changeCore(address)": { + "notice": "Changes the `core` storage variable." + }, + "changeJumpDisputeKitID(uint256)": { + "notice": "Changes the dispute kit ID used for the jump." + }, + "changeOwner(address)": { + "notice": "Changes the `owner` storage variable." + }, + "createDispute(uint256,uint256,bytes,uint256)": { + "notice": "Creates a local dispute and maps it to the dispute ID in the Core contract." + }, + "currentRuling(uint256)": { + "notice": "Gets the current ruling of a specified dispute." + }, + "draw(uint256,uint256)": { + "notice": "Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core." + }, + "executeOwnerProposal(address,uint256,bytes)": { + "notice": "Allows the owner to call anything on behalf of the contract." + }, + "fundAppeal(uint256,uint256)": { + "notice": "Manages contributions, and appeals a dispute if at least two choices are fully funded. Note that the surplus deposit will be reimbursed." + }, + "getCoherentCount(uint256,uint256)": { + "notice": "Gets the number of jurors who are eligible to a reward in this round." + }, + "getDegreeOfCoherencePenalty(uint256,uint256,uint256,uint256,uint256)": { + "notice": "Gets the degree of coherence of a particular voter." + }, + "getDegreeOfCoherenceReward(uint256,uint256,uint256,uint256,uint256)": { + "notice": "Gets the degree of coherence of a particular voter." + }, + "getFundedChoices(uint256)": { + "notice": "Returns the rulings that were fully funded in the latest appeal round." + }, + "getJumpDisputeKitID()": { + "notice": "Returns the dispute kit ID to be used after court jump by Kleros Core." + }, + "getLocalDisputeRoundID(uint256,uint256)": { + "notice": "Returns the local dispute ID and round ID for a given core dispute ID and core round ID." + }, + "getNbVotesAfterAppeal(address,uint256)": { + "notice": "Returns the number of votes after the appeal." + }, + "getNumberOfRounds(uint256)": { + "notice": "Returns the number of rounds in a dispute." + }, + "getRoundInfo(uint256,uint256,uint256)": { + "notice": "Returns the info of the specified round in the core contract." + }, + "getVoteInfo(uint256,uint256,uint256)": { + "notice": "Returns the vote information for a given vote ID." + }, + "hashVote(uint256,uint256,string)": { + "notice": "Computes the hash of a vote using ABI encoding" + }, + "initialize(address,address,address,uint256)": { + "notice": "Initializer." + }, + "isAppealFunded(uint256)": { + "notice": "Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund)." + }, + "isVoteActive(uint256,uint256,uint256)": { + "notice": "Returns true if the specified voter was active in this round." + }, + "proxiableUUID()": { + "notice": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade." + }, + "upgradeToAndCall(address,bytes)": { + "notice": "Upgrade mechanism including access control and UUPS-compliance." + }, + "version()": { + "notice": "Returns the version of the implementation." + }, + "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { + "notice": "Allows those contributors who attempted to fund an appeal round to withdraw any reimbursable fees or rewards after the dispute gets resolved." + } + }, + "notice": "Dispute kit implementation of the Kleros v1 features including: - a drawing system: proportional to staked PNK, - a vote aggregation system: plurality, - an incentive system: equal split between coherent votes, - an appeal system: fund 2 choices only, vote on any choice.", "version": 1 }, "storageLayout": { "storage": [ { - "astId": 17736, + "astId": 21251, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "governor", + "label": "owner", "offset": 0, "slot": "0", "type": "t_address" }, { - "astId": 17739, + "astId": 21254, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCore)7051" + "type": "t_contract(KlerosCore)15195" }, { - "astId": 17743, + "astId": 21258, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "disputes", "offset": 0, "slot": "2", - "type": "t_array(t_struct(Dispute)17675_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)21183_storage)dyn_storage" }, { - "astId": 17747, + "astId": 21262, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreDisputeIDToLocal", "offset": 0, "slot": "3", "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 21264, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "singleDrawPerJuror", + "offset": 0, + "slot": "4", + "type": "t_bool" + }, + { + "astId": 21268, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "coreDisputeIDToActive", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_bool)" + }, + { + "astId": 21270, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "wNative", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 21272, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "jumpDisputeKitID", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 21276, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "__gap", + "offset": 0, + "slot": "8", + "type": "t_array(t_uint256)50_storage" } ], "types": { @@ -1276,24 +1910,36 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(Dispute)17675_storage)dyn_storage": { - "base": "t_struct(Dispute)17675_storage", + "t_array(t_struct(Dispute)21183_storage)dyn_storage": { + "base": "t_struct(Dispute)21183_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Dispute[]", + "label": "struct DisputeKitClassicBase.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)17713_storage)dyn_storage": { - "base": "t_struct(Round)17713_storage", + "t_array(t_struct(Round)21227_storage)dyn_storage": { + "base": "t_struct(Round)21227_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Round[]", + "label": "struct DisputeKitClassicBase.Round[]", "numberOfBytes": "32" }, - "t_array(t_struct(Vote)17722_storage)dyn_storage": { - "base": "t_struct(Vote)17722_storage", + "t_array(t_struct(Vote)21240_storage)dyn_storage": { + "base": "t_struct(Vote)21240_storage", "encoding": "dynamic_array", - "label": "struct DisputeKitClassic.Vote[]", + "label": "struct DisputeKitClassicBase.Vote[]", "numberOfBytes": "32" }, + "t_array(t_uint256)10_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[10]", + "numberOfBytes": "320" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, "t_array(t_uint256)dyn_storage": { "base": "t_uint256", "encoding": "dynamic_array", @@ -1315,11 +1961,18 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(KlerosCore)7051": { + "t_contract(KlerosCore)15195": { "encoding": "inplace", "label": "contract KlerosCore", "numberOfBytes": "20" }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { "encoding": "mapping", "key": "t_address", @@ -1341,20 +1994,20 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Dispute)17675_storage": { + "t_struct(Dispute)21183_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Dispute", + "label": "struct DisputeKitClassicBase.Dispute", "members": [ { - "astId": 17664, + "astId": 21168, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "rounds", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Round)17713_storage)dyn_storage" + "type": "t_array(t_struct(Round)21227_storage)dyn_storage" }, { - "astId": 17666, + "astId": 21170, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "numberOfChoices", "offset": 0, @@ -1362,7 +2015,7 @@ "type": "t_uint256" }, { - "astId": 17668, + "astId": 21172, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "jumped", "offset": 0, @@ -1370,7 +2023,7 @@ "type": "t_bool" }, { - "astId": 17672, + "astId": 21176, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreRoundIDToLocal", "offset": 0, @@ -1378,30 +2031,38 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 17674, + "astId": 21178, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "extraData", "offset": 0, "slot": "4", "type": "t_bytes_storage" + }, + { + "astId": 21182, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "__gap", + "offset": 0, + "slot": "5", + "type": "t_array(t_uint256)10_storage" } ], - "numberOfBytes": "160" + "numberOfBytes": "480" }, - "t_struct(Round)17713_storage": { + "t_struct(Round)21227_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Round", + "label": "struct DisputeKitClassicBase.Round", "members": [ { - "astId": 17679, + "astId": 21187, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "votes", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Vote)17722_storage)dyn_storage" + "type": "t_array(t_struct(Vote)21240_storage)dyn_storage" }, { - "astId": 17681, + "astId": 21189, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "winningChoice", "offset": 0, @@ -1409,7 +2070,7 @@ "type": "t_uint256" }, { - "astId": 17685, + "astId": 21193, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "counts", "offset": 0, @@ -1417,7 +2078,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 17687, + "astId": 21195, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "tied", "offset": 0, @@ -1425,7 +2086,7 @@ "type": "t_bool" }, { - "astId": 17689, + "astId": 21197, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalVoted", "offset": 0, @@ -1433,7 +2094,7 @@ "type": "t_uint256" }, { - "astId": 17691, + "astId": 21199, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalCommitted", "offset": 0, @@ -1441,7 +2102,7 @@ "type": "t_uint256" }, { - "astId": 17695, + "astId": 21203, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "paidFees", "offset": 0, @@ -1449,7 +2110,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 17699, + "astId": 21207, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "hasPaid", "offset": 0, @@ -1457,7 +2118,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 17705, + "astId": 21213, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "contributions", "offset": 0, @@ -1465,7 +2126,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 17707, + "astId": 21215, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "feeRewards", "offset": 0, @@ -1473,7 +2134,7 @@ "type": "t_uint256" }, { - "astId": 17710, + "astId": 21218, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "fundedChoices", "offset": 0, @@ -1481,30 +2142,46 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 17712, + "astId": 21222, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "nbVotes", + "label": "alreadyDrawn", "offset": 0, "slot": "11", - "type": "t_uint256" + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 21226, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "__gap", + "offset": 0, + "slot": "12", + "type": "t_array(t_uint256)10_storage" } ], - "numberOfBytes": "384" + "numberOfBytes": "704" }, - "t_struct(Vote)17722_storage": { + "t_struct(Vote)21240_storage": { "encoding": "inplace", - "label": "struct DisputeKitClassic.Vote", + "label": "struct DisputeKitClassicBase.Vote", "members": [ { - "astId": 17715, + "astId": 21229, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "account", + "label": "voted", "offset": 0, "slot": "0", + "type": "t_bool" + }, + { + "astId": 21231, + "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", + "label": "account", + "offset": 1, + "slot": "0", "type": "t_address" }, { - "astId": 17717, + "astId": 21233, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "commit", "offset": 0, @@ -1512,7 +2189,7 @@ "type": "t_bytes32" }, { - "astId": 17719, + "astId": 21235, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "choice", "offset": 0, @@ -1520,15 +2197,15 @@ "type": "t_uint256" }, { - "astId": 17721, + "astId": 21239, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", - "label": "voted", + "label": "__gap", "offset": 0, "slot": "3", - "type": "t_bool" + "type": "t_array(t_uint256)10_storage" } ], - "numberOfBytes": "128" + "numberOfBytes": "416" }, "t_uint256": { "encoding": "inplace", diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json index 90c310630..9e6ff1681 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + "address": "0x82F2089442979A6b56c80274D144575980092F91", "abi": [ { "inputs": [ @@ -26,44 +26,44 @@ "type": "receive" } ], - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", + "transactionHash": "0xbc5117fa79c44f4304b16dfe26f072d80a71dce7cf9986f10f363c6e20457bd5", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", - "transactionIndex": 1, - "gasUsed": "189732", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000004000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90", - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", + "contractAddress": "0x82F2089442979A6b56c80274D144575980092F91", + "transactionIndex": 2, + "gasUsed": "205891", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000080000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x11a1f340150df5f9ad32caef5cb1157e97be0914fb56af4c3835a86a743a5184", + "transactionHash": "0xbc5117fa79c44f4304b16dfe26f072d80a71dce7cf9986f10f363c6e20457bd5", "logs": [ { - "transactionIndex": 1, - "blockNumber": 96308536, - "transactionHash": "0xbe90d4066f62381a1a2c725364c3d35093e1ff685736f3fa0a7b75c3b0e82f93", - "address": "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + "transactionIndex": 2, + "blockNumber": 193533776, + "transactionHash": "0xbc5117fa79c44f4304b16dfe26f072d80a71dce7cf9986f10f363c6e20457bd5", + "address": "0x82F2089442979A6b56c80274D144575980092F91", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x1e4647532736ec4a239971727f05a17b1bb50fc89c0ec7a8da6e34f4f5bfcc90" + "logIndex": 4, + "blockHash": "0x11a1f340150df5f9ad32caef5cb1157e97be0914fb56af4c3835a86a743a5184" } ], - "blockNumber": 96308536, - "cumulativeGasUsed": "189732", + "blockNumber": 193533776, + "cumulativeGasUsed": "320063", "status": 1, "byzantium": true }, "args": [ - "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" + "0x602ADa1cE706404BFb5417e497cdDae934436081", + "0xcf756fdf000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000000000000000000000000000000000000000000000000000000000000000000003829a2486d53ee984a0ca2d76552715726b771380000000000000000000000000000000000000000000000000000000000000001" ], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "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\":\"DisputeKitClassicUniversityProxy\"},\"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 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\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\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 */\\ncontract UUPSProxy {\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\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 */\\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 /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\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 /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220a67e53546ab2c83f023c185d90506ad48d4e7af6339cf6db0c4ed97ec9ed376f64736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":{},\"notice\":\"Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitClassicUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 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 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\":\"0x3160bd320b23c6ec0c21862b455c3044a9b33654ae84a1b6cd76255626c9154b\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122078e638e186ffb95282090eae06b37667016702ebe14876894d9cb231ea135b1264736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122078e638e186ffb95282090eae06b37667016702ebe14876894d9cb231ea135b1264736f6c634300081e0033", "devdoc": { "kind": "dev", "methods": {}, @@ -72,6 +72,7 @@ "userdoc": { "kind": "user", "methods": {}, + "notice": "Workaround to get meaningful names for the proxy contracts Otherwise all the contracts are called `UUPSProxy` on the chain explorers", "version": 1 }, "storageLayout": { diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json index df70ac2d7..ced6acaaf 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json @@ -1,5 +1,5 @@ { - "address": "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", + "address": "0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D", "abi": [ { "inputs": [ @@ -17,6 +17,31 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [], + "name": "ArbitratorOnly", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeAlreadyRuled", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "RulingOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "ShouldBeAtLeastTwoRulingOptions", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -43,12 +68,6 @@ "internalType": "uint256", "name": "_templateId", "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_templateUri", - "type": "string" } ], "name": "DisputeRequest", @@ -128,11 +147,11 @@ "inputs": [ { "internalType": "address", - "name": "_governor", + "name": "_owner", "type": "address" } ], - "name": "changeGovernor", + "name": "changeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -184,35 +203,6 @@ "stateMutability": "payable", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_arbitratorExtraData", - "type": "bytes" - }, - { - "internalType": "string", - "name": "_disputeTemplateUri", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_numberOfRulingOptions", - "type": "uint256" - } - ], - "name": "createDisputeForTemplateUri", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, { "inputs": [ { @@ -249,7 +239,7 @@ }, { "inputs": [], - "name": "governor", + "name": "owner", "outputs": [ { "internalType": "address", @@ -292,45 +282,43 @@ "type": "function" } ], - "transactionHash": "0x6e6144da838df488664fec992cf96ff6d6d7e6d6b2239d15dbaa4db970be6116", + "transactionHash": "0x4f3a4aa6c10dc5486a14af9edbc0f2115240604e431b9902d5694f2e9bd893de", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", + "contractAddress": "0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D", "transactionIndex": 1, - "gasUsed": "935568", + "gasUsed": "676666", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x581b5decfadcbf1085c9383e7378b7f2738f8a0050031424ce6c036cf809ff5d", - "transactionHash": "0x6e6144da838df488664fec992cf96ff6d6d7e6d6b2239d15dbaa4db970be6116", + "blockHash": "0x9775b98bdf7d48f5236d3471c48cef965244309e2f8efa2435e030236005bc91", + "transactionHash": "0x4f3a4aa6c10dc5486a14af9edbc0f2115240604e431b9902d5694f2e9bd893de", "logs": [], - "blockNumber": 96308731, - "cumulativeGasUsed": "935568", + "blockNumber": 193533879, + "cumulativeGasUsed": "676666", "status": 1, "byzantium": true }, "args": [ - "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "0x596D3B09E684D62217682216e9b7a0De75933391" + "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", + "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f" ], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateUri\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplateUri\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor.\",\"params\":{\"_governor\":\"The address of the new governor.\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"createDisputeForTemplateUri(bytes,string,uint256)\":{\"details\":\"Calls createDispute function of the specified arbitrator to create a dispute. Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"To be called by the arbitrator of the dispute, to declare the winning ruling.\",\"params\":{\"_arbitratorDisputeID\":\"ID of the dispute in arbitrator contract.\",\"_ruling\":\"The ruling choice of the arbitration.\"}}},\"title\":\"DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity 0.8.24;\\n\\n/// @title DisputeResolver\\n/// DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the governor.\\n /// @param _governor The address of the new governor.\\n function changeGovernor(address _governor) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n require(governor == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n \\\"\\\",\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @dev Calls createDispute function of the specified arbitrator to create a dispute.\\n /// Note that we don\\u2019t need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplateUri(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return _createDispute(_arbitratorExtraData, \\\"\\\", \\\"\\\", _disputeTemplateUri, _numberOfRulingOptions);\\n }\\n\\n /// @dev To be called by the arbitrator of the dispute, to declare the winning ruling.\\n /// @param _arbitratorDisputeID ID of the dispute in arbitrator contract.\\n /// @param _ruling The ruling choice of the arbitration.\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n require(msg.sender == address(arbitrator), \\\"Only the arbitrator can execute this.\\\");\\n require(_ruling <= dispute.numberOfRulingOptions, \\\"Invalid ruling.\\\");\\n require(!dispute.isRuled, \\\"This dispute has been ruled already.\\\");\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n string memory _disputeTemplateUri,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n require(_numberOfRulingOptions > 1, \\\"Should be at least 2 ruling options.\\\");\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId, _disputeTemplateUri);\\n }\\n}\\n\",\"keccak256\":\"0xee61f409399f0e66be187def6fcbe2e23717475b2b752d913dfac0a32c7dca1a\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0xb46ff71c32a524a865fe8ca99d94c9daeb690bc9d7d49d963a45b06f60af19f3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610ed7380380610ed783398101604081905261002f91610083565b600080546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100bd565b6001600160a01b038116811461008057600080fd5b50565b6000806040838503121561009657600080fd5b82516100a18161006b565b60208401519092506100b28161006b565b809150509250929050565b610e0b806100cc6000396000f3fe60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063908bb29511610064578063908bb29514610170578063a0af81f014610191578063dc653511146101b1578063e09997d9146101c4578063e4c0aaf4146101f1578063fc548f081461021157600080fd5b80630c340a24146100a1578063311a6c56146100de5780634660ebbe14610100578063564a565d146101205780636cc6cde114610150575b600080fd5b3480156100ad57600080fd5b506000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100fe6100f93660046108bb565b610231565b005b34801561010c57600080fd5b506100fe61011b3660046108f5565b6103d1565b34801561012c57600080fd5b5061014061013b366004610919565b61041d565b6040516100d59493929190610978565b34801561015c57600080fd5b506001546100c1906001600160a01b031681565b61018361017e3660046109f0565b6104eb565b6040519081526020016100d5565b34801561019d57600080fd5b506002546100c1906001600160a01b031681565b6101836101bf366004610a7a565b61055a565b3480156101d057600080fd5b506101836101df366004610919565b60046020526000908152604090205481565b3480156101fd57600080fd5b506100fe61020c3660046108f5565b6105b9565b34801561021d57600080fd5b506100fe61022c3660046108f5565b610605565b600082815260046020526040812054600380549192918390811061025757610257610b88565b6000918252602090912060015460049092020191506001600160a01b031633146102d65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561031c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102cd565b600181015460ff161561037d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102cd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b6000546001600160a01b031633146103fb5760405162461bcd60e51b81526004016102cd90610b9e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061042d57600080fd5b906000526020600020906004020160009150905080600001805461045090610be0565b80601f016020809104026020016040519081016040528092919081815260200182805461047c90610be0565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b60006105508686604051806020016040528060008152506040518060200160405280600081525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250610651915050565b9695505050505050565b60006105ae878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081528a93509150889050610651565b979650505050505050565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016102cd90610b9e565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461062f5760405162461bcd60e51b81526004016102cd90610b9e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600182116106af5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102cd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106e59086908c908c90600401610c1a565b60206040518083038185885af1158015610703573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107289190610c50565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284376000920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107a59082610cba565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092556000858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a9941749161081c918b918b9101610d7a565b6020604051808303816000875af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190610c50565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186906108a790869086908b90610db6565b60405180910390a350509695505050505050565b600080604083850312156108ce57600080fd5b50508035926020909101359150565b6001600160a01b03811681146108f257600080fd5b50565b60006020828403121561090757600080fd5b8135610912816108dd565b9392505050565b60006020828403121561092b57600080fd5b5035919050565b6000815180845260005b818110156109585760208185018101518683018201520161093c565b506000602082860101526020601f19601f83011685010191505092915050565b60808152600061098b6080830187610932565b9415156020830152506040810192909252606090910152919050565b60008083601f8401126109b957600080fd5b50813567ffffffffffffffff8111156109d157600080fd5b6020830191508360208285010111156109e957600080fd5b9250929050565b600080600080600060608688031215610a0857600080fd5b853567ffffffffffffffff80821115610a2057600080fd5b610a2c89838a016109a7565b90975095506020880135915080821115610a4557600080fd5b50610a52888289016109a7565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060808789031215610a9357600080fd5b863567ffffffffffffffff80821115610aab57600080fd5b610ab78a838b016109a7565b90985096506020890135915080821115610ad057600080fd5b610adc8a838b016109a7565b90965094506040890135915080821115610af557600080fd5b818901915089601f830112610b0957600080fd5b813581811115610b1b57610b1b610a64565b604051601f8201601f19908116603f01168101908382118183101715610b4357610b43610a64565b816040528281528c6020848701011115610b5c57600080fd5b826020860160208301376000602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610bf457607f821691505b602082108103610c1457634e487b7160e01b600052602260045260246000fd5b50919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215610c6257600080fd5b5051919050565b601f821115610cb5576000816000526020600020601f850160051c81016020861015610c925750805b601f850160051c820191505b81811015610cb157828155600101610c9e565b5050505b505050565b815167ffffffffffffffff811115610cd457610cd4610a64565b610ce881610ce28454610be0565b84610c69565b602080601f831160018114610d1d5760008415610d055750858301515b600019600386901b1c1916600185901b178555610cb1565b600085815260208120601f198616915b82811015610d4c57888601518255948401946001909101908401610d2d565b5085821015610d6a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006060820152608060208201526000610d9b6080830185610932565b8281036040840152610dad8185610932565b95945050505050565b838152826020820152606060408201526000610dad606083018461093256fea264697066735822122028e3f1561d663e8479b35f936c2645829463b01bf5fedd3e120b732867bda19a64736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArbitratorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeAlreadyRuled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingOutOfBounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ShouldBeAtLeastTwoRulingOptions\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitratorDisputeIDToLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplate\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_disputeTemplateDataMappings\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfRulingOptions\",\"type\":\"uint256\"}],\"name\":\"createDisputeForTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isRuled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numberOfRulingOptions\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitratorDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\",\"events\":{\"DisputeRequest(address,uint256,uint256,uint256)\":{\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorDisputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template.\"}},\"Ruling(address,uint256,uint256)\":{\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}}},\"kind\":\"dev\",\"methods\":{\"changeOwner(address)\":{\"params\":{\"_owner\":\"The address of the new owner.\"}},\"constructor\":{\"params\":{\"_arbitrator\":\"Target global arbitrator for any disputes.\"}},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"details\":\"No need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\",\"params\":{\"_arbitratorExtraData\":\"Extra data for the arbitrator of the dispute.\",\"_disputeTemplate\":\"Dispute template.\",\"_disputeTemplateDataMappings\":\"The data mappings.\",\"_numberOfRulingOptions\":\"Number of ruling options.\"},\"returns\":{\"disputeID\":\"Dispute id (on arbitrator side) of the created dispute.\"}},\"rule(uint256,uint256)\":{\"details\":\"This is a callback function for the arbitrator to provide the ruling to this contract. Only the arbitrator must be allowed to call this function. Ruling 0 is reserved for \\\"Not able/wanting to make a decision\\\".\",\"params\":{\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"Ruling given by the arbitrator.\"}}},\"title\":\"DisputeResolver\",\"version\":1},\"userdoc\":{\"events\":{\"DisputeRequest(address,uint256,uint256,uint256)\":{\"notice\":\"To be emitted when a dispute is created to link the correct template to the disputeID.\"},\"Ruling(address,uint256,uint256)\":{\"notice\":\"To be raised when a ruling is given.\"}},\"kind\":\"user\",\"methods\":{\"changeOwner(address)\":{\"notice\":\"Changes the owner.\"},\"constructor\":{\"notice\":\"Constructor\"},\"createDisputeForTemplate(bytes,string,string,uint256)\":{\"notice\":\"Calls createDispute function of the specified arbitrator to create a dispute.\"},\"rule(uint256,uint256)\":{\"notice\":\"Give a ruling for a dispute.\"}},\"notice\":\"DisputeResolver contract\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/arbitrables/DisputeResolver.sol\":\"DisputeResolver\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/arbitrables/DisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitrableV2.sol\\\";\\nimport \\\"../interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\npragma solidity ^0.8.24;\\n\\n/// @title DisputeResolver\\n/// @notice DisputeResolver contract\\n/// @dev Adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.\\ncontract DisputeResolver is IArbitrableV2 {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct DisputeStruct {\\n bytes arbitratorExtraData; // Extra data for the dispute.\\n bool isRuled; // True if the dispute has been ruled.\\n uint256 ruling; // Ruling given to the dispute.\\n uint256 numberOfRulingOptions; // The number of choices the arbitrator can give.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public owner; // The owner.\\n IArbitratorV2 public arbitrator; // The arbitrator.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n DisputeStruct[] public disputes; // Local disputes.\\n mapping(uint256 => uint256) public arbitratorDisputeIDToLocalID; // Maps arbitrator-side dispute IDs to local dispute IDs.\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @notice Constructor\\n /// @param _arbitrator Target global arbitrator for any disputes.\\n constructor(IArbitratorV2 _arbitrator, IDisputeTemplateRegistry _templateRegistry) {\\n owner = msg.sender;\\n arbitrator = _arbitrator;\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @notice Changes the owner.\\n /// @param _owner The address of the new owner.\\n function changeOwner(address _owner) external {\\n if (owner != msg.sender) revert OwnerOnly();\\n owner = _owner;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external {\\n if (owner != msg.sender) revert OwnerOnly();\\n arbitrator = _arbitrator;\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external {\\n if (owner != msg.sender) revert OwnerOnly();\\n templateRegistry = _templateRegistry;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Calls createDispute function of the specified arbitrator to create a dispute.\\n /// @dev No need to check that msg.value is enough to pay arbitration fees as it\\u2019s the responsibility of the arbitrator contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator of the dispute.\\n /// @param _disputeTemplate Dispute template.\\n /// @param _disputeTemplateDataMappings The data mappings.\\n /// @param _numberOfRulingOptions Number of ruling options.\\n /// @return disputeID Dispute id (on arbitrator side) of the created dispute.\\n function createDisputeForTemplate(\\n bytes calldata _arbitratorExtraData,\\n string calldata _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) external payable returns (uint256 disputeID) {\\n return\\n _createDispute(\\n _arbitratorExtraData,\\n _disputeTemplate,\\n _disputeTemplateDataMappings,\\n _numberOfRulingOptions\\n );\\n }\\n\\n /// @inheritdoc IArbitrableV2\\n function rule(uint256 _arbitratorDisputeID, uint256 _ruling) external override {\\n uint256 localDisputeID = arbitratorDisputeIDToLocalID[_arbitratorDisputeID];\\n DisputeStruct storage dispute = disputes[localDisputeID];\\n if (msg.sender != address(arbitrator)) revert ArbitratorOnly();\\n if (_ruling > dispute.numberOfRulingOptions) revert RulingOutOfBounds();\\n if (dispute.isRuled) revert DisputeAlreadyRuled();\\n\\n dispute.isRuled = true;\\n dispute.ruling = _ruling;\\n\\n emit Ruling(IArbitratorV2(msg.sender), _arbitratorDisputeID, dispute.ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n bytes calldata _arbitratorExtraData,\\n string memory _disputeTemplate,\\n string memory _disputeTemplateDataMappings,\\n uint256 _numberOfRulingOptions\\n ) internal virtual returns (uint256 arbitratorDisputeID) {\\n if (_numberOfRulingOptions <= 1) revert ShouldBeAtLeastTwoRulingOptions();\\n\\n arbitratorDisputeID = arbitrator.createDispute{value: msg.value}(_numberOfRulingOptions, _arbitratorExtraData);\\n uint256 localDisputeID = disputes.length;\\n disputes.push(\\n DisputeStruct({\\n arbitratorExtraData: _arbitratorExtraData,\\n isRuled: false,\\n ruling: 0,\\n numberOfRulingOptions: _numberOfRulingOptions\\n })\\n );\\n arbitratorDisputeIDToLocalID[arbitratorDisputeID] = localDisputeID;\\n uint256 templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _disputeTemplate, _disputeTemplateDataMappings);\\n emit DisputeRequest(arbitrator, arbitratorDisputeID, localDisputeID, templateId);\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error OwnerOnly();\\n error ArbitratorOnly();\\n error RulingOutOfBounds();\\n error DisputeAlreadyRuled();\\n error ShouldBeAtLeastTwoRulingOptions();\\n}\\n\",\"keccak256\":\"0xba17fdaa371403c1b9c1e6673e640aa4c70f409b479e5147a8db9755f6154f0f\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation which calls `arbitrator.createDispute{value: _fee}(_choices,_extraData)`.\\ninterface IArbitrableV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created to link the correct template to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId\\n );\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Give a ruling for a dispute.\\n ///\\n /// @dev This is a callback function for the arbitrator to provide the ruling to this contract.\\n /// Only the arbitrator must be allowed to call this function.\\n /// Ruling 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n ///\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x3afa29a93847399c8705103350b69bb70706b2075ca41b39d523b007e69e23db\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// @notice Arbitrator interface for the Kleros V2 protocol.\\n/// @dev Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\ninterface IArbitratorV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @notice To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @notice To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in ETH.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @notice Create a dispute and pay for the fees in a supported ERC20 token.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in the supported ERC20 token.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @notice Compute the cost of arbitration denominated in `_feeToken`.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @notice Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x65ba87c5309cd6e6562e569f79778ca423c9be7b0a44b9407e5bd2bdf8fdc3b0\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Registers a new dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings for the template.\\n /// @return templateId The identifier of the dispute template.\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x07ea0d9c5aea94cb73ca90f9a9f7689dcca2b37e7ec49bc6e02ee660ce2cee4f\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60803460a157601f610ac438819003918201601f19168301916001600160401b0383118484101760a557808492604094855283398101031260a15780516001600160a01b038116919082900360a157602001516001600160a01b038116919082900360a1575f80546001600160a01b031990811633179091556001805482169290921790915560028054909116919091179055604051610a0a90816100ba8239f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f3560e01c8063311a6c56146107a25780634660ebbe1461074a578063564a565d1461064f5780636cc6cde1146106295780638da5cb5b14610604578063a0af81f0146105de578063a6f9dae11461058b578063dc65351114610135578063e09997d91461010b5763fc548f0814610087575f80fd5b34610107576020366003190112610107576004356001600160a01b038116809103610107576001600160a01b035f541633036100df5773ffffffffffffffffffffffffffffffffffffffff1960015416176001555f80f35b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b5f80fd5b34610107576020366003190112610107576004355f526004602052602060405f2054604051908152f35b60803660031901126101075760043567ffffffffffffffff811161010757610161903690600401610960565b9060243567ffffffffffffffff811161010757610182903690600401610960565b9160443567ffffffffffffffff81116101075736602382011215610107576101b76101c391369060248160040135910161098e565b9260643594369161098e565b906001841115610563576001600160a01b036001541693602060405180967fc13517e100000000000000000000000000000000000000000000000000000000825283600483015260406024830152886044830152888560648401375f60648a8401015281606481601f19601f8d0116810103019134905af194851561043e575f9561052f575b506003549560405192608084019184831067ffffffffffffffff8411176105085761027892604052369161098e565b8252602082015f815260408301905f8252606084019283526801000000000000000088101561050857600188016003556102b1886108b2565b94909461051c575180519067ffffffffffffffff8211610508576102d586546108e2565b601f81116104c3575b50602090601f831160011461045457928260209896936103b19a9896936003965f92610449575b50508160011b915f1990871b1c19161785555b600185019051151560ff8019835416911617905551600284015551910155845f52600483528560405f205561039f5f6001600160a01b036002541692604051968795869485937f4a9941740000000000000000000000000000000000000000000000000000000085526060600486015285606486015260806024860152608485019061093c565b8381036003190160448501529061093c565b03925af190811561043e575f9161040b575b5081907fa8a9266995639bff048ad93524a5a561269d3f742d2ee429089990d4d1bb09d460406020956001600160a01b036001541693825191825287820152a3604051908152f35b90506020813d602011610436575b816104266020938361091a565b81010312610107575160206103c3565b3d9150610419565b6040513d5f823e3d90fd5b015190508d80610305565b90601f19831691875f52815f20925f5b8181106104ab5750936103b19a989693600396936001938360209d9b9810610494575b505050811b018555610318565b01515f1983891b60f8161c191690558d8080610487565b92936020600181928786015181550195019301610464565b865f5260205f20601f840160051c810191602085106104fe575b601f0160051c01905b8181106104f357506102de565b5f81556001016104e6565b90915081906104dd565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f525f60045260245ffd5b9094506020813d60201161055b575b8161054b6020938361091a565b8101031261010757519386610249565b3d915061053e565b7f5fea5b86000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610107576020366003190112610107576004356001600160a01b038116809103610107575f54336001600160a01b038216036100df5773ffffffffffffffffffffffffffffffffffffffff1916175f55005b34610107575f3660031901126101075760206001600160a01b0360025416604051908152f35b34610107575f3660031901126101075760206001600160a01b035f5416604051908152f35b34610107575f3660031901126101075760206001600160a01b0360015416604051908152f35b346101075760203660031901126101075760043560035481101561010757610676906108b2565b506040515f918054610687816108e2565b808452906001811690811561072657506001146106ed575b506106af826106d794038361091a565b60ff60018201541690600360028201549101549060405194859460808652608086019061093c565b9215156020850152604084015260608301520390f35b9250805f5260205f205f905b8482106107105750820160200192506106af61069f565b60018160209254838588010152019101906106f9565b60ff191660208086019190915291151560051b840190910193506106af905061069f565b34610107576020366003190112610107576004356001600160a01b038116809103610107576001600160a01b035f541633036100df5773ffffffffffffffffffffffffffffffffffffffff1960025416176002555f80f35b3461010757604036600319011261010757600435602435815f5260046020526107ce60405f20546108b2565b506001600160a01b0360015416330361088a576003810154821161086257600181019081549060ff821661083a578392600160029360ff191617905501556040519081527f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e7562227660203392a3005b7fcbb4c9f3000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f1f6edbfd000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4aafc238000000000000000000000000000000000000000000000000000000005f5260045ffd5b6003548110156108ce5760035f5260205f209060021b01905f90565b634e487b7160e01b5f52603260045260245ffd5b90600182811c92168015610910575b60208310146108fc57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916108f1565b90601f8019910116810190811067ffffffffffffffff82111761050857604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156101075782359167ffffffffffffffff8311610107576020838186019501011161010757565b92919267ffffffffffffffff821161050857604051916109b8601f8201601f19166020018461091a565b829481845281830111610107578281602093845f96013701015256fea2646970667358221220e532d202945144342a4a2c1b0b99b885b88a09bbedafe262a405f2c73673c2c464736f6c634300081e0033", + "deployedBytecode": "0x60806040526004361015610011575f80fd5b5f3560e01c8063311a6c56146107a25780634660ebbe1461074a578063564a565d1461064f5780636cc6cde1146106295780638da5cb5b14610604578063a0af81f0146105de578063a6f9dae11461058b578063dc65351114610135578063e09997d91461010b5763fc548f0814610087575f80fd5b34610107576020366003190112610107576004356001600160a01b038116809103610107576001600160a01b035f541633036100df5773ffffffffffffffffffffffffffffffffffffffff1960015416176001555f80f35b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b5f80fd5b34610107576020366003190112610107576004355f526004602052602060405f2054604051908152f35b60803660031901126101075760043567ffffffffffffffff811161010757610161903690600401610960565b9060243567ffffffffffffffff811161010757610182903690600401610960565b9160443567ffffffffffffffff81116101075736602382011215610107576101b76101c391369060248160040135910161098e565b9260643594369161098e565b906001841115610563576001600160a01b036001541693602060405180967fc13517e100000000000000000000000000000000000000000000000000000000825283600483015260406024830152886044830152888560648401375f60648a8401015281606481601f19601f8d0116810103019134905af194851561043e575f9561052f575b506003549560405192608084019184831067ffffffffffffffff8411176105085761027892604052369161098e565b8252602082015f815260408301905f8252606084019283526801000000000000000088101561050857600188016003556102b1886108b2565b94909461051c575180519067ffffffffffffffff8211610508576102d586546108e2565b601f81116104c3575b50602090601f831160011461045457928260209896936103b19a9896936003965f92610449575b50508160011b915f1990871b1c19161785555b600185019051151560ff8019835416911617905551600284015551910155845f52600483528560405f205561039f5f6001600160a01b036002541692604051968795869485937f4a9941740000000000000000000000000000000000000000000000000000000085526060600486015285606486015260806024860152608485019061093c565b8381036003190160448501529061093c565b03925af190811561043e575f9161040b575b5081907fa8a9266995639bff048ad93524a5a561269d3f742d2ee429089990d4d1bb09d460406020956001600160a01b036001541693825191825287820152a3604051908152f35b90506020813d602011610436575b816104266020938361091a565b81010312610107575160206103c3565b3d9150610419565b6040513d5f823e3d90fd5b015190508d80610305565b90601f19831691875f52815f20925f5b8181106104ab5750936103b19a989693600396936001938360209d9b9810610494575b505050811b018555610318565b01515f1983891b60f8161c191690558d8080610487565b92936020600181928786015181550195019301610464565b865f5260205f20601f840160051c810191602085106104fe575b601f0160051c01905b8181106104f357506102de565b5f81556001016104e6565b90915081906104dd565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f525f60045260245ffd5b9094506020813d60201161055b575b8161054b6020938361091a565b8101031261010757519386610249565b3d915061053e565b7f5fea5b86000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610107576020366003190112610107576004356001600160a01b038116809103610107575f54336001600160a01b038216036100df5773ffffffffffffffffffffffffffffffffffffffff1916175f55005b34610107575f3660031901126101075760206001600160a01b0360025416604051908152f35b34610107575f3660031901126101075760206001600160a01b035f5416604051908152f35b34610107575f3660031901126101075760206001600160a01b0360015416604051908152f35b346101075760203660031901126101075760043560035481101561010757610676906108b2565b506040515f918054610687816108e2565b808452906001811690811561072657506001146106ed575b506106af826106d794038361091a565b60ff60018201541690600360028201549101549060405194859460808652608086019061093c565b9215156020850152604084015260608301520390f35b9250805f5260205f205f905b8482106107105750820160200192506106af61069f565b60018160209254838588010152019101906106f9565b60ff191660208086019190915291151560051b840190910193506106af905061069f565b34610107576020366003190112610107576004356001600160a01b038116809103610107576001600160a01b035f541633036100df5773ffffffffffffffffffffffffffffffffffffffff1960025416176002555f80f35b3461010757604036600319011261010757600435602435815f5260046020526107ce60405f20546108b2565b506001600160a01b0360015416330361088a576003810154821161086257600181019081549060ff821661083a578392600160029360ff191617905501556040519081527f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e7562227660203392a3005b7fcbb4c9f3000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f1f6edbfd000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4aafc238000000000000000000000000000000000000000000000000000000005f5260045ffd5b6003548110156108ce5760035f5260205f209060021b01905f90565b634e487b7160e01b5f52603260045260245ffd5b90600182811c92168015610910575b60208310146108fc57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916108f1565b90601f8019910116810190811067ffffffffffffffff82111761050857604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9181601f840112156101075782359167ffffffffffffffff8311610107576020838186019501011161010757565b92919267ffffffffffffffff821161050857604051916109b8601f8201601f19166020018461091a565b829481845281830111610107578281602093845f96013701015256fea2646970667358221220e532d202945144342a4a2c1b0b99b885b88a09bbedafe262a405f2c73673c2c464736f6c634300081e0033", "devdoc": { + "details": "Adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", "events": { - "DisputeRequest(address,uint256,uint256,uint256,string)": { - "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", + "DisputeRequest(address,uint256,uint256,uint256)": { "params": { "_arbitrator": "The arbitrator of the contract.", "_arbitratorDisputeID": "The identifier of the dispute in the Arbitrator contract.", "_externalDisputeID": "An identifier created outside Kleros by the protocol requesting arbitration.", - "_templateId": "The identifier of the dispute template. Should not be used with _templateUri.", - "_templateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId." + "_templateId": "The identifier of the dispute template." } }, "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", "params": { "_arbitrator": "The arbitrator giving the ruling.", "_disputeID": "The identifier of the dispute in the Arbitrator contract.", @@ -340,20 +328,18 @@ }, "kind": "dev", "methods": { - "changeGovernor(address)": { - "details": "Changes the governor.", + "changeOwner(address)": { "params": { - "_governor": "The address of the new governor." + "_owner": "The address of the new owner." } }, "constructor": { - "details": "Constructor", "params": { "_arbitrator": "Target global arbitrator for any disputes." } }, "createDisputeForTemplate(bytes,string,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", + "details": "No need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", "params": { "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", "_disputeTemplate": "Dispute template.", @@ -364,69 +350,80 @@ "disputeID": "Dispute id (on arbitrator side) of the created dispute." } }, - "createDisputeForTemplateUri(bytes,string,uint256)": { - "details": "Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.", - "params": { - "_arbitratorExtraData": "Extra data for the arbitrator of the dispute.", - "_disputeTemplateUri": "The URI to the dispute template. For example on IPFS: starting with '/ipfs/'.", - "_numberOfRulingOptions": "Number of ruling options." - }, - "returns": { - "disputeID": "Dispute id (on arbitrator side) of the created dispute." - } - }, "rule(uint256,uint256)": { - "details": "To be called by the arbitrator of the dispute, to declare the winning ruling.", + "details": "This is a callback function for the arbitrator to provide the ruling to this contract. Only the arbitrator must be allowed to call this function. Ruling 0 is reserved for \"Not able/wanting to make a decision\".", "params": { - "_arbitratorDisputeID": "ID of the dispute in arbitrator contract.", - "_ruling": "The ruling choice of the arbitration." + "_disputeID": "The identifier of the dispute in the Arbitrator contract.", + "_ruling": "Ruling given by the arbitrator." } } }, - "title": "DisputeResolver DisputeResolver contract adapted for V2 from https://github.com/kleros/arbitrable-proxy-contracts/blob/master/contracts/ArbitrableProxy.sol.", + "title": "DisputeResolver", "version": 1 }, "userdoc": { + "events": { + "DisputeRequest(address,uint256,uint256,uint256)": { + "notice": "To be emitted when a dispute is created to link the correct template to the disputeID." + }, + "Ruling(address,uint256,uint256)": { + "notice": "To be raised when a ruling is given." + } + }, "kind": "user", - "methods": {}, + "methods": { + "changeOwner(address)": { + "notice": "Changes the owner." + }, + "constructor": { + "notice": "Constructor" + }, + "createDisputeForTemplate(bytes,string,string,uint256)": { + "notice": "Calls createDispute function of the specified arbitrator to create a dispute." + }, + "rule(uint256,uint256)": { + "notice": "Give a ruling for a dispute." + } + }, + "notice": "DisputeResolver contract", "version": 1 }, "storageLayout": { "storage": [ { - "astId": 14991, + "astId": 18721, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", - "label": "governor", + "label": "owner", "offset": 0, "slot": "0", "type": "t_address" }, { - "astId": 14994, + "astId": 18724, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitrator", "offset": 0, "slot": "1", - "type": "t_contract(IArbitratorV2)23044" + "type": "t_contract(IArbitratorV2)26051" }, { - "astId": 14997, + "astId": 18727, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "templateRegistry", "offset": 0, "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)23215" + "type": "t_contract(IDisputeTemplateRegistry)26278" }, { - "astId": 15001, + "astId": 18731, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "disputes", "offset": 0, "slot": "3", - "type": "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage" + "type": "t_array(t_struct(DisputeStruct)18719_storage)dyn_storage" }, { - "astId": 15005, + "astId": 18735, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitratorDisputeIDToLocalID", "offset": 0, @@ -440,8 +437,8 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)14989_storage", + "t_array(t_struct(DisputeStruct)18719_storage)dyn_storage": { + "base": "t_struct(DisputeStruct)18719_storage", "encoding": "dynamic_array", "label": "struct DisputeResolver.DisputeStruct[]", "numberOfBytes": "32" @@ -456,12 +453,12 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(IArbitratorV2)23044": { + "t_contract(IArbitratorV2)26051": { "encoding": "inplace", "label": "contract IArbitratorV2", "numberOfBytes": "20" }, - "t_contract(IDisputeTemplateRegistry)23215": { + "t_contract(IDisputeTemplateRegistry)26278": { "encoding": "inplace", "label": "contract IDisputeTemplateRegistry", "numberOfBytes": "20" @@ -473,12 +470,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(DisputeStruct)14989_storage": { + "t_struct(DisputeStruct)18719_storage": { "encoding": "inplace", "label": "struct DisputeResolver.DisputeStruct", "members": [ { - "astId": 14982, + "astId": 18712, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitratorExtraData", "offset": 0, @@ -486,7 +483,7 @@ "type": "t_bytes_storage" }, { - "astId": 14984, + "astId": 18714, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "isRuled", "offset": 0, @@ -494,7 +491,7 @@ "type": "t_bool" }, { - "astId": 14986, + "astId": 18716, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "ruling", "offset": 0, @@ -502,7 +499,7 @@ "type": "t_uint256" }, { - "astId": 14988, + "astId": 18718, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "numberOfRulingOptions", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json new file mode 100644 index 000000000..0586cb4bf --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json @@ -0,0 +1,317 @@ +{ + "address": "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", + "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": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_templateId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "string", + "name": "_templateTag", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "_templateData", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "_templateDataMappings", + "type": "string" + } + ], + "name": "DisputeTemplate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "changeOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_templateTag", + "type": "string" + }, + { + "internalType": "string", + "name": "_templateData", + "type": "string" + }, + { + "internalType": "string", + "name": "_templateDataMappings", + "type": "string" + } + ], + "name": "setDisputeTemplate", + "outputs": [ + { + "internalType": "uint256", + "name": "templateId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "templates", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "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": "0xbc50b201f6d4dfa0a74e83aeb201df1f0390ab361ba76bf72a696a36d3a5ffe4", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", + "transactionIndex": 1, + "gasUsed": "157979", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000004000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9656d572eb28bbdc716c7b34860d4e05442e4a488ce69c9f410f69a3d125df0c", + "transactionHash": "0xbc50b201f6d4dfa0a74e83aeb201df1f0390ab361ba76bf72a696a36d3a5ffe4", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 193661064, + "transactionHash": "0xbc50b201f6d4dfa0a74e83aeb201df1f0390ab361ba76bf72a696a36d3a5ffe4", + "address": "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 0, + "blockHash": "0x9656d572eb28bbdc716c7b34860d4e05442e4a488ce69c9f410f69a3d125df0c" + } + ], + "blockNumber": 193661064, + "cumulativeGasUsed": "157979", + "status": 1, + "byzantium": true + }, + "args": [ + "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", + "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" + ], + "numDeployments": 1, + "solcInputHash": "cff4f5de661c6299ed3bdc0f8613457a", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"DisputeTemplateRegistryUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 DisputeTemplateRegistryUniversityProxy 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 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 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\":\"0x9dbd26ac5a026a32fc38e394188ab4a8dce0d7e8f249fa1412f757611f948767\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220e347285b4ca364b0c82598fe294ad8b02e9adfbbac26ab00c24b1b747375019464736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220e347285b4ca364b0c82598fe294ad8b02e9adfbbac26ab00c24b1b747375019464736f6c634300081e0033", + "execute": { + "methodName": "initialize", + "args": [ + "0xf1C7c037891525E360C59f708739Ac09A7670c59" + ] + }, + "implementation": "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json new file mode 100644 index 000000000..bb5d17755 --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json @@ -0,0 +1,445 @@ +{ + "address": "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "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": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_templateId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "string", + "name": "_templateTag", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "_templateData", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "_templateDataMappings", + "type": "string" + } + ], + "name": "DisputeTemplate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "changeOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_templateTag", + "type": "string" + }, + { + "internalType": "string", + "name": "_templateData", + "type": "string" + }, + { + "internalType": "string", + "name": "_templateDataMappings", + "type": "string" + } + ], + "name": "setDisputeTemplate", + "outputs": [ + { + "internalType": "uint256", + "name": "templateId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "templates", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "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" + } + ], + "transactionHash": "0xa6a4958a5881803297025fcb6b02ff4623b6c196dfc1c63ecdcc5dbca371f59c", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", + "transactionIndex": 1, + "gasUsed": "550773", + "logsBloom": "0x00080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000100000000000000000000000000000", + "blockHash": "0x3831b40eb48160858d03c9e32ad925255ab201a6d738d0d223b347c63193ab27", + "transactionHash": "0xa6a4958a5881803297025fcb6b02ff4623b6c196dfc1c63ecdcc5dbca371f59c", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 193661055, + "transactionHash": "0xa6a4958a5881803297025fcb6b02ff4623b6c196dfc1c63ecdcc5dbca371f59c", + "address": "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "logIndex": 0, + "blockHash": "0x3831b40eb48160858d03c9e32ad925255ab201a6d738d0d223b347c63193ab27" + } + ], + "blockNumber": 193661055, + "cumulativeGasUsed": "550773", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"OwnerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"DisputeTemplate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateTag\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"setDisputeTemplate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"templateId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"DisputeTemplate(uint256,string,string,string)\":{\"params\":{\"_templateData\":\"The template data.\",\"_templateDataMappings\":\"The data mappings.\",\"_templateId\":\"The identifier of the dispute template.\",\"_templateTag\":\"An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"changeOwner(address)\":{\"params\":{\"_owner\":\"The new owner.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"initialize(address)\":{\"params\":{\"_owner\":\"Owner of the contract.\"}},\"proxiableUUID()\":{\"details\":\"IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setDisputeTemplate(string,string,string)\":{\"params\":{\"_templateData\":\"The template data.\",\"_templateDataMappings\":\"The data mappings for the template.\",\"_templateTag\":\"An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\"},\"returns\":{\"templateId\":\"The identifier of the dispute template.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"Dispute Template Registry\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}],\"UUPSUnauthorizedCallContext()\":[{\"notice\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"notice\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"DisputeTemplate(uint256,string,string,string)\":{\"notice\":\"To be emitted when a new dispute template is created.\"},\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{\"changeOwner(address)\":{\"notice\":\"Changes the owner of the contract.\"},\"initialize(address)\":{\"notice\":\"Initializer\"},\"owner()\":{\"notice\":\"The owner of the contract.\"},\"proxiableUUID()\":{\"notice\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade.\"},\"setDisputeTemplate(string,string,string)\":{\"notice\":\"Registers a new dispute template.\"},\"templates()\":{\"notice\":\"The number of templates.\"},\"upgradeToAndCall(address,bytes)\":{\"notice\":\"Upgrade mechanism including access control and UUPS-compliance.\"},\"version()\":{\"notice\":\"Returns the version of the implementation.\"}},\"notice\":\"A contract to maintain a registry of dispute templates.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"src/arbitration/DisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\nimport \\\"./interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\n/// @title Dispute Template Registry\\n/// @notice A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Initializable {\\n string public constant override version = \\\"2.0.0\\\";\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @notice The owner of the contract.\\n address public owner;\\n\\n /// @notice The number of templates.\\n uint256 public templates;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByOwner() {\\n if (owner != msg.sender) revert OwnerOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializer\\n /// @param _owner Owner of the contract.\\n function initialize(address _owner) external initializer {\\n owner = _owner;\\n }\\n\\n // ************************ //\\n // * Governance * //\\n // ************************ //\\n\\n /// @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n /// Only the owner can perform upgrades (`onlyByOwner`)\\n function _authorizeUpgrade(address) internal view override onlyByOwner {\\n // NOP\\n }\\n\\n /// @notice Changes the owner of the contract.\\n /// @param _owner The new owner.\\n function changeOwner(address _owner) external onlyByOwner {\\n owner = _owner;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc IDisputeTemplateRegistry\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId) {\\n templateId = templates++;\\n emit DisputeTemplate(templateId, _templateTag, _templateData, _templateDataMappings);\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error OwnerOnly();\\n}\\n\",\"keccak256\":\"0x9790f4e6f1a6b77063f3d95595ad70d86b5076371b3c3e04e2ce73ec0f9365f4\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Registers a new dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings for the template.\\n /// @return templateId The identifier of the dispute template.\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x07ea0d9c5aea94cb73ca90f9a9f7689dcca2b37e7ec49bc6e02ee660ce2cee4f\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `initializer()`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0xdad09e5f773fa6940dbd8c28480f602a7eaa3c70d3da9d06df140187cbf5dad4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @notice This contract implements an upgradeability mechanism designed for UUPS proxies.\\n///\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @notice Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @notice The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @notice The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @notice The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// @dev IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @notice Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\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\",\"keccak256\":\"0xa369061748e8a7b02873d597d4c78a2a09328111f04a97428b1c209e82cf5414\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a080604052346100c157306080525f5160206109585f395f51905f525460ff8160401c166100b3576002600160401b03196001600160401b03821601610060575b60405161089290816100c6823960805181818161036a01526104430152f35b6001600160401b0319166001600160401b039081175f5160206109585f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80610041565b62dc149f60e41b5f5260045ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c9081633a283d7d14610762575080634a9941741461065a5780634f1ef286146103e257806352d1902d1461035057806354fd4d50146102ed5780638da5cb5b146102c8578063a6f9dae11461024b5763c4d66de814610074575f80fd5b346102475760203660031901126102475761008d610822565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5460ff8160401c16159167ffffffffffffffff8216838061023d575b15908161021f575b506101f75767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e556001600160a01b0391836101b8575b501673ffffffffffffffffffffffffffffffffffffffff195f5416175f5561013b57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e54167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e555f610117565b7f0dc149f0000000000000000000000000000000000000000000000000000000005f5260045ffd5b303b15915081610232575b50155f6100d2565b60019150145f61022a565b50600181106100ca565b5f80fd5b3461024757602036600319011261024757610264610822565b5f5490336001600160a01b038316036102a0576001600160a01b0373ffffffffffffffffffffffffffffffffffffffff1991169116175f555f80f35b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610247575f3660031901126102475760206001600160a01b035f5416604051908152f35b34610247575f3660031901126102475761034c60405161030e60408261077c565b600581527f322e302e300000000000000000000000000000000000000000000000000000006020820152604051918291602083526020830190610838565b0390f35b34610247575f366003190112610247576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036103ba5760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b7fe07c8dba000000000000000000000000000000000000000000000000000000005f5260045ffd5b6040366003190112610247576103f6610822565b60243567ffffffffffffffff81116102475736602382011215610247576104279036906024816004013591016107ce565b906001600160a01b035f541633036102a0576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115610625575b506103ba576001600160a01b038116916040517f52d1902d000000000000000000000000000000000000000000000000000000008152602081600481875afa5f91816105f1575b506104e657837f0c760937000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8592036105c65750827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a280518061056057005b5f926020849301905af43d156105c1573d61057a816107b2565b90610588604051928361077c565b81525f60203d92013e5b1561059957005b7f736436ba000000000000000000000000000000000000000000000000000000005f5260045ffd5b610592565b7faa1d49a4000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091506020813d60201161061d575b8161060d6020938361077c565b81010312610247575190856104b5565b3d9150610600565b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614158361046e565b346102475760603660031901126102475760043567ffffffffffffffff81116102475761068b903690600401610804565b60243567ffffffffffffffff8111610247576106ab903690600401610804565b9060443567ffffffffffffffff8111610247576106cc903690600401610804565b600154915f19831461074e577ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992461073660209561074387879560018701600155604051918183925191829101835e81015f815203902095604051938493604085526040850190610838565b908382038a850152610838565b0390a3604051908152f35b634e487b7160e01b5f52601160045260245ffd5b34610247575f366003190112610247576020906001548152f35b90601f8019910116810190811067ffffffffffffffff82111761079e57604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161079e57601f01601f191660200190565b9291926107da826107b2565b916107e8604051938461077c565b829481845281830111610247578281602093845f960137010152565b9080601f830112156102475781602061081f933591016107ce565b90565b600435906001600160a01b038216820361024757565b805180835260209291819084018484015e5f828201840152601f01601f191601019056fea2646970667358221220bb75c0a527977368a7b8fd2e1e5a73e20d804eb35645fe757271a9acd08c759764736f6c634300081e0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e", + "deployedBytecode": "0x6080806040526004361015610012575f80fd5b5f3560e01c9081633a283d7d14610762575080634a9941741461065a5780634f1ef286146103e257806352d1902d1461035057806354fd4d50146102ed5780638da5cb5b146102c8578063a6f9dae11461024b5763c4d66de814610074575f80fd5b346102475760203660031901126102475761008d610822565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5460ff8160401c16159167ffffffffffffffff8216838061023d575b15908161021f575b506101f75767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e556001600160a01b0391836101b8575b501673ffffffffffffffffffffffffffffffffffffffff195f5416175f5561013b57005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e54167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e555f610117565b7f0dc149f0000000000000000000000000000000000000000000000000000000005f5260045ffd5b303b15915081610232575b50155f6100d2565b60019150145f61022a565b50600181106100ca565b5f80fd5b3461024757602036600319011261024757610264610822565b5f5490336001600160a01b038316036102a0576001600160a01b0373ffffffffffffffffffffffffffffffffffffffff1991169116175f555f80f35b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610247575f3660031901126102475760206001600160a01b035f5416604051908152f35b34610247575f3660031901126102475761034c60405161030e60408261077c565b600581527f322e302e300000000000000000000000000000000000000000000000000000006020820152604051918291602083526020830190610838565b0390f35b34610247575f366003190112610247576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036103ba5760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b7fe07c8dba000000000000000000000000000000000000000000000000000000005f5260045ffd5b6040366003190112610247576103f6610822565b60243567ffffffffffffffff81116102475736602382011215610247576104279036906024816004013591016107ce565b906001600160a01b035f541633036102a0576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115610625575b506103ba576001600160a01b038116916040517f52d1902d000000000000000000000000000000000000000000000000000000008152602081600481875afa5f91816105f1575b506104e657837f0c760937000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8592036105c65750827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a280518061056057005b5f926020849301905af43d156105c1573d61057a816107b2565b90610588604051928361077c565b81525f60203d92013e5b1561059957005b7f736436ba000000000000000000000000000000000000000000000000000000005f5260045ffd5b610592565b7faa1d49a4000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091506020813d60201161061d575b8161060d6020938361077c565b81010312610247575190856104b5565b3d9150610600565b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541614158361046e565b346102475760603660031901126102475760043567ffffffffffffffff81116102475761068b903690600401610804565b60243567ffffffffffffffff8111610247576106ab903690600401610804565b9060443567ffffffffffffffff8111610247576106cc903690600401610804565b600154915f19831461074e577ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992461073660209561074387879560018701600155604051918183925191829101835e81015f815203902095604051938493604085526040850190610838565b908382038a850152610838565b0390a3604051908152f35b634e487b7160e01b5f52601160045260245ffd5b34610247575f366003190112610247576020906001548152f35b90601f8019910116810190811067ffffffffffffffff82111761079e57604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161079e57601f01601f191660200190565b9291926107da826107b2565b916107e8604051938461077c565b829481845281830111610247578281602093845f960137010152565b9080601f830112156102475781602061081f933591016107ce565b90565b600435906001600160a01b038216820361024757565b805180835260209291819084018484015e5f828201840152601f01601f191601019056fea2646970667358221220bb75c0a527977368a7b8fd2e1e5a73e20d804eb35645fe757271a9acd08c759764736f6c634300081e0033", + "devdoc": { + "errors": { + "AlreadyInitialized()": [ + { + "details": "The contract is already initialized." + } + ], + "NotInitializing()": [ + { + "details": "The contract is not initializing." + } + ] + }, + "events": { + "DisputeTemplate(uint256,string,string,string)": { + "params": { + "_templateData": "The template data.", + "_templateDataMappings": "The data mappings.", + "_templateId": "The identifier of the dispute template.", + "_templateTag": "An optional tag for the dispute template, such as \"registration\" or \"removal\"." + } + }, + "Initialized(uint64)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "Upgraded(address)": { + "params": { + "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." + } + } + }, + "kind": "dev", + "methods": { + "changeOwner(address)": { + "params": { + "_owner": "The new owner." + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "initialize(address)": { + "params": { + "_owner": "Owner of the contract." + } + }, + "proxiableUUID()": { + "details": "IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." + }, + "setDisputeTemplate(string,string,string)": { + "params": { + "_templateData": "The template data.", + "_templateDataMappings": "The data mappings for the template.", + "_templateTag": "An optional tag for the dispute template, such as \"registration\" or \"removal\"." + }, + "returns": { + "templateId": "The identifier of the dispute template." + } + }, + "upgradeToAndCall(address,bytes)": { + "details": "Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", + "params": { + "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", + "newImplementation": "Address of the new implementation contract." + } + } + }, + "stateVariables": { + "version": { + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, + "title": "Dispute Template Registry", + "version": 1 + }, + "userdoc": { + "errors": { + "FailedDelegateCall()": [ + { + "notice": "Failed Delegated call" + } + ], + "InvalidImplementation(address)": [ + { + "notice": "The `implementation` is not UUPS-compliant" + } + ], + "UUPSUnauthorizedCallContext()": [ + { + "notice": "The call is from an unauthorized context." + } + ], + "UUPSUnsupportedProxiableUUID(bytes32)": [ + { + "notice": "The storage `slot` is unsupported as a UUID." + } + ] + }, + "events": { + "DisputeTemplate(uint256,string,string,string)": { + "notice": "To be emitted when a new dispute template is created." + }, + "Upgraded(address)": { + "notice": "Emitted when the `implementation` has been successfully upgraded." + } + }, + "kind": "user", + "methods": { + "changeOwner(address)": { + "notice": "Changes the owner of the contract." + }, + "initialize(address)": { + "notice": "Initializer" + }, + "owner()": { + "notice": "The owner of the contract." + }, + "proxiableUUID()": { + "notice": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade." + }, + "setDisputeTemplate(string,string,string)": { + "notice": "Registers a new dispute template." + }, + "templates()": { + "notice": "The number of templates." + }, + "upgradeToAndCall(address,bytes)": { + "notice": "Upgrade mechanism including access control and UUPS-compliance." + }, + "version()": { + "notice": "Returns the version of the implementation." + } + }, + "notice": "A contract to maintain a registry of dispute templates.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 11041, + "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", + "label": "owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 11044, + "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", + "label": "templates", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json new file mode 100644 index 000000000..618d75a4e --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json @@ -0,0 +1,81 @@ +{ + "address": "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", + "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" + } + ], + "transactionHash": "0xbc50b201f6d4dfa0a74e83aeb201df1f0390ab361ba76bf72a696a36d3a5ffe4", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", + "transactionIndex": 1, + "gasUsed": "157979", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000004000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9656d572eb28bbdc716c7b34860d4e05442e4a488ce69c9f410f69a3d125df0c", + "transactionHash": "0xbc50b201f6d4dfa0a74e83aeb201df1f0390ab361ba76bf72a696a36d3a5ffe4", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 193661064, + "transactionHash": "0xbc50b201f6d4dfa0a74e83aeb201df1f0390ab361ba76bf72a696a36d3a5ffe4", + "address": "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 0, + "blockHash": "0x9656d572eb28bbdc716c7b34860d4e05442e4a488ce69c9f410f69a3d125df0c" + } + ], + "blockNumber": 193661064, + "cumulativeGasUsed": "157979", + "status": 1, + "byzantium": true + }, + "args": [ + "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", + "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" + ], + "numDeployments": 1, + "solcInputHash": "cff4f5de661c6299ed3bdc0f8613457a", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"DisputeTemplateRegistryUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 DisputeTemplateRegistryUniversityProxy 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 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 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\":\"0x9dbd26ac5a026a32fc38e394188ab4a8dce0d7e8f249fa1412f757611f948767\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220e347285b4ca364b0c82598fe294ad8b02e9adfbbac26ab00c24b1b747375019464736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220e347285b4ca364b0c82598fe294ad8b02e9adfbbac26ab00c24b1b747375019464736f6c634300081e0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json index b6b4080c4..f5511de8f 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json @@ -1,5 +1,5 @@ { - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "abi": [ { "stateMutability": "payable", @@ -34,11 +34,6 @@ "name": "ArbitrationFeesNotEnough", "type": "error" }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, { "inputs": [], "name": "CannotDisableClassicDK", @@ -49,11 +44,6 @@ "name": "CommitPeriodNotPassed", "type": "error" }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, { "inputs": [], "name": "DisputeKitNotSupportedByCourt", @@ -89,16 +79,6 @@ "name": "FailedDelegateCall", "type": "error" }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, { "inputs": [], "name": "InstructorOnly", @@ -155,6 +135,16 @@ "name": "NotInitializing", "type": "error" }, + { + "inputs": [], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerOrInstructorOnly", + "type": "error" + }, { "inputs": [], "name": "RulingAlreadyExecuted", @@ -177,7 +167,7 @@ }, { "inputs": [], - "name": "StakingNotPossibeInThisCourt", + "name": "StakingNotPossibleInThisCourt", "type": "error" }, { @@ -185,6 +175,11 @@ "name": "StakingTransferFailed", "type": "error" }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", + "type": "error" + }, { "inputs": [], "name": "TokenNotAccepted", @@ -298,9 +293,9 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", + "internalType": "uint96", "name": "_courtID", - "type": "uint256" + "type": "uint96" }, { "indexed": true, @@ -575,6 +570,12 @@ { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, { "indexed": true, "internalType": "uint256", @@ -590,13 +591,62 @@ { "indexed": false, "internalType": "uint256", - "name": "_pnkAmount", + "name": "_degreeOfCoherencyPnk", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "_feeAmount", + "name": "_degreeOfCoherencyFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_amountPnk", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_amountFee", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "JurorRewardPenalty", + "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": "_amountPnk", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountFee", "type": "uint256" }, { @@ -678,55 +728,6 @@ "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": [ @@ -949,12 +950,12 @@ { "inputs": [ { - "internalType": "address payable", - "name": "_governor", + "internalType": "address", + "name": "_instructor", "type": "address" } ], - "name": "changeGovernor", + "name": "changeInstructor", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -963,11 +964,11 @@ "inputs": [ { "internalType": "address", - "name": "_instructor", + "name": "_jurorProsecutionModule", "type": "address" } ], - "name": "changeInstructor", + "name": "changeJurorProsecutionModule", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -975,12 +976,12 @@ { "inputs": [ { - "internalType": "address", - "name": "_jurorProsecutionModule", + "internalType": "address payable", + "name": "_owner", "type": "address" } ], - "name": "changeJurorProsecutionModule", + "name": "changeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1074,11 +1075,6 @@ "internalType": "uint256", "name": "jurorsForCourtJump", "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" } ], "stateMutability": "view", @@ -1388,7 +1384,7 @@ "type": "bytes" } ], - "name": "executeGovernorProposal", + "name": "executeOwnerProposal", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1457,6 +1453,30 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getPnkAtStakePerJuror", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1509,6 +1529,11 @@ "name": "drawnJurors", "type": "address[]" }, + { + "internalType": "uint96[]", + "name": "drawnJurorFromCourtIDs", + "type": "uint96[]" + }, { "internalType": "uint256", "name": "sumFeeRewardPaid", @@ -1528,6 +1553,11 @@ "internalType": "uint256", "name": "drawIterations", "type": "uint256" + }, + { + "internalType": "uint256[10]", + "name": "__gap", + "type": "uint256[10]" } ], "internalType": "struct KlerosCoreUniversity.Round", @@ -1557,24 +1587,11 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "_governor", + "name": "_owner", "type": "address" }, { @@ -1692,6 +1709,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1765,11 +1795,6 @@ "internalType": "uint256", "name": "_newStake", "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" } ], "name": "setStakeBySortitionModule", @@ -1790,6 +1815,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferBySortitionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1808,6 +1851,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1825,50 +1881,50 @@ "type": "constructor" } ], - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "transactionIndex": 1, - "gasUsed": "484460", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000080000000000000040000000000000000000000000000020000000000000010200800402000000000000008000000000000008000000000000000000800000000000000000000000080000000000000000000000000000000800008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000008000000000200000000000000000000", - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8", - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", + "contractAddress": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", + "transactionIndex": 2, + "gasUsed": "453977", + "logsBloom": "0x000000000000000000000000200000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000800000000400000000000000000000000000000200000000000000100008004020000000000000000000000000040000008000000000000008000000000000000000000000800000000000100000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000e4000000001000000000000001000000000000000000000000000800000000000000", + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f", + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", "logs": [ { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5" + "0x00000000000000000000000082f2089442979a6b56c80274d144575980092f91" ], "data": "0x", - "logIndex": 0, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 3, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" }, { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", + "0x550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 4, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" }, { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -1876,36 +1932,36 @@ "0x0000000000000000000000000000000000000000000000000000000000000001" ], "data": "0x", - "logIndex": 2, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 5, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" }, { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 6, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" } ], - "blockNumber": 96308609, - "cumulativeGasUsed": "484460", + "blockNumber": 193533818, + "cumulativeGasUsed": "582464", "status": 1, "byzantium": true }, "args": [ - "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "0xe399d29b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000004b2c2d048921f694cce3aea35698c6b1f5fcbb79" + "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", + "0xe399d29b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa225000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082f2089442979a6b56c80274d144575980092f91000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000009f55804177e7e44e558616cd7d06b865788214ca" ], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "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\":\"KlerosCoreUniversityProxy\"},\"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 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\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\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 */\\ncontract UUPSProxy {\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\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 */\\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 /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\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 /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"KlerosCoreUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 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 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\":\"0x3160bd320b23c6ec0c21862b455c3044a9b33654ae84a1b6cd76255626c9154b\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122094c812c85dc437a2ab3eda19f621c1ecfc3fbf77e5465f816bde0529d28053a664736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122094c812c85dc437a2ab3eda19f621c1ecfc3fbf77e5465f816bde0529d28053a664736f6c634300081e0033", "execute": { "methodName": "initialize", "args": [ @@ -1913,7 +1969,7 @@ "0xf1C7c037891525E360C59f708739Ac09A7670c59", "0x34B944D42cAcfC8266955D07A80181D2054aa225", "0x0000000000000000000000000000000000000000", - "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + "0x82F2089442979A6b56c80274D144575980092F91", false, [ "200000000000000000000", @@ -1927,10 +1983,10 @@ 0, 10 ], - "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79" + "0x9f55804177e7E44E558616cD7d06B865788214cA" ] }, - "implementation": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", + "implementation": "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json index c8261658d..30c8cb622 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", + "address": "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", "abi": [ { "inputs": [], @@ -31,11 +31,6 @@ "name": "ArbitrationFeesNotEnough", "type": "error" }, - { - "inputs": [], - "name": "ArraysLengthMismatch", - "type": "error" - }, { "inputs": [], "name": "CannotDisableClassicDK", @@ -46,11 +41,6 @@ "name": "CommitPeriodNotPassed", "type": "error" }, - { - "inputs": [], - "name": "DepthLevelMax", - "type": "error" - }, { "inputs": [], "name": "DisputeKitNotSupportedByCourt", @@ -86,16 +76,6 @@ "name": "FailedDelegateCall", "type": "error" }, - { - "inputs": [], - "name": "GovernorOnly", - "type": "error" - }, - { - "inputs": [], - "name": "GovernorOrInstructorOnly", - "type": "error" - }, { "inputs": [], "name": "InstructorOnly", @@ -152,6 +132,16 @@ "name": "NotInitializing", "type": "error" }, + { + "inputs": [], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerOrInstructorOnly", + "type": "error" + }, { "inputs": [], "name": "RulingAlreadyExecuted", @@ -174,7 +164,7 @@ }, { "inputs": [], - "name": "StakingNotPossibeInThisCourt", + "name": "StakingNotPossibleInThisCourt", "type": "error" }, { @@ -182,6 +172,11 @@ "name": "StakingTransferFailed", "type": "error" }, + { + "inputs": [], + "name": "StakingZeroWhenNoStake", + "type": "error" + }, { "inputs": [], "name": "TokenNotAccepted", @@ -295,9 +290,9 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", + "internalType": "uint96", "name": "_courtID", - "type": "uint256" + "type": "uint96" }, { "indexed": true, @@ -572,6 +567,12 @@ { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, { "indexed": true, "internalType": "uint256", @@ -587,13 +588,62 @@ { "indexed": false, "internalType": "uint256", - "name": "_pnkAmount", + "name": "_degreeOfCoherencyPnk", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "_feeAmount", + "name": "_degreeOfCoherencyFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_amountPnk", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_amountFee", + "type": "int256" + }, + { + "indexed": false, + "internalType": "contract IERC20", + "name": "_feeToken", + "type": "address" + } + ], + "name": "JurorRewardPenalty", + "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": "_amountPnk", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountFee", "type": "uint256" }, { @@ -675,55 +725,6 @@ "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": [ @@ -946,12 +947,12 @@ { "inputs": [ { - "internalType": "address payable", - "name": "_governor", + "internalType": "address", + "name": "_instructor", "type": "address" } ], - "name": "changeGovernor", + "name": "changeInstructor", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -960,11 +961,11 @@ "inputs": [ { "internalType": "address", - "name": "_instructor", + "name": "_jurorProsecutionModule", "type": "address" } ], - "name": "changeInstructor", + "name": "changeJurorProsecutionModule", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -972,12 +973,12 @@ { "inputs": [ { - "internalType": "address", - "name": "_jurorProsecutionModule", + "internalType": "address payable", + "name": "_owner", "type": "address" } ], - "name": "changeJurorProsecutionModule", + "name": "changeOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1071,11 +1072,6 @@ "internalType": "uint256", "name": "jurorsForCourtJump", "type": "uint256" - }, - { - "internalType": "bool", - "name": "disabled", - "type": "bool" } ], "stateMutability": "view", @@ -1385,7 +1381,7 @@ "type": "bytes" } ], - "name": "executeGovernorProposal", + "name": "executeOwnerProposal", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1454,6 +1450,30 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getPnkAtStakePerJuror", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1506,6 +1526,11 @@ "name": "drawnJurors", "type": "address[]" }, + { + "internalType": "uint96[]", + "name": "drawnJurorFromCourtIDs", + "type": "uint96[]" + }, { "internalType": "uint256", "name": "sumFeeRewardPaid", @@ -1525,6 +1550,11 @@ "internalType": "uint256", "name": "drawIterations", "type": "uint256" + }, + { + "internalType": "uint256[10]", + "name": "__gap", + "type": "uint256[10]" } ], "internalType": "struct KlerosCoreUniversity.Round", @@ -1554,24 +1584,11 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "_governor", + "name": "_owner", "type": "address" }, { @@ -1689,6 +1706,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1762,11 +1792,6 @@ "internalType": "uint256", "name": "_newStake", "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" } ], "name": "setStakeBySortitionModule", @@ -1787,6 +1812,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferBySortitionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1804,43 +1847,56 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0xf99e544be3b28ba3d5d7dc89481e4698807522d7dd1d431faf2305c6cbb9265f", + "transactionHash": "0x6733cea855fc3ea83280d8dd2bc1de31a95423f55539cb924ed683d4444bf016", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", + "contractAddress": "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", "transactionIndex": 2, - "gasUsed": "5019437", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000008000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x02db98181f92e8759b1936b6812ee2468550ddd547787f25f966d5f49f589fc4", - "transactionHash": "0xf99e544be3b28ba3d5d7dc89481e4698807522d7dd1d431faf2305c6cbb9265f", + "gasUsed": "4792792", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000200000000000000080000000000000000000000000000000000000000004000000000000000000000000000000000000004000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x355195241087caacd449d7bcbb83dcb810fc9e09cfc475e69287a5285d1b23bb", + "transactionHash": "0x6733cea855fc3ea83280d8dd2bc1de31a95423f55539cb924ed683d4444bf016", "logs": [ { "transactionIndex": 2, - "blockNumber": 96308594, - "transactionHash": "0xf99e544be3b28ba3d5d7dc89481e4698807522d7dd1d431faf2305c6cbb9265f", - "address": "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", + "blockNumber": 193533808, + "transactionHash": "0x6733cea855fc3ea83280d8dd2bc1de31a95423f55539cb924ed683d4444bf016", + "address": "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 1, - "blockHash": "0x02db98181f92e8759b1936b6812ee2468550ddd547787f25f966d5f49f589fc4" + "blockHash": "0x355195241087caacd449d7bcbb83dcb810fc9e09cfc475e69287a5285d1b23bb" } ], - "blockNumber": 96308594, - "cumulativeGasUsed": "5609813", + "blockNumber": 193533808, + "cumulativeGasUsed": "4827069", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AllJurorsDrawn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrationFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArraysLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotDisableClassicDK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DepthLevelMax\",\"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\":\"GovernorOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InstructorOnly\",\"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\":\"NoJurorDrawn\",\"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\":\"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\":\"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\":\"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 KlerosCoreUniversity.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"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\":[{\"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\":\"_instructor\",\"type\":\"address\"}],\"name\":\"changeInstructor\",\"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 ISortitionModuleUniversity\",\"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\":\"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 KlerosCoreUniversity.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\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"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 KlerosCoreUniversity.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\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_instructor\",\"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\":\"contract ISortitionModuleUniversity\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"instructor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":\"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 ISortitionModuleUniversity\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"details\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\",\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"details\":\"To be emitted when a dispute is created.\",\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"details\":\"To be emitted when the fee for a particular ERC20 token is updated.\",\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"details\":\"Add a new supported dispute kit module to the court.\",\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"details\":\"Gets the cost of appealing a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"details\":\"Gets the start and the end of a specified dispute's current appeal period.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"details\":\"Changes the supported fee tokens.\",\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"details\":\"Changes the currency rate of a fee token.\",\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeGovernor(address)\":{\"details\":\"Changes the `governor` storage variable.\",\"params\":{\"_governor\":\"The new value for the `governor` storage variable.\"}},\"changeInstructor(address)\":{\"details\":\"Changes the `instructor` storage variable.\",\"params\":{\"_instructor\":\"The new value for the `instructor` storage variable.\"}},\"changeJurorProsecutionModule(address)\":{\"details\":\"Changes the `jurorProsecutionModule` storage variable.\",\"params\":{\"_jurorProsecutionModule\":\"The new value for the `jurorProsecutionModule` storage variable.\"}},\"changePinakion(address)\":{\"details\":\"Changes the `pinakion` storage variable.\",\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"changeSortitionModule(address)\":{\"details\":\"Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.\",\"params\":{\"_sortitionModule\":\"The new value for the `sortitionModule` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])\":{\"details\":\"Creates a court under a specified parent court.\",\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_supportedDisputeKits\":\"Indexes of dispute kits that this court will support.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"details\":\"Gets the current ruling of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,address)\":{\"details\":\"Draws one juror for the dispute until the number votes paid for is reached.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_juror\":\"The address of the juror to draw.\"}},\"enableDisputeKits(uint96,uint256[],bool)\":{\"details\":\"Adds/removes court's support for specified dispute kits.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_disputeKitIDs\":\"The IDs of dispute kits which support should be added/removed.\",\"_enable\":\"Whether add or remove the dispute kits from the court.\"}},\"execute(uint256,uint256,uint256)\":{\"details\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\",\"_round\":\"The appeal round.\"}},\"executeGovernorProposal(address,uint256,bytes)\":{\"details\":\"Allows the governor to call anything on behalf of the contract.\",\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256)\":{\"details\":\"Executes a specified dispute's ruling.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfVotes(uint256)\":{\"details\":\"Gets the number of votes permitted for the specified dispute in the latest round.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getTimesPerPeriod(uint96)\":{\"details\":\"Gets the timesPerPeriod array for a given court.\",\"params\":{\"_courtID\":\"The ID of the court to get the times from.\"},\"returns\":{\"timesPerPeriod\":\"The timesPerPeriod array for the given court.\"}},\"initialize(address,address,address,address,address,bool,uint256[4],uint256[4],address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_disputeKit\":\"The address of the default dispute kit.\",\"_governor\":\"The governor's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_instructor\":\"The address of the instructor.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionModuleAddress\":\"The sortition module responsible for sortition of the jurors.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the general court.\"}},\"isDisputeKitJumping(uint256)\":{\"details\":\"Returns true if the dispute kit will be switched to a parent DK.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"Whether DK will be switched or not.\"}},\"passPeriod(uint256)\":{\"details\":\"Passes the period of a specified dispute.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(uint96,uint256)\":{\"details\":\"Sets the caller's stake in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake. Note that the existing delayed stake will be nullified as non-relevant.\"}},\"setStakeBySortitionModule(address,uint96,uint256,bool)\":{\"details\":\"Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\",\"params\":{\"_account\":\"The account whose stake is being set.\",\"_alreadyTransferred\":\"Whether the PNKs have already been transferred to the contract.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"KlerosCoreUniversity Core arbitrator contract for educational purposes.\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/university/KlerosCoreUniversity.sol\":\"KlerosCoreUniversity\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xb9590d05f9df08dd0ed027b2eb40c7b1885b7574a121b1b0b7da0920429bb4d5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/university/ISortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface ISortitionModuleUniversity is ISortitionModule {\\n function setTransientJuror(address _juror) external;\\n}\\n\",\"keccak256\":\"0x57fee0787ae90af01c57a7d2850f8e4ade1ca72163a388341cac017bfdbf163a\",\"license\":\"MIT\"},\"src/arbitration/university/KlerosCoreUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"../interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModuleUniversity} from \\\"./ISortitionModuleUniversity.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title KlerosCoreUniversity\\n/// Core arbitrator contract for educational purposes.\\ncontract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public instructor; // The instructor who is allowed to choose the jurors.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModuleUniversity public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByInstructor() {\\n if (instructor != msg.sender) revert InstructorOnly();\\n _;\\n }\\n\\n modifier onlyByGovernorOrInstructor() {\\n if (msg.sender != governor && msg.sender != instructor) revert GovernorOrInstructorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _instructor The address of the instructor.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _instructor,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n ISortitionModuleUniversity _sortitionModuleAddress\\n ) external reinitializer(1) {\\n governor = _governor;\\n instructor = _instructor;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `instructor` storage variable.\\n /// @param _instructor The new value for the `instructor` storage variable.\\n function changeInstructor(address _instructor) external onlyByGovernorOrInstructor {\\n instructor = _instructor;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModuleUniversity _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws one juror for the dispute until the number votes paid for is reached.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _juror The address of the juror to draw.\\n function draw(uint256 _disputeID, address _juror) external onlyByGovernorOrInstructor {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n if (round.drawnJurors.length >= round.nbVotes) revert AllJurorsDrawn();\\n\\n sortitionModule.setTransientJuror(_juror);\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n uint256 iteration = round.drawIterations + 1;\\n address drawnAddress = disputeKit.draw(_disputeID, iteration);\\n if (drawnAddress == address(0)) {\\n revert NoJurorDrawn();\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n round.drawIterations = iteration;\\n }\\n sortitionModule.setTransientJuror(address(0));\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n _params.pnkPenaltiesInRound += penalty;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n sortitionModule.penalizeStake(account, penalty);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(penalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (!disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive, unstake them.\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Give back the locked PNKs in case the juror fully unstaked earlier.\\n if (!sortitionModule.isJurorStaked(account)) {\\n pinakion.safeTransfer(account, pnkLocked);\\n }\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs were already transferred to/from the staking contract.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibeInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error InstructorOnly();\\n error GovernorOrInstructorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error DepthLevelMax();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error ArraysLengthMismatch();\\n error StakingInTooManyCourts();\\n error StakingNotPossibeInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error AllJurorsDrawn();\\n error NoJurorDrawn();\\n}\\n\",\"keccak256\":\"0xd636c2294d15110a20dcf97d67f2989e14233cd1de353032807ad44a8e828e49\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked\\n}\\n\",\"keccak256\":\"0x486016fb74cc91439c2ec918e97a79190ab4eed223987d516986fff8eaeecfbf\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\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\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161566962000103600039600081816115e10152818161160a015261180101526156696000f3fe60806040526004361061027c5760003560e01c80638a9bb02a1161014f578063d07368bd116100c1578063f6506db41161007a578063f6506db414610867578063f7434ea914610887578063fbb519e7146108a7578063fbf405b0146108c7578063fc6f8f16146108e7578063fe524c391461090757600080fd5b8063d07368bd146107b2578063d4d1d76a146107d2578063d874514b146107e7578063d98493f614610807578063e399d29b14610827578063e4c0aaf41461084757600080fd5b8063b702a87911610113578063b702a8791461070c578063c13517e11461072c578063c258bb191461073f578063c35699021461075f578063c71f425314610772578063cf0c38f81461079257600080fd5b80638a9bb02a1461064a5780638bb0487514610677578063acdbf51d14610697578063afe15cfb146106b7578063b0049637146106ec57600080fd5b80632e1daf2f116101f357806371ae413d116101ac57806371ae413d1461058a578063751accd0146105aa5780637717a6e8146105ca5780637934c0be146105ea57806382d022371461060a57806386541b241461062a57600080fd5b80632e1daf2f146104c45780633cfd1184146104e45780634f1ef2861461051157806352d1902d14610524578063564a565d1461053957806359ec827e1461056a57600080fd5b8063115d537611610245578063115d5376146103885780631860592b146103a857806319b81529146103d65780631c3db16d146104065780631f5a0dd2146104435780632d29a47b146104a457600080fd5b8062f5822c146102815780630219da79146102a357806309cfdc9c1461031b5780630b7414bc1461033b5780630c340a241461035b575b600080fd5b34801561028d57600080fd5b506102a161029c366004614846565b610927565b005b3480156102af57600080fd5b506102ee6102be366004614846565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561032757600080fd5b506102a1610336366004614846565b610974565b34801561034757600080fd5b506102a161035636600461494e565b6109da565b34801561036757600080fd5b5060005461037b906001600160a01b031681565b60405161031291906149af565b34801561039457600080fd5b506102a16103a33660046149c3565b610b11565b3480156103b457600080fd5b506103c86103c33660046149dc565b611048565b604051908152602001610312565b3480156103e257600080fd5b506103f66103f13660046149c3565b6110a2565b6040519015158152602001610312565b34801561041257600080fd5b506104266104213660046149c3565b61119b565b604080519384529115156020840152151590820152606001610312565b34801561044f57600080fd5b5061046361045e3660046149c3565b61129c565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610312565b3480156104b057600080fd5b506102a16104bf366004614a08565b6112fb565b3480156104d057600080fd5b5060045461037b906001600160a01b031681565b3480156104f057600080fd5b506105046104ff366004614a34565b611563565b6040516103129190614a72565b6102a161051f366004614aef565b6115cd565b34801561053057600080fd5b506103c86117f4565b34801561054557600080fd5b506105596105543660046149c3565b611852565b604051610312959493929190614b76565b34801561057657600080fd5b506103c86105853660046149c3565b6118ae565b34801561059657600080fd5b5060015461037b906001600160a01b031681565b3480156105b657600080fd5b506102a16105c5366004614bb5565b611a03565b3480156105d657600080fd5b506102a16105e5366004614c0d565b611aad565b3480156105f657600080fd5b506102a1610605366004614c29565b611abb565b34801561061657600080fd5b506102a1610625366004614c62565b611b3a565b34801561063657600080fd5b506102a1610645366004614d21565b611bf7565b34801561065657600080fd5b5061066a610665366004614d8f565b611dd4565b6040516103129190614df6565b34801561068357600080fd5b506102a16106923660046149c3565b611f60565b3480156106a357600080fd5b5061037b6106b23660046149c3565b6120c4565b3480156106c357600080fd5b506106d76106d23660046149c3565b6120ee565b60408051928352602083019190915201610312565b3480156106f857600080fd5b506102a1610707366004614846565b61219a565b34801561071857600080fd5b506102a1610727366004614e9b565b6121e7565b6103c861073a366004614ec0565b6125fa565b34801561074b57600080fd5b506102a161075a366004614846565b612632565b6102a161076d366004614ef0565b61267f565b34801561077e57600080fd5b506103c861078d3660046149c3565b612b53565b34801561079e57600080fd5b5060035461037b906001600160a01b031681565b3480156107be57600080fd5b506102a16107cd366004614846565b612bbb565b3480156107de57600080fd5b506006546103c8565b3480156107f357600080fd5b506102a1610802366004614f29565b612c64565b34801561081357600080fd5b506103c861082236600461500a565b612f62565b34801561083357600080fd5b506102a1610842366004615055565b612faf565b34801561085357600080fd5b506102a1610862366004614846565b61329f565b34801561087357600080fd5b506103c8610882366004615110565b6132ec565b34801561089357600080fd5b506103c86108a2366004615176565b6133d2565b3480156108b357600080fd5b506102a16108c23660046151aa565b61341e565b3480156108d357600080fd5b5060025461037b906001600160a01b031681565b3480156108f357600080fd5b506103c86109023660046149c3565b61345e565b34801561091357600080fd5b506103f6610922366004614c0d565b61348d565b6000546001600160a01b031633146109525760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061099a57506001546001600160a01b03163314155b156109b857604051633244d29960e21b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a055760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0b578115610aa457828181518110610a2957610a296151fb565b602002602001015160001480610a5c57506006548351849083908110610a5157610a516151fb565b602002602001015110155b15610a7a57604051633d58a98960e11b815260040160405180910390fd5b610a9f84848381518110610a9057610a906151fb565b602002602001015160016134d5565b610b03565b6001838281518110610ab857610ab86151fb565b602002602001015103610ade576040516356d111fd60e11b815260040160405180910390fd5b610b0384848381518110610af457610af46151fb565b602002602001015160006134d5565b600101610a08565b50505050565b600060078281548110610b2657610b266151fb565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610b5957610b596151fb565b6000918252602082206003850154600c909202019250610b7b90600190615227565b90506000836003018281548110610b9457610b946151fb565b600091825260208220600b909102019150600185015460ff166004811115610bbe57610bbe614b3e565b03610c995781158015610c0d57506001840154600684019060ff166004811115610bea57610bea614b3e565b60048110610bfa57610bfa6151fb565b01546002850154610c0b9042615227565b105b15610c2b57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610c53576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610c6a576002610c6d565b60015b60018086018054909160ff1990911690836004811115610c8f57610c8f614b3e565b0217905550610ffa565b60018085015460ff166004811115610cb357610cb3614b3e565b03610dc3576001840154600684019060ff166004811115610cd657610cd6614b3e565b60048110610ce657610ce66151fb565b01546002850154610cf79042615227565b108015610d8e57506006816000015481548110610d1657610d166151fb565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610d68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8c919061523a565b155b15610dac57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610c8f565b6002600185015460ff166004811115610dde57610dde614b3e565b03610f2c576001840154600684019060ff166004811115610e0157610e01614b3e565b60048110610e1157610e116151fb565b01546002850154610e229042615227565b108015610eb957506006816000015481548110610e4157610e416151fb565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb7919061523a565b155b15610ed757604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610ffa565b6003600185015460ff166004811115610f4757610f47614b3e565b03610fc1576001840154600684019060ff166004811115610f6a57610f6a614b3e565b60048110610f7a57610f7a6151fb565b01546002850154610f8b9042615227565b1015610faa57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610c8f565b6004600185015460ff166004811115610fdc57610fdc614b3e565b03610ffa576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110399160ff1690615257565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061108590600160481b900460ff16600a615349565b61108f9084615358565b6110999190615385565b90505b92915050565b600080600783815481106110b8576110b86151fb565b60009182526020822060036004909202019081018054919350906110de90600190615227565b815481106110ee576110ee6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611123576111236151fb565b90600052602060002090600c0201905080600501548260030154101561114e57506000949350505050565b80546005805490916001600160601b031690811061116e5761116e6151fb565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600785815481106111b4576111b46151fb565b60009182526020822060036004909202019081018054919350906111da90600190615227565b815481106111ea576111ea6151fb565b90600052602060002090600b0201905060006006826000015481548110611213576112136151fb565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128c9190615399565b9199909850909650945050505050565b600581815481106112ac57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60008060078581548110611311576113116151fb565b600091825260209091206004918202019150600182015460ff16600481111561133c5761133c614b3e565b1461135a57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061136f5761136f6151fb565b6000918252602082206004600b9092020190810154909350915061139384836153d1565b60058401546006850154600286015492935090916000906113b5908390615385565b905060008660010154905060008060068960000154815481106113da576113da6151fb565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611436573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145a91906153e4565b915050806000036114765783861115611471578395505b611496565b611481846002615358565b86111561149657611493846002615358565b95505b60048801869055865b8681101561154257848110156114f8576114f16040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061355d565b955061153a565b61153a6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a2e565b60010161149f565b508488600501541461155657600588018590555b5050505050505050505050565b61156b614786565b6005826001600160601b031681548110611587576115876151fb565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116115ae5750505050509050919050565b6115d682613f70565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061165457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116486000805160206156148339815191525490565b6001600160a01b031614155b156116725760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156116cc575060408051601f3d908101601f191682019092526116c9918101906153e4565b60015b6116f45781604051630c76093760e01b81526004016116eb91906149af565b60405180910390fd5b600080516020615614833981519152811461172557604051632a87526960e21b8152600481018290526024016116eb565b6000805160206156148339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156117ee576000836001600160a01b03168360405161178c9190615421565b600060405180830381855af49150503d80600081146117c7576040519150601f19603f3d011682016040523d82523d6000602084013e6117cc565b606091505b5050905080610b0b576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461183f5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061561483398151915290565b6007818154811061186257600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600783815481106118c4576118c46151fb565b60009182526020822060036004909202019081018054919350906118ea90600190615227565b815481106118fa576118fa6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061192f5761192f6151fb565b90600052602060002090600c0201905080600501548260030154106119ce5782546001600160601b031660001901611970576001600160ff1b0393506119fb565b6003820154611980906002615358565b61198b9060016153d1565b81546005805490916001600160601b03169081106119ab576119ab6151fb565b90600052602060002090600c0201600401546119c79190615358565b93506119fb565b60038201546119de906002615358565b6119e99060016153d1565b81600401546119f89190615358565b93505b505050919050565b6000546001600160a01b03163314611a2e5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611a499190615421565b60006040518083038185875af1925050503d8060008114611a86576040519150601f19603f3d011682016040523d82523d6000602084013e611a8b565b606091505b5050905080610b0b576040516322092f2f60e11b815260040160405180910390fd5b6117ee338383600080613f9e565b6000546001600160a01b03163314611ae65760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611b655760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611c225760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611c4057611c406151fb565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611ca2575080546005805488926001600160601b0316908110611c8e57611c8e6151fb565b90600052602060002090600c020160020154115b15611cc057604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611d3b57866005836001018381548110611ce757611ce76151fb565b906000526020600020015481548110611d0257611d026151fb565b90600052602060002090600c0201600201541015611d3357604051639717078960e01b815260040160405180910390fd5b600101611cc3565b5060028101869055805460ff60601b1916600160601b8815150217815560038101859055600480820185905560058201849055611d7e90600683019084906147a4565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611dc29695949392919061543d565b60405180910390a25050505050505050565b611e3a60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b60078381548110611e4d57611e4d6151fb565b90600052602060002090600402016003018281548110611e6f57611e6f6151fb565b90600052602060002090600b02016040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805480602002602001604051908101604052809291908181526020018280548015611f1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f00575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b600060078281548110611f7557611f756151fb565b600091825260209091206004918202019150600182015460ff166004811115611fa057611fa0614b3e565b14611fbe57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff1615611fe95760405163c977f8d360e01b815260040160405180910390fd5b6000611ff48361119b565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b1580156120a757600080fd5b505af11580156120bb573d6000803e3d6000fd5b50505050505050565b600681815481106120d457600080fd5b6000918252602090912001546001600160a01b0316905081565b600080600060078481548110612106576121066151fb565b6000918252602090912060049091020190506003600182015460ff16600481111561213357612133614b3e565b0361218b576002810154815460058054929550916001600160601b03909116908110612161576121616151fb565b600091825260209091206009600c909202010154600282015461218491906153d1565b9150612194565b60009250600091505b50915091565b6000546001600160a01b031633146121c55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061220d57506001546001600160a01b03163314155b1561222b57604051633244d29960e21b815260040160405180910390fd5b600060078381548110612240576122406151fb565b906000526020600020906004020190506000600182600301805490506122669190615227565b9050600082600301828154811061227f5761227f6151fb565b600091825260208220600b909102019150600184015460ff1660048111156122a9576122a9614b3e565b146122c757604051638285c4ef60e01b815260040160405180910390fd5b60038101546006820154106122ef57604051634df06de360e01b815260040160405180910390fd5b60048054604051633c694c4160e21b81526001600160a01b039091169163f1a531049161231e918891016149af565b600060405180830381600087803b15801561233857600080fd5b505af115801561234c573d6000803e3d6000fd5b5050505060006006826000015481548110612369576123696151fb565b6000918252602082200154600a8401546001600160a01b0390911692506123919060016153d1565b60405163695c01ad60e11b815260048101899052602481018290529091506000906001600160a01b0384169063d2b8035a906044016020604051808303816000875af11580156123e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124099190615470565b90506001600160a01b03811661243257604051632e38b8f760e11b815260040160405180910390fd5b6004805460018601546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261246892869290910161548d565b600060405180830381600087803b15801561248257600080fd5b505af1158015612496573d6000803e3d6000fd5b50505060068501546040518a92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916124e3918a8252602082015260400190565b60405180910390a36006840180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600385015490540361258a5760048054604051632e96bc2360e11b81529182018a9052602482018790526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561257157600080fd5b505af1158015612585573d6000803e3d6000fd5b505050505b50600a8301555060048054604051633c694c4160e21b81526001600160a01b039091169163f1a53104916125c191600091016149af565b600060405180830381600087803b1580156125db57600080fd5b505af11580156125ef573d6000803e3d6000fd5b505050505050505050565b6000612605826133d2565b34101561262557604051630e3360f160e21b815260040160405180910390fd5b6110998383600034614158565b6000546001600160a01b0316331461265d5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612688836118ae565b3410156126a857604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106126bd576126bd6151fb565b6000918252602090912060049091020190506003600182015460ff1660048111156126ea576126ea614b3e565b14612708576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061271e90600190615227565b8154811061272e5761272e6151fb565b90600052602060002090600b020190506006816000015481548110612755576127556151fb565b6000918252602090912001546001600160a01b031633146127895760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106127cc576127cc6151fb565b90600052602060002090600c0201600501548460030154106128d5576005836001600160601b031681548110612804576128046151fb565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612837576128376151fb565b60009182526020808320858452600a600c90930201919091019052604090205460ff1661286357600191505b84546001600160601b038481169116146128d557845460038601546001600160601b039091169061289690600190615227565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612918576129186151fb565b90600052602060002090600c020190508060040154346129389190615385565b8260030181905550612710816003015482600201546129579190615358565b6129619190615385565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c9161299891615227565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b1580156129d657600080fd5b505af11580156129ea573d6000803e3d6000fd5b505086548454149150612ad090505784546003870154612a0c90600190615227565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612a5a57612a5a6151fb565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612a9d918d918d918d91906004016154a6565b600060405180830381600087803b158015612ab757600080fd5b505af1158015612acb573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612b409190615257565b60405180910390a2505050505050505050565b60008060078381548110612b6957612b696151fb565b906000526020600020906004020190508060030160018260030180549050612b919190615227565b81548110612ba157612ba16151fb565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612be65760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b6000546001600160a01b03163314612c8f5760405163c383977560e01b815260040160405180910390fd5b856005896001600160601b031681548110612cac57612cac6151fb565b90600052602060002090600c0201600201541115612cdd57604051639717078960e01b815260040160405180910390fd5b8051600003612cff5760405163402585f560e01b815260040160405180910390fd5b6001600160601b038816612d2657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612e1557838181518110612d7957612d796151fb565b602002602001015160001480612dac57506006548451859083908110612da157612da16151fb565b602002602001015110155b15612dca57604051633d58a98960e11b815260040160405180910390fd5b600182600a016000868481518110612de457612de46151fb565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612d5e565b5060016000908152600a8201602052604090205460ff16612e49576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038b161781556040805160008152602081019182905251612e819160018401916147e2565b50805460ff60601b1916600160601b8a1515021781556002810188905560038101879055600480820187905560058201869055612ec490600683019086906147a4565b5060058a6001600160601b031681548110612ee157612ee16151fb565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038b169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612f4e908d908d908d908d908d908d908d906154ef565b60405180910390a350505050505050505050565b6000612fa7826103c386868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133d292505050565b949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680612ff8575080546001600160401b03808416911610155b156130155760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b03808e166001600160a01b0319928316178355600180548e8316908416178155600280548e8416908516178155600380548e8516908616179055600480548985169086161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054928c1692909316821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a360058054600082815260028201909255600c6001909101027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180546001600160601b031916815560408051938452602084019081905292519092613174927f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db101916147e2565b50805460ff60601b1916600160601b8815150217815585516002820155602086015160038201556040860151600480830191909155606087015160058301556131c390600683019087906147a4565b50805486516020808901516040808b015160608c0151825160008082529581019093526001600160601b03909616956001957f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d958f959194919392918e915060405161323597969594939291906154ef565b60405180910390a361324a60018060016134d5565b50805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050565b6000546001600160a01b031633146132ca5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133255760405163e51cf7bf60e01b815260040160405180910390fd5b613330858585612f62565b82101561335057604051630e3360f160e21b815260040160405180910390fd5b6133656001600160a01b03841633308561443f565b613382576040516312171d8360e31b815260040160405180910390fd5b6133c68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506141589050565b90505b95945050505050565b60008060006133e08461451b565b5091509150806005836001600160601b031681548110613402576134026151fb565b90600052602060002090600c020160040154612fa79190615358565b6004546001600160a01b0316331461344957604051639d6cab9960e01b815260040160405180910390fd5b613457848484846001613f9e565b5050505050565b600060078281548110613473576134736151fb565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134ab576134ab6151fb565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134f2576134f26151fb565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b6000806007836000015181548110613577576135776151fb565b906000526020600020906004020190506000816003018460200151815481106135a2576135a26151fb565b90600052602060002090600b02019050600060068260000154815481106135cb576135cb6151fb565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613651573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367591906153e4565b905061271081111561368657506127105b60006127106136958382615227565b85600101546136a49190615358565b6136ae9190615385565b9050808760c0018181516136c291906153d1565b90525060e08701516006850180546000929081106136e2576136e26151fb565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161372391859187910161548d565b600060405180830381600087803b15801561373d57600080fd5b505af1158015613751573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061378691859187910161548d565b600060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137f48761556e565b60098b01546040516138169392916000916001600160a01b039091169061558a565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa15801561387d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138a1919061523a565b613907576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138d4918591016149af565b600060405180830381600087803b1580156138ee57600080fd5b505af1158015613902573d6000803e3d6000fd5b505050505b600188606001516139189190615227565b8860e0015114801561392c57506040880151155b15613a1d5760098501546001600160a01b0316613975576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f193505050505061399c565b6000546002860154600987015461399a926001600160a01b03918216929116906145a2565b505b60005460c08901516002546139bf926001600160a01b03918216929116906145a2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a1493909290916001600160a01b03909116906155ae565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a4757613a476151fb565b90600052602060002090600402019050600081600301836020015181548110613a7257613a726151fb565b90600052602060002090600b0201905060006006826000015481548110613a9b57613a9b6151fb565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ada916155cd565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b5e91906153e4565b9050612710811115613b6f57506127105b60008360060186606001518760e00151613b8991906155cd565b81548110613b9957613b996151fb565b600091825260208220015460018601546001600160a01b03909116925061271090613bc5908590615358565b613bcf9190615385565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613c0191869186910161548d565b600060405180830381600087803b158015613c1b57600080fd5b505af1158015613c2f573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c62918691016149af565b602060405180830381865afa158015613c7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ca3919061523a565b613cc057600254613cbe906001600160a01b031683836145a2565b505b60006127108489604001518a60c00151613cda9190615385565b613ce49190615358565b613cee9190615385565b905080866008016000828254613d0491906153d1565b925050819055506000612710858a604001518960020154613d259190615385565b613d2f9190615358565b613d399190615385565b905080876007016000828254613d4f91906153d1565b9091555050600254613d6b906001600160a01b031685846145a2565b5060098701546001600160a01b0316613da9576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613dc4565b6009870154613dc2906001600160a01b031685836145a2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e14928c928a928a929091169061558a565b60405180910390a4600189606001516002613e2f9190615358565b613e399190615227565b8960e00151036125ef57600087600801548a60c00151613e599190615227565b9050600088600701548960020154613e719190615227565b905081151580613e8057508015155b15611556578115613eaa57600054600254613ea8916001600160a01b039182169116846145a2565b505b8015613f115760098901546001600160a01b0316613ef057600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f11565b60005460098a0154613f0f916001600160a01b039182169116836145a2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf491613f5b91879187916001600160a01b03909116906155ae565b60405180910390a35050505050505050505050565b6000546001600160a01b03163314613f9b5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fc057506005546001600160601b038616115b15613fd857613fd082600461466f565b5060006133c9565b831580159061401357506005856001600160601b031681548110613ffe57613ffe6151fb565b90600052602060002090600c02016002015484105b1561402357613fd082600561466f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140ba91906155e1565b9194509250905060008160078111156140d5576140d5614b3e565b146140f0576140e4858261466f565b600093505050506133c9565b821561411d5760025461410e906001600160a01b03168a308661443f565b61411d576140e485600161466f565b81156141495760025461413a906001600160a01b03168a846145a2565b614149576140e485600261466f565b50600198975050505050505050565b60008060006141668661451b565b92505091506005826001600160601b031681548110614187576141876151fb565b60009182526020808320848452600a600c90930201919091019052604090205460ff166141c75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614252576142526151fb565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614288576142886151fb565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156142d3576142ce8a8460040154611048565b6142d9565b82600401545b90506142e5818a615385565b60038084019190915586835583015460028401546127109161430691615358565b6143109190615385565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561438357600080fd5b505af1158015614397573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016143d194939291906154a6565b600060405180830381600087803b1580156143eb57600080fd5b505af11580156143ff573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516144a49190615421565b6000604051808303816000865af19150503d80600081146144e1576040519150601f19603f3d011682016040523d82523d6000602084013e6144e6565b606091505b5091509150818015614510575080511580614510575080806020019051810190614510919061523a565b979650505050505050565b60008060006040845110614590575050506020810151604082015160608301516001600160601b038316158061455c57506005546001600160601b03841610155b1561456657600192505b8160000361457357600391505b80158061458257506006548110155b1561458b575060015b61459b565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016145c492919061548d565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516145f99190615421565b6000604051808303816000865af19150503d8060008114614636576040519150601f19603f3d011682016040523d82523d6000602084013e61463b565b606091505b5091509150818015614665575080511580614665575080806020019051810190614665919061523a565b9695505050505050565b600182600181111561468357614683614b3e565b0361468c575050565b60018160078111156146a0576146a0614b3e565b036146be57604051630f323ed960e11b815260040160405180910390fd5b60028160078111156146d2576146d2614b3e565b036146f05760405163e45e13a360e01b815260040160405180910390fd5b600381600781111561470457614704614b3e565b0361472257604051631d91d0ed60e31b815260040160405180910390fd5b600481600781111561473657614736614b3e565b03614754576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561476857614768614b3e565b036117f057604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b82600481019282156147d2579160200282015b828111156147d25782518255916020019190600101906147b7565b506147de92915061481c565b5090565b8280548282559060005260206000209081019282156147d257916020028201828111156147d25782518255916020019190600101906147b7565b5b808211156147de576000815560010161481d565b6001600160a01b0381168114613f9b57600080fd5b60006020828403121561485857600080fd5b813561486381614831565b9392505050565b80356001600160601b038116811461488157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156148c4576148c4614886565b604052919050565b600082601f8301126148dd57600080fd5b813560206001600160401b038211156148f8576148f8614886565b8160051b61490782820161489c565b928352848101820192828101908785111561492157600080fd5b83870192505b8483101561451057823582529183019190830190614927565b8015158114613f9b57600080fd5b60008060006060848603121561496357600080fd5b61496c8461486a565b925060208401356001600160401b0381111561498757600080fd5b614993868287016148cc565b92505060408401356149a481614940565b809150509250925092565b6001600160a01b0391909116815260200190565b6000602082840312156149d557600080fd5b5035919050565b600080604083850312156149ef57600080fd5b82356149fa81614831565b946020939093013593505050565b600080600060608486031215614a1d57600080fd5b505081359360208301359350604090920135919050565b600060208284031215614a4657600080fd5b6110998261486a565b8060005b6004811015610b0b578151845260209384019390910190600101614a53565b6080810161109c8284614a4f565b600082601f830112614a9157600080fd5b81356001600160401b03811115614aaa57614aaa614886565b614abd601f8201601f191660200161489c565b818152846020838601011115614ad257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614b0257600080fd5b8235614b0d81614831565b915060208301356001600160401b03811115614b2857600080fd5b614b3485828601614a80565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614b7257634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614ba26040830186614b54565b9215156060820152608001529392505050565b600080600060608486031215614bca57600080fd5b8335614bd581614831565b92506020840135915060408401356001600160401b03811115614bf757600080fd5b614c0386828701614a80565b9150509250925092565b60008060408385031215614c2057600080fd5b6149fa8361486a565b60008060408385031215614c3c57600080fd5b8235614c4781614831565b91506020830135614c5781614940565b809150509250929050565b600080600060608486031215614c7757600080fd5b8335614c8281614831565b925060208401356001600160401b0381168114614c9e57600080fd5b9150604084013560ff811681146149a457600080fd5b600082601f830112614cc557600080fd5b604051608081018181106001600160401b0382111715614ce757614ce7614886565b604052806080840185811115614cfc57600080fd5b845b81811015614d16578035835260209283019201614cfe565b509195945050505050565b6000806000806000806000610140888a031215614d3d57600080fd5b614d468861486a565b96506020880135614d5681614940565b955060408801359450606088013593506080880135925060a08801359150614d818960c08a01614cb4565b905092959891949750929550565b60008060408385031215614da257600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b83811015614deb5781516001600160a01b031687529582019590820190600101614dc6565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152614e51610180850183614db1565b60e08601516101008681019190915286015161012080870191909152860151909250610140614e8a818701836001600160a01b03169052565b959095015193019290925250919050565b60008060408385031215614eae57600080fd5b823591506020830135614c5781614831565b60008060408385031215614ed357600080fd5b8235915060208301356001600160401b03811115614b2857600080fd5b600080600060608486031215614f0557600080fd5b833592506020840135915060408401356001600160401b03811115614bf757600080fd5b600080600080600080600080610160898b031215614f4657600080fd5b614f4f8961486a565b97506020890135614f5f81614940565b965060408901359550606089013594506080890135935060a08901359250614f8a8a60c08b01614cb4565b91506101408901356001600160401b03811115614fa657600080fd5b614fb28b828c016148cc565b9150509295985092959890939650565b60008083601f840112614fd457600080fd5b5081356001600160401b03811115614feb57600080fd5b60208301915083602082850101111561500357600080fd5b9250929050565b60008060006040848603121561501f57600080fd5b83356001600160401b0381111561503557600080fd5b61504186828701614fc2565b90945092505060208401356149a481614831565b60008060008060008060008060006101e08a8c03121561507457600080fd5b893561507f81614831565b985060208a013561508f81614831565b975060408a013561509f81614831565b965060608a01356150af81614831565b955060808a01356150bf81614831565b945060a08a01356150cf81614940565b93506150de8b60c08c01614cb4565b92506150ee8b6101408c01614cb4565b91506101c08a01356150ff81614831565b809150509295985092959850929598565b60008060008060006080868803121561512857600080fd5b8535945060208601356001600160401b0381111561514557600080fd5b61515188828901614fc2565b909550935050604086013561516581614831565b949793965091946060013592915050565b60006020828403121561518857600080fd5b81356001600160401b0381111561519e57600080fd5b612fa784828501614a80565b600080600080608085870312156151c057600080fd5b84356151cb81614831565b93506151d96020860161486a565b92506040850135915060608501356151f081614940565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561109c5761109c615211565b60006020828403121561524c57600080fd5b815161486381614940565b6020810161109c8284614b54565b600181815b808511156152a057816000190482111561528657615286615211565b8085161561529357918102915b93841c939080029061526a565b509250929050565b6000826152b75750600161109c565b816152c45750600061109c565b81600181146152da57600281146152e457615300565b600191505061109c565b60ff8411156152f5576152f5615211565b50506001821b61109c565b5060208310610133831016604e8410600b8410161715615323575081810a61109c565b61532d8383615265565b806000190482111561534157615341615211565b029392505050565b600061109960ff8416836152a8565b808202811582820484141761109c5761109c615211565b634e487b7160e01b600052601260045260246000fd5b6000826153945761539461536f565b500490565b6000806000606084860312156153ae57600080fd5b8351925060208401516153c081614940565b60408501519092506149a481614940565b8082018082111561109c5761109c615211565b6000602082840312156153f657600080fd5b5051919050565b60005b83811015615418578181015183820152602001615400565b50506000910152565b600082516154338184602087016153fd565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261451060a0830184614a4f565b60006020828403121561548257600080fd5b815161486381614831565b6001600160a01b03929092168252602082015260400190565b84815283602082015260806040820152600083518060808401526154d18160a08501602088016153fd565b606083019390935250601f91909101601f19160160a0019392505050565b60006101408083018a1515845260208a602086015289604086015288606086015287608086015261552360a0860188614a4f565b610120850192909252845190819052610160840191602086019160005b8181101561555c57835185529382019392820192600101615540565b50929c9b505050505050505050505050565b6000600160ff1b820161558357615583615211565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b6000826155dc576155dc61536f565b500690565b6000806000606084860312156155f657600080fd5b83519250602084015191506040840151600881106149a457600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122088332e4bd463fd5a2a31ab980f2b2ead694ff8b8a10a33684171a45128537f0a64736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061027c5760003560e01c80638a9bb02a1161014f578063d07368bd116100c1578063f6506db41161007a578063f6506db414610867578063f7434ea914610887578063fbb519e7146108a7578063fbf405b0146108c7578063fc6f8f16146108e7578063fe524c391461090757600080fd5b8063d07368bd146107b2578063d4d1d76a146107d2578063d874514b146107e7578063d98493f614610807578063e399d29b14610827578063e4c0aaf41461084757600080fd5b8063b702a87911610113578063b702a8791461070c578063c13517e11461072c578063c258bb191461073f578063c35699021461075f578063c71f425314610772578063cf0c38f81461079257600080fd5b80638a9bb02a1461064a5780638bb0487514610677578063acdbf51d14610697578063afe15cfb146106b7578063b0049637146106ec57600080fd5b80632e1daf2f116101f357806371ae413d116101ac57806371ae413d1461058a578063751accd0146105aa5780637717a6e8146105ca5780637934c0be146105ea57806382d022371461060a57806386541b241461062a57600080fd5b80632e1daf2f146104c45780633cfd1184146104e45780634f1ef2861461051157806352d1902d14610524578063564a565d1461053957806359ec827e1461056a57600080fd5b8063115d537611610245578063115d5376146103885780631860592b146103a857806319b81529146103d65780631c3db16d146104065780631f5a0dd2146104435780632d29a47b146104a457600080fd5b8062f5822c146102815780630219da79146102a357806309cfdc9c1461031b5780630b7414bc1461033b5780630c340a241461035b575b600080fd5b34801561028d57600080fd5b506102a161029c366004614846565b610927565b005b3480156102af57600080fd5b506102ee6102be366004614846565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561032757600080fd5b506102a1610336366004614846565b610974565b34801561034757600080fd5b506102a161035636600461494e565b6109da565b34801561036757600080fd5b5060005461037b906001600160a01b031681565b60405161031291906149af565b34801561039457600080fd5b506102a16103a33660046149c3565b610b11565b3480156103b457600080fd5b506103c86103c33660046149dc565b611048565b604051908152602001610312565b3480156103e257600080fd5b506103f66103f13660046149c3565b6110a2565b6040519015158152602001610312565b34801561041257600080fd5b506104266104213660046149c3565b61119b565b604080519384529115156020840152151590820152606001610312565b34801561044f57600080fd5b5061046361045e3660046149c3565b61129c565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e001610312565b3480156104b057600080fd5b506102a16104bf366004614a08565b6112fb565b3480156104d057600080fd5b5060045461037b906001600160a01b031681565b3480156104f057600080fd5b506105046104ff366004614a34565b611563565b6040516103129190614a72565b6102a161051f366004614aef565b6115cd565b34801561053057600080fd5b506103c86117f4565b34801561054557600080fd5b506105596105543660046149c3565b611852565b604051610312959493929190614b76565b34801561057657600080fd5b506103c86105853660046149c3565b6118ae565b34801561059657600080fd5b5060015461037b906001600160a01b031681565b3480156105b657600080fd5b506102a16105c5366004614bb5565b611a03565b3480156105d657600080fd5b506102a16105e5366004614c0d565b611aad565b3480156105f657600080fd5b506102a1610605366004614c29565b611abb565b34801561061657600080fd5b506102a1610625366004614c62565b611b3a565b34801561063657600080fd5b506102a1610645366004614d21565b611bf7565b34801561065657600080fd5b5061066a610665366004614d8f565b611dd4565b6040516103129190614df6565b34801561068357600080fd5b506102a16106923660046149c3565b611f60565b3480156106a357600080fd5b5061037b6106b23660046149c3565b6120c4565b3480156106c357600080fd5b506106d76106d23660046149c3565b6120ee565b60408051928352602083019190915201610312565b3480156106f857600080fd5b506102a1610707366004614846565b61219a565b34801561071857600080fd5b506102a1610727366004614e9b565b6121e7565b6103c861073a366004614ec0565b6125fa565b34801561074b57600080fd5b506102a161075a366004614846565b612632565b6102a161076d366004614ef0565b61267f565b34801561077e57600080fd5b506103c861078d3660046149c3565b612b53565b34801561079e57600080fd5b5060035461037b906001600160a01b031681565b3480156107be57600080fd5b506102a16107cd366004614846565b612bbb565b3480156107de57600080fd5b506006546103c8565b3480156107f357600080fd5b506102a1610802366004614f29565b612c64565b34801561081357600080fd5b506103c861082236600461500a565b612f62565b34801561083357600080fd5b506102a1610842366004615055565b612faf565b34801561085357600080fd5b506102a1610862366004614846565b61329f565b34801561087357600080fd5b506103c8610882366004615110565b6132ec565b34801561089357600080fd5b506103c86108a2366004615176565b6133d2565b3480156108b357600080fd5b506102a16108c23660046151aa565b61341e565b3480156108d357600080fd5b5060025461037b906001600160a01b031681565b3480156108f357600080fd5b506103c86109023660046149c3565b61345e565b34801561091357600080fd5b506103f6610922366004614c0d565b61348d565b6000546001600160a01b031633146109525760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061099a57506001546001600160a01b03163314155b156109b857604051633244d29960e21b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a055760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610b0b578115610aa457828181518110610a2957610a296151fb565b602002602001015160001480610a5c57506006548351849083908110610a5157610a516151fb565b602002602001015110155b15610a7a57604051633d58a98960e11b815260040160405180910390fd5b610a9f84848381518110610a9057610a906151fb565b602002602001015160016134d5565b610b03565b6001838281518110610ab857610ab86151fb565b602002602001015103610ade576040516356d111fd60e11b815260040160405180910390fd5b610b0384848381518110610af457610af46151fb565b602002602001015160006134d5565b600101610a08565b50505050565b600060078281548110610b2657610b266151fb565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610b5957610b596151fb565b6000918252602082206003850154600c909202019250610b7b90600190615227565b90506000836003018281548110610b9457610b946151fb565b600091825260208220600b909102019150600185015460ff166004811115610bbe57610bbe614b3e565b03610c995781158015610c0d57506001840154600684019060ff166004811115610bea57610bea614b3e565b60048110610bfa57610bfa6151fb565b01546002850154610c0b9042615227565b105b15610c2b57604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610c53576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610c6a576002610c6d565b60015b60018086018054909160ff1990911690836004811115610c8f57610c8f614b3e565b0217905550610ffa565b60018085015460ff166004811115610cb357610cb3614b3e565b03610dc3576001840154600684019060ff166004811115610cd657610cd6614b3e565b60048110610ce657610ce66151fb565b01546002850154610cf79042615227565b108015610d8e57506006816000015481548110610d1657610d166151fb565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610d68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8c919061523a565b155b15610dac57604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610c8f565b6002600185015460ff166004811115610dde57610dde614b3e565b03610f2c576001840154600684019060ff166004811115610e0157610e01614b3e565b60048110610e1157610e116151fb565b01546002850154610e229042615227565b108015610eb957506006816000015481548110610e4157610e416151fb565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb7919061523a565b155b15610ed757604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a3610ffa565b6003600185015460ff166004811115610f4757610f47614b3e565b03610fc1576001840154600684019060ff166004811115610f6a57610f6a614b3e565b60048110610f7a57610f7a6151fb565b01546002850154610f8b9042615227565b1015610faa57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610c8f565b6004600185015460ff166004811115610fdc57610fdc614b3e565b03610ffa576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110399160ff1690615257565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061108590600160481b900460ff16600a615349565b61108f9084615358565b6110999190615385565b90505b92915050565b600080600783815481106110b8576110b86151fb565b60009182526020822060036004909202019081018054919350906110de90600190615227565b815481106110ee576110ee6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611123576111236151fb565b90600052602060002090600c0201905080600501548260030154101561114e57506000949350505050565b80546005805490916001600160601b031690811061116e5761116e6151fb565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b600080600080600785815481106111b4576111b46151fb565b60009182526020822060036004909202019081018054919350906111da90600190615227565b815481106111ea576111ea6151fb565b90600052602060002090600b0201905060006006826000015481548110611213576112136151fb565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128c9190615399565b9199909850909650945050505050565b600581815481106112ac57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b60008060078581548110611311576113116151fb565b600091825260209091206004918202019150600182015460ff16600481111561133c5761133c614b3e565b1461135a57604051638794ce4b60e01b815260040160405180910390fd5b80600301848154811061136f5761136f6151fb565b6000918252602082206004600b9092020190810154909350915061139384836153d1565b60058401546006850154600286015492935090916000906113b5908390615385565b905060008660010154905060008060068960000154815481106113da576113da6151fb565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611436573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145a91906153e4565b915050806000036114765783861115611471578395505b611496565b611481846002615358565b86111561149657611493846002615358565b95505b60048801869055865b8681101561154257848110156114f8576114f16040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061355d565b955061153a565b61153a6040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613a2e565b60010161149f565b508488600501541461155657600588018590555b5050505050505050505050565b61156b614786565b6005826001600160601b031681548110611587576115876151fb565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b8154815260200190600101908083116115ae5750505050509050919050565b6115d682613f70565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061165457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116486000805160206156148339815191525490565b6001600160a01b031614155b156116725760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156116cc575060408051601f3d908101601f191682019092526116c9918101906153e4565b60015b6116f45781604051630c76093760e01b81526004016116eb91906149af565b60405180910390fd5b600080516020615614833981519152811461172557604051632a87526960e21b8152600481018290526024016116eb565b6000805160206156148339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156117ee576000836001600160a01b03168360405161178c9190615421565b600060405180830381855af49150503d80600081146117c7576040519150601f19603f3d011682016040523d82523d6000602084013e6117cc565b606091505b5050905080610b0b576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461183f5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061561483398151915290565b6007818154811061186257600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b600080600783815481106118c4576118c46151fb565b60009182526020822060036004909202019081018054919350906118ea90600190615227565b815481106118fa576118fa6151fb565b600091825260208220845460058054600b909402909201945090916001600160601b0390911690811061192f5761192f6151fb565b90600052602060002090600c0201905080600501548260030154106119ce5782546001600160601b031660001901611970576001600160ff1b0393506119fb565b6003820154611980906002615358565b61198b9060016153d1565b81546005805490916001600160601b03169081106119ab576119ab6151fb565b90600052602060002090600c0201600401546119c79190615358565b93506119fb565b60038201546119de906002615358565b6119e99060016153d1565b81600401546119f89190615358565b93505b505050919050565b6000546001600160a01b03163314611a2e5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611a499190615421565b60006040518083038185875af1925050503d8060008114611a86576040519150601f19603f3d011682016040523d82523d6000602084013e611a8b565b606091505b5050905080610b0b576040516322092f2f60e11b815260040160405180910390fd5b6117ee338383600080613f9e565b6000546001600160a01b03163314611ae65760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611b655760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6000546001600160a01b03163314611c225760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b031681548110611c4057611c406151fb565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015611ca2575080546005805488926001600160601b0316908110611c8e57611c8e6151fb565b90600052602060002090600c020160020154115b15611cc057604051639717078960e01b815260040160405180910390fd5b60005b6001820154811015611d3b57866005836001018381548110611ce757611ce76151fb565b906000526020600020015481548110611d0257611d026151fb565b90600052602060002090600c0201600201541015611d3357604051639717078960e01b815260040160405180910390fd5b600101611cc3565b5060028101869055805460ff60601b1916600160601b8815150217815560038101859055600480820185905560058201849055611d7e90600683019084906147a4565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a888888888888604051611dc29695949392919061543d565b60405180910390a25050505050505050565b611e3a60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b60078381548110611e4d57611e4d6151fb565b90600052602060002090600402016003018281548110611e6f57611e6f6151fb565b90600052602060002090600b02016040518061016001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805480602002602001604051908101604052809291908181526020018280548015611f1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f00575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b600060078281548110611f7557611f756151fb565b600091825260209091206004918202019150600182015460ff166004811115611fa057611fa0614b3e565b14611fbe57604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff1615611fe95760405163c977f8d360e01b815260040160405180910390fd5b6000611ff48361119b565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b1580156120a757600080fd5b505af11580156120bb573d6000803e3d6000fd5b50505050505050565b600681815481106120d457600080fd5b6000918252602090912001546001600160a01b0316905081565b600080600060078481548110612106576121066151fb565b6000918252602090912060049091020190506003600182015460ff16600481111561213357612133614b3e565b0361218b576002810154815460058054929550916001600160601b03909116908110612161576121616151fb565b600091825260209091206009600c909202010154600282015461218491906153d1565b9150612194565b60009250600091505b50915091565b6000546001600160a01b031633146121c55760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480159061220d57506001546001600160a01b03163314155b1561222b57604051633244d29960e21b815260040160405180910390fd5b600060078381548110612240576122406151fb565b906000526020600020906004020190506000600182600301805490506122669190615227565b9050600082600301828154811061227f5761227f6151fb565b600091825260208220600b909102019150600184015460ff1660048111156122a9576122a9614b3e565b146122c757604051638285c4ef60e01b815260040160405180910390fd5b60038101546006820154106122ef57604051634df06de360e01b815260040160405180910390fd5b60048054604051633c694c4160e21b81526001600160a01b039091169163f1a531049161231e918891016149af565b600060405180830381600087803b15801561233857600080fd5b505af115801561234c573d6000803e3d6000fd5b5050505060006006826000015481548110612369576123696151fb565b6000918252602082200154600a8401546001600160a01b0390911692506123919060016153d1565b60405163695c01ad60e11b815260048101899052602481018290529091506000906001600160a01b0384169063d2b8035a906044016020604051808303816000875af11580156123e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124099190615470565b90506001600160a01b03811661243257604051632e38b8f760e11b815260040160405180910390fd5b6004805460018601546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261246892869290910161548d565b600060405180830381600087803b15801561248257600080fd5b505af1158015612496573d6000803e3d6000fd5b50505060068501546040518a92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b916124e3918a8252602082015260400190565b60405180910390a36006840180546001810182556000828152602090200180546001600160a01b0319166001600160a01b038416179055600385015490540361258a5760048054604051632e96bc2360e11b81529182018a9052602482018790526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561257157600080fd5b505af1158015612585573d6000803e3d6000fd5b505050505b50600a8301555060048054604051633c694c4160e21b81526001600160a01b039091169163f1a53104916125c191600091016149af565b600060405180830381600087803b1580156125db57600080fd5b505af11580156125ef573d6000803e3d6000fd5b505050505050505050565b6000612605826133d2565b34101561262557604051630e3360f160e21b815260040160405180910390fd5b6110998383600034614158565b6000546001600160a01b0316331461265d5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612688836118ae565b3410156126a857604051633191f8f160e01b815260040160405180910390fd5b6000600784815481106126bd576126bd6151fb565b6000918252602090912060049091020190506003600182015460ff1660048111156126ea576126ea614b3e565b14612708576040516337cdefcb60e21b815260040160405180910390fd5b6003810180546000919061271e90600190615227565b8154811061272e5761272e6151fb565b90600052602060002090600b020190506006816000015481548110612755576127556151fb565b6000918252602090912001546001600160a01b031633146127895760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b90930290910191849081106127cc576127cc6151fb565b90600052602060002090600c0201600501548460030154106128d5576005836001600160601b031681548110612804576128046151fb565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612837576128376151fb565b60009182526020808320858452600a600c90930201919091019052604090205460ff1661286357600191505b84546001600160601b038481169116146128d557845460038601546001600160601b039091169061289690600190615227565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612918576129186151fb565b90600052602060002090600c020190508060040154346129389190615385565b8260030181905550612710816003015482600201546129579190615358565b6129619190615385565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c9161299891615227565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b1580156129d657600080fd5b505af11580156129ea573d6000803e3d6000fd5b505086548454149150612ad090505784546003870154612a0c90600190615227565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612a5a57612a5a6151fb565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612a9d918d918d918d91906004016154a6565b600060405180830381600087803b158015612ab757600080fd5b505af1158015612acb573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612b409190615257565b60405180910390a2505050505050505050565b60008060078381548110612b6957612b696151fb565b906000526020600020906004020190508060030160018260030180549050612b919190615227565b81548110612ba157612ba16151fb565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612be65760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b6000546001600160a01b03163314612c8f5760405163c383977560e01b815260040160405180910390fd5b856005896001600160601b031681548110612cac57612cac6151fb565b90600052602060002090600c0201600201541115612cdd57604051639717078960e01b815260040160405180910390fd5b8051600003612cff5760405163402585f560e01b815260040160405180910390fd5b6001600160601b038816612d2657604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b8351811015612e1557838181518110612d7957612d796151fb565b602002602001015160001480612dac57506006548451859083908110612da157612da16151fb565b602002602001015110155b15612dca57604051633d58a98960e11b815260040160405180910390fd5b600182600a016000868481518110612de457612de46151fb565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612d5e565b5060016000908152600a8201602052604090205460ff16612e49576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038b161781556040805160008152602081019182905251612e819160018401916147e2565b50805460ff60601b1916600160601b8a1515021781556002810188905560038101879055600480820187905560058201869055612ec490600683019086906147a4565b5060058a6001600160601b031681548110612ee157612ee16151fb565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038b169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612f4e908d908d908d908d908d908d908d906154ef565b60405180910390a350505050505050505050565b6000612fa7826103c386868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506133d292505050565b949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680612ff8575080546001600160401b03808416911610155b156130155760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b178155600080546001600160a01b03808e166001600160a01b0319928316178355600180548e8316908416178155600280548e8416908516178155600380548e8516908616179055600480548985169086161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054928c1692909316821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a360058054600082815260028201909255600c6001909101027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180546001600160601b031916815560408051938452602084019081905292519092613174927f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db101916147e2565b50805460ff60601b1916600160601b8815150217815585516002820155602086015160038201556040860151600480830191909155606087015160058301556131c390600683019087906147a4565b50805486516020808901516040808b015160608c0151825160008082529581019093526001600160601b03909616956001957f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d958f959194919392918e915060405161323597969594939291906154ef565b60405180910390a361324a60018060016134d5565b50805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15050505050505050505050565b6000546001600160a01b031633146132ca5760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133255760405163e51cf7bf60e01b815260040160405180910390fd5b613330858585612f62565b82101561335057604051630e3360f160e21b815260040160405180910390fd5b6133656001600160a01b03841633308561443f565b613382576040516312171d8360e31b815260040160405180910390fd5b6133c68686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506141589050565b90505b95945050505050565b60008060006133e08461451b565b5091509150806005836001600160601b031681548110613402576134026151fb565b90600052602060002090600c020160040154612fa79190615358565b6004546001600160a01b0316331461344957604051639d6cab9960e01b815260040160405180910390fd5b613457848484846001613f9e565b5050505050565b600060078281548110613473576134736151fb565b600091825260209091206003600490920201015492915050565b60006005836001600160601b0316815481106134ab576134ab6151fb565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b0316815481106134f2576134f26151fb565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b6000806007836000015181548110613577576135776151fb565b906000526020600020906004020190506000816003018460200151815481106135a2576135a26151fb565b90600052602060002090600b02019050600060068260000154815481106135cb576135cb6151fb565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613651573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061367591906153e4565b905061271081111561368657506127105b60006127106136958382615227565b85600101546136a49190615358565b6136ae9190615385565b9050808760c0018181516136c291906153d1565b90525060e08701516006850180546000929081106136e2576136e26151fb565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c79161372391859187910161548d565b600060405180830381600087803b15801561373d57600080fd5b505af1158015613751573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c925061378691859187910161548d565b600060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7866137f48761556e565b60098b01546040516138169392916000916001600160a01b039091169061558a565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa15801561387d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138a1919061523a565b613907576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e99916138d4918591016149af565b600060405180830381600087803b1580156138ee57600080fd5b505af1158015613902573d6000803e3d6000fd5b505050505b600188606001516139189190615227565b8860e0015114801561392c57506040880151155b15613a1d5760098501546001600160a01b0316613975576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f193505050505061399c565b6000546002860154600987015461399a926001600160a01b03918216929116906145a2565b505b60005460c08901516002546139bf926001600160a01b03918216929116906145a2565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613a1493909290916001600160a01b03909116906155ae565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613a4757613a476151fb565b90600052602060002090600402019050600081600301836020015181548110613a7257613a726151fb565b90600052602060002090600b0201905060006006826000015481548110613a9b57613a9b6151fb565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ada916155cd565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b5e91906153e4565b9050612710811115613b6f57506127105b60008360060186606001518760e00151613b8991906155cd565b81548110613b9957613b996151fb565b600091825260208220015460018601546001600160a01b03909116925061271090613bc5908590615358565b613bcf9190615385565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613c0191869186910161548d565b600060405180830381600087803b158015613c1b57600080fd5b505af1158015613c2f573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f9250613c62918691016149af565b602060405180830381865afa158015613c7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ca3919061523a565b613cc057600254613cbe906001600160a01b031683836145a2565b505b60006127108489604001518a60c00151613cda9190615385565b613ce49190615358565b613cee9190615385565b905080866008016000828254613d0491906153d1565b925050819055506000612710858a604001518960020154613d259190615385565b613d2f9190615358565b613d399190615385565b905080876007016000828254613d4f91906153d1565b9091555050600254613d6b906001600160a01b031685846145a2565b5060098701546001600160a01b0316613da9576040516001600160a01b0385169082156108fc029083906000818181858888f1935050505050613dc4565b6009870154613dc2906001600160a01b031685836145a2565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792613e14928c928a928a929091169061558a565b60405180910390a4600189606001516002613e2f9190615358565b613e399190615227565b8960e00151036125ef57600087600801548a60c00151613e599190615227565b9050600088600701548960020154613e719190615227565b905081151580613e8057508015155b15611556578115613eaa57600054600254613ea8916001600160a01b039182169116846145a2565b505b8015613f115760098901546001600160a01b0316613ef057600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050613f11565b60005460098a0154613f0f916001600160a01b039182169116836145a2565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf491613f5b91879187916001600160a01b03909116906155ae565b60405180910390a35050505050505050505050565b6000546001600160a01b03163314613f9b5760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b0385161580613fc057506005546001600160601b038616115b15613fd857613fd082600461466f565b5060006133c9565b831580159061401357506005856001600160601b031681548110613ffe57613ffe6151fb565b90600052602060002090600c02016002015484105b1561402357613fd082600561466f565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af1158015614096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140ba91906155e1565b9194509250905060008160078111156140d5576140d5614b3e565b146140f0576140e4858261466f565b600093505050506133c9565b821561411d5760025461410e906001600160a01b03168a308661443f565b61411d576140e485600161466f565b81156141495760025461413a906001600160a01b03168a846145a2565b614149576140e485600261466f565b50600198975050505050505050565b60008060006141668661451b565b92505091506005826001600160601b031681548110614187576141876151fb565b60009182526020808320848452600a600c90930201919091019052604090205460ff166141c75760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614252576142526151fb565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614288576142886151fb565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156142d3576142ce8a8460040154611048565b6142d9565b82600401545b90506142e5818a615385565b60038084019190915586835583015460028401546127109161430691615358565b6143109190615385565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b15801561438357600080fd5b505af1158015614397573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b81526004016143d194939291906154a6565b600060405180830381600087803b1580156143eb57600080fd5b505af11580156143ff573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516144a49190615421565b6000604051808303816000865af19150503d80600081146144e1576040519150601f19603f3d011682016040523d82523d6000602084013e6144e6565b606091505b5091509150818015614510575080511580614510575080806020019051810190614510919061523a565b979650505050505050565b60008060006040845110614590575050506020810151604082015160608301516001600160601b038316158061455c57506005546001600160601b03841610155b1561456657600192505b8160000361457357600391505b80158061458257506006548110155b1561458b575060015b61459b565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016145c492919061548d565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516145f99190615421565b6000604051808303816000865af19150503d8060008114614636576040519150601f19603f3d011682016040523d82523d6000602084013e61463b565b606091505b5091509150818015614665575080511580614665575080806020019051810190614665919061523a565b9695505050505050565b600182600181111561468357614683614b3e565b0361468c575050565b60018160078111156146a0576146a0614b3e565b036146be57604051630f323ed960e11b815260040160405180910390fd5b60028160078111156146d2576146d2614b3e565b036146f05760405163e45e13a360e01b815260040160405180910390fd5b600381600781111561470457614704614b3e565b0361472257604051631d91d0ed60e31b815260040160405180910390fd5b600481600781111561473657614736614b3e565b03614754576040516321f1774b60e11b815260040160405180910390fd5b600581600781111561476857614768614b3e565b036117f057604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b82600481019282156147d2579160200282015b828111156147d25782518255916020019190600101906147b7565b506147de92915061481c565b5090565b8280548282559060005260206000209081019282156147d257916020028201828111156147d25782518255916020019190600101906147b7565b5b808211156147de576000815560010161481d565b6001600160a01b0381168114613f9b57600080fd5b60006020828403121561485857600080fd5b813561486381614831565b9392505050565b80356001600160601b038116811461488157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156148c4576148c4614886565b604052919050565b600082601f8301126148dd57600080fd5b813560206001600160401b038211156148f8576148f8614886565b8160051b61490782820161489c565b928352848101820192828101908785111561492157600080fd5b83870192505b8483101561451057823582529183019190830190614927565b8015158114613f9b57600080fd5b60008060006060848603121561496357600080fd5b61496c8461486a565b925060208401356001600160401b0381111561498757600080fd5b614993868287016148cc565b92505060408401356149a481614940565b809150509250925092565b6001600160a01b0391909116815260200190565b6000602082840312156149d557600080fd5b5035919050565b600080604083850312156149ef57600080fd5b82356149fa81614831565b946020939093013593505050565b600080600060608486031215614a1d57600080fd5b505081359360208301359350604090920135919050565b600060208284031215614a4657600080fd5b6110998261486a565b8060005b6004811015610b0b578151845260209384019390910190600101614a53565b6080810161109c8284614a4f565b600082601f830112614a9157600080fd5b81356001600160401b03811115614aaa57614aaa614886565b614abd601f8201601f191660200161489c565b818152846020838601011115614ad257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215614b0257600080fd5b8235614b0d81614831565b915060208301356001600160401b03811115614b2857600080fd5b614b3485828601614a80565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60058110614b7257634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a08101614ba26040830186614b54565b9215156060820152608001529392505050565b600080600060608486031215614bca57600080fd5b8335614bd581614831565b92506020840135915060408401356001600160401b03811115614bf757600080fd5b614c0386828701614a80565b9150509250925092565b60008060408385031215614c2057600080fd5b6149fa8361486a565b60008060408385031215614c3c57600080fd5b8235614c4781614831565b91506020830135614c5781614940565b809150509250929050565b600080600060608486031215614c7757600080fd5b8335614c8281614831565b925060208401356001600160401b0381168114614c9e57600080fd5b9150604084013560ff811681146149a457600080fd5b600082601f830112614cc557600080fd5b604051608081018181106001600160401b0382111715614ce757614ce7614886565b604052806080840185811115614cfc57600080fd5b845b81811015614d16578035835260209283019201614cfe565b509195945050505050565b6000806000806000806000610140888a031215614d3d57600080fd5b614d468861486a565b96506020880135614d5681614940565b955060408801359450606088013593506080880135925060a08801359150614d818960c08a01614cb4565b905092959891949750929550565b60008060408385031215614da257600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b83811015614deb5781516001600160a01b031687529582019590820190600101614dc6565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152614e51610180850183614db1565b60e08601516101008681019190915286015161012080870191909152860151909250610140614e8a818701836001600160a01b03169052565b959095015193019290925250919050565b60008060408385031215614eae57600080fd5b823591506020830135614c5781614831565b60008060408385031215614ed357600080fd5b8235915060208301356001600160401b03811115614b2857600080fd5b600080600060608486031215614f0557600080fd5b833592506020840135915060408401356001600160401b03811115614bf757600080fd5b600080600080600080600080610160898b031215614f4657600080fd5b614f4f8961486a565b97506020890135614f5f81614940565b965060408901359550606089013594506080890135935060a08901359250614f8a8a60c08b01614cb4565b91506101408901356001600160401b03811115614fa657600080fd5b614fb28b828c016148cc565b9150509295985092959890939650565b60008083601f840112614fd457600080fd5b5081356001600160401b03811115614feb57600080fd5b60208301915083602082850101111561500357600080fd5b9250929050565b60008060006040848603121561501f57600080fd5b83356001600160401b0381111561503557600080fd5b61504186828701614fc2565b90945092505060208401356149a481614831565b60008060008060008060008060006101e08a8c03121561507457600080fd5b893561507f81614831565b985060208a013561508f81614831565b975060408a013561509f81614831565b965060608a01356150af81614831565b955060808a01356150bf81614831565b945060a08a01356150cf81614940565b93506150de8b60c08c01614cb4565b92506150ee8b6101408c01614cb4565b91506101c08a01356150ff81614831565b809150509295985092959850929598565b60008060008060006080868803121561512857600080fd5b8535945060208601356001600160401b0381111561514557600080fd5b61515188828901614fc2565b909550935050604086013561516581614831565b949793965091946060013592915050565b60006020828403121561518857600080fd5b81356001600160401b0381111561519e57600080fd5b612fa784828501614a80565b600080600080608085870312156151c057600080fd5b84356151cb81614831565b93506151d96020860161486a565b92506040850135915060608501356151f081614940565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561109c5761109c615211565b60006020828403121561524c57600080fd5b815161486381614940565b6020810161109c8284614b54565b600181815b808511156152a057816000190482111561528657615286615211565b8085161561529357918102915b93841c939080029061526a565b509250929050565b6000826152b75750600161109c565b816152c45750600061109c565b81600181146152da57600281146152e457615300565b600191505061109c565b60ff8411156152f5576152f5615211565b50506001821b61109c565b5060208310610133831016604e8410600b8410161715615323575081810a61109c565b61532d8383615265565b806000190482111561534157615341615211565b029392505050565b600061109960ff8416836152a8565b808202811582820484141761109c5761109c615211565b634e487b7160e01b600052601260045260246000fd5b6000826153945761539461536f565b500490565b6000806000606084860312156153ae57600080fd5b8351925060208401516153c081614940565b60408501519092506149a481614940565b8082018082111561109c5761109c615211565b6000602082840312156153f657600080fd5b5051919050565b60005b83811015615418578181015183820152602001615400565b50506000910152565b600082516154338184602087016153fd565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261451060a0830184614a4f565b60006020828403121561548257600080fd5b815161486381614831565b6001600160a01b03929092168252602082015260400190565b84815283602082015260806040820152600083518060808401526154d18160a08501602088016153fd565b606083019390935250601f91909101601f19160160a0019392505050565b60006101408083018a1515845260208a602086015289604086015288606086015287608086015261552360a0860188614a4f565b610120850192909252845190819052610160840191602086019160005b8181101561555c57835185529382019392820192600101615540565b50929c9b505050505050505050505050565b6000600160ff1b820161558357615583615211565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b6000826155dc576155dc61536f565b500690565b6000806000606084860312156155f657600080fd5b83519250602084015191506040840151600881106149a457600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122088332e4bd463fd5a2a31ab980f2b2ead694ff8b8a10a33684171a45128537f0a64736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AllJurorsDrawn\",\"type\":\"error\"},{\"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\":\"InstructorOnly\",\"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\":\"NoJurorDrawn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEvidencePeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotExecutionPeriod\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerOrInstructorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RulingAlreadyExecuted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SortitionModuleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingInTooManyCourts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingLessThanCourtMinStake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingNotPossibleInThisCourt\",\"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\":\"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\":\"_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\":\"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\":\"_degreeOfCoherencyPnk\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherencyFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_amountPnk\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_amountFee\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"JurorRewardPenalty\",\"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\":\"_amountPnk\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountFee\",\"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 KlerosCoreUniversity.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"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\":\"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\",\"name\":\"_instructor\",\"type\":\"address\"}],\"name\":\"changeInstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModuleUniversity\",\"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\"}],\"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\":\"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 KlerosCoreUniversity.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\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"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\":\"executeOwnerProposal\",\"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\":\"getPnkAtStakePerJuror\",\"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\":\"uint96[]\",\"name\":\"drawnJurorFromCourtIDs\",\"type\":\"uint96[]\"},{\"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\":\"uint256[10]\",\"name\":\"__gap\",\"type\":\"uint256[10]\"}],\"internalType\":\"struct KlerosCoreUniversity.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\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_instructor\",\"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\":\"contract ISortitionModuleUniversity\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"instructor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":[],\"name\":\"owner\",\"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\":\"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\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModuleUniversity\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferBySortitionModule\",\"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\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"params\":{\"_accepted\":\"Whether the token is accepted or not.\",\"_token\":\"The ERC20 token.\"}},\"DisputeCreation(uint256,address)\":{\"params\":{\"_arbitrable\":\"The contract which created the dispute.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"params\":{\"_feeToken\":\"The ERC20 token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"Ruling(address,uint256,uint256)\":{\"params\":{\"_arbitrable\":\"The arbitrable receiving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"addNewDisputeKit(address)\":{\"params\":{\"_disputeKitAddress\":\"The address of the dispute kit contract.\"}},\"appeal(uint256,uint256,bytes)\":{\"details\":\"Access restricted to the Dispute Kit for this `disputeID`.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_extraData\":\"Extradata for the dispute. Can be required during court jump.\",\"_numberOfChoices\":\"Number of choices for the dispute. Can be required during court jump.\"}},\"appealCost(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"cost\":\"The appeal cost.\"}},\"appealPeriod(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"end\":\"The end of the appeal period.\",\"start\":\"The start of the appeal period.\"}},\"arbitrationCost(bytes)\":{\"details\":\"It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\"},\"returns\":{\"cost\":\"The arbitration cost in ETH.\"}},\"arbitrationCost(bytes,address)\":{\"details\":\"It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeToken\":\"The ERC20 token used to pay fees.\"},\"returns\":{\"cost\":\"The arbitration cost in `_feeToken`.\"}},\"changeAcceptedFeeTokens(address,bool)\":{\"params\":{\"_accepted\":\"Whether the token is supported or not as a method of fee payment.\",\"_feeToken\":\"The fee token.\"}},\"changeCurrencyRates(address,uint64,uint8)\":{\"params\":{\"_feeToken\":\"The fee token.\",\"_rateDecimals\":\"The new decimals of the fee token rate.\",\"_rateInEth\":\"The new rate of the fee token in ETH.\"}},\"changeInstructor(address)\":{\"params\":{\"_instructor\":\"The new value for the `instructor` storage variable.\"}},\"changeJurorProsecutionModule(address)\":{\"params\":{\"_jurorProsecutionModule\":\"The new value for the `jurorProsecutionModule` storage variable.\"}},\"changeOwner(address)\":{\"params\":{\"_owner\":\"The new value for the `owner` storage variable.\"}},\"changePinakion(address)\":{\"params\":{\"_pinakion\":\"The new value for the `pinakion` storage variable.\"}},\"changeSortitionModule(address)\":{\"params\":{\"_sortitionModule\":\"The new value for the `sortitionModule` storage variable.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])\":{\"params\":{\"_alpha\":\"The `alpha` property value of the court.\",\"_feeForJuror\":\"The `feeForJuror` property value of the court.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the court.\",\"_jurorsForCourtJump\":\"The `jurorsForCourtJump` property value of the court.\",\"_minStake\":\"The `minStake` property value of the court.\",\"_parent\":\"The `parent` property value of the court.\",\"_supportedDisputeKits\":\"Indexes of dispute kits that this court will support.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the court.\"}},\"createDispute(uint256,bytes)\":{\"details\":\"Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in ETH.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"createDispute(uint256,bytes,address,uint256)\":{\"details\":\"Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in the supported ERC20 token.\",\"params\":{\"_extraData\":\"Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\",\"_feeAmount\":\"Amount of the ERC20 token used to pay fees.\",\"_feeToken\":\"The ERC20 token used to pay fees.\",\"_numberOfChoices\":\"The number of choices the arbitrator can choose from in this dispute.\"},\"returns\":{\"disputeID\":\"The identifier of the dispute created.\"}},\"currentRuling(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"overridden\":\"Whether the ruling was overridden by appeal funding or not.\",\"ruling\":\"The current ruling.\",\"tied\":\"Whether it's a tie or not.\"}},\"draw(uint256,address)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_juror\":\"The address of the juror to draw.\"}},\"enableDisputeKits(uint96,uint256[],bool)\":{\"params\":{\"_courtID\":\"The ID of the court.\",\"_disputeKitIDs\":\"The IDs of dispute kits which support should be added/removed.\",\"_enable\":\"Whether add or remove the dispute kits from the court.\"}},\"execute(uint256,uint256,uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\",\"_round\":\"The appeal round.\"}},\"executeOwnerProposal(address,uint256,bytes)\":{\"params\":{\"_amount\":\"The value sent with the call.\",\"_data\":\"The data sent with the call.\",\"_destination\":\"The destination of the call.\"}},\"executeRuling(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getNumberOfRounds(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"The number of rounds.\"}},\"getNumberOfVotes(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"getPnkAtStakePerJuror(uint256,uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"pnkAtStakePerJuror The PNK at stake per juror.\"}},\"getRoundInfo(uint256,uint256)\":{\"details\":\"This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_round\":\"The round to get the info for.\"},\"returns\":{\"_0\":\"round The round info.\"}},\"getTimesPerPeriod(uint96)\":{\"params\":{\"_courtID\":\"The ID of the court to get the times from.\"},\"returns\":{\"timesPerPeriod\":\"The timesPerPeriod array for the given court.\"}},\"initialize(address,address,address,address,address,bool,uint256[4],uint256[4],address)\":{\"params\":{\"_courtParameters\":\"Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\",\"_disputeKit\":\"The address of the default dispute kit.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_instructor\":\"The address of the instructor.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_owner\":\"The owner's address.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionModuleAddress\":\"The sortition module responsible for sortition of the jurors.\",\"_timesPerPeriod\":\"The `timesPerPeriod` property value of the general court.\"}},\"isDisputeKitJumping(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"},\"returns\":{\"_0\":\"Whether DK will be switched or not.\"}},\"isSupported(uint96,uint256)\":{\"params\":{\"_courtID\":\"The ID of the court to check the support for.\",\"_disputeKitID\":\"The ID of the dispute kit to check the support for.\"},\"returns\":{\"_0\":\"Whether the dispute kit is supported or not.\"}},\"passPeriod(uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\"}},\"proxiableUUID()\":{\"details\":\"IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(uint96,uint256)\":{\"params\":{\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake. Note that the existing delayed stake will be nullified as non-relevant.\"}},\"setStakeBySortitionModule(address,uint96,uint256)\":{\"params\":{\"_account\":\"The account whose stake is being set.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"}},\"transferBySortitionModule(address,uint256)\":{\"params\":{\"_account\":\"The account of the juror whose PNK to transfer.\",\"_amount\":\"The amount to transfer.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"stateVariables\":{\"version\":{\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"KlerosCoreUniversity\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}],\"UUPSUnauthorizedCallContext()\":[{\"notice\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"notice\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"AcceptedFeeToken(address,bool)\":{\"notice\":\"To be emitted when an ERC20 token is added or removed as a method to pay fees.\"},\"DisputeCreation(uint256,address)\":{\"notice\":\"To be emitted when a dispute is created.\"},\"NewCurrencyRate(address,uint64,uint8)\":{\"notice\":\"To be emitted when the fee for a particular ERC20 token is updated.\"},\"Ruling(address,uint256,uint256)\":{\"notice\":\"To be raised when a ruling is given.\"},\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{\"addNewDisputeKit(address)\":{\"notice\":\"Add a new supported dispute kit module to the court.\"},\"appeal(uint256,uint256,bytes)\":{\"notice\":\"Appeals the ruling of a specified dispute.\"},\"appealCost(uint256)\":{\"notice\":\"Gets the cost of appealing a specified dispute.\"},\"appealPeriod(uint256)\":{\"notice\":\"Gets the start and the end of a specified dispute's current appeal period.\"},\"arbitrationCost(bytes)\":{\"notice\":\"Compute the cost of arbitration denominated in the native currency, typically ETH.\"},\"arbitrationCost(bytes,address)\":{\"notice\":\"Compute the cost of arbitration denominated in `_feeToken`.\"},\"changeAcceptedFeeTokens(address,bool)\":{\"notice\":\"Changes the supported fee tokens.\"},\"changeCurrencyRates(address,uint64,uint8)\":{\"notice\":\"Changes the currency rate of a fee token.\"},\"changeInstructor(address)\":{\"notice\":\"Changes the `instructor` storage variable.\"},\"changeJurorProsecutionModule(address)\":{\"notice\":\"Changes the `jurorProsecutionModule` storage variable.\"},\"changeOwner(address)\":{\"notice\":\"Changes the `owner` storage variable.\"},\"changePinakion(address)\":{\"notice\":\"Changes the `pinakion` storage variable.\"},\"changeSortitionModule(address)\":{\"notice\":\"Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.\"},\"createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])\":{\"notice\":\"Creates a court under a specified parent court.\"},\"createDispute(uint256,bytes)\":{\"notice\":\"Create a dispute and pay for the fees in the native currency, typically ETH.\"},\"createDispute(uint256,bytes,address,uint256)\":{\"notice\":\"Create a dispute and pay for the fees in a supported ERC20 token.\"},\"currentRuling(uint256)\":{\"notice\":\"Gets the current ruling of a specified dispute.\"},\"draw(uint256,address)\":{\"notice\":\"Draws one juror for the dispute until the number votes paid for is reached.\"},\"enableDisputeKits(uint96,uint256[],bool)\":{\"notice\":\"Adds/removes court's support for specified dispute kits.\"},\"execute(uint256,uint256,uint256)\":{\"notice\":\"Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\"},\"executeOwnerProposal(address,uint256,bytes)\":{\"notice\":\"Allows the owner to call anything on behalf of the contract.\"},\"executeRuling(uint256)\":{\"notice\":\"Executes a specified dispute's ruling.\"},\"getNumberOfRounds(uint256)\":{\"notice\":\"Gets the number of rounds for a specified dispute.\"},\"getNumberOfVotes(uint256)\":{\"notice\":\"Gets the number of votes permitted for the specified dispute in the latest round.\"},\"getPnkAtStakePerJuror(uint256,uint256)\":{\"notice\":\"Gets the PNK at stake per juror for a specified dispute and round.\"},\"getRoundInfo(uint256,uint256)\":{\"notice\":\"Gets the round info for a specified dispute and round.\"},\"getTimesPerPeriod(uint96)\":{\"notice\":\"Gets the timesPerPeriod array for a given court.\"},\"initialize(address,address,address,address,address,bool,uint256[4],uint256[4],address)\":{\"notice\":\"Initializer (constructor equivalent for upgradable contracts).\"},\"isDisputeKitJumping(uint256)\":{\"notice\":\"Returns true if the dispute kit will be switched to a parent DK.\"},\"isSupported(uint96,uint256)\":{\"notice\":\"Checks if a given dispute kit is supported by a given court.\"},\"passPeriod(uint256)\":{\"notice\":\"Passes the period of a specified dispute.\"},\"proxiableUUID()\":{\"notice\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade.\"},\"setStake(uint96,uint256)\":{\"notice\":\"Sets the caller's stake in a court.\"},\"setStakeBySortitionModule(address,uint96,uint256)\":{\"notice\":\"Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\"},\"transferBySortitionModule(address,uint256)\":{\"notice\":\"Transfers PNK to the juror by SortitionModule.\"},\"upgradeToAndCall(address,bytes)\":{\"notice\":\"Upgrade mechanism including access control and UUPS-compliance.\"},\"version()\":{\"notice\":\"Returns the version of the implementation.\"}},\"notice\":\"Core arbitrator contract for educational purposes.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/university/KlerosCoreUniversity.sol\":\"KlerosCoreUniversity\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation which calls `arbitrator.createDispute{value: _fee}(_choices,_extraData)`.\\ninterface IArbitrableV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created to link the correct template to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId\\n );\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Give a ruling for a dispute.\\n ///\\n /// @dev This is a callback function for the arbitrator to provide the ruling to this contract.\\n /// Only the arbitrator must be allowed to call this function.\\n /// Ruling 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n ///\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x3afa29a93847399c8705103350b69bb70706b2075ca41b39d523b007e69e23db\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// @notice Arbitrator interface for the Kleros V2 protocol.\\n/// @dev Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\ninterface IArbitratorV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @notice To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @notice To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in ETH.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @notice Create a dispute and pay for the fees in a supported ERC20 token.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in the supported ERC20 token.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @notice Compute the cost of arbitration denominated in `_feeToken`.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @notice Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x65ba87c5309cd6e6562e569f79778ca423c9be7b0a44b9407e5bd2bdf8fdc3b0\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// @notice An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// @dev It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @notice Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// @dev Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. Added for future-proofing.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @notice Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// @dev Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external returns (address drawnAddress, uint96 fromSubcourtID);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @notice Gets the degree of coherence of a particular voter.\\n /// @dev This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward.\\n /// @return feeCoherence The degree of coherence in basis points for the dispute fee reward.\\n function getDegreeOfCoherenceReward(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256 pnkCoherence, uint256 feeCoherence);\\n\\n /// @notice Gets the degree of coherence of a particular voter.\\n /// @dev This function is called by Kleros Core in order to determine the amount of the penalty.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward.\\n function getDegreeOfCoherencePenalty(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256 pnkCoherence);\\n\\n /// @notice Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @notice Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns true if all of the jurors have cast their votes for the last round.\\n /// @dev This function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @dev This function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the dispute is jumping to a parent court.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the dispute is jumping to a parent court or not.\\n function earlyCourtJump(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns the number of votes after the appeal.\\n /// @param _previousDisputeKit The previous Dispute Kit.\\n /// @param _currentNbVotes The number of votes before the appeal.\\n /// @return The number of votes after the appeal.\\n function getNbVotesAfterAppeal(\\n IDisputeKit _previousDisputeKit,\\n uint256 _currentNbVotes\\n ) external view returns (uint256);\\n\\n /// @notice Returns the dispute kit ID to be used after court jump by Kleros Core.\\n /// @return The ID of the dispute kit in Kleros Core disputeKits array.\\n function getJumpDisputeKitID() external view returns (uint256);\\n\\n /// @notice Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n /// @notice Returns the info of the specified round in the core contract.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _choice The choice to query.\\n /// @return winningChoice The winning choice of this round.\\n /// @return tied Whether it's a tie or not.\\n /// @return totalVoted Number of jurors who cast the vote already.\\n /// @return totalCommited Number of jurors who cast the commit already (only relevant for hidden votes).\\n /// @return nbVoters Total number of voters in this round.\\n /// @return choiceCount Number of votes cast for the queried choice.\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n /// @notice Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n /// @return choice The choice that got the vote.\\n /// @return voted Whether the vote was cast or not.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0x1f12d2574dffd9bf83cf33a54aa4abbbfa4203251a0f962edd8e5c3b370408bc\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title ISortitionModule\\n/// @notice Interface for the SortitionModule contract.\\ninterface ISortitionModule {\\n // ************************************* //\\n // * Enums * //\\n // ************************************* //\\n\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when the phase is changed.\\n /// @param _phase The new phase.\\n event NewPhase(Phase _phase);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Passes the phase.\\n function passPhase() external;\\n\\n /// @notice Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external;\\n\\n /// @notice Create a sortition sum tree at the specified key.\\n /// @param _courtID The ID of the court.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(uint96 _courtID, bytes memory _extraData) external;\\n\\n /// @notice Validate the specified juror's new stake for a court.\\n /// @dev No state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _noDelay True if the stake change should not be delayed.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _noDelay\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n /// @notice Update the state of the stakes, called by KC at the end of setStake flow.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _pnkDeposit The amount of PNK to be deposited.\\n /// @param _pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @param _newStake The new stake.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n /// @notice Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _penalty The amount of PNK to be deducted.\\n /// @return pnkBalance The updated total PNK balance of the juror, including the penalty.\\n /// @return newCourtStake The updated stake of the juror in the court.\\n /// @return availablePenalty The amount of PNK that was actually deducted.\\n function setStakePenalty(\\n address _account,\\n uint96 _courtID,\\n uint256 _penalty\\n ) external returns (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty);\\n\\n /// @notice Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _reward The amount of PNK to be deposited as a reward.\\n /// @return success True if the reward was added successfully.\\n function setStakeReward(address _account, uint96 _courtID, uint256 _reward) external returns (bool success);\\n\\n /// @notice Unstakes the inactive juror from all courts.\\n ///\\n /// @dev `O(n * (p * log_k(j)) )` where\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The juror to unstake.\\n function forcedUnstakeAllCourts(address _account) external;\\n\\n /// @notice Unstakes the inactive juror from a specific court.\\n ///\\n /// @dev `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The juror to unstake.\\n /// @param _courtID The ID of the court.\\n function forcedUnstake(address _account, uint96 _courtID) external;\\n\\n /// @notice Locks the tokens of the drawn juror.\\n /// @param _account The address of the juror.\\n /// @param _relativeAmount The amount to lock.\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n /// @notice Unlocks the tokens of the drawn juror.\\n /// @param _account The address of the juror.\\n /// @param _relativeAmount The amount to unlock.\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n /// @notice Triggers the state changes after dispute creation.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _roundID The ID of the round.\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n /// @notice Triggers the state changes after drawing.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _roundID The ID of the round.\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n /// @notice Gives back the locked PNKs in case the juror fully unstaked earlier.\\n ///\\n /// @dev that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance\\n /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked).\\n /// In this case the juror can use this function to withdraw the leftover tokens.\\n /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\\n ///\\n /// @param _account The juror whose PNK to withdraw.\\n function withdrawLeftoverPNK(address _account) external;\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Draw an ID from a tree using a number.\\n ///\\n /// @dev that this function reverts if the sum of all values in the tree is 0.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n ///\\n /// @param _courtID The ID of the court.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _nonce Nonce to hash with random number.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint96 _courtID,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external view returns (address drawnAddress, uint96 fromSubcourtID);\\n\\n /// @notice Gets the balance of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return totalStakedPnk The total amount of tokens staked including locked tokens and penalty deductions. Equivalent to the effective stake in the General court.\\n /// @return totalLocked The total amount of tokens locked in disputes.\\n /// @return stakedInCourt The amount of tokens staked in the specified court including locked tokens and penalty deductions.\\n /// @return nbCourts The number of courts the juror has directly staked in.\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStakedPnk, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n /// @notice Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n /// @notice Checks if the juror is staked in any court.\\n /// @param _juror The address of the juror.\\n /// @return Whether the juror is staked or not.\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n /// @notice Checks if the juror has any leftover PNK in the contract.\\n /// @param _juror The address of the juror.\\n /// @return Whether the juror has leftover PNK.\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3eeff4281ddf3c731c6503094bbbcc80d8015e3a60a27c8cadadfffdf1bf5437\",\"license\":\"MIT\"},\"src/arbitration/university/ISortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface ISortitionModuleUniversity is ISortitionModule {\\n function setTransientJuror(address _juror) external;\\n}\\n\",\"keccak256\":\"0x57478726f4dd824eca06d8b5349395b5b37756f7988d3fffb6fdae4d0f4164ee\",\"license\":\"MIT\"},\"src/arbitration/university/KlerosCoreUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"../interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModuleUniversity} from \\\"./ISortitionModuleUniversity.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreUniversity\\n/// @notice Core arbitrator contract for educational purposes.\\ncontract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n string public constant override version = \\\"2.0.0\\\";\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint96[] drawnJurorFromCourtIDs; // The courtIDs where the juror was drawn from, possibly their stake in a subcourt.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public owner; // The owner of the contract.\\n address public instructor; // The instructor who is allowed to choose the jurors.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModuleUniversity public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event JurorRewardPenalty(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherencyPnk,\\n uint256 _degreeOfCoherencyFee,\\n int256 _amountPnk,\\n int256 _amountFee,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _amountPnk,\\n uint256 _amountFee,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByOwner() {\\n if (owner != msg.sender) revert OwnerOnly();\\n _;\\n }\\n\\n modifier onlyByInstructor() {\\n if (instructor != msg.sender) revert InstructorOnly();\\n _;\\n }\\n\\n modifier onlyByOwnerOrInstructor() {\\n if (msg.sender != owner && msg.sender != instructor) revert OwnerOrInstructorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializer (constructor equivalent for upgradable contracts).\\n /// @param _owner The owner's address.\\n /// @param _instructor The address of the instructor.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _owner,\\n address _instructor,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n ISortitionModuleUniversity _sortitionModuleAddress\\n ) external initializer {\\n owner = _owner;\\n instructor = _instructor;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the owner can perform upgrades (`onlyByOwner`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByOwner {\\n // NOP\\n }\\n\\n /// @notice Allows the owner to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @notice Changes the `owner` storage variable.\\n /// @param _owner The new value for the `owner` storage variable.\\n function changeOwner(address payable _owner) external onlyByOwner {\\n owner = _owner;\\n }\\n\\n /// @notice Changes the `instructor` storage variable.\\n /// @param _instructor The new value for the `instructor` storage variable.\\n function changeInstructor(address _instructor) external onlyByOwnerOrInstructor {\\n instructor = _instructor;\\n }\\n\\n /// @notice Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByOwner {\\n pinakion = _pinakion;\\n }\\n\\n /// @notice Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByOwner {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @notice Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModuleUniversity _sortitionModule) external onlyByOwner {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @notice Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByOwner {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @notice Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByOwner {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByOwner {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @notice Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByOwner {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @notice Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByOwner {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @notice Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByOwner {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @notice Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, true, OnError.Return);\\n }\\n\\n /// @notice Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ONE_BASIS_POINT;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @notice Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @notice Draws one juror for the dispute until the number votes paid for is reached.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _juror The address of the juror to draw.\\n function draw(uint256 _disputeID, address _juror) external onlyByOwnerOrInstructor {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n if (round.drawnJurors.length >= round.nbVotes) revert AllJurorsDrawn();\\n\\n sortitionModule.setTransientJuror(_juror);\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n uint256 iteration = round.drawIterations + 1;\\n (address drawnAddress, uint96 fromSubcourtID) = disputeKit.draw(_disputeID, iteration);\\n if (drawnAddress == address(0)) {\\n revert NoJurorDrawn();\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n round.drawnJurorFromCourtIDs.push(fromSubcourtID != 0 ? fromSubcourtID : dispute.courtID);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n round.drawIterations = iteration;\\n }\\n sortitionModule.setTransientJuror(address(0));\\n }\\n\\n /// @notice Appeals the ruling of a specified dispute.\\n /// @dev Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ONE_BASIS_POINT;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 coherence = disputeKit.getDegreeOfCoherencePenalty(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Guard against degree exceeding 1, though it should be ensured by the dispute kit.\\n if (coherence > ONE_BASIS_POINT) {\\n coherence = ONE_BASIS_POINT;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ONE_BASIS_POINT - coherence)) / ONE_BASIS_POINT;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n uint96 penalizedInCourtID = round.drawnJurorFromCourtIDs[_params.repartition];\\n (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) = sortitionModule.setStakePenalty(\\n account,\\n penalizedInCourtID,\\n penalty\\n );\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit JurorRewardPenalty(\\n account,\\n _params.disputeID,\\n _params.round,\\n coherence,\\n coherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive or their balance is can't cover penalties anymore, unstake them from all courts.\\n sortitionModule.forcedUnstakeAllCourts(account);\\n } else if (newCourtStake < courts[penalizedInCourtID].minStake) {\\n // The juror's balance fell below the court minStake, unstake them from the court.\\n sortitionModule.forcedUnstake(account, penalizedInCourtID);\\n }\\n\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the owner.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(owner).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(owner, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(owner, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n (uint256 pnkCoherence, uint256 feeCoherence) = disputeKit.getDegreeOfCoherenceReward(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Guard against degree exceeding 1, though it should be ensured by the dispute kit.\\n if (pnkCoherence > ONE_BASIS_POINT) {\\n pnkCoherence = ONE_BASIS_POINT;\\n }\\n if (feeCoherence > ONE_BASIS_POINT) {\\n feeCoherence = ONE_BASIS_POINT;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * pnkCoherence) / ONE_BASIS_POINT;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Compute the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * pnkCoherence) / ONE_BASIS_POINT; /// forge-lint: disable-line(divide-before-multiply)\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * feeCoherence) / ONE_BASIS_POINT; /// forge-lint: disable-line(divide-before-multiply)\\n round.sumFeeRewardPaid += feeReward;\\n\\n // Transfer the fee reward\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n\\n // Stake the PNK reward if possible, by-passes delayed stakes and other checks usually done by validateStake()\\n if (!sortitionModule.setStakeReward(account, dispute.courtID, pnkReward)) {\\n pinakion.safeTransfer(account, pnkReward);\\n }\\n\\n emit JurorRewardPenalty(\\n account,\\n _params.disputeID,\\n _params.round,\\n pnkCoherence,\\n feeCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the owner. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(owner, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(owner).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(owner, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @notice Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @notice Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @notice Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @notice Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @notice Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @notice Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @notice Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @notice Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @notice Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @notice Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @notice Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @notice If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _noDelay True if the stake change should not be delayed.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _noDelay,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake,\\n _noDelay\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @notice It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @notice Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// @dev If `_extraData` contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error OwnerOnly();\\n error InstructorOnly();\\n error OwnerOrInstructorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error AllJurorsDrawn();\\n error NoJurorDrawn();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x6a0daf9a8720b0618dc69c8b29794fad12f5477d4ec96c778c7c140150b8214d\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\n// Units\\nuint256 constant ONE_BASIS_POINT = 10000;\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0xb8c96c842259ca1384e8450dfb214f0fcd604829c84293dd3f8981f3421b66c9\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n///\\n/// @notice Wrappers around ERC20 operations\\n///\\n/// @dev Throws on failure (when the token contract returns false).\\n/// Tokens that return no value (and instead revert or throw on failure) are also supported.\\n/// Non-reverting calls are assumed to be successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @notice Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @notice Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @notice Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x36b92f984484f9dfd63a40ccb1c1e23cde0085db36ec8adb7afe7e98ef667bd7\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `initializer()`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0xdad09e5f773fa6940dbd8c28480f602a7eaa3c70d3da9d06df140187cbf5dad4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @notice This contract implements an upgradeability mechanism designed for UUPS proxies.\\n///\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @notice Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @notice The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @notice The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @notice The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// @dev IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @notice Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\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\",\"keccak256\":\"0xa369061748e8a7b02873d597d4c78a2a09328111f04a97428b1c209e82cf5414\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a080604052346100c157306080525f5160206156465f395f51905f525460ff8160401c166100b3576002600160401b03196001600160401b03821601610060575b60405161558090816100c682396080518181816112b001526114de0152f35b6001600160401b0319166001600160401b039081175f5160206156465f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80610041565b62dc149f60e41b5f5260045ffd5b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c8062f5822c146103235780630219da791461031e5780630761c14d1461031957806309cfdc9c146103145780630b7414bc1461030f578063115d53761461030a5780631860592b1461030557806319b81529146103005780631c3db16d146102fb5780631f5a0dd2146102f65780632d29a47b146102f15780632e1daf2f146102ec5780633cfd1184146102e757806342c37fa3146102e25780634f1ef286146102dd57806352d1902d146102d857806354fd4d50146102d3578063564a565d146102ce57806359ec827e146102c95780636a8c9194146102c457806371ae413d146102bf5780637717a6e8146102ba5780637934c0be146102b557806382d02237146102b057806386541b24146102ab57806386cdecef146102a65780638a9bb02a146102a15780638bb048751461029c5780638da5cb5b14610297578063a6f9dae114610292578063acdbf51d1461028d578063afe15cfb14610288578063b004963714610283578063b702a8791461027e578063c13517e114610279578063c258bb1914610274578063c35699021461026f578063c71f42531461026a578063cf0c38f814610265578063d07368bd14610260578063d4d1d76a1461025b578063d874514b14610256578063d98493f614610251578063e399d29b1461024c578063f6506db414610247578063f7434ea914610242578063fbf405b01461023d578063fc6f8f16146102385763fe524c3914610233575f80fd5b6131a5565b613185565b61315f565b613129565b613016565b612f55565b612ef8565b612c27565b612c0a565b612b9f565b612b79565b612b39565b6126f9565b6126ad565b61242e565b612017565b611fcb565b611f48565b611eef565b611e76565b611e51565b611d02565b611c54565b611ab6565b61193d565b61180d565b611784565b61175a565b611734565b61169e565b611680565b6115fd565b611552565b6114c4565b611266565b6111af565b611134565b6110d7565b610e80565b610e00565b610d96565b610d6e565b610d3b565b610750565b61061c565b610493565b610421565b6103b1565b61033d565b6001600160a01b0381160361033957565b5f80fd5b346103395760203660031901126103395760043561035a81610328565b6001600160a01b035f54163303610389576001600160a01b03166001600160a01b031960025416176002555f80f35b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576001600160a01b036004356103d681610328565b165f526008602052606060405f205460ff604051918181161515835267ffffffffffffffff8160081c16602084015260481c166040820152f35b6001600160601b0381160361033957565b346103395760603660031901126103395760043561043e81610328565b60243561044a81610410565b604435906001600160a01b0360045416330361046b5761046992613fb0565b005b7f9d6cab99000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576004356104b081610328565b6001600160a01b035f54163314158061050e575b6104e6576001600160a01b03166001600160a01b031960015416176001555f80f35b7ff10d23b5000000000000000000000000000000000000000000000000000000005f5260045ffd5b506001600160a01b03600154163314156104c4565b634e487b7160e01b5f52604160045260245ffd5b6101a0810190811067ffffffffffffffff82111761055457604052565b610523565b90601f8019910116810190811067ffffffffffffffff82111761055457604052565b6040519061058b61010083610559565b565b6040519061058b6101a083610559565b67ffffffffffffffff81116105545760051b60200190565b9080601f830112156103395781356105cc8161059d565b926105da6040519485610559565b81845260208085019260051b82010192831161033957602001905b8282106106025750505090565b81358152602091820191016105f5565b8015150361033957565b346103395760603660031901126103395760043561063981610410565b60243567ffffffffffffffff8111610339576106599036906004016105b5565b6044359061066682610612565b6001600160a01b035f54163303610389575f5b81518110156104695782156106fa5761069281836131ec565b511580156106e4575b6106bc57806106b66106af600193856131ec565b51866143e8565b01610679565b7f7ab15312000000000000000000000000000000000000000000000000000000005f5260045ffd5b506106ef81836131ec565b51600654111561069b565b600161070682846131ec565b5114610728578061072361071c600193856131ec565b5186614397565b6106b6565b7fada223fa000000000000000000000000000000000000000000000000000000005f5260045ffd5b346103395760203660031901126103395760043561076d816115b1565b5061078761078282546001600160601b031690565b610ddf565b509060038101916107a261079b8454613214565b809461323f565b5060018301936107b3855460ff1690565b6107bc816115e1565b806108d857501580610896575b61086e57600360068201549101540361084657547f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91926108379261082b9260601c60ff161561083c5761081e60015b83613287565b6002429101555460ff1690565b6040519182918261329f565b0390a2005b61081e6002610818565b7f9e4486b0000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3e9727df000000000000000000000000000000000000000000000000000000005f5260045ffd5b506108a5600284015442613232565b6108d26108c86108b6875460ff1690565b6108bf816115e1565b60068601613258565b90549060031b1c90565b116107c9565b90506108e9819594959392936115e1565b60018103610a5057506109246108c8610906600287015442613232565b926006610914875460ff1690565b9161091e836115e1565b01613258565b119081610993575b5061096b57805460ff191660021781557f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916108379161082b9161081e565b7f9bf4af0a000000000000000000000000000000000000000000000000000000005f5260045ffd5b6109c491506109a56109b89154611ec2565b90546001600160a01b039160031b1c1690565b6001600160a01b031690565b602060405180927f0baa64d10000000000000000000000000000000000000000000000000000000082528180610a0289600483019190602083019252565b03915afa908115610a4b575f91610a1c575b50155f61092c565b610a3e915060203d602011610a44575b610a368183610559565b810190613267565b5f610a14565b503d610a2c565b61327c565b610a59816115e1565b60028103610ba75750610a766108c8610906600287015442613232565b119081610b1e575b50610af657805460ff191660031781557f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916108379161082b916001600160a01b03610acb825460601c90565b16867fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f5f80a361081e565b7fcc46f568000000000000000000000000000000000000000000000000000000005f5260045ffd5b610b3091506109a56109b89154611ec2565b602060405180927f6d4cd8ea0000000000000000000000000000000000000000000000000000000082528180610b6e89600483019190602083019252565b03915afa908115610a4b575f91610b88575b50155f610a7e565b610ba1915060203d602011610a4457610a368183610559565b5f610b80565b610bb0816115e1565b60038103610cd1576108c8610bd9916006610bcf600289015442613232565b9461091e836115e1565b119081610c48575b50610c2057805460ff191660041781557f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916108379161082b9161081e565b7f2f4dfd87000000000000000000000000000000000000000000000000000000005f5260045ffd5b610c5a91506109a56109b89154611ec2565b602060405180927f0855bbe90000000000000000000000000000000000000000000000000000000082528180610c9889600483019190602083019252565b03915afa908115610a4b575f91610cb2575b50155f610be1565b610ccb915060203d602011610a4457610a368183610559565b5f610caa565b905060049150610ce0816115e1565b14610d135761082b610837917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b919361081e565b7f0fe7191e000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576040366003190112610339576020610d66600435610d5d81610328565b602435906132fb565b604051908152f35b34610339576020366003190112610339576020610d8c600435613353565b6040519015158152f35b34610339576020366003190112610339576060610db46004356133f9565b906040519283521515602083015215156040820152f35b634e487b7160e01b5f52603260045260245ffd5b600554811015610dfb5760055f52601560205f20910201905f90565b610dcb565b346103395760203660031901126103395760043560055481101561033957610e2790610ddf565b508054600282015460038301546004840154600590940154604080516001600160601b0386168152606095861c60ff16151560208201529081019390935292820152608081019290925260a08201528060c081015b0390f35b3461033957606036600319011261033957600435604435602435610ea3836115b1565b506004610eb4600183015460ff1690565b610ebd816115e1565b036110a557816003610ecf920161323f565b50906004820193610ee2855494856134e1565b926005810194855496600683015490610eff8260028601546132ec565b92610f156109b86109a560018801549754611ec2565b6040517fda3beb8c00000000000000000000000000000000000000000000000000000000815260048101889052602481018990529290602090849060449082905afa928315610a4b575f93611074575b50826110455783891161103c575b9780979695949392985b55965b868810610f9657898981815403610f9357005b55005b9091929394959698828a105f14610ff657610fe7600191610fb561057b565b908882528960208301528460408301528560608301528660808301528760a083015260c08201528b60e0820152614a40565b995b0196959493929190610f80565b9860019061103761100561057b565b8881528960208201528460408201528560608201528660808201528760a08201528c60c08201528260e08201526144aa565b610fe9565b97508297610f73565b61104e846132af565b8911611063575b978097969594939298610f7d565b975061106e836132af565b97611055565b61109791935060203d60201161109e575b61108f8183610559565b8101906134ee565b915f610f65565b503d611085565b7f8794ce4b000000000000000000000000000000000000000000000000000000005f5260045ffd5b5f91031261033957565b34610339575f3660031901126103395760206001600160a01b0360045416604051908152f35b905f905b6004821061110e57505050565b6020806001928551815201930191019091611101565b60808101929161058b91906110fd565b346103395760203660031901126103395761116b60043561115481610410565b60806040516111638282610559565b369037610ddf565b50604051906006015f825b6004821061119957610e7c8461118d608082610559565b60405191829182611124565b6001602081928554815201930191019091611176565b34610339576040366003190112610339576004356111cc81610328565b6024356001600160a01b0360045416330361046b57610469916001600160a01b036002541661500d565b67ffffffffffffffff811161055457601f01601f191660200190565b92919261121e826111f6565b9161122c6040519384610559565b829481845281830111610339578281602093845f960137010152565b9080601f830112156103395781602061126393359101611212565b90565b60403660031901126103395760043561127e81610328565b60243567ffffffffffffffff81116103395761129e903690600401611248565b6112a66150a2565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115611489575b50611461576001600160a01b0382166040517f52d1902d000000000000000000000000000000000000000000000000000000008152602081600481855afa5f9181611440575b5061135b577f0c760937000000000000000000000000000000000000000000000000000000005f526001600160a01b03841660045260245ffd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81036114155750827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a28051806113d357005b5f926020849301905af46113e56134fd565b50156113ed57005b7f736436ba000000000000000000000000000000000000000000000000000000005f5260045ffd5b7faa1d49a4000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b61145a91925060203d60201161109e5761108f8183610559565b905f611321565b7fe07c8dba000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506114bc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b14155f6112db565b34610339575f366003190112610339576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036114615760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b34610339575f36600319011261033957610e7c604051611573604082610559565b600581527f322e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061152e565b600754811015610dfb5760075f52600e60205f20910201905f90565b634e487b7160e01b5f52602160045260245ffd5b600511156115eb57565b6115cd565b9060058210156115eb5752565b34610339576020366003190112610339576004356007548110156103395761162660ff916115b1565b508054600260018301549201546040519384936001600160a01b0360a08601946001600160601b0380821616875260601c16602086015261166c604086018383166115f0565b60081c161515606084015260808301520390f35b34610339576020366003190112610339576020610d6660043561352c565b34610339576060366003190112610339576004356116bb81610328565b60243560443567ffffffffffffffff8111610339576116de903690600401611248565b6001600160a01b035f54163303610389575f928392602083519301915af16117046134fd565b501561170c57005b7f44125e5e000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339575f3660031901126103395760206001600160a01b0360015416604051908152f35b346103395760403660031901126103395761046960043561177a81610410565b6024359033614203565b34610339576040366003190112610339576004356117a181610328565b602435906117ae82610612565b6001600160a01b035f54163303610389576001600160a01b031690815f52600860205260405f2060ff1981541660ff831515161790551515907f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd445f80a3005b346103395760603660031901126103395760043561182a81610328565b6024359067ffffffffffffffff821682036103395760443560ff81168103610339576001600160a01b035f54163303610389576001600160a01b03919091165f81815260086020818152604092839020805469ffffffffffffffffff0019169287901b68ffffffffffffffff001692909217604886901b69ff0000000000000000001617909155815167ffffffffffffffff909516855260ff90931692840192909252917fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e69181908101610837565b8060e312156103395760405190611911608083610559565b8190610144116103395760c4905b610144821061192d57505090565b813581526020918201910161191f565b34610339576101403660031901126103395760043561195b81610410565b60243561196781610612565b6044359060643560a43560843561197d366118f9565b926001600160a01b035f54163303610389576001600160601b036119a088610ddf565b50971696600188141580611a95575b611a6d575f600182018054915b828110611a4a57600284018a905583546cff000000000000000000000000191689151560601b6cff000000000000000000000000161784558a7f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8b8b6108378c8c8c8c611a3e8460068f846003820155856004820155866005820155016135fa565b6040519687968761361e565b896002611a5d6107826108c88587611eda565b50015410611a6d576001016119bc565b7f97170789000000000000000000000000000000000000000000000000000000005f5260045ffd5b50866002611aad61078284546001600160601b031690565b500154116119af565b346103395760403660031901126103395760206001611ae56024356003611ade6004356115b1565b500161323f565b500154604051908152f35b90602080835192838152019201905f5b818110611b0d5750505090565b82516001600160a01b0316845260209384019390920191600101611b00565b90602080835192838152019201905f5b818110611b495750505090565b82516001600160601b0316845260209384019390920191600101611b3c565b905f905b600a8210611b7957505050565b6020806001928551815201930191019091611b6c565b611263906020815282516020820152602083015160408201526040830151606082015260608301516080820152608083015160a082015260a083015160c08201526101a0610180611c0b611bf460c08701516102c060e08701526102e0860190611af0565b60e0870151858203601f1901610100870152611b2c565b94610100810151610120850152610120810151610140850152611c406101408201516101608601906001600160a01b03169052565b610160810151828501520151910190611b68565b3461033957604036600319011261033957610e7c611cf6611cf06004356003611ade60243592604051611c8681610537565b5f81525f60208201525f60408201525f60608201525f60808201525f60a0820152606060c0820152606060e08201525f6101008201525f6101208201525f6101408201525f6101608201526101806101409160405192611ce68185610559565b36843701526115b1565b5061379b565b60405191829182611b8f565b3461033957602036600319011261033957600435611d1f816115b1565b5090600182019182546004611d348260ff1690565b611d3d816115e1565b036110a55760081c60ff16611e2957611d78611dbd91611d71611d5f856133f9565b5050865461ff00191661010017909655565b5460601c90565b60405184815283906001600160a01b038316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e7562227690602090a36001600160a01b031690565b91823b15610339576040517f311a6c5600000000000000000000000000000000000000000000000000000000815260048101929092526024820152905f908290818381604481015b03925af18015610a4b57611e1557005b80611e235f61046993610559565b806110cd565b7fc977f8d3000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339575f3660031901126103395760206001600160a01b035f5416604051908152f35b3461033957602036600319011261033957600435611e9381610328565b5f5490336001600160a01b03831603610389576001600160a01b036001600160a01b031991169116175f555f80f35b600654811015610dfb5760065f5260205f2001905f90565b8054821015610dfb575f5260205f2001905f90565b3461033957602036600319011261033957600435600654811015610339576001600160a01b0360209160065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f015416604051908152f35b3461033957602036600319011261033957611f646004356115b1565b5060ff60018201541660058110156115eb57600303611fc357611fb0611faa6108c86006611fa06001600160601b036002870154965416610ddf565b5001600301905f90565b826134e1565b905b604080519182526020820192909252f35b505f80611fb2565b3461033957602036600319011261033957600435611fe881610328565b6001600160a01b035f54163303610389576001600160a01b03166001600160a01b031960045416176004555f80f35b346103395760403660031901126103395760243560043561203782610328565b6001600160a01b035f541633141580612419575b6104e657612058816115b1565b5090600382019061207361206c8354613214565b809361323f565b5093612083600185015460ff1690565b61208c816115e1565b6123f157600685018054916003870192835411156123c9576120b96109b86004546001600160a01b031690565b803b1561033957604051633c694c4160e21b81526001600160a01b039290921660048301525f908290602490829084905af18015610a4b576123b5575b506121666121076109a58854611ec2565b96600b810196604061211989546134d3565b809a885f6001600160a01b0385518099819682957fd2b8035a0000000000000000000000000000000000000000000000000000000084526004840160209093929193604081019481520152565b0393165af18015610a4b575f935f91612380575b506001600160a01b038416918215612358576121a16109b86004546001600160a01b031690565b600185015490803b15610339576040517f21e1625e0000000000000000000000000000000000000000000000000000000081526001600160a01b038816600482015260248101929092525f908290604490829084905af1958615610a4b578960079561224b9361226399612344575b508954604080518f815260208101929092527f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91a38761387e565b6001600160601b038216156123325750915b016138e0565b549054146122af575b5050556122846109b86004546001600160a01b031690565b803b15610339575f6040518092633c694c4160e21b8252818381611e0560048201905f602083019252565b6122c46109b86004546001600160a01b031690565b91823b15610339576040517f5d2d784600000000000000000000000000000000000000000000000000000000815260048101929092526024820152905f908290604490829084905af18015610a4b5761231e575b8061226c565b80611e235f61232c93610559565b5f612318565b546001600160601b031690509161225d565b80611e235f61235293610559565b5f612210565b7f5c7171ee000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506123a591935060403d6040116123ae575b61239d8183610559565b810190613859565b9290925f61217a565b503d612393565b80611e235f6123c393610559565b5f6120f6565b7f4df06de3000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f8285c4ef000000000000000000000000000000000000000000000000000000005f5260045ffd5b506001600160a01b036001541633141561204b565b60403660031901126103395760043560243567ffffffffffffffff81116103395761245d903690600401611248565b9061246782613f61565b34106126855761247682615331565b90506124a96124a561249e83600a61248f879897610ddf565b5001905f5260205260405f2090565b5460ff1690565b1590565b61265d57600754926125675f600a6124bf6150b5565b503360601b6bffffffffffffffffffffffff19166001600160601b03861617815542600282015561254061253861250e60036125066125006109a58c611ec2565b99610ddf565b50940161391b565b509261251e6004820154346132ec565b9860038501998a55845560036002820154910154906132c5565b612710900490565b600182015534600282015501906001600160a01b03166001600160a01b0319825416179055565b61257c6109b86004546001600160a01b031690565b90813b156103395760405163d09f392d60e01b8152600481018690525f6024820181905290928390604490829084905af1918215610a4b576001600160a01b0392612649575b5016905490803b15610339576125f3945f8094604051978895869485936302dbb79560e61b85528a6004860161393c565b03925af1918215610a4b57602092612635575b5033817f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed9955f80a3604051908152f35b80611e235f61264393610559565b5f612606565b80611e235f61265793610559565b5f6125c2565b7fb34eb75d000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f38cd83c4000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576004356126ca81610328565b6001600160a01b035f54163303610389576001600160a01b03166001600160a01b031960035416176003555f80f35b60603660031901126103395760043560243560443567ffffffffffffffff81116103395761272b903690600401611248565b6127348361352c565b3410612b1157612743836115b1565b5091600183016003612756825460ff1690565b61275f816115e1565b03612ae9576003840161277b6127758254613214565b8261323f565b509081546127916109b86109b86109a584611ec2565b3303612ac15786546001600160601b031681946127ad8461391b565b5092600386015460056127bf85610ddf565b50015411156129fa575b5088546bffffffffffffffffffffffff19166001600160601b03831617895561280691906127fb90805460ff19169055565b4260028a0155610ddf565b509361283461253861281c6004880154346132ec565b966003850197885560036002820154910154906132c5565b600183015534600283015581556128566109b86004546001600160a01b031690565b6128608354613214565b90803b156103395760405163d09f392d60e01b8152600481018b905260248101929092525f908290604490829084905af18015610a4b576129e6575b5054915490818303612915575b877f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916001600160a01b036128de8a5460601c90565b1660405190837f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d5f80a35f81528060208101610837565b61295d926109b89261292a6109a59354613214565b6040518381528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea775690602090a4611ec2565b905490803b156103395761298c935f8094604051968795869485936302dbb79560e61b85528c6004860161393c565b03925af18015610a4b577f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91926001600160a01b03926128de926129d2575b8194816128a9565b80611e235f6129e093610559565b5f6129ca565b80611e235f6129f493610559565b5f61289c565b916124a561249e612a1e612a10612a2a94610ddf565b50546001600160601b031690565b94600a61248f87610ddf565b612ab8575b906127fb61280692612a488b546001600160601b031690565b6001600160601b0381166001600160601b03851603612a6b575b509192506127c9565b612a758754613214565b6040516001600160601b03868116825292909216918e907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f90602090a45f612a62565b60019550612a2f565b7f065f245f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fdf37bf2c000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3191f8f1000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576003612b576004356115b1565b500180545f198101908111612b7457611ae560039160209361323f565b613200565b34610339575f3660031901126103395760206001600160a01b0360035416604051908152f35b3461033957602036600319011261033957600435612bbc81610328565b6001600160a01b035f54163303610389576001600160a01b0360065491612be281613963565b16907f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb25f80a3005b34610339575f366003190112610339576020600654604051908152f35b346103395761016036600319011261033957600435612c4581610410565b602435612c5181610612565b604435606435906084359260a43591612c69366118f9565b956101443567ffffffffffffffff811161033957612c8b9036906004016105b5565b966001600160a01b035f5416330361038957826002612ca984610ddf565b50015411611a6d57875115612ea2576001600160601b038216948515612e7a5760059796975491612cd86139cb565b50915f98600a8401995b8c51811015612d54578c81612cf781836131ec565b5115918215612d3d575b50506106bc5780612d37612d2a8f612d1d8f91956001966131ec565b515f5260205260405f2090565b805460ff19166001179055565b01612ce2565b612d4792506131ec565b516006541115818e612d01565b50908b92918b612d726124a561249e8e60015f5260205260405f2090565b612e52577f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee698612e3f886001612e388c8f8a6001600160601b039f8e612e4d9f61078294612ddb600694612e1a93906001600160601b03166001600160601b0319825416179055565b612dee612de66139fd565b8a8501613a18565b82546cff000000000000000000000000191690151560601b6cff00000000000000000000000016178255565b8960028201558a60038201558b60048201558c6005820155016135fa565b5001613a96565b604051988998169a88613aca565b0390a3005b7f31a8d9e8000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f1ef4f649000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f402585f5000000000000000000000000000000000000000000000000000000005f5260045ffd5b9181601f840112156103395782359167ffffffffffffffff8311610339576020838186019501011161033957565b346103395760403660031901126103395760043567ffffffffffffffff811161033957610d66612f4a612f4f612f346020943690600401612eca565b929060243593612f4385610328565b3691611212565b613f61565b906132fb565b34610339576101e036600319011261033957600435612f7381610328565b60243590612f8082610328565b604435612f8c81610328565b606435612f9881610328565b608435612fa481610328565b60a43590612fb182610612565b612fba366118f9565b923661016312156103395760405194612fd4608087610559565b8597366101c41161033957610144985b6101c48a10613006575061046998506101c4359761300189610328565b613b38565b893581526020998a019901612fe4565b346103395760803660031901126103395760043560243567ffffffffffffffff81116103395761304a903690600401612eca565b9160443561305781610328565b606435916001600160a01b0382165f52600860205261307d6124a560405f205460ff1690565b61310157613098613092612f4a368888611212565b836132fb565b8310612685576130ad6124a5843033866152d4565b6130d9576130c36130c994610e7c963691611212565b906150e7565b6040519081529081906020820190565b7f90b8ec18000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fe51cf7bf000000000000000000000000000000000000000000000000000000005f5260045ffd5b346103395760203660031901126103395760043567ffffffffffffffff811161033957610d66612f4a6020923690600401611248565b34610339575f3660031901126103395760206001600160a01b0360025416604051908152f35b346103395760203660031901126103395760206003611ae56004356115b1565b3461033957604036600319011261033957600a6004356131c481610410565b6131d060243591610ddf565b50905f5201602052602060ff60405f2054166040519015158152f35b8051821015610dfb5760209160051b010190565b634e487b7160e01b5f52601160045260245ffd5b5f19810191908211612b7457565b61271003906127108211612b7457565b91908203918211612b7457565b8054821015610dfb575f52601660205f20910201905f90565b6004821015610dfb5701905f90565b90816020910312610339575161126381610612565b6040513d5f823e3d90fd5b9060058110156115eb5760ff80198354169116179055565b60208101929161058b91906115f0565b908160011b9180830460021490151715612b7457565b81810292918115918404141715612b7457565b634e487b7160e01b5f52601260045260245ffd5b81156132f6570490565b6132d8565b6001600160a01b031690815f52600860205260ff60405f205460481c1690604d8211612b745761332e91600a0a906132c5565b905f52600860205267ffffffffffffffff60405f205460081c169081156132f6570490565b61335c906115b1565b506003810180545f198101908111612b74576133836001600160601b039161338c9361323f565b50925416610ddf565b509060038101546005830154116133c9576133b26001600160601b03600a935416610ddf565b5090545f520160205260ff60405f20541615151590565b50505f90565b9081606091031261033957805191604060208301516133ed81610612565b92015161126381610612565b6003613404826115b1565b500180545f19810192908311612b745761344c6001600160a01b036134386134316134859660609661323f565b5054611ec2565b90549060031b1c166001600160a01b031690565b60405180809581947f1c3db16d000000000000000000000000000000000000000000000000000000008352600483019190602083019252565b03915afa908115610a4b575f915f915f916134a1575b50909192565b9150506134c6915060603d6060116134cc575b6134be8183610559565b8101906133cf565b5f61349b565b503d6134b4565b9060018201809211612b7457565b91908201809211612b7457565b90816020910312610339575190565b3d15613527573d9061350e826111f6565b9161351c6040519384610559565b82523d5f602084013e565b606090565b613535906115b1565b5061355f6135506003830161354a8154613214565b9061323f565b5091546001600160601b031690565b600361356a82610ddf565b50920154600583015490919082106135e5576001600160601b03166001036135b25750507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b6135df6135da60046135d161078261126396546001600160601b031690565b500154926132af565b6134d3565b906132c5565b506135df6135da6004611263940154926132af565b905f5b6004811061360a57505050565b6001906020835193019281850155016135fd565b919360a09361058b969298979561012085019915158552602085015260408401526060830152608082015201906110fd565b90604051918281549182825260208201905f5260205f20925f5b81811061367f57505061058b92500383610559565b84546001600160a01b031683526001948501948794506020909301920161366a565b604051815480825290929183906136bf60208301915f5260205f2090565b925f905b80600183011061371a5761058b945491818110613700575b106136e9575b500383610559565b60601c6001600160601b031681526020015f6136e1565b6001600160601b03831684529260019060200193016136db565b91600291935060406001916137588754613745836001600160601b0383166001600160601b03169052565b60601c6001600160601b03166020830152565b0194019201859293916136c3565b60405191905f835b600a82106137855750505061058b61014083610559565b600160208192855481520193019101909161376e565b90613851600c6137a961058d565b938054855260018101546020860152600281015460408601526003810154606086015260048101546080860152600581015460a08601526137ec60068201613650565b60c08601526137fd600782016136a1565b60e08601526008810154610100860152600981015461012086015261384061382f600a8301546001600160a01b031690565b6001600160a01b0316610140870152565b600b81015461016086015201613766565b610180830152565b9190826040910312610339576020825161387281610328565b92015161126381610410565b90815491600160401b83101561055457826138a191600161058b95018155611eda565b9091906001600160a01b038084549260031b9316831b921b1916179055565b9190918054831015610dfb575f52600c600160205f2084821c0193160290565b8054600160401b811015610554576138fd916001820181556138c0565b6001600160601b0380839493549260031b9316831b921b1916179055565b8054600160401b811015610554576139389160018201815561323f565b9091565b94939260609261395e928752602087015260806040870152608086019061152e565b930152565b60065490600160401b8210156105545760018201600655600654821015610dfb5760065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b0319166001600160a01b03909216919091179055565b600554600160401b8110156105545760018101600555600554811015610dfb5760055f52601560205f20910201905f90565b60405190613a0c602083610559565b5f808352366020840137565b81519167ffffffffffffffff831161055457600160401b8311610554578154838355808410613a70575b50602001905f5260205f205f5b838110613a5c5750505050565b600190602084519401938184015501613a4f565b825f528360205f2091820191015b818110613a8b5750613a42565b5f8155600101613a7e565b8054600160401b81101561055457613ab391600182018155611eda565b819291549060031b91821b915f19901b1916179055565b929461016094602096613b0194989398610140870199151587528887015260408601526060850152608084015260a08301906110fd565b6101406101208201528451809452019201905f5b818110613b225750505090565b8251845260209384019390920191600101613b15565b96949290979593917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5498613b84613b7660ff8c60401c1615151590565b9a67ffffffffffffffff1690565b8a80613d37575b159081613d0f575b50613ce757613bfd988a613bf4600167ffffffffffffffff197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5416177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e55565b613c8757613d79565b613c0357565b613c5868ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e54167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e55565b604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1565b613ce2600160401b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5416177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e55565b613d79565b7f0dc149f0000000000000000000000000000000000000000000000000000000005f5260045ffd5b303b15915081613d22575b50155f613b93565b6001915067ffffffffffffffff16145f613d1a565b50600167ffffffffffffffff821610613b8b565b600654600160401b8110156105545760018101600655600654811015610dfb5760065f5260205f2001905f90565b93613e516001600160601b039699613e35613f5696613e1960019c97613dfd6001600160a01b0398613de17f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee69f9d6001600160a01b03166001600160a01b03195f5416175f55565b6001600160a01b03166001600160a01b03196001541617600155565b6001600160a01b03166001600160a01b03196002541617600255565b6001600160a01b03166001600160a01b03196003541617600355565b6001600160a01b03166001600160a01b03196004541617600455565b613e59613d4b565b5050613e6481613963565b16867f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb25f80a3613e926139cb565b5050613e9c6139cb565b5080546bffffffffffffffffffffffff1916815590613ec4613ebc6139fd565b888401613a18565b81546cff000000000000000000000000191688151560601b6cff0000000000000000000000001617825583516002830155602084018051600384015591604085018051600483015590613f36606087019182516005820155613f2985600683016135fa565b546001600160601b031690565b955193519151905191613f476139fd565b94604051988998169b88613aca565b0390a361058b61443c565b613f7a6004613f7261126393615331565b509290610ddf565b5001546132c5565b908160609103126103395780519160406020830151920151600a8110156103395790565b600a11156115eb57565b906001600160601b03811680159081156141f6575b506141e957821515806141d3575b6141c657613fec6109b86004546001600160a01b031690565b60405163c70ba3b960e01b81526001600160a01b03841660048201526001600160601b038316602482015260448101859052600160648201529390606090859060849082905f905af1918215610a4b575f925f955f9161418d575b5061405181613fa6565b8061417c575082614147575b84614110575b6140786109b86004546001600160a01b031690565b91823b15610339576040517faac03ad20000000000000000000000000000000000000000000000000000000081526001600160a01b0390951660048601526001600160601b039091166024850152604484019290925260648301939093526084820152905f90829081838160a4810103925af18015610a4b576140fc575b50600190565b80611e235f61410a93610559565b5f6140f6565b61412f6124a5868661412a6002546001600160a01b031690565b61500d565b156140635750505050506141436001615422565b5f90565b6141686124a5846141606002546001600160a01b031690565b8730916152d4565b1561405d5750505050506141436001615402565b935050505061414391506001615442565b919350506141b491945060603d6060116141bf575b6141ac8183610559565b810190613f82565b94919290945f614047565b503d6141a2565b50505061414360016153e2565b5060026141df82610ddf565b5001548310613fd3565b50505061414360016153c2565b905060055411155f613fc5565b906001600160601b038116801590811561438a575b5061437e5782151580614368575b61435c5761423f6109b86004546001600160a01b031690565b60405163c70ba3b960e01b81526001600160a01b03841660048201526001600160601b0383166024820152604481018590525f60648201819052909491606091869160849183915af1918215610a4b575f925f955f91614333575b506142a481613fa6565b806143235750826142f7575b846142ca576140786109b86004546001600160a01b031690565b6142e46124a5868661412a6002546001600160a01b031690565b156140635750505050506141435f615422565b6143106124a5846141606002546001600160a01b031690565b156142b05750505050506141435f615402565b935050505061414391505f615442565b9193505061435191945060603d6060116141bf576141ac8183610559565b94919290945f61429a565b5050506141435f6153e2565b50600261437482610ddf565b5001548310614226565b5050506141435f6153c2565b905060055411155f614218565b906001600160601b035f92600a6143ad82610ddf565b508486520160205260408420805460ff19169055167fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc798380a4565b906001600160601b03600192600a6143ff82610ddf565b50845f520160205260405f208460ff19825416179055167fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc795f80a4565b600a6144486001610ddf565b5060015f520160205260405f20600160ff19825416179055600180807fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc795f80a4565b81156132f6570690565b9190826040910312610339576020825192015190565b6144b481516115b1565b50906144c760208201516003840161323f565b50916144d96109b86109a58554611ec2565b9060408351926020850151906144f860e087015160608801519061448a565b608087015160a088015185517f9d61ab6e00000000000000000000000000000000000000000000000000000000815260048101989098526024880194909452604487019190915260648601526084850191909152839060a49082905afa8015610a4b575f925f916149c4575b50918261271082116149ba575b612710106149b0575b61459c6109a561459360e087015160608801519061448a565b60068801611eda565b926145ae6125388360018901546132c5565b936145c46109b86004546001600160a01b031690565b803b156103395760405163965af6c760e01b81526001600160a01b038316600482015260248101969096525f908690604490829084905af1908115610a4b576002956147279261499c575b5060208861465f6125388661463a8c61463f6125388c61463a604060c08601519501948551906132ec565b6132c5565b9c866146508f6009819a01546134e1565b600982015501549051906132ec565b9661466e8860088d01546134e1565b60088c0155600a8b01546001600160a01b031688858261498d575090505f8115614984575b5f80809381936001600160a01b038a1690f1505b6146cd6146bf6109b86004546001600160a01b031690565b91546001600160601b031690565b5f6040518097819582947f664bffc300000000000000000000000000000000000000000000000000000000845289600485016001600160601b036040929594936001600160a01b0360608401971683521660208201520152565b03925af1918215610a4b577fa90d30adac7f21a7def444f0fe0a60bdf16d7e8415973dd09bf869db8f94d58e936001600160a01b03936147bf925f91614965575b5015614948575b88519660208a01519861478c600a8d01546001600160a01b031690565b60408051998a5260208a01949094529288015260608701526001600160a01b0316608086015291169290819060a0820190565b0390a460e08101516147dc6147d760608401516132af565b613214565b146147e5575050565b6147f860c0820151600984015490613232565b61480b6002840154600885015490613232565b8115918215809361493f575b614823575b5050505050565b7f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf492614913575b81801580156148a9575b505061489c614874600a602087519701519701546001600160a01b031690565b604051938493849160409194936001600160a01b039160608501968552602085015216910152565b0390a35f8080808061481c565b600a8701546001600160a01b0316806148f557505f80809381936148da6109b86109b885546001600160a01b031690565b9083906148ec575bf1505b815f614854565b506108fc6148e2565b5f5461490d9392506001600160a01b03165b9061500d565b506148e5565b614939816149296002546001600160a01b031690565b5f546001600160a01b0316614907565b5061484a565b50811515614817565b61495f888461412a6002546001600160a01b031690565b5061476f565b61497e915060203d602011610a4457610a368183610559565b5f614768565b506108fc614693565b6149969261500d565b506146a7565b80611e235f6149aa93610559565b5f61460f565b612710925061457a565b6127109150614571565b90506149e991925060403d6040116149f2575b6149e18183610559565b810190614494565b9190915f614564565b503d6149d7565b90816060910312610339578051916040602083015192015190565b7f80000000000000000000000000000000000000000000000000000000000000008114612b74575f0390565b614a4a81516115b1565b50614a5e602083019160038351910161323f565b5090614a706109b86109a58454611ec2565b8351825160e086018051608088015160a08901516040517f149a5dc0000000000000000000000000000000000000000000000000000000008152600481019690965260248601949094526044850191909152606484015260848301919091529094919060208660a481855afa958615610a4b575f96614fec575b506127108611614fe2575b614b0961253860018701546135df89613222565b614b1a6109a5835160068901611eda565b614b2f6109b86004546001600160a01b031690565b803b156103395760405163965af6c760e01b81526001600160a01b038316600482015260248101849052905f908290604490829084905af18015610a4b57614fce575b505f6060614c0e614b9d614b8a875160078d016138c0565b90546001600160601b039160031b1c1690565b94614bb36109b86004546001600160a01b031690565b906040519485809481937f771a27cb0000000000000000000000000000000000000000000000000000000083528a8a600485016001600160601b036040929594936001600160a01b0360608401971683521660208201520152565b03925af1948515610a4b5788955f905f935f91614f97575b508960c08a019c8d614c398482516134e1565b90527fa90d30adac7f21a7def444f0fe0a60bdf16d7e8415973dd09bf869db8f94d58e600a614c6b8d51945195614a14565b9b019a614c7f8c546001600160a01b031690565b6040805185815260208101959095528401919091525f60608401526001600160a01b03908116608084015288169160a090a415908115614f13575b5015614e6357509050614cd86109b86004546001600160a01b031690565b803b15610339576040517faa9ebfb70000000000000000000000000000000000000000000000000000000081526001600160a01b039290921660048301525f908290602490829084905af18015610a4b57614e4f575b505b51614d3e6060840151613214565b1480614e43575b614d52575b505050505190565b7f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf491614d8582546001600160a01b031690565b6001600160a01b038116614e1d57505f808080614daf6109b86109b883546001600160a01b031690565b60028a015490828215614e14575bf1505b614de8614dd56002546001600160a01b031690565b5f546001600160a01b031688519161500d565b5051925193614e086148746002885193015493546001600160a01b031690565b0390a35f808080614d4a565b506108fc614dbd565b614e3d90614e325f546001600160a01b031690565b60028801549161500d565b50614dc0565b50604082015115614d45565b80611e235f614e5d93610559565b5f614d2e565b6002614e6e84610ddf565b50015411614e7e575b5050614d30565b614e936109b86004546001600160a01b031690565b91823b15610339576040517f9d5608670000000000000000000000000000000000000000000000000000000081526001600160a01b039290921660048301526001600160601b03166024820152905f908290604490829084905af18015610a4b57614eff575b80614e77565b80611e235f614f0d93610559565b5f614ef9565b8751895187516040517fba66fde70000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201529150602090829060649082905afa908115610a4b575f91614f78575b50155f614cba565b614f91915060203d602011610a4457610a368183610559565b5f614f70565b915050614fbd91925060603d606011614fc7575b614fb58183610559565b8101906149f9565b929190925f614c26565b503d614fab565b80611e235f614fdc93610559565b5f614b72565b6127109550614af5565b61500691965060203d60201161109e5761108f8183610559565b945f614aea565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082019081526001600160a01b0393841660248301526044808301959095529381525f9384939091849190615068606482610559565b5193165af16150756134fd565b8161507e575090565b805180159250821561508f57505090565b6112639250602080918301019101613267565b6001600160a01b035f5416330361038957565b600754600160401b8110156105545760018101600755600754811015610dfb5760075f52600e60205f20910201905f90565b90919392936150f583615331565b92905061510d6124a561249e85600a61248f87610ddf565b61265d576151d290600a600754986151236150b5565b503360601b6bffffffffffffffffffffffff19166001600160601b038716178155426002820155906151ac612538615173600361516b6151656109a58d611ec2565b9a610ddf565b50950161391b565b50936001600160a01b0387166152be5761519260048201545b856132ec565b99600386019a8b55855560036002820154910154906132c5565b6001830155600282015501906001600160a01b03166001600160a01b0319825416179055565b6151e76109b86004546001600160a01b031690565b90813b156103395760405163d09f392d60e01b8152600481018890525f6024820181905290928390604490829084905af1918215610a4b576001600160a01b03926152aa575b5016905490803b156103395761525e935f8094604051968795869485936302dbb79560e61b85528c6004860161393c565b03925af18015610a4b57615296575b5033827f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed9955f80a3565b80611e235f6152a493610559565b5f61526d565b80611e235f6152b893610559565b5f61522d565b6151926152cf6004830154896132fb565b61518c565b905f6001600160a01b03819594829582604051928160208501977f23b872dd000000000000000000000000000000000000000000000000000000008952166024850152166044830152606482015260648152615068608482610559565b80516040116153ac5760208101519160606040830151920151906001600160601b038416801590811561539f575b50615396575b821561538d575b81158015615381575b61537b57565b60019150565b50600654821015615375565b6003925061536c565b60019350615365565b905060055411155f61535f565b50600190600390600190565b600211156115eb57565b6001906153ce816153b8565b1461058b57637c84af5160e01b5f5260045ffd5b6001906153ee816153b8565b1461058b57630caac6b360e31b5f5260045ffd5b60019061540e816153b8565b1461058b57630f323ed960e11b5f5260045ffd5b60019061542e816153b8565b1461058b5763e45e13a360e01b5f5260045ffd5b60019061544e816153b8565b146155475761545c81613fa6565b600281146155385761546d81613fa6565b600381146155295761547e81613fa6565b600481146155015761548f81613fa6565b600581146154f2576154a081613fa6565b600681146154e357806154b4600992613fa6565b146154bb57565b7ff95e58bc000000000000000000000000000000000000000000000000000000005f5260045ffd5b630caac6b360e31b5f5260045ffd5b637c84af5160e01b5f5260045ffd5b7fec8e8768000000000000000000000000000000000000000000000000000000005f5260045ffd5b63e45e13a360e01b5f5260045ffd5b630f323ed960e11b5f5260045ffd5b5056fea26469706673582212209d8693ceca011df52e9dd63f6056bbcd764f392dc1976d1654c7a6599b67d72c64736f6c634300081e0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e", + "deployedBytecode": "0x60806040526004361015610011575f80fd5b5f3560e01c8062f5822c146103235780630219da791461031e5780630761c14d1461031957806309cfdc9c146103145780630b7414bc1461030f578063115d53761461030a5780631860592b1461030557806319b81529146103005780631c3db16d146102fb5780631f5a0dd2146102f65780632d29a47b146102f15780632e1daf2f146102ec5780633cfd1184146102e757806342c37fa3146102e25780634f1ef286146102dd57806352d1902d146102d857806354fd4d50146102d3578063564a565d146102ce57806359ec827e146102c95780636a8c9194146102c457806371ae413d146102bf5780637717a6e8146102ba5780637934c0be146102b557806382d02237146102b057806386541b24146102ab57806386cdecef146102a65780638a9bb02a146102a15780638bb048751461029c5780638da5cb5b14610297578063a6f9dae114610292578063acdbf51d1461028d578063afe15cfb14610288578063b004963714610283578063b702a8791461027e578063c13517e114610279578063c258bb1914610274578063c35699021461026f578063c71f42531461026a578063cf0c38f814610265578063d07368bd14610260578063d4d1d76a1461025b578063d874514b14610256578063d98493f614610251578063e399d29b1461024c578063f6506db414610247578063f7434ea914610242578063fbf405b01461023d578063fc6f8f16146102385763fe524c3914610233575f80fd5b6131a5565b613185565b61315f565b613129565b613016565b612f55565b612ef8565b612c27565b612c0a565b612b9f565b612b79565b612b39565b6126f9565b6126ad565b61242e565b612017565b611fcb565b611f48565b611eef565b611e76565b611e51565b611d02565b611c54565b611ab6565b61193d565b61180d565b611784565b61175a565b611734565b61169e565b611680565b6115fd565b611552565b6114c4565b611266565b6111af565b611134565b6110d7565b610e80565b610e00565b610d96565b610d6e565b610d3b565b610750565b61061c565b610493565b610421565b6103b1565b61033d565b6001600160a01b0381160361033957565b5f80fd5b346103395760203660031901126103395760043561035a81610328565b6001600160a01b035f54163303610389576001600160a01b03166001600160a01b031960025416176002555f80f35b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576001600160a01b036004356103d681610328565b165f526008602052606060405f205460ff604051918181161515835267ffffffffffffffff8160081c16602084015260481c166040820152f35b6001600160601b0381160361033957565b346103395760603660031901126103395760043561043e81610328565b60243561044a81610410565b604435906001600160a01b0360045416330361046b5761046992613fb0565b005b7f9d6cab99000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576004356104b081610328565b6001600160a01b035f54163314158061050e575b6104e6576001600160a01b03166001600160a01b031960015416176001555f80f35b7ff10d23b5000000000000000000000000000000000000000000000000000000005f5260045ffd5b506001600160a01b03600154163314156104c4565b634e487b7160e01b5f52604160045260245ffd5b6101a0810190811067ffffffffffffffff82111761055457604052565b610523565b90601f8019910116810190811067ffffffffffffffff82111761055457604052565b6040519061058b61010083610559565b565b6040519061058b6101a083610559565b67ffffffffffffffff81116105545760051b60200190565b9080601f830112156103395781356105cc8161059d565b926105da6040519485610559565b81845260208085019260051b82010192831161033957602001905b8282106106025750505090565b81358152602091820191016105f5565b8015150361033957565b346103395760603660031901126103395760043561063981610410565b60243567ffffffffffffffff8111610339576106599036906004016105b5565b6044359061066682610612565b6001600160a01b035f54163303610389575f5b81518110156104695782156106fa5761069281836131ec565b511580156106e4575b6106bc57806106b66106af600193856131ec565b51866143e8565b01610679565b7f7ab15312000000000000000000000000000000000000000000000000000000005f5260045ffd5b506106ef81836131ec565b51600654111561069b565b600161070682846131ec565b5114610728578061072361071c600193856131ec565b5186614397565b6106b6565b7fada223fa000000000000000000000000000000000000000000000000000000005f5260045ffd5b346103395760203660031901126103395760043561076d816115b1565b5061078761078282546001600160601b031690565b610ddf565b509060038101916107a261079b8454613214565b809461323f565b5060018301936107b3855460ff1690565b6107bc816115e1565b806108d857501580610896575b61086e57600360068201549101540361084657547f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91926108379261082b9260601c60ff161561083c5761081e60015b83613287565b6002429101555460ff1690565b6040519182918261329f565b0390a2005b61081e6002610818565b7f9e4486b0000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3e9727df000000000000000000000000000000000000000000000000000000005f5260045ffd5b506108a5600284015442613232565b6108d26108c86108b6875460ff1690565b6108bf816115e1565b60068601613258565b90549060031b1c90565b116107c9565b90506108e9819594959392936115e1565b60018103610a5057506109246108c8610906600287015442613232565b926006610914875460ff1690565b9161091e836115e1565b01613258565b119081610993575b5061096b57805460ff191660021781557f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916108379161082b9161081e565b7f9bf4af0a000000000000000000000000000000000000000000000000000000005f5260045ffd5b6109c491506109a56109b89154611ec2565b90546001600160a01b039160031b1c1690565b6001600160a01b031690565b602060405180927f0baa64d10000000000000000000000000000000000000000000000000000000082528180610a0289600483019190602083019252565b03915afa908115610a4b575f91610a1c575b50155f61092c565b610a3e915060203d602011610a44575b610a368183610559565b810190613267565b5f610a14565b503d610a2c565b61327c565b610a59816115e1565b60028103610ba75750610a766108c8610906600287015442613232565b119081610b1e575b50610af657805460ff191660031781557f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916108379161082b916001600160a01b03610acb825460601c90565b16867fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f5f80a361081e565b7fcc46f568000000000000000000000000000000000000000000000000000000005f5260045ffd5b610b3091506109a56109b89154611ec2565b602060405180927f6d4cd8ea0000000000000000000000000000000000000000000000000000000082528180610b6e89600483019190602083019252565b03915afa908115610a4b575f91610b88575b50155f610a7e565b610ba1915060203d602011610a4457610a368183610559565b5f610b80565b610bb0816115e1565b60038103610cd1576108c8610bd9916006610bcf600289015442613232565b9461091e836115e1565b119081610c48575b50610c2057805460ff191660041781557f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916108379161082b9161081e565b7f2f4dfd87000000000000000000000000000000000000000000000000000000005f5260045ffd5b610c5a91506109a56109b89154611ec2565b602060405180927f0855bbe90000000000000000000000000000000000000000000000000000000082528180610c9889600483019190602083019252565b03915afa908115610a4b575f91610cb2575b50155f610be1565b610ccb915060203d602011610a4457610a368183610559565b5f610caa565b905060049150610ce0816115e1565b14610d135761082b610837917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b919361081e565b7f0fe7191e000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576040366003190112610339576020610d66600435610d5d81610328565b602435906132fb565b604051908152f35b34610339576020366003190112610339576020610d8c600435613353565b6040519015158152f35b34610339576020366003190112610339576060610db46004356133f9565b906040519283521515602083015215156040820152f35b634e487b7160e01b5f52603260045260245ffd5b600554811015610dfb5760055f52601560205f20910201905f90565b610dcb565b346103395760203660031901126103395760043560055481101561033957610e2790610ddf565b508054600282015460038301546004840154600590940154604080516001600160601b0386168152606095861c60ff16151560208201529081019390935292820152608081019290925260a08201528060c081015b0390f35b3461033957606036600319011261033957600435604435602435610ea3836115b1565b506004610eb4600183015460ff1690565b610ebd816115e1565b036110a557816003610ecf920161323f565b50906004820193610ee2855494856134e1565b926005810194855496600683015490610eff8260028601546132ec565b92610f156109b86109a560018801549754611ec2565b6040517fda3beb8c00000000000000000000000000000000000000000000000000000000815260048101889052602481018990529290602090849060449082905afa928315610a4b575f93611074575b50826110455783891161103c575b9780979695949392985b55965b868810610f9657898981815403610f9357005b55005b9091929394959698828a105f14610ff657610fe7600191610fb561057b565b908882528960208301528460408301528560608301528660808301528760a083015260c08201528b60e0820152614a40565b995b0196959493929190610f80565b9860019061103761100561057b565b8881528960208201528460408201528560608201528660808201528760a08201528c60c08201528260e08201526144aa565b610fe9565b97508297610f73565b61104e846132af565b8911611063575b978097969594939298610f7d565b975061106e836132af565b97611055565b61109791935060203d60201161109e575b61108f8183610559565b8101906134ee565b915f610f65565b503d611085565b7f8794ce4b000000000000000000000000000000000000000000000000000000005f5260045ffd5b5f91031261033957565b34610339575f3660031901126103395760206001600160a01b0360045416604051908152f35b905f905b6004821061110e57505050565b6020806001928551815201930191019091611101565b60808101929161058b91906110fd565b346103395760203660031901126103395761116b60043561115481610410565b60806040516111638282610559565b369037610ddf565b50604051906006015f825b6004821061119957610e7c8461118d608082610559565b60405191829182611124565b6001602081928554815201930191019091611176565b34610339576040366003190112610339576004356111cc81610328565b6024356001600160a01b0360045416330361046b57610469916001600160a01b036002541661500d565b67ffffffffffffffff811161055457601f01601f191660200190565b92919261121e826111f6565b9161122c6040519384610559565b829481845281830111610339578281602093845f960137010152565b9080601f830112156103395781602061126393359101611212565b90565b60403660031901126103395760043561127e81610328565b60243567ffffffffffffffff81116103395761129e903690600401611248565b6112a66150a2565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016803014908115611489575b50611461576001600160a01b0382166040517f52d1902d000000000000000000000000000000000000000000000000000000008152602081600481855afa5f9181611440575b5061135b577f0c760937000000000000000000000000000000000000000000000000000000005f526001600160a01b03841660045260245ffd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81036114155750827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a28051806113d357005b5f926020849301905af46113e56134fd565b50156113ed57005b7f736436ba000000000000000000000000000000000000000000000000000000005f5260045ffd5b7faa1d49a4000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b61145a91925060203d60201161109e5761108f8183610559565b905f611321565b7fe07c8dba000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506114bc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b14155f6112db565b34610339575f366003190112610339576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036114615760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b34610339575f36600319011261033957610e7c604051611573604082610559565b600581527f322e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061152e565b600754811015610dfb5760075f52600e60205f20910201905f90565b634e487b7160e01b5f52602160045260245ffd5b600511156115eb57565b6115cd565b9060058210156115eb5752565b34610339576020366003190112610339576004356007548110156103395761162660ff916115b1565b508054600260018301549201546040519384936001600160a01b0360a08601946001600160601b0380821616875260601c16602086015261166c604086018383166115f0565b60081c161515606084015260808301520390f35b34610339576020366003190112610339576020610d6660043561352c565b34610339576060366003190112610339576004356116bb81610328565b60243560443567ffffffffffffffff8111610339576116de903690600401611248565b6001600160a01b035f54163303610389575f928392602083519301915af16117046134fd565b501561170c57005b7f44125e5e000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339575f3660031901126103395760206001600160a01b0360015416604051908152f35b346103395760403660031901126103395761046960043561177a81610410565b6024359033614203565b34610339576040366003190112610339576004356117a181610328565b602435906117ae82610612565b6001600160a01b035f54163303610389576001600160a01b031690815f52600860205260405f2060ff1981541660ff831515161790551515907f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd445f80a3005b346103395760603660031901126103395760043561182a81610328565b6024359067ffffffffffffffff821682036103395760443560ff81168103610339576001600160a01b035f54163303610389576001600160a01b03919091165f81815260086020818152604092839020805469ffffffffffffffffff0019169287901b68ffffffffffffffff001692909217604886901b69ff0000000000000000001617909155815167ffffffffffffffff909516855260ff90931692840192909252917fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e69181908101610837565b8060e312156103395760405190611911608083610559565b8190610144116103395760c4905b610144821061192d57505090565b813581526020918201910161191f565b34610339576101403660031901126103395760043561195b81610410565b60243561196781610612565b6044359060643560a43560843561197d366118f9565b926001600160a01b035f54163303610389576001600160601b036119a088610ddf565b50971696600188141580611a95575b611a6d575f600182018054915b828110611a4a57600284018a905583546cff000000000000000000000000191689151560601b6cff000000000000000000000000161784558a7f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8b8b6108378c8c8c8c611a3e8460068f846003820155856004820155866005820155016135fa565b6040519687968761361e565b896002611a5d6107826108c88587611eda565b50015410611a6d576001016119bc565b7f97170789000000000000000000000000000000000000000000000000000000005f5260045ffd5b50866002611aad61078284546001600160601b031690565b500154116119af565b346103395760403660031901126103395760206001611ae56024356003611ade6004356115b1565b500161323f565b500154604051908152f35b90602080835192838152019201905f5b818110611b0d5750505090565b82516001600160a01b0316845260209384019390920191600101611b00565b90602080835192838152019201905f5b818110611b495750505090565b82516001600160601b0316845260209384019390920191600101611b3c565b905f905b600a8210611b7957505050565b6020806001928551815201930191019091611b6c565b611263906020815282516020820152602083015160408201526040830151606082015260608301516080820152608083015160a082015260a083015160c08201526101a0610180611c0b611bf460c08701516102c060e08701526102e0860190611af0565b60e0870151858203601f1901610100870152611b2c565b94610100810151610120850152610120810151610140850152611c406101408201516101608601906001600160a01b03169052565b610160810151828501520151910190611b68565b3461033957604036600319011261033957610e7c611cf6611cf06004356003611ade60243592604051611c8681610537565b5f81525f60208201525f60408201525f60608201525f60808201525f60a0820152606060c0820152606060e08201525f6101008201525f6101208201525f6101408201525f6101608201526101806101409160405192611ce68185610559565b36843701526115b1565b5061379b565b60405191829182611b8f565b3461033957602036600319011261033957600435611d1f816115b1565b5090600182019182546004611d348260ff1690565b611d3d816115e1565b036110a55760081c60ff16611e2957611d78611dbd91611d71611d5f856133f9565b5050865461ff00191661010017909655565b5460601c90565b60405184815283906001600160a01b038316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e7562227690602090a36001600160a01b031690565b91823b15610339576040517f311a6c5600000000000000000000000000000000000000000000000000000000815260048101929092526024820152905f908290818381604481015b03925af18015610a4b57611e1557005b80611e235f61046993610559565b806110cd565b7fc977f8d3000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339575f3660031901126103395760206001600160a01b035f5416604051908152f35b3461033957602036600319011261033957600435611e9381610328565b5f5490336001600160a01b03831603610389576001600160a01b036001600160a01b031991169116175f555f80f35b600654811015610dfb5760065f5260205f2001905f90565b8054821015610dfb575f5260205f2001905f90565b3461033957602036600319011261033957600435600654811015610339576001600160a01b0360209160065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f015416604051908152f35b3461033957602036600319011261033957611f646004356115b1565b5060ff60018201541660058110156115eb57600303611fc357611fb0611faa6108c86006611fa06001600160601b036002870154965416610ddf565b5001600301905f90565b826134e1565b905b604080519182526020820192909252f35b505f80611fb2565b3461033957602036600319011261033957600435611fe881610328565b6001600160a01b035f54163303610389576001600160a01b03166001600160a01b031960045416176004555f80f35b346103395760403660031901126103395760243560043561203782610328565b6001600160a01b035f541633141580612419575b6104e657612058816115b1565b5090600382019061207361206c8354613214565b809361323f565b5093612083600185015460ff1690565b61208c816115e1565b6123f157600685018054916003870192835411156123c9576120b96109b86004546001600160a01b031690565b803b1561033957604051633c694c4160e21b81526001600160a01b039290921660048301525f908290602490829084905af18015610a4b576123b5575b506121666121076109a58854611ec2565b96600b810196604061211989546134d3565b809a885f6001600160a01b0385518099819682957fd2b8035a0000000000000000000000000000000000000000000000000000000084526004840160209093929193604081019481520152565b0393165af18015610a4b575f935f91612380575b506001600160a01b038416918215612358576121a16109b86004546001600160a01b031690565b600185015490803b15610339576040517f21e1625e0000000000000000000000000000000000000000000000000000000081526001600160a01b038816600482015260248101929092525f908290604490829084905af1958615610a4b578960079561224b9361226399612344575b508954604080518f815260208101929092527f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91a38761387e565b6001600160601b038216156123325750915b016138e0565b549054146122af575b5050556122846109b86004546001600160a01b031690565b803b15610339575f6040518092633c694c4160e21b8252818381611e0560048201905f602083019252565b6122c46109b86004546001600160a01b031690565b91823b15610339576040517f5d2d784600000000000000000000000000000000000000000000000000000000815260048101929092526024820152905f908290604490829084905af18015610a4b5761231e575b8061226c565b80611e235f61232c93610559565b5f612318565b546001600160601b031690509161225d565b80611e235f61235293610559565b5f612210565b7f5c7171ee000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506123a591935060403d6040116123ae575b61239d8183610559565b810190613859565b9290925f61217a565b503d612393565b80611e235f6123c393610559565b5f6120f6565b7f4df06de3000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f8285c4ef000000000000000000000000000000000000000000000000000000005f5260045ffd5b506001600160a01b036001541633141561204b565b60403660031901126103395760043560243567ffffffffffffffff81116103395761245d903690600401611248565b9061246782613f61565b34106126855761247682615331565b90506124a96124a561249e83600a61248f879897610ddf565b5001905f5260205260405f2090565b5460ff1690565b1590565b61265d57600754926125675f600a6124bf6150b5565b503360601b6bffffffffffffffffffffffff19166001600160601b03861617815542600282015561254061253861250e60036125066125006109a58c611ec2565b99610ddf565b50940161391b565b509261251e6004820154346132ec565b9860038501998a55845560036002820154910154906132c5565b612710900490565b600182015534600282015501906001600160a01b03166001600160a01b0319825416179055565b61257c6109b86004546001600160a01b031690565b90813b156103395760405163d09f392d60e01b8152600481018690525f6024820181905290928390604490829084905af1918215610a4b576001600160a01b0392612649575b5016905490803b15610339576125f3945f8094604051978895869485936302dbb79560e61b85528a6004860161393c565b03925af1918215610a4b57602092612635575b5033817f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed9955f80a3604051908152f35b80611e235f61264393610559565b5f612606565b80611e235f61265793610559565b5f6125c2565b7fb34eb75d000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f38cd83c4000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576004356126ca81610328565b6001600160a01b035f54163303610389576001600160a01b03166001600160a01b031960035416176003555f80f35b60603660031901126103395760043560243560443567ffffffffffffffff81116103395761272b903690600401611248565b6127348361352c565b3410612b1157612743836115b1565b5091600183016003612756825460ff1690565b61275f816115e1565b03612ae9576003840161277b6127758254613214565b8261323f565b509081546127916109b86109b86109a584611ec2565b3303612ac15786546001600160601b031681946127ad8461391b565b5092600386015460056127bf85610ddf565b50015411156129fa575b5088546bffffffffffffffffffffffff19166001600160601b03831617895561280691906127fb90805460ff19169055565b4260028a0155610ddf565b509361283461253861281c6004880154346132ec565b966003850197885560036002820154910154906132c5565b600183015534600283015581556128566109b86004546001600160a01b031690565b6128608354613214565b90803b156103395760405163d09f392d60e01b8152600481018b905260248101929092525f908290604490829084905af18015610a4b576129e6575b5054915490818303612915575b877f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916001600160a01b036128de8a5460601c90565b1660405190837f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d5f80a35f81528060208101610837565b61295d926109b89261292a6109a59354613214565b6040518381528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea775690602090a4611ec2565b905490803b156103395761298c935f8094604051968795869485936302dbb79560e61b85528c6004860161393c565b03925af18015610a4b577f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91926001600160a01b03926128de926129d2575b8194816128a9565b80611e235f6129e093610559565b5f6129ca565b80611e235f6129f493610559565b5f61289c565b916124a561249e612a1e612a10612a2a94610ddf565b50546001600160601b031690565b94600a61248f87610ddf565b612ab8575b906127fb61280692612a488b546001600160601b031690565b6001600160601b0381166001600160601b03851603612a6b575b509192506127c9565b612a758754613214565b6040516001600160601b03868116825292909216918e907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f90602090a45f612a62565b60019550612a2f565b7f065f245f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fdf37bf2c000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3191f8f1000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610339576020366003190112610339576003612b576004356115b1565b500180545f198101908111612b7457611ae560039160209361323f565b613200565b34610339575f3660031901126103395760206001600160a01b0360035416604051908152f35b3461033957602036600319011261033957600435612bbc81610328565b6001600160a01b035f54163303610389576001600160a01b0360065491612be281613963565b16907f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb25f80a3005b34610339575f366003190112610339576020600654604051908152f35b346103395761016036600319011261033957600435612c4581610410565b602435612c5181610612565b604435606435906084359260a43591612c69366118f9565b956101443567ffffffffffffffff811161033957612c8b9036906004016105b5565b966001600160a01b035f5416330361038957826002612ca984610ddf565b50015411611a6d57875115612ea2576001600160601b038216948515612e7a5760059796975491612cd86139cb565b50915f98600a8401995b8c51811015612d54578c81612cf781836131ec565b5115918215612d3d575b50506106bc5780612d37612d2a8f612d1d8f91956001966131ec565b515f5260205260405f2090565b805460ff19166001179055565b01612ce2565b612d4792506131ec565b516006541115818e612d01565b50908b92918b612d726124a561249e8e60015f5260205260405f2090565b612e52577f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee698612e3f886001612e388c8f8a6001600160601b039f8e612e4d9f61078294612ddb600694612e1a93906001600160601b03166001600160601b0319825416179055565b612dee612de66139fd565b8a8501613a18565b82546cff000000000000000000000000191690151560601b6cff00000000000000000000000016178255565b8960028201558a60038201558b60048201558c6005820155016135fa565b5001613a96565b604051988998169a88613aca565b0390a3005b7f31a8d9e8000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f1ef4f649000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f402585f5000000000000000000000000000000000000000000000000000000005f5260045ffd5b9181601f840112156103395782359167ffffffffffffffff8311610339576020838186019501011161033957565b346103395760403660031901126103395760043567ffffffffffffffff811161033957610d66612f4a612f4f612f346020943690600401612eca565b929060243593612f4385610328565b3691611212565b613f61565b906132fb565b34610339576101e036600319011261033957600435612f7381610328565b60243590612f8082610328565b604435612f8c81610328565b606435612f9881610328565b608435612fa481610328565b60a43590612fb182610612565b612fba366118f9565b923661016312156103395760405194612fd4608087610559565b8597366101c41161033957610144985b6101c48a10613006575061046998506101c4359761300189610328565b613b38565b893581526020998a019901612fe4565b346103395760803660031901126103395760043560243567ffffffffffffffff81116103395761304a903690600401612eca565b9160443561305781610328565b606435916001600160a01b0382165f52600860205261307d6124a560405f205460ff1690565b61310157613098613092612f4a368888611212565b836132fb565b8310612685576130ad6124a5843033866152d4565b6130d9576130c36130c994610e7c963691611212565b906150e7565b6040519081529081906020820190565b7f90b8ec18000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fe51cf7bf000000000000000000000000000000000000000000000000000000005f5260045ffd5b346103395760203660031901126103395760043567ffffffffffffffff811161033957610d66612f4a6020923690600401611248565b34610339575f3660031901126103395760206001600160a01b0360025416604051908152f35b346103395760203660031901126103395760206003611ae56004356115b1565b3461033957604036600319011261033957600a6004356131c481610410565b6131d060243591610ddf565b50905f5201602052602060ff60405f2054166040519015158152f35b8051821015610dfb5760209160051b010190565b634e487b7160e01b5f52601160045260245ffd5b5f19810191908211612b7457565b61271003906127108211612b7457565b91908203918211612b7457565b8054821015610dfb575f52601660205f20910201905f90565b6004821015610dfb5701905f90565b90816020910312610339575161126381610612565b6040513d5f823e3d90fd5b9060058110156115eb5760ff80198354169116179055565b60208101929161058b91906115f0565b908160011b9180830460021490151715612b7457565b81810292918115918404141715612b7457565b634e487b7160e01b5f52601260045260245ffd5b81156132f6570490565b6132d8565b6001600160a01b031690815f52600860205260ff60405f205460481c1690604d8211612b745761332e91600a0a906132c5565b905f52600860205267ffffffffffffffff60405f205460081c169081156132f6570490565b61335c906115b1565b506003810180545f198101908111612b74576133836001600160601b039161338c9361323f565b50925416610ddf565b509060038101546005830154116133c9576133b26001600160601b03600a935416610ddf565b5090545f520160205260ff60405f20541615151590565b50505f90565b9081606091031261033957805191604060208301516133ed81610612565b92015161126381610612565b6003613404826115b1565b500180545f19810192908311612b745761344c6001600160a01b036134386134316134859660609661323f565b5054611ec2565b90549060031b1c166001600160a01b031690565b60405180809581947f1c3db16d000000000000000000000000000000000000000000000000000000008352600483019190602083019252565b03915afa908115610a4b575f915f915f916134a1575b50909192565b9150506134c6915060603d6060116134cc575b6134be8183610559565b8101906133cf565b5f61349b565b503d6134b4565b9060018201809211612b7457565b91908201809211612b7457565b90816020910312610339575190565b3d15613527573d9061350e826111f6565b9161351c6040519384610559565b82523d5f602084013e565b606090565b613535906115b1565b5061355f6135506003830161354a8154613214565b9061323f565b5091546001600160601b031690565b600361356a82610ddf565b50920154600583015490919082106135e5576001600160601b03166001036135b25750507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b6135df6135da60046135d161078261126396546001600160601b031690565b500154926132af565b6134d3565b906132c5565b506135df6135da6004611263940154926132af565b905f5b6004811061360a57505050565b6001906020835193019281850155016135fd565b919360a09361058b969298979561012085019915158552602085015260408401526060830152608082015201906110fd565b90604051918281549182825260208201905f5260205f20925f5b81811061367f57505061058b92500383610559565b84546001600160a01b031683526001948501948794506020909301920161366a565b604051815480825290929183906136bf60208301915f5260205f2090565b925f905b80600183011061371a5761058b945491818110613700575b106136e9575b500383610559565b60601c6001600160601b031681526020015f6136e1565b6001600160601b03831684529260019060200193016136db565b91600291935060406001916137588754613745836001600160601b0383166001600160601b03169052565b60601c6001600160601b03166020830152565b0194019201859293916136c3565b60405191905f835b600a82106137855750505061058b61014083610559565b600160208192855481520193019101909161376e565b90613851600c6137a961058d565b938054855260018101546020860152600281015460408601526003810154606086015260048101546080860152600581015460a08601526137ec60068201613650565b60c08601526137fd600782016136a1565b60e08601526008810154610100860152600981015461012086015261384061382f600a8301546001600160a01b031690565b6001600160a01b0316610140870152565b600b81015461016086015201613766565b610180830152565b9190826040910312610339576020825161387281610328565b92015161126381610410565b90815491600160401b83101561055457826138a191600161058b95018155611eda565b9091906001600160a01b038084549260031b9316831b921b1916179055565b9190918054831015610dfb575f52600c600160205f2084821c0193160290565b8054600160401b811015610554576138fd916001820181556138c0565b6001600160601b0380839493549260031b9316831b921b1916179055565b8054600160401b811015610554576139389160018201815561323f565b9091565b94939260609261395e928752602087015260806040870152608086019061152e565b930152565b60065490600160401b8210156105545760018201600655600654821015610dfb5760065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b0319166001600160a01b03909216919091179055565b600554600160401b8110156105545760018101600555600554811015610dfb5760055f52601560205f20910201905f90565b60405190613a0c602083610559565b5f808352366020840137565b81519167ffffffffffffffff831161055457600160401b8311610554578154838355808410613a70575b50602001905f5260205f205f5b838110613a5c5750505050565b600190602084519401938184015501613a4f565b825f528360205f2091820191015b818110613a8b5750613a42565b5f8155600101613a7e565b8054600160401b81101561055457613ab391600182018155611eda565b819291549060031b91821b915f19901b1916179055565b929461016094602096613b0194989398610140870199151587528887015260408601526060850152608084015260a08301906110fd565b6101406101208201528451809452019201905f5b818110613b225750505090565b8251845260209384019390920191600101613b15565b96949290979593917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5498613b84613b7660ff8c60401c1615151590565b9a67ffffffffffffffff1690565b8a80613d37575b159081613d0f575b50613ce757613bfd988a613bf4600167ffffffffffffffff197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5416177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e55565b613c8757613d79565b613c0357565b613c5868ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e54167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e55565b604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1565b613ce2600160401b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5416177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e55565b613d79565b7f0dc149f0000000000000000000000000000000000000000000000000000000005f5260045ffd5b303b15915081613d22575b50155f613b93565b6001915067ffffffffffffffff16145f613d1a565b50600167ffffffffffffffff821610613b8b565b600654600160401b8110156105545760018101600655600654811015610dfb5760065f5260205f2001905f90565b93613e516001600160601b039699613e35613f5696613e1960019c97613dfd6001600160a01b0398613de17f550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee69f9d6001600160a01b03166001600160a01b03195f5416175f55565b6001600160a01b03166001600160a01b03196001541617600155565b6001600160a01b03166001600160a01b03196002541617600255565b6001600160a01b03166001600160a01b03196003541617600355565b6001600160a01b03166001600160a01b03196004541617600455565b613e59613d4b565b5050613e6481613963565b16867f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb25f80a3613e926139cb565b5050613e9c6139cb565b5080546bffffffffffffffffffffffff1916815590613ec4613ebc6139fd565b888401613a18565b81546cff000000000000000000000000191688151560601b6cff0000000000000000000000001617825583516002830155602084018051600384015591604085018051600483015590613f36606087019182516005820155613f2985600683016135fa565b546001600160601b031690565b955193519151905191613f476139fd565b94604051988998169b88613aca565b0390a361058b61443c565b613f7a6004613f7261126393615331565b509290610ddf565b5001546132c5565b908160609103126103395780519160406020830151920151600a8110156103395790565b600a11156115eb57565b906001600160601b03811680159081156141f6575b506141e957821515806141d3575b6141c657613fec6109b86004546001600160a01b031690565b60405163c70ba3b960e01b81526001600160a01b03841660048201526001600160601b038316602482015260448101859052600160648201529390606090859060849082905f905af1918215610a4b575f925f955f9161418d575b5061405181613fa6565b8061417c575082614147575b84614110575b6140786109b86004546001600160a01b031690565b91823b15610339576040517faac03ad20000000000000000000000000000000000000000000000000000000081526001600160a01b0390951660048601526001600160601b039091166024850152604484019290925260648301939093526084820152905f90829081838160a4810103925af18015610a4b576140fc575b50600190565b80611e235f61410a93610559565b5f6140f6565b61412f6124a5868661412a6002546001600160a01b031690565b61500d565b156140635750505050506141436001615422565b5f90565b6141686124a5846141606002546001600160a01b031690565b8730916152d4565b1561405d5750505050506141436001615402565b935050505061414391506001615442565b919350506141b491945060603d6060116141bf575b6141ac8183610559565b810190613f82565b94919290945f614047565b503d6141a2565b50505061414360016153e2565b5060026141df82610ddf565b5001548310613fd3565b50505061414360016153c2565b905060055411155f613fc5565b906001600160601b038116801590811561438a575b5061437e5782151580614368575b61435c5761423f6109b86004546001600160a01b031690565b60405163c70ba3b960e01b81526001600160a01b03841660048201526001600160601b0383166024820152604481018590525f60648201819052909491606091869160849183915af1918215610a4b575f925f955f91614333575b506142a481613fa6565b806143235750826142f7575b846142ca576140786109b86004546001600160a01b031690565b6142e46124a5868661412a6002546001600160a01b031690565b156140635750505050506141435f615422565b6143106124a5846141606002546001600160a01b031690565b156142b05750505050506141435f615402565b935050505061414391505f615442565b9193505061435191945060603d6060116141bf576141ac8183610559565b94919290945f61429a565b5050506141435f6153e2565b50600261437482610ddf565b5001548310614226565b5050506141435f6153c2565b905060055411155f614218565b906001600160601b035f92600a6143ad82610ddf565b508486520160205260408420805460ff19169055167fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc798380a4565b906001600160601b03600192600a6143ff82610ddf565b50845f520160205260405f208460ff19825416179055167fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc795f80a4565b600a6144486001610ddf565b5060015f520160205260405f20600160ff19825416179055600180807fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc795f80a4565b81156132f6570690565b9190826040910312610339576020825192015190565b6144b481516115b1565b50906144c760208201516003840161323f565b50916144d96109b86109a58554611ec2565b9060408351926020850151906144f860e087015160608801519061448a565b608087015160a088015185517f9d61ab6e00000000000000000000000000000000000000000000000000000000815260048101989098526024880194909452604487019190915260648601526084850191909152839060a49082905afa8015610a4b575f925f916149c4575b50918261271082116149ba575b612710106149b0575b61459c6109a561459360e087015160608801519061448a565b60068801611eda565b926145ae6125388360018901546132c5565b936145c46109b86004546001600160a01b031690565b803b156103395760405163965af6c760e01b81526001600160a01b038316600482015260248101969096525f908690604490829084905af1908115610a4b576002956147279261499c575b5060208861465f6125388661463a8c61463f6125388c61463a604060c08601519501948551906132ec565b6132c5565b9c866146508f6009819a01546134e1565b600982015501549051906132ec565b9661466e8860088d01546134e1565b60088c0155600a8b01546001600160a01b031688858261498d575090505f8115614984575b5f80809381936001600160a01b038a1690f1505b6146cd6146bf6109b86004546001600160a01b031690565b91546001600160601b031690565b5f6040518097819582947f664bffc300000000000000000000000000000000000000000000000000000000845289600485016001600160601b036040929594936001600160a01b0360608401971683521660208201520152565b03925af1918215610a4b577fa90d30adac7f21a7def444f0fe0a60bdf16d7e8415973dd09bf869db8f94d58e936001600160a01b03936147bf925f91614965575b5015614948575b88519660208a01519861478c600a8d01546001600160a01b031690565b60408051998a5260208a01949094529288015260608701526001600160a01b0316608086015291169290819060a0820190565b0390a460e08101516147dc6147d760608401516132af565b613214565b146147e5575050565b6147f860c0820151600984015490613232565b61480b6002840154600885015490613232565b8115918215809361493f575b614823575b5050505050565b7f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf492614913575b81801580156148a9575b505061489c614874600a602087519701519701546001600160a01b031690565b604051938493849160409194936001600160a01b039160608501968552602085015216910152565b0390a35f8080808061481c565b600a8701546001600160a01b0316806148f557505f80809381936148da6109b86109b885546001600160a01b031690565b9083906148ec575bf1505b815f614854565b506108fc6148e2565b5f5461490d9392506001600160a01b03165b9061500d565b506148e5565b614939816149296002546001600160a01b031690565b5f546001600160a01b0316614907565b5061484a565b50811515614817565b61495f888461412a6002546001600160a01b031690565b5061476f565b61497e915060203d602011610a4457610a368183610559565b5f614768565b506108fc614693565b6149969261500d565b506146a7565b80611e235f6149aa93610559565b5f61460f565b612710925061457a565b6127109150614571565b90506149e991925060403d6040116149f2575b6149e18183610559565b810190614494565b9190915f614564565b503d6149d7565b90816060910312610339578051916040602083015192015190565b7f80000000000000000000000000000000000000000000000000000000000000008114612b74575f0390565b614a4a81516115b1565b50614a5e602083019160038351910161323f565b5090614a706109b86109a58454611ec2565b8351825160e086018051608088015160a08901516040517f149a5dc0000000000000000000000000000000000000000000000000000000008152600481019690965260248601949094526044850191909152606484015260848301919091529094919060208660a481855afa958615610a4b575f96614fec575b506127108611614fe2575b614b0961253860018701546135df89613222565b614b1a6109a5835160068901611eda565b614b2f6109b86004546001600160a01b031690565b803b156103395760405163965af6c760e01b81526001600160a01b038316600482015260248101849052905f908290604490829084905af18015610a4b57614fce575b505f6060614c0e614b9d614b8a875160078d016138c0565b90546001600160601b039160031b1c1690565b94614bb36109b86004546001600160a01b031690565b906040519485809481937f771a27cb0000000000000000000000000000000000000000000000000000000083528a8a600485016001600160601b036040929594936001600160a01b0360608401971683521660208201520152565b03925af1948515610a4b5788955f905f935f91614f97575b508960c08a019c8d614c398482516134e1565b90527fa90d30adac7f21a7def444f0fe0a60bdf16d7e8415973dd09bf869db8f94d58e600a614c6b8d51945195614a14565b9b019a614c7f8c546001600160a01b031690565b6040805185815260208101959095528401919091525f60608401526001600160a01b03908116608084015288169160a090a415908115614f13575b5015614e6357509050614cd86109b86004546001600160a01b031690565b803b15610339576040517faa9ebfb70000000000000000000000000000000000000000000000000000000081526001600160a01b039290921660048301525f908290602490829084905af18015610a4b57614e4f575b505b51614d3e6060840151613214565b1480614e43575b614d52575b505050505190565b7f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf491614d8582546001600160a01b031690565b6001600160a01b038116614e1d57505f808080614daf6109b86109b883546001600160a01b031690565b60028a015490828215614e14575bf1505b614de8614dd56002546001600160a01b031690565b5f546001600160a01b031688519161500d565b5051925193614e086148746002885193015493546001600160a01b031690565b0390a35f808080614d4a565b506108fc614dbd565b614e3d90614e325f546001600160a01b031690565b60028801549161500d565b50614dc0565b50604082015115614d45565b80611e235f614e5d93610559565b5f614d2e565b6002614e6e84610ddf565b50015411614e7e575b5050614d30565b614e936109b86004546001600160a01b031690565b91823b15610339576040517f9d5608670000000000000000000000000000000000000000000000000000000081526001600160a01b039290921660048301526001600160601b03166024820152905f908290604490829084905af18015610a4b57614eff575b80614e77565b80611e235f614f0d93610559565b5f614ef9565b8751895187516040517fba66fde70000000000000000000000000000000000000000000000000000000081526004810193909352602483019190915260448201529150602090829060649082905afa908115610a4b575f91614f78575b50155f614cba565b614f91915060203d602011610a4457610a368183610559565b5f614f70565b915050614fbd91925060603d606011614fc7575b614fb58183610559565b8101906149f9565b929190925f614c26565b503d614fab565b80611e235f614fdc93610559565b5f614b72565b6127109550614af5565b61500691965060203d60201161109e5761108f8183610559565b945f614aea565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082019081526001600160a01b0393841660248301526044808301959095529381525f9384939091849190615068606482610559565b5193165af16150756134fd565b8161507e575090565b805180159250821561508f57505090565b6112639250602080918301019101613267565b6001600160a01b035f5416330361038957565b600754600160401b8110156105545760018101600755600754811015610dfb5760075f52600e60205f20910201905f90565b90919392936150f583615331565b92905061510d6124a561249e85600a61248f87610ddf565b61265d576151d290600a600754986151236150b5565b503360601b6bffffffffffffffffffffffff19166001600160601b038716178155426002820155906151ac612538615173600361516b6151656109a58d611ec2565b9a610ddf565b50950161391b565b50936001600160a01b0387166152be5761519260048201545b856132ec565b99600386019a8b55855560036002820154910154906132c5565b6001830155600282015501906001600160a01b03166001600160a01b0319825416179055565b6151e76109b86004546001600160a01b031690565b90813b156103395760405163d09f392d60e01b8152600481018890525f6024820181905290928390604490829084905af1918215610a4b576001600160a01b03926152aa575b5016905490803b156103395761525e935f8094604051968795869485936302dbb79560e61b85528c6004860161393c565b03925af18015610a4b57615296575b5033827f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed9955f80a3565b80611e235f6152a493610559565b5f61526d565b80611e235f6152b893610559565b5f61522d565b6151926152cf6004830154896132fb565b61518c565b905f6001600160a01b03819594829582604051928160208501977f23b872dd000000000000000000000000000000000000000000000000000000008952166024850152166044830152606482015260648152615068608482610559565b80516040116153ac5760208101519160606040830151920151906001600160601b038416801590811561539f575b50615396575b821561538d575b81158015615381575b61537b57565b60019150565b50600654821015615375565b6003925061536c565b60019350615365565b905060055411155f61535f565b50600190600390600190565b600211156115eb57565b6001906153ce816153b8565b1461058b57637c84af5160e01b5f5260045ffd5b6001906153ee816153b8565b1461058b57630caac6b360e31b5f5260045ffd5b60019061540e816153b8565b1461058b57630f323ed960e11b5f5260045ffd5b60019061542e816153b8565b1461058b5763e45e13a360e01b5f5260045ffd5b60019061544e816153b8565b146155475761545c81613fa6565b600281146155385761546d81613fa6565b600381146155295761547e81613fa6565b600481146155015761548f81613fa6565b600581146154f2576154a081613fa6565b600681146154e357806154b4600992613fa6565b146154bb57565b7ff95e58bc000000000000000000000000000000000000000000000000000000005f5260045ffd5b630caac6b360e31b5f5260045ffd5b637c84af5160e01b5f5260045ffd5b7fec8e8768000000000000000000000000000000000000000000000000000000005f5260045ffd5b63e45e13a360e01b5f5260045ffd5b630f323ed960e11b5f5260045ffd5b5056fea26469706673582212209d8693ceca011df52e9dd63f6056bbcd764f392dc1976d1654c7a6599b67d72c64736f6c634300081e0033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -1852,28 +1908,16 @@ { "details": "The contract is not initializing." } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } ] }, "events": { "AcceptedFeeToken(address,bool)": { - "details": "To be emitted when an ERC20 token is added or removed as a method to pay fees.", "params": { "_accepted": "Whether the token is accepted or not.", "_token": "The ERC20 token." } }, "DisputeCreation(uint256,address)": { - "details": "To be emitted when a dispute is created.", "params": { "_arbitrable": "The contract which created the dispute.", "_disputeID": "The identifier of the dispute in the Arbitrator contract." @@ -1883,7 +1927,6 @@ "details": "Triggered when the contract has been initialized or reinitialized." }, "NewCurrencyRate(address,uint64,uint8)": { - "details": "To be emitted when the fee for a particular ERC20 token is updated.", "params": { "_feeToken": "The ERC20 token.", "_rateDecimals": "The new decimals of the fee token rate.", @@ -1891,7 +1934,6 @@ } }, "Ruling(address,uint256,uint256)": { - "details": "To be raised when a ruling is given.", "params": { "_arbitrable": "The arbitrable receiving the ruling.", "_disputeID": "The identifier of the dispute in the Arbitrator contract.", @@ -1907,13 +1949,12 @@ "kind": "dev", "methods": { "addNewDisputeKit(address)": { - "details": "Add a new supported dispute kit module to the court.", "params": { "_disputeKitAddress": "The address of the dispute kit contract." } }, "appeal(uint256,uint256,bytes)": { - "details": "Appeals the ruling of a specified dispute. Note: Access restricted to the Dispute Kit for this `disputeID`.", + "details": "Access restricted to the Dispute Kit for this `disputeID`.", "params": { "_disputeID": "The ID of the dispute.", "_extraData": "Extradata for the dispute. Can be required during court jump.", @@ -1921,7 +1962,6 @@ } }, "appealCost(uint256)": { - "details": "Gets the cost of appealing a specified dispute.", "params": { "_disputeID": "The ID of the dispute." }, @@ -1930,7 +1970,6 @@ } }, "appealPeriod(uint256)": { - "details": "Gets the start and the end of a specified dispute's current appeal period.", "params": { "_disputeID": "The ID of the dispute." }, @@ -1940,7 +1979,7 @@ } }, "arbitrationCost(bytes)": { - "details": "Compute the cost of arbitration denominated in ETH. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", + "details": "It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", "params": { "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes)." }, @@ -1949,7 +1988,7 @@ } }, "arbitrationCost(bytes,address)": { - "details": "Compute the cost of arbitration denominated in `_feeToken`. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", + "details": "It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.", "params": { "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", "_feeToken": "The ERC20 token used to pay fees." @@ -1959,55 +1998,47 @@ } }, "changeAcceptedFeeTokens(address,bool)": { - "details": "Changes the supported fee tokens.", "params": { "_accepted": "Whether the token is supported or not as a method of fee payment.", "_feeToken": "The fee token." } }, "changeCurrencyRates(address,uint64,uint8)": { - "details": "Changes the currency rate of a fee token.", "params": { "_feeToken": "The fee token.", "_rateDecimals": "The new decimals of the fee token rate.", "_rateInEth": "The new rate of the fee token in ETH." } }, - "changeGovernor(address)": { - "details": "Changes the `governor` storage variable.", - "params": { - "_governor": "The new value for the `governor` storage variable." - } - }, "changeInstructor(address)": { - "details": "Changes the `instructor` storage variable.", "params": { "_instructor": "The new value for the `instructor` storage variable." } }, "changeJurorProsecutionModule(address)": { - "details": "Changes the `jurorProsecutionModule` storage variable.", "params": { "_jurorProsecutionModule": "The new value for the `jurorProsecutionModule` storage variable." } }, + "changeOwner(address)": { + "params": { + "_owner": "The new value for the `owner` storage variable." + } + }, "changePinakion(address)": { - "details": "Changes the `pinakion` storage variable.", "params": { "_pinakion": "The new value for the `pinakion` storage variable." } }, "changeSortitionModule(address)": { - "details": "Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts.", "params": { "_sortitionModule": "The new value for the `sortitionModule` storage variable." } }, "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])": { - "details": "Creates a court under a specified parent court.", "params": { "_alpha": "The `alpha` property value of the court.", "_feeForJuror": "The `feeForJuror` property value of the court.", @@ -2020,7 +2051,7 @@ } }, "createDispute(uint256,bytes)": { - "details": "Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", + "details": "Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in ETH.", "params": { "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", "_numberOfChoices": "The number of choices the arbitrator can choose from in this dispute." @@ -2030,7 +2061,7 @@ } }, "createDispute(uint256,bytes,address,uint256)": { - "details": "Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).", + "details": "Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in the supported ERC20 token.", "params": { "_extraData": "Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).", "_feeAmount": "Amount of the ERC20 token used to pay fees.", @@ -2042,7 +2073,6 @@ } }, "currentRuling(uint256)": { - "details": "Gets the current ruling of a specified dispute.", "params": { "_disputeID": "The ID of the dispute." }, @@ -2053,14 +2083,12 @@ } }, "draw(uint256,address)": { - "details": "Draws one juror for the dispute until the number votes paid for is reached.", "params": { "_disputeID": "The ID of the dispute.", "_juror": "The address of the juror to draw." } }, "enableDisputeKits(uint96,uint256[],bool)": { - "details": "Adds/removes court's support for specified dispute kits.", "params": { "_courtID": "The ID of the court.", "_disputeKitIDs": "The IDs of dispute kits which support should be added/removed.", @@ -2068,15 +2096,13 @@ } }, "execute(uint256,uint256,uint256)": { - "details": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.", "params": { "_disputeID": "The ID of the dispute.", "_iterations": "The number of iterations to run.", "_round": "The appeal round." } }, - "executeGovernorProposal(address,uint256,bytes)": { - "details": "Allows the governor to call anything on behalf of the contract.", + "executeOwnerProposal(address,uint256,bytes)": { "params": { "_amount": "The value sent with the call.", "_data": "The data sent with the call.", @@ -2084,19 +2110,43 @@ } }, "executeRuling(uint256)": { - "details": "Executes a specified dispute's ruling.", "params": { "_disputeID": "The ID of the dispute." } }, + "getNumberOfRounds(uint256)": { + "params": { + "_disputeID": "The ID of the dispute." + }, + "returns": { + "_0": "The number of rounds." + } + }, "getNumberOfVotes(uint256)": { - "details": "Gets the number of votes permitted for the specified dispute in the latest round.", "params": { "_disputeID": "The ID of the dispute." } }, + "getPnkAtStakePerJuror(uint256,uint256)": { + "params": { + "_disputeID": "The ID of the dispute.", + "_round": "The round to get the info for." + }, + "returns": { + "_0": "pnkAtStakePerJuror The PNK at stake per juror." + } + }, + "getRoundInfo(uint256,uint256)": { + "details": "This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.", + "params": { + "_disputeID": "The ID of the dispute.", + "_round": "The round to get the info for." + }, + "returns": { + "_0": "round The round info." + } + }, "getTimesPerPeriod(uint96)": { - "details": "Gets the timesPerPeriod array for a given court.", "params": { "_courtID": "The ID of the court to get the times from." }, @@ -2105,21 +2155,19 @@ } }, "initialize(address,address,address,address,address,bool,uint256[4],uint256[4],address)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", "params": { "_courtParameters": "Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).", "_disputeKit": "The address of the default dispute kit.", - "_governor": "The governor's address.", "_hiddenVotes": "The `hiddenVotes` property value of the general court.", "_instructor": "The address of the instructor.", "_jurorProsecutionModule": "The address of the juror prosecution module.", + "_owner": "The owner's address.", "_pinakion": "The address of the token contract.", "_sortitionModuleAddress": "The sortition module responsible for sortition of the jurors.", "_timesPerPeriod": "The `timesPerPeriod` property value of the general court." } }, "isDisputeKitJumping(uint256)": { - "details": "Returns true if the dispute kit will be switched to a parent DK.", "params": { "_disputeID": "The ID of the dispute." }, @@ -2127,40 +2175,59 @@ "_0": "Whether DK will be switched or not." } }, + "isSupported(uint96,uint256)": { + "params": { + "_courtID": "The ID of the court to check the support for.", + "_disputeKitID": "The ID of the dispute kit to check the support for." + }, + "returns": { + "_0": "Whether the dispute kit is supported or not." + } + }, "passPeriod(uint256)": { - "details": "Passes the period of a specified dispute.", "params": { "_disputeID": "The ID of the dispute." } }, "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." + "details": "IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." }, "setStake(uint96,uint256)": { - "details": "Sets the caller's stake in a court.", "params": { "_courtID": "The ID of the court.", "_newStake": "The new stake. Note that the existing delayed stake will be nullified as non-relevant." } }, - "setStakeBySortitionModule(address,uint96,uint256,bool)": { - "details": "Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.", + "setStakeBySortitionModule(address,uint96,uint256)": { "params": { "_account": "The account whose stake is being set.", - "_alreadyTransferred": "Whether the PNKs have already been transferred to the contract.", "_courtID": "The ID of the court.", "_newStake": "The new stake." } }, + "transferBySortitionModule(address,uint256)": { + "params": { + "_account": "The account of the juror whose PNK to transfer.", + "_amount": "The amount to transfer." + } + }, "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", + "details": "Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", "params": { "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", "newImplementation": "Address of the new implementation contract." } } }, - "title": "KlerosCoreUniversity Core arbitrator contract for educational purposes.", + "stateVariables": { + "version": { + "return": "Version string.", + "returns": { + "_0": "Version string." + } + } + }, + "title": "KlerosCoreUniversity", "version": 1 }, "userdoc": { @@ -2174,29 +2241,164 @@ { "notice": "The `implementation` is not UUPS-compliant" } + ], + "UUPSUnauthorizedCallContext()": [ + { + "notice": "The call is from an unauthorized context." + } + ], + "UUPSUnsupportedProxiableUUID(bytes32)": [ + { + "notice": "The storage `slot` is unsupported as a UUID." + } ] }, "events": { + "AcceptedFeeToken(address,bool)": { + "notice": "To be emitted when an ERC20 token is added or removed as a method to pay fees." + }, + "DisputeCreation(uint256,address)": { + "notice": "To be emitted when a dispute is created." + }, + "NewCurrencyRate(address,uint64,uint8)": { + "notice": "To be emitted when the fee for a particular ERC20 token is updated." + }, + "Ruling(address,uint256,uint256)": { + "notice": "To be raised when a ruling is given." + }, "Upgraded(address)": { "notice": "Emitted when the `implementation` has been successfully upgraded." } }, "kind": "user", - "methods": {}, + "methods": { + "addNewDisputeKit(address)": { + "notice": "Add a new supported dispute kit module to the court." + }, + "appeal(uint256,uint256,bytes)": { + "notice": "Appeals the ruling of a specified dispute." + }, + "appealCost(uint256)": { + "notice": "Gets the cost of appealing a specified dispute." + }, + "appealPeriod(uint256)": { + "notice": "Gets the start and the end of a specified dispute's current appeal period." + }, + "arbitrationCost(bytes)": { + "notice": "Compute the cost of arbitration denominated in the native currency, typically ETH." + }, + "arbitrationCost(bytes,address)": { + "notice": "Compute the cost of arbitration denominated in `_feeToken`." + }, + "changeAcceptedFeeTokens(address,bool)": { + "notice": "Changes the supported fee tokens." + }, + "changeCurrencyRates(address,uint64,uint8)": { + "notice": "Changes the currency rate of a fee token." + }, + "changeInstructor(address)": { + "notice": "Changes the `instructor` storage variable." + }, + "changeJurorProsecutionModule(address)": { + "notice": "Changes the `jurorProsecutionModule` storage variable." + }, + "changeOwner(address)": { + "notice": "Changes the `owner` storage variable." + }, + "changePinakion(address)": { + "notice": "Changes the `pinakion` storage variable." + }, + "changeSortitionModule(address)": { + "notice": "Changes the `_sortitionModule` storage variable. Note that the new module should be initialized for all courts." + }, + "createCourt(uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])": { + "notice": "Creates a court under a specified parent court." + }, + "createDispute(uint256,bytes)": { + "notice": "Create a dispute and pay for the fees in the native currency, typically ETH." + }, + "createDispute(uint256,bytes,address,uint256)": { + "notice": "Create a dispute and pay for the fees in a supported ERC20 token." + }, + "currentRuling(uint256)": { + "notice": "Gets the current ruling of a specified dispute." + }, + "draw(uint256,address)": { + "notice": "Draws one juror for the dispute until the number votes paid for is reached." + }, + "enableDisputeKits(uint96,uint256[],bool)": { + "notice": "Adds/removes court's support for specified dispute kits." + }, + "execute(uint256,uint256,uint256)": { + "notice": "Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts." + }, + "executeOwnerProposal(address,uint256,bytes)": { + "notice": "Allows the owner to call anything on behalf of the contract." + }, + "executeRuling(uint256)": { + "notice": "Executes a specified dispute's ruling." + }, + "getNumberOfRounds(uint256)": { + "notice": "Gets the number of rounds for a specified dispute." + }, + "getNumberOfVotes(uint256)": { + "notice": "Gets the number of votes permitted for the specified dispute in the latest round." + }, + "getPnkAtStakePerJuror(uint256,uint256)": { + "notice": "Gets the PNK at stake per juror for a specified dispute and round." + }, + "getRoundInfo(uint256,uint256)": { + "notice": "Gets the round info for a specified dispute and round." + }, + "getTimesPerPeriod(uint96)": { + "notice": "Gets the timesPerPeriod array for a given court." + }, + "initialize(address,address,address,address,address,bool,uint256[4],uint256[4],address)": { + "notice": "Initializer (constructor equivalent for upgradable contracts)." + }, + "isDisputeKitJumping(uint256)": { + "notice": "Returns true if the dispute kit will be switched to a parent DK." + }, + "isSupported(uint96,uint256)": { + "notice": "Checks if a given dispute kit is supported by a given court." + }, + "passPeriod(uint256)": { + "notice": "Passes the period of a specified dispute." + }, + "proxiableUUID()": { + "notice": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade." + }, + "setStake(uint96,uint256)": { + "notice": "Sets the caller's stake in a court." + }, + "setStakeBySortitionModule(address,uint96,uint256)": { + "notice": "Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors." + }, + "transferBySortitionModule(address,uint256)": { + "notice": "Transfers PNK to the juror by SortitionModule." + }, + "upgradeToAndCall(address,bytes)": { + "notice": "Upgrade mechanism including access control and UUPS-compliance." + }, + "version()": { + "notice": "Returns the version of the implementation." + } + }, + "notice": "Core arbitrator contract for educational purposes.", "version": 1 }, "storageLayout": { "storage": [ { - "astId": 23505, + "astId": 26659, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "governor", + "label": "owner", "offset": 0, "slot": "0", "type": "t_address" }, { - "astId": 23507, + "astId": 26661, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "instructor", "offset": 0, @@ -2204,15 +2406,15 @@ "type": "t_address" }, { - "astId": 23510, + "astId": 26664, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "pinakion", "offset": 0, "slot": "2", - "type": "t_contract(IERC20)1229" + "type": "t_contract(IERC20)3021" }, { - "astId": 23512, + "astId": 26666, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "jurorProsecutionModule", "offset": 0, @@ -2220,44 +2422,44 @@ "type": "t_address" }, { - "astId": 23515, + "astId": 26669, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "sortitionModule", "offset": 0, "slot": "4", - "type": "t_contract(ISortitionModuleUniversity)23364" + "type": "t_contract(ISortitionModuleUniversity)26504" }, { - "astId": 23519, + "astId": 26673, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "courts", "offset": 0, "slot": "5", - "type": "t_array(t_struct(Court)23424_storage)dyn_storage" + "type": "t_array(t_struct(Court)26570_storage)dyn_storage" }, { - "astId": 23523, + "astId": 26677, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "disputeKits", "offset": 0, "slot": "6", - "type": "t_array(t_contract(IDisputeKit)23189)dyn_storage" + "type": "t_array(t_contract(IDisputeKit)26251)dyn_storage" }, { - "astId": 23527, + "astId": 26681, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "disputes", "offset": 0, "slot": "7", - "type": "t_array(t_struct(Dispute)23441_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)26591_storage)dyn_storage" }, { - "astId": 23533, + "astId": 26687, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "currencyRates", "offset": 0, "slot": "8", - "type": "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)23490_storage)" + "type": "t_mapping(t_contract(IERC20)3021,t_struct(CurrencyRate)26647_storage)" } ], "types": { @@ -2272,30 +2474,36 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_contract(IDisputeKit)23189)dyn_storage": { - "base": "t_contract(IDisputeKit)23189", + "t_array(t_contract(IDisputeKit)26251)dyn_storage": { + "base": "t_contract(IDisputeKit)26251", "encoding": "dynamic_array", "label": "contract IDisputeKit[]", "numberOfBytes": "32" }, - "t_array(t_struct(Court)23424_storage)dyn_storage": { - "base": "t_struct(Court)23424_storage", + "t_array(t_struct(Court)26570_storage)dyn_storage": { + "base": "t_struct(Court)26570_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreUniversity.Court[]", "numberOfBytes": "32" }, - "t_array(t_struct(Dispute)23441_storage)dyn_storage": { - "base": "t_struct(Dispute)23441_storage", + "t_array(t_struct(Dispute)26591_storage)dyn_storage": { + "base": "t_struct(Dispute)26591_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreUniversity.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)23466_storage)dyn_storage": { - "base": "t_struct(Round)23466_storage", + "t_array(t_struct(Round)26623_storage)dyn_storage": { + "base": "t_struct(Round)26623_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreUniversity.Round[]", "numberOfBytes": "32" }, + "t_array(t_uint256)10_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[10]", + "numberOfBytes": "320" + }, "t_array(t_uint256)4_storage": { "base": "t_uint256", "encoding": "inplace", @@ -2308,42 +2516,48 @@ "label": "uint256[]", "numberOfBytes": "32" }, + "t_array(t_uint96)dyn_storage": { + "base": "t_uint96", + "encoding": "dynamic_array", + "label": "uint96[]", + "numberOfBytes": "32" + }, "t_bool": { "encoding": "inplace", "label": "bool", "numberOfBytes": "1" }, - "t_contract(IArbitrableV2)22946": { + "t_contract(IArbitrableV2)25953": { "encoding": "inplace", "label": "contract IArbitrableV2", "numberOfBytes": "20" }, - "t_contract(IDisputeKit)23189": { + "t_contract(IDisputeKit)26251": { "encoding": "inplace", "label": "contract IDisputeKit", "numberOfBytes": "20" }, - "t_contract(IERC20)1229": { + "t_contract(IERC20)3021": { "encoding": "inplace", "label": "contract IERC20", "numberOfBytes": "20" }, - "t_contract(ISortitionModuleUniversity)23364": { + "t_contract(ISortitionModuleUniversity)26504": { "encoding": "inplace", "label": "contract ISortitionModuleUniversity", "numberOfBytes": "20" }, - "t_enum(Period)23398": { + "t_enum(Period)26542": { "encoding": "inplace", "label": "enum KlerosCoreUniversity.Period", "numberOfBytes": "1" }, - "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)23490_storage)": { + "t_mapping(t_contract(IERC20)3021,t_struct(CurrencyRate)26647_storage)": { "encoding": "mapping", - "key": "t_contract(IERC20)1229", + "key": "t_contract(IERC20)3021", "label": "mapping(contract IERC20 => struct KlerosCoreUniversity.CurrencyRate)", "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)23490_storage" + "value": "t_struct(CurrencyRate)26647_storage" }, "t_mapping(t_uint256,t_bool)": { "encoding": "mapping", @@ -2352,12 +2566,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_struct(Court)23424_storage": { + "t_struct(Court)26570_storage": { "encoding": "inplace", "label": "struct KlerosCoreUniversity.Court", "members": [ { - "astId": 23400, + "astId": 26544, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "parent", "offset": 0, @@ -2365,7 +2579,7 @@ "type": "t_uint96" }, { - "astId": 23402, + "astId": 26546, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "hiddenVotes", "offset": 12, @@ -2373,7 +2587,7 @@ "type": "t_bool" }, { - "astId": 23405, + "astId": 26549, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "children", "offset": 0, @@ -2381,7 +2595,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 23407, + "astId": 26551, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "minStake", "offset": 0, @@ -2389,7 +2603,7 @@ "type": "t_uint256" }, { - "astId": 23409, + "astId": 26553, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "alpha", "offset": 0, @@ -2397,7 +2611,7 @@ "type": "t_uint256" }, { - "astId": 23411, + "astId": 26555, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "feeForJuror", "offset": 0, @@ -2405,7 +2619,7 @@ "type": "t_uint256" }, { - "astId": 23413, + "astId": 26557, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "jurorsForCourtJump", "offset": 0, @@ -2413,7 +2627,7 @@ "type": "t_uint256" }, { - "astId": 23417, + "astId": 26561, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "timesPerPeriod", "offset": 0, @@ -2421,7 +2635,7 @@ "type": "t_array(t_uint256)4_storage" }, { - "astId": 23421, + "astId": 26565, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "supportedDisputeKits", "offset": 0, @@ -2429,22 +2643,22 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 23423, + "astId": 26569, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "disabled", + "label": "__gap", "offset": 0, "slot": "11", - "type": "t_bool" + "type": "t_array(t_uint256)10_storage" } ], - "numberOfBytes": "384" + "numberOfBytes": "672" }, - "t_struct(CurrencyRate)23490_storage": { + "t_struct(CurrencyRate)26647_storage": { "encoding": "inplace", "label": "struct KlerosCoreUniversity.CurrencyRate", "members": [ { - "astId": 23485, + "astId": 26642, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "feePaymentAccepted", "offset": 0, @@ -2452,7 +2666,7 @@ "type": "t_bool" }, { - "astId": 23487, + "astId": 26644, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "rateInEth", "offset": 1, @@ -2460,7 +2674,7 @@ "type": "t_uint64" }, { - "astId": 23489, + "astId": 26646, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "rateDecimals", "offset": 9, @@ -2470,12 +2684,12 @@ ], "numberOfBytes": "32" }, - "t_struct(Dispute)23441_storage": { + "t_struct(Dispute)26591_storage": { "encoding": "inplace", "label": "struct KlerosCoreUniversity.Dispute", "members": [ { - "astId": 23426, + "astId": 26572, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "courtID", "offset": 0, @@ -2483,23 +2697,23 @@ "type": "t_uint96" }, { - "astId": 23429, + "astId": 26575, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "arbitrated", "offset": 12, "slot": "0", - "type": "t_contract(IArbitrableV2)22946" + "type": "t_contract(IArbitrableV2)25953" }, { - "astId": 23432, + "astId": 26578, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "period", "offset": 0, "slot": "1", - "type": "t_enum(Period)23398" + "type": "t_enum(Period)26542" }, { - "astId": 23434, + "astId": 26580, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "ruled", "offset": 1, @@ -2507,7 +2721,7 @@ "type": "t_bool" }, { - "astId": 23436, + "astId": 26582, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "lastPeriodChange", "offset": 0, @@ -2515,22 +2729,30 @@ "type": "t_uint256" }, { - "astId": 23440, + "astId": 26586, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "rounds", "offset": 0, "slot": "3", - "type": "t_array(t_struct(Round)23466_storage)dyn_storage" + "type": "t_array(t_struct(Round)26623_storage)dyn_storage" + }, + { + "astId": 26590, + "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", + "label": "__gap", + "offset": 0, + "slot": "4", + "type": "t_array(t_uint256)10_storage" } ], - "numberOfBytes": "128" + "numberOfBytes": "448" }, - "t_struct(Round)23466_storage": { + "t_struct(Round)26623_storage": { "encoding": "inplace", "label": "struct KlerosCoreUniversity.Round", "members": [ { - "astId": 23443, + "astId": 26593, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "disputeKitID", "offset": 0, @@ -2538,7 +2760,7 @@ "type": "t_uint256" }, { - "astId": 23445, + "astId": 26595, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "pnkAtStakePerJuror", "offset": 0, @@ -2546,7 +2768,7 @@ "type": "t_uint256" }, { - "astId": 23447, + "astId": 26597, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "totalFeesForJurors", "offset": 0, @@ -2554,7 +2776,7 @@ "type": "t_uint256" }, { - "astId": 23449, + "astId": 26599, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "nbVotes", "offset": 0, @@ -2562,7 +2784,7 @@ "type": "t_uint256" }, { - "astId": 23451, + "astId": 26601, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "repartitions", "offset": 0, @@ -2570,7 +2792,7 @@ "type": "t_uint256" }, { - "astId": 23453, + "astId": 26603, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "pnkPenalties", "offset": 0, @@ -2578,7 +2800,7 @@ "type": "t_uint256" }, { - "astId": 23456, + "astId": 26606, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "drawnJurors", "offset": 0, @@ -2586,39 +2808,55 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 23458, + "astId": 26609, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", - "label": "sumFeeRewardPaid", + "label": "drawnJurorFromCourtIDs", "offset": 0, "slot": "7", + "type": "t_array(t_uint96)dyn_storage" + }, + { + "astId": 26611, + "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", + "label": "sumFeeRewardPaid", + "offset": 0, + "slot": "8", "type": "t_uint256" }, { - "astId": 23460, + "astId": 26613, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "sumPnkRewardPaid", "offset": 0, - "slot": "8", + "slot": "9", "type": "t_uint256" }, { - "astId": 23463, + "astId": 26616, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "feeToken", "offset": 0, - "slot": "9", - "type": "t_contract(IERC20)1229" + "slot": "10", + "type": "t_contract(IERC20)3021" }, { - "astId": 23465, + "astId": 26618, "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", "label": "drawIterations", "offset": 0, - "slot": "10", + "slot": "11", "type": "t_uint256" + }, + { + "astId": 26622, + "contract": "src/arbitration/university/KlerosCoreUniversity.sol:KlerosCoreUniversity", + "label": "__gap", + "offset": 0, + "slot": "12", + "type": "t_array(t_uint256)10_storage" } ], - "numberOfBytes": "352" + "numberOfBytes": "704" }, "t_uint256": { "encoding": "inplace", diff --git a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json index ca2512f0b..a6b30105b 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "abi": [ { "inputs": [ @@ -26,50 +26,50 @@ "type": "receive" } ], - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x5AB37F38778Bc175852fA353056591D91c744ce6", - "transactionIndex": 1, - "gasUsed": "484460", - "logsBloom": "0x00000000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000080000000000000040000000000000000000000000000020000000000000010200800402000000000000008000000000000008000000000000000000800000000000000000000000080000000000000000000000000000000800008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001001000000000000000000000008000000000200000000000000000000", - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8", - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", + "contractAddress": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", + "transactionIndex": 2, + "gasUsed": "453977", + "logsBloom": "0x000000000000000000000000200000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000800000000400000000000000000000000000000200000000000000100008004020000000000000000000000000040000008000000000000008000000000000000000000000800000000000100000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000e4000000001000000000000001000000000000000000000000000800000000000000", + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f", + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", "logs": [ { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5" + "0x00000000000000000000000082f2089442979a6b56c80274d144575980092f91" ], "data": "0x", - "logIndex": 0, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 3, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" }, { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ - "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", + "0x550ff678017abc294b4786a99a046628d5a1eac07be0f1ea7e89543f13576ee6", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 4, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" }, { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -77,36 +77,36 @@ "0x0000000000000000000000000000000000000000000000000000000000000001" ], "data": "0x", - "logIndex": 2, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 5, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" }, { - "transactionIndex": 1, - "blockNumber": 96308609, - "transactionHash": "0x6d19fdb430b5611f9aedf5792b44a297c36bd84d34e66ddaf82844f33eb1748a", - "address": "0x5AB37F38778Bc175852fA353056591D91c744ce6", + "transactionIndex": 2, + "blockNumber": 193533818, + "transactionHash": "0x998456e4bf88144d618ef98fb44d1c7bb857cbbbefe8b7c523399abc23f581c1", + "address": "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0x152fd5195e3f7b8e0ab803f90700d35d20f4452193858d10558fc31c226227c8" + "logIndex": 6, + "blockHash": "0xe5a6d446390c5a4cfe779ab765b5c591e177b2dcfe4263135a1943f55babc82f" } ], - "blockNumber": 96308609, - "cumulativeGasUsed": "484460", + "blockNumber": 193533818, + "cumulativeGasUsed": "582464", "status": 1, "byzantium": true }, "args": [ - "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", - "0xe399d29b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa2250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d6e96b7c993763b5cdda1139c7387b82a7c8b8b5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000004b2c2d048921f694cce3aea35698c6b1f5fcbb79" + "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", + "0xe399d29b000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c5900000000000000000000000034b944d42cacfc8266955d07a80181d2054aa225000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082f2089442979a6b56c80274d144575980092f91000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000009f55804177e7e44e558616cd7d06b865788214ca" ], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "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\":\"KlerosCoreUniversityProxy\"},\"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 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\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\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 */\\ncontract UUPSProxy {\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\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 */\\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 /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\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 /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220025ed3e852b24305c0ac2e202b83cf5fed6ae313e772bad4b0c1340efea75f0764736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"KlerosCoreUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 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 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\":\"0x3160bd320b23c6ec0c21862b455c3044a9b33654ae84a1b6cd76255626c9154b\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122094c812c85dc437a2ab3eda19f621c1ecfc3fbf77e5465f816bde0529d28053a664736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea264697066735822122094c812c85dc437a2ab3eda19f621c1ecfc3fbf77e5465f816bde0529d28053a664736f6c634300081e0033", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json index 1ce05ea30..539868fe6 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json @@ -1,5 +1,5 @@ { - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + "address": "0x9f55804177e7E44E558616cD7d06B865788214cA", "abi": [ { "stateMutability": "payable", @@ -30,11 +30,26 @@ "name": "InvalidImplementation", "type": "error" }, + { + "inputs": [], + "name": "KlerosCoreOnly", + "type": "error" + }, + { + "inputs": [], + "name": "NotEligibleForWithdrawal", + "type": "error" + }, { "inputs": [], "name": "NotInitializing", "type": "error" }, + { + "inputs": [], + "name": "OwnerOnly", + "type": "error" + }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", @@ -64,6 +79,44 @@ "name": "Initialized", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "LeftoverPNK", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "LeftoverPNKWithdrawn", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -122,6 +175,12 @@ "internalType": "uint256", "name": "_amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" } ], "name": "StakeSet", @@ -174,9 +233,9 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" }, { "internalType": "bytes", @@ -205,9 +264,9 @@ { "inputs": [ { - "internalType": "bytes32", + "internalType": "uint96", "name": "", - "type": "bytes32" + "type": "uint96" }, { "internalType": "uint256", @@ -226,11 +285,60 @@ "internalType": "address", "name": "drawnAddress", "type": "address" + }, + { + "internalType": "uint96", + "name": "fromSubcourtID", + "type": "uint96" } ], "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "executeDelayedStakes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "forcedUnstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "forcedUnstakeAllCourts", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -290,15 +398,21 @@ "type": "function" }, { - "inputs": [], - "name": "governor", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "_juror", "type": "address" } ], + "name": "getJurorLeftoverPNK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, @@ -306,7 +420,7 @@ "inputs": [ { "internalType": "address", - "name": "_governor", + "name": "_owner", "type": "address" }, { @@ -382,32 +496,21 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", + "inputs": [], + "name": "passPhase", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -449,9 +552,29 @@ "internalType": "address", "name": "_account", "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_pnkDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_pnkWithdrawal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" } ], - "name": "setJurorInactive", + "name": "setStake", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -470,31 +593,55 @@ }, { "internalType": "uint256", - "name": "_newStake", + "name": "_penalty", "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" } ], - "name": "setStake", + "name": "setStakePenalty", "outputs": [ { "internalType": "uint256", - "name": "pnkDeposit", + "name": "pnkBalance", "type": "uint256" }, { "internalType": "uint256", - "name": "pnkWithdrawal", + "name": "newCourtStake", "type": "uint256" }, { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" + "internalType": "uint256", + "name": "availablePenalty", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_reward", + "type": "uint256" + } + ], + "name": "setStakeReward", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" } ], "stateMutability": "nonpayable", @@ -549,6 +696,76 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "validateStake", + "outputs": [ + { + "internalType": "uint256", + "name": "pnkDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkWithdrawal", + "type": "uint256" + }, + { + "internalType": "enum StakingResult", + "name": "stakingResult", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "withdrawLeftoverPNK", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -566,52 +783,52 @@ "type": "constructor" } ], - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", + "transactionHash": "0x816a335385508eb3b23f6e38ecbdb464110275a0059895f982bfb692c8e7a452", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "transactionIndex": 1, - "gasUsed": "210047", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010800000020000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3", - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", + "contractAddress": "0x9f55804177e7E44E558616cD7d06B865788214cA", + "transactionIndex": 2, + "gasUsed": "180483", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000008000000000000000000000000000000000000000000", + "blockHash": "0xeb89982fc4a65212a277169f078d43cd1578b93b962c37ded52f9ddeb92610af", + "transactionHash": "0x816a335385508eb3b23f6e38ecbdb464110275a0059895f982bfb692c8e7a452", "logs": [ { - "transactionIndex": 1, - "blockNumber": 96308572, - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + "transactionIndex": 2, + "blockNumber": 193533797, + "transactionHash": "0x816a335385508eb3b23f6e38ecbdb464110275a0059895f982bfb692c8e7a452", + "address": "0x9f55804177e7E44E558616cD7d06B865788214cA", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3" + "logIndex": 1, + "blockHash": "0xeb89982fc4a65212a277169f078d43cd1578b93b962c37ded52f9ddeb92610af" } ], - "blockNumber": 96308572, - "cumulativeGasUsed": "210047", + "blockNumber": 193533797, + "cumulativeGasUsed": "214736", "status": 1, "byzantium": true }, "args": [ - "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000005ab37f38778bc175852fa353056591d91c744ce6" + "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", + "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000a34dbbd0e5e1d09bd683455f9dbc393797bc558f" ], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "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\":\"SortitionModuleUniversityProxy\"},\"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 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\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\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 */\\ncontract UUPSProxy {\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\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 */\\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 /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\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 /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"SortitionModuleUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 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 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\":\"0x3160bd320b23c6ec0c21862b455c3044a9b33654ae84a1b6cd76255626c9154b\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220cebc238294db6f217e59b4194d65c951358927be9872c8bda288fff77348423e64736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220cebc238294db6f217e59b4194d65c951358927be9872c8bda288fff77348423e64736f6c634300081e0033", "execute": { "methodName": "initialize", "args": [ "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0x5AB37F38778Bc175852fA353056591D91c744ce6" + "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f" ] }, - "implementation": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", + "implementation": "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json index 21360963b..909027f9a 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", + "address": "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", "abi": [ { "inputs": [], @@ -27,11 +27,26 @@ "name": "InvalidImplementation", "type": "error" }, + { + "inputs": [], + "name": "KlerosCoreOnly", + "type": "error" + }, + { + "inputs": [], + "name": "NotEligibleForWithdrawal", + "type": "error" + }, { "inputs": [], "name": "NotInitializing", "type": "error" }, + { + "inputs": [], + "name": "OwnerOnly", + "type": "error" + }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", @@ -61,6 +76,44 @@ "name": "Initialized", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "LeftoverPNK", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "LeftoverPNKWithdrawn", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -119,6 +172,12 @@ "internalType": "uint256", "name": "_amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amountAllCourts", + "type": "uint256" } ], "name": "StakeSet", @@ -171,9 +230,9 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" }, { "internalType": "bytes", @@ -202,9 +261,9 @@ { "inputs": [ { - "internalType": "bytes32", + "internalType": "uint96", "name": "", - "type": "bytes32" + "type": "uint96" }, { "internalType": "uint256", @@ -223,11 +282,60 @@ "internalType": "address", "name": "drawnAddress", "type": "address" + }, + { + "internalType": "uint96", + "name": "fromSubcourtID", + "type": "uint96" } ], "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "executeDelayedStakes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + } + ], + "name": "forcedUnstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "forcedUnstakeAllCourts", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -287,15 +395,21 @@ "type": "function" }, { - "inputs": [], - "name": "governor", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "_juror", "type": "address" } ], + "name": "getJurorLeftoverPNK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, @@ -303,7 +417,7 @@ "inputs": [ { "internalType": "address", - "name": "_governor", + "name": "_owner", "type": "address" }, { @@ -379,32 +493,21 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { - "internalType": "uint256", - "name": "_randomNumber", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "notifyRandomNumber", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relativeAmount", - "type": "uint256" - } - ], - "name": "penalizeStake", + "inputs": [], + "name": "passPhase", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -446,9 +549,29 @@ "internalType": "address", "name": "_account", "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_pnkDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_pnkWithdrawal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" } ], - "name": "setJurorInactive", + "name": "setStake", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -467,31 +590,55 @@ }, { "internalType": "uint256", - "name": "_newStake", + "name": "_penalty", "type": "uint256" - }, - { - "internalType": "bool", - "name": "_alreadyTransferred", - "type": "bool" } ], - "name": "setStake", + "name": "setStakePenalty", "outputs": [ { "internalType": "uint256", - "name": "pnkDeposit", + "name": "pnkBalance", "type": "uint256" }, { "internalType": "uint256", - "name": "pnkWithdrawal", + "name": "newCourtStake", "type": "uint256" }, { - "internalType": "enum StakingResult", - "name": "stakingResult", - "type": "uint8" + "internalType": "uint256", + "name": "availablePenalty", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_reward", + "type": "uint256" + } + ], + "name": "setStakeReward", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" } ], "stateMutability": "nonpayable", @@ -545,45 +692,114 @@ "outputs": [], "stateMutability": "payable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_courtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_newStake", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "name": "validateStake", + "outputs": [ + { + "internalType": "uint256", + "name": "pnkDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pnkWithdrawal", + "type": "uint256" + }, + { + "internalType": "enum StakingResult", + "name": "stakingResult", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "withdrawLeftoverPNK", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ], - "transactionHash": "0x204b96d9a80952f3d7f84a74ce0fe11b7a03ce93187949d2da7e793d56552c61", + "transactionHash": "0x0ccfa8e496e33cfb8956ab152907c8003a17df581534ed86b8ed60a5935d657a", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", + "contractAddress": "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", "transactionIndex": 1, - "gasUsed": "1471948", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000004000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa593072d9d6d0d0c6ee98e672a112e47e0501bc4d4bca56a6a66060d7427021a", - "transactionHash": "0x204b96d9a80952f3d7f84a74ce0fe11b7a03ce93187949d2da7e793d56552c61", + "gasUsed": "1639716", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000200000000000000000040000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x44cafbfb6a05aee0aaa7a1e875dee979c45404904686c44cd3cd9f981b60e98b", + "transactionHash": "0x0ccfa8e496e33cfb8956ab152907c8003a17df581534ed86b8ed60a5935d657a", "logs": [ { "transactionIndex": 1, - "blockNumber": 96308555, - "transactionHash": "0x204b96d9a80952f3d7f84a74ce0fe11b7a03ce93187949d2da7e793d56552c61", - "address": "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", + "blockNumber": 193533787, + "transactionHash": "0x0ccfa8e496e33cfb8956ab152907c8003a17df581534ed86b8ed60a5935d657a", + "address": "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0xa593072d9d6d0d0c6ee98e672a112e47e0501bc4d4bca56a6a66060d7427021a" + "blockHash": "0x44cafbfb6a05aee0aaa7a1e875dee979c45404904686c44cd3cd9f981b60e98b" } ], - "blockNumber": 96308555, - "cumulativeGasUsed": "1471948", + "blockNumber": 193533787, + "cumulativeGasUsed": "1639716", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"_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\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCoreUniversity\",\"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\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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 KlerosCoreUniversity\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"initialize\",\"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\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"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\":[{\"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\":[{\"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\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"setTransientJuror\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"}],\"devdoc\":{\"details\":\"An adapted version of the SortitionModule contract for educational purposes.\",\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"draw(bytes32,uint256,uint256)\":{\"details\":\"Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.\",\"returns\":{\"drawnAddress\":\"The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended.\"}},\"getJurorBalance(address,uint96)\":{\"details\":\"Gets the stake of a juror in a court. Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in but acceptable for this educational implementation.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"nbCourts\":\"The number of courts the juror has staked in.\",\"stakedInCourt\":\"The amount of tokens staked by the juror in the court.\",\"totalLocked\":\"The total amount of tokens locked by the juror in the court.\",\"totalStaked\":\"The total amount of tokens staked by the juror in the court.\"}},\"getJurorCourtIDs(address)\":{\"details\":\"Gets the court identifiers where a specific `_juror` has staked.\",\"params\":{\"_juror\":\"The address of the juror.\"}},\"initialize(address,address)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\"}},\"notifyRandomNumber(uint256)\":{\"details\":\"Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\",\"params\":{\"_randomNumber\":\"Random number returned by RNG contract.\"}},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setJurorInactive(address)\":{\"details\":\"Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The juror to unstake.\"}},\"setStake(address,uint96,uint256,bool)\":{\"details\":\"Sets the specified juror's stake in a court. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_alreadyTransferred\":\"True if the tokens were already transferred from juror. Only relevant for delayed stakes.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\"},\"returns\":{\"pnkDeposit\":\"The amount of PNK to be deposited.\",\"pnkWithdrawal\":\"The amount of PNK to be withdrawn.\",\"stakingResult\":\"The result of the staking operation.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}}},\"title\":\"SortitionModuleUniversity\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}]},\"events\":{\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/university/SortitionModuleUniversity.sol\":\"SortitionModuleUniversity\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\ninterface IArbitrableV2 {\\n /// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// Must be called by the arbitrator.\\n /// The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0xe841a4fe8ec109ce17dde4457bf1583c8b499109b05887c53a49a3207fc6e80b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n/// - Define the functions for cost display (arbitrationCost).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0xa4dc6b958197adead238de4246cd04e7389c3dc1b9f968acd10985f8fc5b74cf\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@unknownunknown1, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @dev Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// Note: Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(uint256 _coreDisputeID, uint256 _nonce) external returns (address drawnAddress);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return The degree of coherence in basis points.\\n function getDegreeOfCoherence(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256);\\n\\n /// @dev Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @dev Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if all of the jurors have cast their votes for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0xb9590d05f9df08dd0ed027b2eb40c7b1885b7574a121b1b0b7da0920429bb4d5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\ninterface ISortitionModule {\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n event NewPhase(Phase _phase);\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external;\\n\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n function setJurorInactive(address _account) external;\\n\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external;\\n\\n function notifyRandomNumber(uint256 _drawnNumber) external;\\n\\n function draw(bytes32 _court, uint256 _coreDisputeID, uint256 _nonce) external view returns (address);\\n\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n}\\n\",\"keccak256\":\"0x18a4ff126bb51e7b5b0e3fbff7cf0dbbcfff7195ad79307e69cdbc9226e63502\",\"license\":\"MIT\"},\"src/arbitration/university/ISortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface ISortitionModuleUniversity is ISortitionModule {\\n function setTransientJuror(address _juror) external;\\n}\\n\",\"keccak256\":\"0x57fee0787ae90af01c57a7d2850f8e4ade1ca72163a388341cac017bfdbf163a\",\"license\":\"MIT\"},\"src/arbitration/university/KlerosCoreUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"../interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModuleUniversity} from \\\"./ISortitionModuleUniversity.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title KlerosCoreUniversity\\n/// Core arbitrator contract for educational purposes.\\ncontract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n bool disabled; // True if the court is disabled. Unused for now, will be implemented later.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public governor; // The governor of the contract.\\n address public instructor; // The instructor who is allowed to choose the jurors.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModuleUniversity public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint256 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event TokenAndETHShift(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherency,\\n int256 _pnkAmount,\\n int256 _feeAmount,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _pnkAmount,\\n uint256 _feeAmount,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier onlyByInstructor() {\\n if (instructor != msg.sender) revert InstructorOnly();\\n _;\\n }\\n\\n modifier onlyByGovernorOrInstructor() {\\n if (msg.sender != governor && msg.sender != instructor) revert GovernorOrInstructorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _governor The governor's address.\\n /// @param _instructor The address of the instructor.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _governor,\\n address _instructor,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n ISortitionModuleUniversity _sortitionModuleAddress\\n ) external reinitializer(1) {\\n governor = _governor;\\n instructor = _instructor;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n emit CourtCreated(\\n 1,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n /// @dev Allows the governor to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeGovernorProposal(\\n address _destination,\\n uint256 _amount,\\n bytes memory _data\\n ) external onlyByGovernor {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address payable _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Changes the `instructor` storage variable.\\n /// @param _instructor The new value for the `instructor` storage variable.\\n function changeInstructor(address _instructor) external onlyByGovernorOrInstructor {\\n instructor = _instructor;\\n }\\n\\n /// @dev Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByGovernor {\\n pinakion = _pinakion;\\n }\\n\\n /// @dev Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByGovernor {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @dev Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModuleUniversity _sortitionModule) external onlyByGovernor {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @dev Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByGovernor {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @dev Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByGovernor {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n courtID,\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByGovernor {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @dev Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByGovernor {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @dev Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByGovernor {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @dev Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByGovernor {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @dev Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs have already been transferred to the contract.\\n function setStakeBySortitionModule(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, _alreadyTransferred, OnError.Return);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @dev Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @dev Draws one juror for the dispute until the number votes paid for is reached.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _juror The address of the juror to draw.\\n function draw(uint256 _disputeID, address _juror) external onlyByGovernorOrInstructor {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n if (round.drawnJurors.length >= round.nbVotes) revert AllJurorsDrawn();\\n\\n sortitionModule.setTransientJuror(_juror);\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n uint256 iteration = round.drawIterations + 1;\\n address drawnAddress = disputeKit.draw(_disputeID, iteration);\\n if (drawnAddress == address(0)) {\\n revert NoJurorDrawn();\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n round.drawIterations = iteration;\\n }\\n sortitionModule.setTransientJuror(address(0));\\n }\\n\\n /// @dev Appeals the ruling of a specified dispute.\\n /// Note: Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ALPHA_DIVISOR;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ALPHA_DIVISOR - degreeOfCoherence)) / ALPHA_DIVISOR;\\n _params.pnkPenaltiesInRound += penalty;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n sortitionModule.penalizeStake(account, penalty);\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n -int256(penalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (!disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive, unstake them.\\n sortitionModule.setJurorInactive(account);\\n }\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the governor.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(governor, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @dev Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 degreeOfCoherence = disputeKit.getDegreeOfCoherence(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Make sure the degree doesn't exceed 1, though it should be ensured by the dispute kit.\\n if (degreeOfCoherence > ALPHA_DIVISOR) {\\n degreeOfCoherence = ALPHA_DIVISOR;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * degreeOfCoherence) / ALPHA_DIVISOR;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Give back the locked PNKs in case the juror fully unstaked earlier.\\n if (!sortitionModule.isJurorStaked(account)) {\\n pinakion.safeTransfer(account, pnkLocked);\\n }\\n\\n // Transfer the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;\\n round.sumFeeRewardPaid += feeReward;\\n pinakion.safeTransfer(account, pnkReward);\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n emit TokenAndETHShift(\\n account,\\n _params.disputeID,\\n _params.round,\\n degreeOfCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the governor. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(governor, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(governor).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(governor, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @dev Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Compute the cost of arbitration denominated in ETH.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @dev Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @dev Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @dev Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @dev Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @dev Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @dev If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred Whether the PNKs were already transferred to/from the staking contract.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID > courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @dev It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibeInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n }\\n\\n /// @dev Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// Note that if extradata contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error InstructorOnly();\\n error GovernorOrInstructorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error DepthLevelMax();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error ArraysLengthMismatch();\\n error StakingInTooManyCourts();\\n error StakingNotPossibeInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error AllJurorsDrawn();\\n error NoJurorDrawn();\\n}\\n\",\"keccak256\":\"0xd636c2294d15110a20dcf97d67f2989e14233cd1de353032807ad44a8e828e49\",\"license\":\"MIT\"},\"src/arbitration/university/SortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @custom:authors: [@epiqueras, @unknownunknown1, @jaybuidl, @shotaronowhere]\\n * @custom:reviewers: []\\n * @custom:auditors: []\\n * @custom:bounties: []\\n * @custom:deployments: []\\n */\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./KlerosCoreUniversity.sol\\\";\\nimport \\\"./ISortitionModuleUniversity.sol\\\";\\nimport \\\"../interfaces/IDisputeKit.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleUniversity\\n/// @dev An adapted version of the SortitionModule contract for educational purposes.\\ncontract SortitionModuleUniversity is ISortitionModuleUniversity, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct Juror {\\n mapping(uint96 => uint256) stakesByCourtID; // The stakes of the juror in particular courts.\\n uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`.\\n uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. Reflects actual pnk balance.\\n uint256 lockedPnk; // The juror's total amount of tokens locked in disputes. Can reflect actual pnk balance when stakedPnk are fully withdrawn.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n KlerosCoreUniversity public core; // The core arbitrator contract.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n mapping(address account => Juror) public jurors; // The jurors.\\n address private transientJuror; // The juror address used between calls within the same transaction.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(address(governor) == msg.sender, \\\"Access not allowed: Governor only.\\\");\\n _;\\n }\\n\\n modifier onlyByCore() {\\n require(address(core) == msg.sender, \\\"Access not allowed: KlerosCore only.\\\");\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor, initializing the implementation to reduce attack surface.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @dev Initializer (constructor equivalent for upgradable contracts).\\n /// @param _core The KlerosCore.\\n function initialize(address _governor, KlerosCoreUniversity _core) external reinitializer(1) {\\n governor = _governor;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the governor can perform upgrades (`onlyByGovernor`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByGovernor {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function setTransientJuror(address _juror) external override onlyByCore {\\n transientJuror = _juror;\\n }\\n\\n function createTree(bytes32 _key, bytes memory _extraData) external {\\n // NOP\\n }\\n\\n function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors++;\\n }\\n\\n function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors--;\\n }\\n\\n /// @dev Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().\\n /// @param _randomNumber Random number returned by RNG contract.\\n function notifyRandomNumber(uint256 _randomNumber) public override {}\\n\\n /// @dev Sets the specified juror's stake in a court.\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _alreadyTransferred True if the tokens were already transferred from juror. Only relevant for delayed stakes.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) external override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n Juror storage juror = jurors[_account];\\n uint256 currentStake = _stakeOf(_account, _courtID);\\n\\n uint256 nbCourts = juror.courtIDs.length;\\n if (_newStake == 0 && (nbCourts >= MAX_STAKE_PATHS || currentStake == 0)) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (_newStake >= currentStake) {\\n if (!_alreadyTransferred) {\\n pnkDeposit = _increaseStake(juror, _courtID, _newStake, currentStake);\\n }\\n } else {\\n pnkWithdrawal += _decreaseStake(juror, _courtID, _newStake, currentStake);\\n }\\n\\n bool finished = false;\\n uint96 currentCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n juror.stakesByCourtID[currentCourtID] += _newStake;\\n juror.stakesByCourtID[currentCourtID] -= currentStake;\\n if (currentCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currentCourtID, , , , , , ) = core.courts(currentCourtID);\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n function _increaseStake(\\n Juror storage juror,\\n uint96 _courtID,\\n uint256 _newStake,\\n uint256 _currentStake\\n ) internal returns (uint256 transferredAmount) {\\n // Stake increase\\n // When stakedPnk becomes lower than lockedPnk count the locked tokens in when transferring tokens from juror.\\n // (E.g. stakedPnk = 0, lockedPnk = 150) which can happen if the juror unstaked fully while having some tokens locked.\\n uint256 previouslyLocked = (juror.lockedPnk >= juror.stakedPnk) ? juror.lockedPnk - juror.stakedPnk : 0; // underflow guard\\n transferredAmount = (_newStake >= _currentStake + previouslyLocked) // underflow guard\\n ? _newStake - _currentStake - previouslyLocked\\n : 0;\\n if (_currentStake == 0) {\\n juror.courtIDs.push(_courtID);\\n }\\n // stakedPnk can become async with _currentStake (e.g. after penalty).\\n juror.stakedPnk = (juror.stakedPnk >= _currentStake) ? juror.stakedPnk - _currentStake + _newStake : _newStake;\\n }\\n\\n function _decreaseStake(\\n Juror storage juror,\\n uint96 _courtID,\\n uint256 _newStake,\\n uint256 _currentStake\\n ) internal returns (uint256 transferredAmount) {\\n // Stakes can be partially delayed only when stake is increased.\\n // Stake decrease: make sure locked tokens always stay in the contract. They can only be released during Execution.\\n if (juror.stakedPnk >= _currentStake - _newStake + juror.lockedPnk) {\\n // We have enough pnk staked to afford withdrawal while keeping locked tokens.\\n transferredAmount = _currentStake - _newStake;\\n } else if (juror.stakedPnk >= juror.lockedPnk) {\\n // Can't afford withdrawing the current stake fully. Take whatever is available while keeping locked tokens.\\n transferredAmount = juror.stakedPnk - juror.lockedPnk;\\n }\\n if (_newStake == 0) {\\n for (uint256 i = juror.courtIDs.length; i > 0; i--) {\\n if (juror.courtIDs[i - 1] == _courtID) {\\n juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1];\\n juror.courtIDs.pop();\\n break;\\n }\\n }\\n }\\n // stakedPnk can become async with _currentStake (e.g. after penalty).\\n juror.stakedPnk = (juror.stakedPnk >= _currentStake) ? juror.stakedPnk - _currentStake + _newStake : _newStake;\\n }\\n\\n function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk += _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, false);\\n }\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk -= _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, true);\\n }\\n\\n function penalizeStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n Juror storage juror = jurors[_account];\\n if (juror.stakedPnk >= _relativeAmount) {\\n juror.stakedPnk -= _relativeAmount;\\n } else {\\n juror.stakedPnk = 0; // stakedPnk might become lower after manual unstaking, but lockedPnk will always cover the difference.\\n }\\n }\\n\\n /// @dev Unstakes the inactive juror from all courts.\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n /// @param _account The juror to unstake.\\n function setJurorInactive(address _account) external override onlyByCore {\\n uint96[] memory courtIDs = getJurorCourtIDs(_account);\\n for (uint256 j = courtIDs.length; j > 0; j--) {\\n core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0, false);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Draw an ID from a tree using a number.\\n /// Note that this function reverts if the sum of all values in the tree is 0.\\n /// @return drawnAddress The drawn address.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n function draw(bytes32, uint256, uint256) public view override returns (address drawnAddress) {\\n drawnAddress = transientJuror;\\n }\\n\\n /// @dev Gets the stake of a juror in a court.\\n /// Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in\\n /// but acceptable for this educational implementation.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return totalStaked The total amount of tokens staked by the juror in the court.\\n /// @return totalLocked The total amount of tokens locked by the juror in the court.\\n /// @return stakedInCourt The amount of tokens staked by the juror in the court.\\n /// @return nbCourts The number of courts the juror has staked in.\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n )\\n external\\n view\\n override\\n returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts)\\n {\\n Juror storage juror = jurors[_juror];\\n totalStaked = juror.stakedPnk;\\n totalLocked = juror.lockedPnk;\\n nbCourts = juror.courtIDs.length;\\n for (uint256 i = 0; i < nbCourts; i++) {\\n if (juror.courtIDs[i] == _courtID) {\\n stakedInCourt = juror.stakesByCourtID[_courtID];\\n break;\\n }\\n }\\n }\\n\\n /// @dev Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) {\\n return jurors[_juror].courtIDs;\\n }\\n\\n function isJurorStaked(address _juror) external view override returns (bool) {\\n return jurors[_juror].stakedPnk > 0;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Gets the stake of a juror in a court.\\n /// Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in\\n /// but acceptable for this educational implementation.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return stakedInCourt The amount of tokens staked by the juror in the court.\\n function _stakeOf(address _juror, uint96 _courtID) internal view returns (uint256 stakedInCourt) {\\n Juror storage juror = jurors[_juror];\\n for (uint256 i = 0; i < juror.courtIDs.length; i++) {\\n if (juror.courtIDs[i] == _courtID) {\\n stakedInCourt = juror.stakesByCourtID[_courtID];\\n break;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x505563930b74c834195c7ae32792ee2b15e6478d404a9ff612133ad23080026b\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked\\n}\\n\",\"keccak256\":\"0x486016fb74cc91439c2ec918e97a79190ab4eed223987d516986fff8eaeecfbf\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x3e39adb9cdd9f86b0defc8f6e1223533d86f82c804e186193f729c32c10161b1\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity 0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x560ea64115636ecd6b3596248817125551c038ce1648019fde3cbe02d9759a30\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\n/**\\n * @title UUPS Proxiable\\n * @author Simon Malatrait \\n * @dev This contract implements an upgradeability mechanism designed for UUPS proxies.\\n * The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n *\\n * IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n * This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSProxiable` with a custom implementation of upgrades.\\n *\\n * The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\n */\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /**\\n * Emitted when the `implementation` has been successfully upgraded.\\n * @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n */\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /**\\n * @dev The call is from an unauthorized context.\\n */\\n error UUPSUnauthorizedCallContext();\\n\\n /**\\n * @dev The storage `slot` is unsupported as a UUID.\\n */\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Storage variable of the proxiable contract address.\\n * It is used to check whether or not the current call is from the proxy.\\n */\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n * @dev Called by {upgradeToAndCall}.\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Upgrade mechanism including access control and UUPS-compliance.\\n * @param newImplementation Address of the new implementation contract.\\n * @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n *\\n * @dev Reverts if the execution is not performed via delegatecall or the execution\\n * context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n /* Check that the execution is being performed through a delegatecall call and that the execution context is\\n a proxy contract with an implementation (as defined in ERC1967) pointing to self. */\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the if statement.\\n */\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\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\",\"keccak256\":\"0x5956855046cdda7aa45f44e379ef45323af7266c44c817d1266d8b32d52b0e22\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161183f6100fc60003960008181610637015281816106600152610858015261183f6000f3fe60806040526004361061012a5760003560e01c80635d2d7846116100ab578063d09f392d1161006f578063d09f392d1461036c578063d1c1df481461038c578063dca5f6b0146103cc578063f1a5310414610418578063f216de4c14610438578063f2f4eb261461045857600080fd5b80635d2d7846146102925780636624192f146102b2578063965af6c7146102fd578063a5861b901461031d578063b5d69e991461034c57600080fd5b8063485cc955116100f2578063485cc955146101ef5780634c70a0d61461020f5780634f1ef2861461023d57806352d1902d14610250578063543f8a361461026557600080fd5b8063034327441461012f5780630c340a241461015857806321e1625e1461019057806321ea9b3f146101b2578063477a655c146101d0575b600080fd5b34801561013b57600080fd5b5061014560025481565b6040519081526020015b60405180910390f35b34801561016457600080fd5b50600054610178906001600160a01b031681565b6040516001600160a01b03909116815260200161014f565b34801561019c57600080fd5b506101b06101ab36600461130b565b610478565b005b3480156101be57600080fd5b506101b06101cd366004611337565b50565b3480156101dc57600080fd5b506101b06101eb3660046113f3565b5050565b3480156101fb57600080fd5b506101b061020a36600461143a565b610524565b34801561021b57600080fd5b5061017861022a366004611473565b50506004546001600160a01b0316919050565b6101b061024b36600461149f565b610623565b34801561025c57600080fd5b5061014561084b565b34801561027157600080fd5b506102856102803660046114d9565b6108a9565b60405161014f91906114fd565b34801561029e57600080fd5b506101b06102ad36600461154a565b61094a565b3480156102be57600080fd5b506102ed6102cd3660046114d9565b6001600160a01b0316600090815260036020526040902060020154151590565b604051901515815260200161014f565b34801561030957600080fd5b506101b061031836600461130b565b61098d565b34801561032957600080fd5b5061033d61033836600461158f565b610a28565b60405161014f939291906115e2565b34801561035857600080fd5b506101b06103673660046114d9565b610c4f565b34801561037857600080fd5b506101b061038736600461154a565b610d55565b34801561039857600080fd5b506103ac6103a736600461161c565b610d8f565b60408051948552602085019390935291830152606082015260800161014f565b3480156103d857600080fd5b506104036103e73660046114d9565b6003602081905260009182526040909120600281015491015482565b6040805192835260208301919091520161014f565b34801561042457600080fd5b506101b06104333660046114d9565b610e45565b34801561044457600080fd5b506101b061045336600461130b565b610e91565b34801561046457600080fd5b50600154610178906001600160a01b031681565b6001546001600160a01b031633146104ab5760405162461bcd60e51b81526004016104a29061164a565b60405180910390fd5b6001600160a01b038216600090815260036020819052604082200180548392906104d69084906116a4565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061056e5750805467ffffffffffffffff808416911610155b1561058b5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b61062c82610f09565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806106aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661069e6000805160206117ea8339815191525490565b6001600160a01b031614155b156106c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610722575060408051601f3d908101601f1916820190925261071f918101906116bd565b60015b61074a57604051630c76093760e01b81526001600160a01b03831660048201526024016104a2565b6000805160206117ea833981519152811461077b57604051632a87526960e21b8152600481018290526024016104a2565b6000805160206117ea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610846576000836001600160a01b0316836040516107e291906116d6565b600060405180830381855af49150503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b5050905080610844576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108965760405163703e46dd60e11b815260040160405180910390fd5b506000805160206117ea83398151915290565b6001600160a01b03811660009081526003602090815260409182902060010180548351818402810184019094528084526060939283018282801561093e57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116108fb5790505b50505050509050919050565b6001546001600160a01b031633146109745760405162461bcd60e51b81526004016104a29061164a565b6002805490600061098483611705565b91905055505050565b6001546001600160a01b031633146109b75760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020819052604082200180548392906109e290849061171c565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610518565b600154600090819081906001600160a01b03163314610a595760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038716600090815260036020526040812090610a7c8989610f6e565b600183015490915087158015610a9b5750600481101580610a9b575081155b15610ab3576000806003955095509550505050610c45565b818810610ad35786610ace57610acb838a8a8561100f565b95505b610aec565b610adf838a8a856110f3565b610ae990866116a4565b94505b6000895b81610bee576001600160601b038116600090815260208690526040812080548c9290610b1d9084906116a4565b90915550506001600160601b03811660009081526020869052604081208054869290610b4a90849061171c565b90915550506000196001600160601b03821601610b6a5760019150610af0565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf919061172f565b50949550610af0945050505050565b604080516001600160601b038d168152602081018c90526001600160a01b038e16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a25060009450505050505b9450945094915050565b6001546001600160a01b03163314610c795760405162461bcd60e51b81526004016104a29061164a565b6000610c84826108a9565b80519091505b801561084657600180546001600160a01b03169063fbb519e79085908590610cb2908661171c565b81518110610cc257610cc26117a4565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526001600160601b031660248201526000604482018190526064820152608401600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050508080610d4d90611705565b915050610c8a565b6001546001600160a01b03163314610d7f5760405162461bcd60e51b81526004016104a29061164a565b60028054906000610984836117ba565b6001600160a01b038216600090815260036020819052604082206002810154918101546001820154929390929091825b82811015610e3a57866001600160601b0316826001018281548110610de657610de66117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610e32576001600160601b0387166000908152602083905260409020549350610e3a565b600101610dbf565b505092959194509250565b6001546001600160a01b03163314610e6f5760405162461bcd60e51b81526004016104a29061164a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610ebb5760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020526040902060028101548211610efd5781816002016000828254610ef2919061171c565b909155506108469050565b60006002820155505050565b6000546001600160a01b031633146101cd5760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b60648201526084016104a2565b6001600160a01b0382166000908152600360205260408120815b600182015481101561100757836001600160601b0316826001018281548110610fb357610fb36117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610fff576001600160601b0384166000908152602083905260409020549250611007565b600101610f88565b505092915050565b60008085600201548660030154101561102957600061103d565b8560020154866003015461103d919061171c565b905061104981846116a4565b84101561105757600061106c565b80611062848661171c565b61106c919061171c565b9150826000036110b557600186810180548083018255600091825260209091206002820401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866002015410156110c757836110e2565b838387600201546110d8919061171c565b6110e291906116a4565b866002018190555050949350505050565b6003840154600090611105848461171c565b61110f91906116a4565b85600201541061112a57611123838361171c565b9050611150565b8460030154856002015410611150578460030154856002015461114d919061171c565b90505b826000036112b95760018501545b80156112b757846001600160601b03168660010160018361117f919061171c565b8154811061118f5761118f6117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036112a5576001808701805490916111cd9161171c565b815481106111dd576111dd6117a4565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087810190611213908461171c565b81548110611223576112236117a4565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508560010180548061126f5761126f6117d3565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556112b7565b806112af81611705565b91505061115e565b505b81856002015410156112cb57826112e6565b828286600201546112dc919061171c565b6112e691906116a4565b8560020181905550949350505050565b6001600160a01b03811681146101cd57600080fd5b6000806040838503121561131e57600080fd5b8235611329816112f6565b946020939093013593505050565b60006020828403121561134957600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261137757600080fd5b813567ffffffffffffffff8082111561139257611392611350565b604051601f8301601f19908116603f011681019082821181831017156113ba576113ba611350565b816040528381528660208588010111156113d357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561140657600080fd5b82359150602083013567ffffffffffffffff81111561142457600080fd5b61143085828601611366565b9150509250929050565b6000806040838503121561144d57600080fd5b8235611458816112f6565b91506020830135611468816112f6565b809150509250929050565b60008060006060848603121561148857600080fd5b505081359360208301359350604090920135919050565b600080604083850312156114b257600080fd5b82356114bd816112f6565b9150602083013567ffffffffffffffff81111561142457600080fd5b6000602082840312156114eb57600080fd5b81356114f6816112f6565b9392505050565b6020808252825182820181905260009190848201906040850190845b8181101561153e5783516001600160601b031683529284019291840191600101611519565b50909695505050505050565b6000806040838503121561155d57600080fd5b50508035926020909101359150565b6001600160601b03811681146101cd57600080fd5b80151581146101cd57600080fd5b600080600080608085870312156115a557600080fd5b84356115b0816112f6565b935060208501356115c08161156c565b92506040850135915060608501356115d781611581565b939692955090935050565b83815260208101839052606081016008831061160e57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6000806040838503121561162f57600080fd5b823561163a816112f6565b915060208301356114688161156c565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156116b7576116b761168e565b92915050565b6000602082840312156116cf57600080fd5b5051919050565b6000825160005b818110156116f757602081860181015185830152016116dd565b506000920191825250919050565b6000816117145761171461168e565b506000190190565b818103818111156116b7576116b761168e565b600080600080600080600060e0888a03121561174a57600080fd5b87516117558161156c565b602089015190975061176681611581565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161179481611581565b8091505092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b6000600182016117cc576117cc61168e565b5060010190565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200166151e57cedd4332854be3f1b542627de717718d9832e670b79904c4b162d864736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061012a5760003560e01c80635d2d7846116100ab578063d09f392d1161006f578063d09f392d1461036c578063d1c1df481461038c578063dca5f6b0146103cc578063f1a5310414610418578063f216de4c14610438578063f2f4eb261461045857600080fd5b80635d2d7846146102925780636624192f146102b2578063965af6c7146102fd578063a5861b901461031d578063b5d69e991461034c57600080fd5b8063485cc955116100f2578063485cc955146101ef5780634c70a0d61461020f5780634f1ef2861461023d57806352d1902d14610250578063543f8a361461026557600080fd5b8063034327441461012f5780630c340a241461015857806321e1625e1461019057806321ea9b3f146101b2578063477a655c146101d0575b600080fd5b34801561013b57600080fd5b5061014560025481565b6040519081526020015b60405180910390f35b34801561016457600080fd5b50600054610178906001600160a01b031681565b6040516001600160a01b03909116815260200161014f565b34801561019c57600080fd5b506101b06101ab36600461130b565b610478565b005b3480156101be57600080fd5b506101b06101cd366004611337565b50565b3480156101dc57600080fd5b506101b06101eb3660046113f3565b5050565b3480156101fb57600080fd5b506101b061020a36600461143a565b610524565b34801561021b57600080fd5b5061017861022a366004611473565b50506004546001600160a01b0316919050565b6101b061024b36600461149f565b610623565b34801561025c57600080fd5b5061014561084b565b34801561027157600080fd5b506102856102803660046114d9565b6108a9565b60405161014f91906114fd565b34801561029e57600080fd5b506101b06102ad36600461154a565b61094a565b3480156102be57600080fd5b506102ed6102cd3660046114d9565b6001600160a01b0316600090815260036020526040902060020154151590565b604051901515815260200161014f565b34801561030957600080fd5b506101b061031836600461130b565b61098d565b34801561032957600080fd5b5061033d61033836600461158f565b610a28565b60405161014f939291906115e2565b34801561035857600080fd5b506101b06103673660046114d9565b610c4f565b34801561037857600080fd5b506101b061038736600461154a565b610d55565b34801561039857600080fd5b506103ac6103a736600461161c565b610d8f565b60408051948552602085019390935291830152606082015260800161014f565b3480156103d857600080fd5b506104036103e73660046114d9565b6003602081905260009182526040909120600281015491015482565b6040805192835260208301919091520161014f565b34801561042457600080fd5b506101b06104333660046114d9565b610e45565b34801561044457600080fd5b506101b061045336600461130b565b610e91565b34801561046457600080fd5b50600154610178906001600160a01b031681565b6001546001600160a01b031633146104ab5760405162461bcd60e51b81526004016104a29061164a565b60405180910390fd5b6001600160a01b038216600090815260036020819052604082200180548392906104d69084906116a4565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff168061056e5750805467ffffffffffffffff808416911610155b1561058b5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b61062c82610f09565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806106aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661069e6000805160206117ea8339815191525490565b6001600160a01b031614155b156106c85760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610722575060408051601f3d908101601f1916820190925261071f918101906116bd565b60015b61074a57604051630c76093760e01b81526001600160a01b03831660048201526024016104a2565b6000805160206117ea833981519152811461077b57604051632a87526960e21b8152600481018290526024016104a2565b6000805160206117ea8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115610846576000836001600160a01b0316836040516107e291906116d6565b600060405180830381855af49150503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b5050905080610844576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108965760405163703e46dd60e11b815260040160405180910390fd5b506000805160206117ea83398151915290565b6001600160a01b03811660009081526003602090815260409182902060010180548351818402810184019094528084526060939283018282801561093e57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116108fb5790505b50505050509050919050565b6001546001600160a01b031633146109745760405162461bcd60e51b81526004016104a29061164a565b6002805490600061098483611705565b91905055505050565b6001546001600160a01b031633146109b75760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020819052604082200180548392906109e290849061171c565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610518565b600154600090819081906001600160a01b03163314610a595760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038716600090815260036020526040812090610a7c8989610f6e565b600183015490915087158015610a9b5750600481101580610a9b575081155b15610ab3576000806003955095509550505050610c45565b818810610ad35786610ace57610acb838a8a8561100f565b95505b610aec565b610adf838a8a856110f3565b610ae990866116a4565b94505b6000895b81610bee576001600160601b038116600090815260208690526040812080548c9290610b1d9084906116a4565b90915550506001600160601b03811660009081526020869052604081208054869290610b4a90849061171c565b90915550506000196001600160601b03821601610b6a5760019150610af0565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf919061172f565b50949550610af0945050505050565b604080516001600160601b038d168152602081018c90526001600160a01b038e16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a25060009450505050505b9450945094915050565b6001546001600160a01b03163314610c795760405162461bcd60e51b81526004016104a29061164a565b6000610c84826108a9565b80519091505b801561084657600180546001600160a01b03169063fbb519e79085908590610cb2908661171c565b81518110610cc257610cc26117a4565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526001600160601b031660248201526000604482018190526064820152608401600060405180830381600087803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b505050508080610d4d90611705565b915050610c8a565b6001546001600160a01b03163314610d7f5760405162461bcd60e51b81526004016104a29061164a565b60028054906000610984836117ba565b6001600160a01b038216600090815260036020819052604082206002810154918101546001820154929390929091825b82811015610e3a57866001600160601b0316826001018281548110610de657610de66117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610e32576001600160601b0387166000908152602083905260409020549350610e3a565b600101610dbf565b505092959194509250565b6001546001600160a01b03163314610e6f5760405162461bcd60e51b81526004016104a29061164a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610ebb5760405162461bcd60e51b81526004016104a29061164a565b6001600160a01b038216600090815260036020526040902060028101548211610efd5781816002016000828254610ef2919061171c565b909155506108469050565b60006002820155505050565b6000546001600160a01b031633146101cd5760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b60648201526084016104a2565b6001600160a01b0382166000908152600360205260408120815b600182015481101561100757836001600160601b0316826001018281548110610fb357610fb36117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b031603610fff576001600160601b0384166000908152602083905260409020549250611007565b600101610f88565b505092915050565b60008085600201548660030154101561102957600061103d565b8560020154866003015461103d919061171c565b905061104981846116a4565b84101561105757600061106c565b80611062848661171c565b61106c919061171c565b9150826000036110b557600186810180548083018255600091825260209091206002820401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866002015410156110c757836110e2565b838387600201546110d8919061171c565b6110e291906116a4565b866002018190555050949350505050565b6003840154600090611105848461171c565b61110f91906116a4565b85600201541061112a57611123838361171c565b9050611150565b8460030154856002015410611150578460030154856002015461114d919061171c565b90505b826000036112b95760018501545b80156112b757846001600160601b03168660010160018361117f919061171c565b8154811061118f5761118f6117a4565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036112a5576001808701805490916111cd9161171c565b815481106111dd576111dd6117a4565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087810190611213908461171c565b81548110611223576112236117a4565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508560010180548061126f5761126f6117d3565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556112b7565b806112af81611705565b91505061115e565b505b81856002015410156112cb57826112e6565b828286600201546112dc919061171c565b6112e691906116a4565b8560020181905550949350505050565b6001600160a01b03811681146101cd57600080fd5b6000806040838503121561131e57600080fd5b8235611329816112f6565b946020939093013593505050565b60006020828403121561134957600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261137757600080fd5b813567ffffffffffffffff8082111561139257611392611350565b604051601f8301601f19908116603f011681019082821181831017156113ba576113ba611350565b816040528381528660208588010111156113d357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561140657600080fd5b82359150602083013567ffffffffffffffff81111561142457600080fd5b61143085828601611366565b9150509250929050565b6000806040838503121561144d57600080fd5b8235611458816112f6565b91506020830135611468816112f6565b809150509250929050565b60008060006060848603121561148857600080fd5b505081359360208301359350604090920135919050565b600080604083850312156114b257600080fd5b82356114bd816112f6565b9150602083013567ffffffffffffffff81111561142457600080fd5b6000602082840312156114eb57600080fd5b81356114f6816112f6565b9392505050565b6020808252825182820181905260009190848201906040850190845b8181101561153e5783516001600160601b031683529284019291840191600101611519565b50909695505050505050565b6000806040838503121561155d57600080fd5b50508035926020909101359150565b6001600160601b03811681146101cd57600080fd5b80151581146101cd57600080fd5b600080600080608085870312156115a557600080fd5b84356115b0816112f6565b935060208501356115c08161156c565b92506040850135915060608501356115d781611581565b939692955090935050565b83815260208101839052606081016008831061160e57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6000806040838503121561162f57600080fd5b823561163a816112f6565b915060208301356114688161156c565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156116b7576116b761168e565b92915050565b6000602082840312156116cf57600080fd5b5051919050565b6000825160005b818110156116f757602081860181015185830152016116dd565b506000920191825250919050565b6000816117145761171461168e565b506000190190565b818103818111156116b7576116b761168e565b600080600080600080600060e0888a03121561174a57600080fd5b87516117558161156c565b602089015190975061176681611581565b8096505060408801519450606088015193506080880151925060a0880151915060c088015161179481611581565b8091505092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b6000600182016117cc576117cc61168e565b5060010190565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200166151e57cedd4332854be3f1b542627de717718d9832e670b79904c4b162d864736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedDelegateCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KlerosCoreOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEligibleForWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerOnly\",\"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\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNK\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"LeftoverPNKWithdrawn\",\"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\":\"_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\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCoreUniversity\",\"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\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"fromSubcourtID\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"forcedUnstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"forcedUnstakeAllCourts\",\"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\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorLeftoverPNK\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCoreUniversity\",\"name\":\"_core\",\"type\":\"address\"}],\"name\":\"initialize\",\"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\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pnkWithdrawal\",\"type\":\"uint256\"},{\"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\":\"_penalty\",\"type\":\"uint256\"}],\"name\":\"setStakePenalty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newCourtStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"availablePenalty\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_reward\",\"type\":\"uint256\"}],\"name\":\"setStakeReward\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"setTransientJuror\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"validateStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"withdrawLeftoverPNK\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"LeftoverPNK(address,uint256)\":{\"params\":{\"_account\":\"The account of the juror.\",\"_amount\":\"The amount of PNK available.\"}},\"LeftoverPNKWithdrawn(address,uint256)\":{\"params\":{\"_account\":\"The account of the juror withdrawing PNK.\",\"_amount\":\"The amount of PNK withdrawn.\"}},\"NewPhase(uint8)\":{\"params\":{\"_phase\":\"The new phase.\"}},\"StakeLocked(address,uint256,bool)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_relativeAmount\":\"The amount of tokens locked.\",\"_unlock\":\"Whether the stake is locked or unlocked.\"}},\"StakeSet(address,uint256,uint256,uint256)\":{\"params\":{\"_address\":\"The address of the juror.\",\"_amount\":\"The amount of tokens staked in the court.\",\"_amountAllCourts\":\"The amount of tokens staked in all courts.\",\"_courtID\":\"The ID of the court.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"createDisputeHook(uint256,uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_roundID\":\"The ID of the round.\"}},\"createTree(uint96,bytes)\":{\"params\":{\"_courtID\":\"The ID of the court.\",\"_extraData\":\"Extra data that contains the number of children each node in the tree should have.\"}},\"draw(uint96,uint256,uint256)\":{\"details\":\"that this function reverts if the sum of all values in the tree is 0. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended.\",\"params\":{\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\",\"_courtID\":\"The ID of the court.\",\"_nonce\":\"Nonce to hash with random number.\"},\"returns\":{\"drawnAddress\":\"The drawn address.\"}},\"executeDelayedStakes(uint256)\":{\"params\":{\"_iterations\":\"The number of delayed stakes to execute.\"}},\"forcedUnstake(address,uint96)\":{\"details\":\"`O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The juror to unstake.\",\"_courtID\":\"The ID of the court.\"}},\"forcedUnstakeAllCourts(address)\":{\"details\":\"`O(n * (p * log_k(j)) )` where `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The juror to unstake.\"}},\"getJurorBalance(address,uint96)\":{\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"nbCourts\":\"The number of courts the juror has directly staked in.\",\"stakedInCourt\":\"The amount of tokens staked in the specified court including locked tokens and penalty deductions.\",\"totalLocked\":\"The total amount of tokens locked in disputes.\",\"totalStaked\":\"The total amount of tokens staked including locked tokens and penalty deductions. Equivalent to the effective stake in the General court.\"}},\"getJurorCourtIDs(address)\":{\"params\":{\"_juror\":\"The address of the juror.\"}},\"getJurorLeftoverPNK(address)\":{\"params\":{\"_juror\":\"The address of the juror.\"},\"returns\":{\"_0\":\"Whether the juror has leftover PNK.\"}},\"initialize(address,address)\":{\"params\":{\"_core\":\"The KlerosCore.\"}},\"isJurorStaked(address)\":{\"params\":{\"_juror\":\"The address of the juror.\"},\"returns\":{\"_0\":\"Whether the juror is staked or not.\"}},\"lockStake(address,uint256)\":{\"params\":{\"_account\":\"The address of the juror.\",\"_relativeAmount\":\"The amount to lock.\"}},\"postDrawHook(uint256,uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_roundID\":\"The ID of the round.\"}},\"proxiableUUID()\":{\"details\":\"IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement.\"},\"setStake(address,uint96,uint256,uint256,uint256)\":{\"details\":\"`O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\",\"_pnkDeposit\":\"The amount of PNK to be deposited.\",\"_pnkWithdrawal\":\"The amount of PNK to be withdrawn.\"}},\"setStakePenalty(address,uint96,uint256)\":{\"details\":\"`O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_penalty\":\"The amount of PNK to be deducted.\"},\"returns\":{\"availablePenalty\":\"The amount of PNK that was actually deducted.\",\"newCourtStake\":\"The updated stake of the juror in the court.\",\"pnkBalance\":\"The updated total PNK balance of the juror, including the penalty.\"}},\"setStakeReward(address,uint96,uint256)\":{\"details\":\"`O(n + p * log_k(j))` where `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_reward\":\"The amount of PNK to be deposited as a reward.\"},\"returns\":{\"success\":\"True if the reward was added successfully.\"}},\"unlockStake(address,uint256)\":{\"params\":{\"_account\":\"The address of the juror.\",\"_relativeAmount\":\"The amount to unlock.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.\",\"params\":{\"data\":\"Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\",\"newImplementation\":\"Address of the new implementation contract.\"}},\"validateStake(address,uint96,uint256,bool)\":{\"details\":\"No state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\",\"params\":{\"_account\":\"The address of the juror.\",\"_courtID\":\"The ID of the court.\",\"_newStake\":\"The new stake.\",\"_noDelay\":\"True if the stake change should not be delayed.\"},\"returns\":{\"pnkDeposit\":\"The amount of PNK to be deposited.\",\"pnkWithdrawal\":\"The amount of PNK to be withdrawn.\",\"stakingResult\":\"The result of the staking operation.\"}},\"withdrawLeftoverPNK(address)\":{\"details\":\"that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\",\"params\":{\"_account\":\"The juror whose PNK to withdraw.\"}}},\"stateVariables\":{\"version\":{\"return\":\"Version string.\",\"returns\":{\"_0\":\"Version string.\"}}},\"title\":\"SortitionModuleUniversity\",\"version\":1},\"userdoc\":{\"errors\":{\"FailedDelegateCall()\":[{\"notice\":\"Failed Delegated call\"}],\"InvalidImplementation(address)\":[{\"notice\":\"The `implementation` is not UUPS-compliant\"}],\"UUPSUnauthorizedCallContext()\":[{\"notice\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"notice\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"LeftoverPNK(address,uint256)\":{\"notice\":\"Emitted when leftover PNK is available.\"},\"LeftoverPNKWithdrawn(address,uint256)\":{\"notice\":\"Emitted when leftover PNK is withdrawn.\"},\"NewPhase(uint8)\":{\"notice\":\"Emitted when the phase is changed.\"},\"StakeLocked(address,uint256,bool)\":{\"notice\":\"Emitted when a juror's stake is locked.\"},\"StakeSet(address,uint256,uint256,uint256)\":{\"notice\":\"Emitted when a juror stakes in a court.\"},\"Upgraded(address)\":{\"notice\":\"Emitted when the `implementation` has been successfully upgraded.\"}},\"kind\":\"user\",\"methods\":{\"createDisputeHook(uint256,uint256)\":{\"notice\":\"Triggers the state changes after dispute creation.\"},\"createTree(uint96,bytes)\":{\"notice\":\"Create a sortition sum tree at the specified key.\"},\"draw(uint96,uint256,uint256)\":{\"notice\":\"Draw an ID from a tree using a number.\"},\"executeDelayedStakes(uint256)\":{\"notice\":\"Executes the next delayed stakes.\"},\"forcedUnstake(address,uint96)\":{\"notice\":\"Unstakes the inactive juror from a specific court.\"},\"forcedUnstakeAllCourts(address)\":{\"notice\":\"Unstakes the inactive juror from all courts.\"},\"getJurorBalance(address,uint96)\":{\"notice\":\"Gets the balance of a juror in a court.\"},\"getJurorCourtIDs(address)\":{\"notice\":\"Gets the court identifiers where a specific `_juror` has staked.\"},\"getJurorLeftoverPNK(address)\":{\"notice\":\"Checks if the juror has any leftover PNK in the contract.\"},\"initialize(address,address)\":{\"notice\":\"Initializer (constructor equivalent for upgradable contracts).\"},\"isJurorStaked(address)\":{\"notice\":\"Checks if the juror is staked in any court.\"},\"lockStake(address,uint256)\":{\"notice\":\"Locks the tokens of the drawn juror.\"},\"passPhase()\":{\"notice\":\"Passes the phase.\"},\"postDrawHook(uint256,uint256)\":{\"notice\":\"Triggers the state changes after drawing.\"},\"proxiableUUID()\":{\"notice\":\"Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade.\"},\"setStake(address,uint96,uint256,uint256,uint256)\":{\"notice\":\"Update the state of the stakes, called by KC at the end of setStake flow.\"},\"setStakePenalty(address,uint96,uint256)\":{\"notice\":\"Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\"},\"setStakeReward(address,uint96,uint256)\":{\"notice\":\"Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\"},\"unlockStake(address,uint256)\":{\"notice\":\"Unlocks the tokens of the drawn juror.\"},\"upgradeToAndCall(address,bytes)\":{\"notice\":\"Upgrade mechanism including access control and UUPS-compliance.\"},\"validateStake(address,uint96,uint256,bool)\":{\"notice\":\"Validate the specified juror's new stake for a court.\"},\"version()\":{\"notice\":\"Returns the version of the implementation.\"},\"withdrawLeftoverPNK(address)\":{\"notice\":\"Gives back the locked PNKs in case the juror fully unstaked earlier.\"}},\"notice\":\"An adapted version of the SortitionModule contract for educational purposes.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitration/university/SortitionModuleUniversity.sol\":\"SortitionModuleUniversity\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity >=0.4.16;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice Arbitrable interface.\\n/// @dev When developing arbitrable contracts, we need to:\\n/// - Define the action taken when a ruling is received by the contract.\\n/// - Allow dispute creation which calls `arbitrator.createDispute{value: _fee}(_choices,_extraData)`.\\ninterface IArbitrableV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created to link the correct template to the disputeID.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitratorDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId\\n );\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Give a ruling for a dispute.\\n ///\\n /// @dev This is a callback function for the arbitrator to provide the ruling to this contract.\\n /// Only the arbitrator must be allowed to call this function.\\n /// Ruling 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n ///\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x3afa29a93847399c8705103350b69bb70706b2075ca41b39d523b007e69e23db\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// @notice Arbitrator interface for the Kleros V2 protocol.\\n/// @dev Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\ninterface IArbitratorV2 {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @notice To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @notice To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @notice To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in ETH.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @notice Create a dispute and pay for the fees in a supported ERC20 token.\\n /// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in the supported ERC20 token.\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @notice Compute the cost of arbitration denominated in `_feeToken`.\\n /// @dev It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @notice Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x65ba87c5309cd6e6562e569f79778ca423c9be7b0a44b9407e5bd2bdf8fdc3b0\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeKit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IDisputeKit\\n/// @notice An abstraction of the Dispute Kits intended for interfacing with KlerosCore.\\n/// @dev It does not intend to abstract the interactions with the user (such as voting or appeal funding) to allow for implementation-specific parameters.\\ninterface IDisputeKit {\\n // ************************************ //\\n // * Events * //\\n // ************************************ //\\n\\n /// @notice Emitted when casting a vote to provide the justification of juror's choice.\\n /// @param _coreDisputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _juror Address of the juror.\\n /// @param _voteIDs The identifiers of the votes in the dispute.\\n /// @param _choice The choice juror voted for.\\n /// @param _justification Justification of the choice.\\n event VoteCast(\\n uint256 indexed _coreDisputeID,\\n address indexed _juror,\\n uint256[] _voteIDs,\\n uint256 indexed _choice,\\n string _justification\\n );\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Creates a local dispute and maps it to the dispute ID in the Core contract.\\n /// @dev Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _numberOfChoices Number of choices of the dispute\\n /// @param _extraData Additional info about the dispute, for possible use in future dispute kits.\\n /// @param _nbVotes Maximal number of votes this dispute can get. Added for future-proofing.\\n function createDispute(\\n uint256 _coreDisputeID,\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n uint256 _nbVotes\\n ) external;\\n\\n /// @notice Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.\\n /// @dev Access restricted to Kleros Core only.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _nonce Nonce.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external returns (address drawnAddress, uint96 fromSubcourtID);\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Gets the current ruling of a specified dispute.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _coreDisputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n\\n /// @notice Gets the degree of coherence of a particular voter.\\n /// @dev This function is called by Kleros Core in order to determine the amount of the reward.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward.\\n /// @return feeCoherence The degree of coherence in basis points for the dispute fee reward.\\n function getDegreeOfCoherenceReward(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256 pnkCoherence, uint256 feeCoherence);\\n\\n /// @notice Gets the degree of coherence of a particular voter.\\n /// @dev This function is called by Kleros Core in order to determine the amount of the penalty.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the vote.\\n /// @param _feePerJuror The fee per juror.\\n /// @param _pnkAtStakePerJuror The PNK at stake per juror.\\n /// @return pnkCoherence The degree of coherence in basis points for the dispute PNK reward.\\n function getDegreeOfCoherencePenalty(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID,\\n uint256 _feePerJuror,\\n uint256 _pnkAtStakePerJuror\\n ) external view returns (uint256 pnkCoherence);\\n\\n /// @notice Gets the number of jurors who are eligible to a reward in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @return The number of coherent jurors.\\n function getCoherentCount(uint256 _coreDisputeID, uint256 _coreRoundID) external view returns (uint256);\\n\\n /// @notice Returns true if all of the jurors have cast their commits for the last round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their commits for the last round.\\n function areCommitsAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns true if all of the jurors have cast their votes for the last round.\\n /// @dev This function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether all of the jurors have cast their votes for the last round.\\n function areVotesAllCast(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns true if the appeal funding is finished prematurely (e.g. when losing side didn't fund).\\n /// @dev This function is to be called directly by the core contract and is not for off-chain usage.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the appeal funding is finished.\\n function isAppealFunded(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @dev Returns true if the dispute is jumping to a parent court.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @return Whether the dispute is jumping to a parent court or not.\\n function earlyCourtJump(uint256 _coreDisputeID) external view returns (bool);\\n\\n /// @notice Returns the number of votes after the appeal.\\n /// @param _previousDisputeKit The previous Dispute Kit.\\n /// @param _currentNbVotes The number of votes before the appeal.\\n /// @return The number of votes after the appeal.\\n function getNbVotesAfterAppeal(\\n IDisputeKit _previousDisputeKit,\\n uint256 _currentNbVotes\\n ) external view returns (uint256);\\n\\n /// @notice Returns the dispute kit ID to be used after court jump by Kleros Core.\\n /// @return The ID of the dispute kit in Kleros Core disputeKits array.\\n function getJumpDisputeKitID() external view returns (uint256);\\n\\n /// @notice Returns true if the specified voter was active in this round.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _voteID The ID of the voter.\\n /// @return Whether the voter was active or not.\\n function isVoteActive(uint256 _coreDisputeID, uint256 _coreRoundID, uint256 _voteID) external view returns (bool);\\n\\n /// @notice Returns the info of the specified round in the core contract.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core, not in the Dispute Kit.\\n /// @param _coreRoundID The ID of the round in Kleros Core, not in the Dispute Kit.\\n /// @param _choice The choice to query.\\n /// @return winningChoice The winning choice of this round.\\n /// @return tied Whether it's a tie or not.\\n /// @return totalVoted Number of jurors who cast the vote already.\\n /// @return totalCommited Number of jurors who cast the commit already (only relevant for hidden votes).\\n /// @return nbVoters Total number of voters in this round.\\n /// @return choiceCount Number of votes cast for the queried choice.\\n function getRoundInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _choice\\n )\\n external\\n view\\n returns (\\n uint256 winningChoice,\\n bool tied,\\n uint256 totalVoted,\\n uint256 totalCommited,\\n uint256 nbVoters,\\n uint256 choiceCount\\n );\\n\\n /// @notice Returns the vote information for a given vote ID.\\n /// @param _coreDisputeID The ID of the dispute in Kleros Core.\\n /// @param _coreRoundID The ID of the round in Kleros Core.\\n /// @param _voteID The ID of the vote.\\n /// @return account The address of the juror who cast the vote.\\n /// @return commit The commit of the vote.\\n /// @return choice The choice that got the vote.\\n /// @return voted Whether the vote was cast or not.\\n function getVoteInfo(\\n uint256 _coreDisputeID,\\n uint256 _coreRoundID,\\n uint256 _voteID\\n ) external view returns (address account, bytes32 commit, uint256 choice, bool voted);\\n}\\n\",\"keccak256\":\"0x1f12d2574dffd9bf83cf33a54aa4abbbfa4203251a0f962edd8e5c3b370408bc\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0 <0.9.0;\\n\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title ISortitionModule\\n/// @notice Interface for the SortitionModule contract.\\ninterface ISortitionModule {\\n // ************************************* //\\n // * Enums * //\\n // ************************************* //\\n\\n enum Phase {\\n staking, // Stake sum trees can be updated. Pass after `minStakingTime` passes and there is at least one dispute without jurors.\\n generating, // Waiting for a random number. Pass as soon as it is ready.\\n drawing // Jurors can be drawn. Pass after all disputes have jurors or `maxDrawingTime` passes.\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when the phase is changed.\\n /// @param _phase The new phase.\\n event NewPhase(Phase _phase);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Passes the phase.\\n function passPhase() external;\\n\\n /// @notice Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external;\\n\\n /// @notice Create a sortition sum tree at the specified key.\\n /// @param _courtID The ID of the court.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(uint96 _courtID, bytes memory _extraData) external;\\n\\n /// @notice Validate the specified juror's new stake for a court.\\n /// @dev No state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// @param _noDelay True if the stake change should not be delayed.\\n /// @return pnkDeposit The amount of PNK to be deposited.\\n /// @return pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @return stakingResult The result of the staking operation.\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _noDelay\\n ) external returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult);\\n\\n /// @notice Update the state of the stakes, called by KC at the end of setStake flow.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _pnkDeposit The amount of PNK to be deposited.\\n /// @param _pnkWithdrawal The amount of PNK to be withdrawn.\\n /// @param _newStake The new stake.\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external;\\n\\n /// @notice Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _penalty The amount of PNK to be deducted.\\n /// @return pnkBalance The updated total PNK balance of the juror, including the penalty.\\n /// @return newCourtStake The updated stake of the juror in the court.\\n /// @return availablePenalty The amount of PNK that was actually deducted.\\n function setStakePenalty(\\n address _account,\\n uint96 _courtID,\\n uint256 _penalty\\n ) external returns (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty);\\n\\n /// @notice Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.\\n ///\\n /// @dev `O(n + p * log_k(j))` where\\n /// `O(n + p * log_k(j))` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _reward The amount of PNK to be deposited as a reward.\\n /// @return success True if the reward was added successfully.\\n function setStakeReward(address _account, uint96 _courtID, uint256 _reward) external returns (bool success);\\n\\n /// @notice Unstakes the inactive juror from all courts.\\n ///\\n /// @dev `O(n * (p * log_k(j)) )` where\\n /// `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The juror to unstake.\\n function forcedUnstakeAllCourts(address _account) external;\\n\\n /// @notice Unstakes the inactive juror from a specific court.\\n ///\\n /// @dev `O(n * (p * log_k(j)) )` where\\n /// `n` is the number of courts the juror has staked in,\\n /// `p` is the depth of the court tree,\\n /// `k` is the minimum number of children per node of one of these courts' sortition sum tree,\\n /// and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.\\n ///\\n /// @param _account The juror to unstake.\\n /// @param _courtID The ID of the court.\\n function forcedUnstake(address _account, uint96 _courtID) external;\\n\\n /// @notice Locks the tokens of the drawn juror.\\n /// @param _account The address of the juror.\\n /// @param _relativeAmount The amount to lock.\\n function lockStake(address _account, uint256 _relativeAmount) external;\\n\\n /// @notice Unlocks the tokens of the drawn juror.\\n /// @param _account The address of the juror.\\n /// @param _relativeAmount The amount to unlock.\\n function unlockStake(address _account, uint256 _relativeAmount) external;\\n\\n /// @notice Triggers the state changes after dispute creation.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _roundID The ID of the round.\\n function createDisputeHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n /// @notice Triggers the state changes after drawing.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _roundID The ID of the round.\\n function postDrawHook(uint256 _disputeID, uint256 _roundID) external;\\n\\n /// @notice Gives back the locked PNKs in case the juror fully unstaked earlier.\\n ///\\n /// @dev that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance\\n /// while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked).\\n /// In this case the juror can use this function to withdraw the leftover tokens.\\n /// Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.\\n ///\\n /// @param _account The juror whose PNK to withdraw.\\n function withdrawLeftoverPNK(address _account) external;\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Draw an ID from a tree using a number.\\n ///\\n /// @dev that this function reverts if the sum of all values in the tree is 0.\\n /// `O(k * log_k(n))` where\\n /// `k` is the maximum number of children per node in the tree,\\n /// and `n` is the maximum number of nodes ever appended.\\n ///\\n /// @param _courtID The ID of the court.\\n /// @param _coreDisputeID Index of the dispute in Kleros Core.\\n /// @param _nonce Nonce to hash with random number.\\n /// @return drawnAddress The drawn address.\\n function draw(\\n uint96 _courtID,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) external view returns (address drawnAddress, uint96 fromSubcourtID);\\n\\n /// @notice Gets the balance of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return totalStakedPnk The total amount of tokens staked including locked tokens and penalty deductions. Equivalent to the effective stake in the General court.\\n /// @return totalLocked The total amount of tokens locked in disputes.\\n /// @return stakedInCourt The amount of tokens staked in the specified court including locked tokens and penalty deductions.\\n /// @return nbCourts The number of courts the juror has directly staked in.\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n ) external view returns (uint256 totalStakedPnk, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts);\\n\\n /// @notice Gets the court identifiers where a specific `_juror` has staked.\\n /// @param _juror The address of the juror.\\n function getJurorCourtIDs(address _juror) external view returns (uint96[] memory);\\n\\n /// @notice Checks if the juror is staked in any court.\\n /// @param _juror The address of the juror.\\n /// @return Whether the juror is staked or not.\\n function isJurorStaked(address _juror) external view returns (bool);\\n\\n /// @notice Checks if the juror has any leftover PNK in the contract.\\n /// @param _juror The address of the juror.\\n /// @return Whether the juror has leftover PNK.\\n function getJurorLeftoverPNK(address _juror) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3eeff4281ddf3c731c6503094bbbcc80d8015e3a60a27c8cadadfffdf1bf5437\",\"license\":\"MIT\"},\"src/arbitration/university/ISortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.24;\\n\\nimport {ISortitionModule} from \\\"../interfaces/ISortitionModule.sol\\\";\\n\\ninterface ISortitionModuleUniversity is ISortitionModule {\\n function setTransientJuror(address _juror) external;\\n}\\n\",\"keccak256\":\"0x57478726f4dd824eca06d8b5349395b5b37756f7988d3fffb6fdae4d0f4164ee\",\"license\":\"MIT\"},\"src/arbitration/university/KlerosCoreUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport {IDisputeKit} from \\\"../interfaces/IDisputeKit.sol\\\";\\nimport {ISortitionModuleUniversity} from \\\"./ISortitionModuleUniversity.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"../../libraries/SafeERC20.sol\\\";\\nimport {UUPSProxiable} from \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title KlerosCoreUniversity\\n/// @notice Core arbitrator contract for educational purposes.\\ncontract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n string public constant override version = \\\"2.0.0\\\";\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum Period {\\n evidence, // Evidence can be submitted. This is also when drawing has to take place.\\n commit, // Jurors commit a hashed vote. This is skipped for courts without hidden votes.\\n vote, // Jurors reveal/cast their vote depending on whether the court has hidden votes or not.\\n appeal, // The dispute can be appealed.\\n execution // Tokens are redistributed and the ruling is executed.\\n }\\n\\n struct Court {\\n uint96 parent; // The parent court.\\n bool hiddenVotes; // Whether to use commit and reveal or not.\\n uint256[] children; // List of child courts.\\n uint256 minStake; // Minimum PNKs needed to stake in the court.\\n uint256 alpha; // Basis point of PNKs that are lost when incoherent.\\n uint256 feeForJuror; // Arbitration fee paid per juror.\\n uint256 jurorsForCourtJump; // The appeal after the one that reaches this number of jurors will go to the parent court if any.\\n uint256[4] timesPerPeriod; // The time allotted to each dispute period in the form `timesPerPeriod[period]`.\\n mapping(uint256 disputeKitId => bool) supportedDisputeKits; // True if DK with this ID is supported by the court. Note that each court must support classic dispute kit.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Dispute {\\n uint96 courtID; // The ID of the court the dispute is in.\\n IArbitrableV2 arbitrated; // The arbitrable contract.\\n Period period; // The current period of the dispute.\\n bool ruled; // True if the ruling has been executed, false otherwise.\\n uint256 lastPeriodChange; // The last time the period was changed.\\n Round[] rounds;\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n struct Round {\\n uint256 disputeKitID; // Index of the dispute kit in the array.\\n uint256 pnkAtStakePerJuror; // The amount of PNKs at stake for each juror in this round.\\n uint256 totalFeesForJurors; // The total juror fees paid in this round.\\n uint256 nbVotes; // The total number of votes the dispute can possibly have in the current round. Former votes[_round].length.\\n uint256 repartitions; // A counter of reward repartitions made in this round.\\n uint256 pnkPenalties; // The amount of PNKs collected from penalties in this round.\\n address[] drawnJurors; // Addresses of the jurors that were drawn in this round.\\n uint96[] drawnJurorFromCourtIDs; // The courtIDs where the juror was drawn from, possibly their stake in a subcourt.\\n uint256 sumFeeRewardPaid; // Total sum of arbitration fees paid to coherent jurors as a reward in this round.\\n uint256 sumPnkRewardPaid; // Total sum of PNK paid to coherent jurors as a reward in this round.\\n IERC20 feeToken; // The token used for paying fees in this round.\\n uint256 drawIterations; // The number of iterations passed drawing the jurors for this round.\\n uint256[10] __gap; // Reserved slots for future upgrades.\\n }\\n\\n // Workaround \\\"stack too deep\\\" errors\\n struct ExecuteParams {\\n uint256 disputeID; // The ID of the dispute to execute.\\n uint256 round; // The round to execute.\\n uint256 coherentCount; // The number of coherent votes in the round.\\n uint256 numberOfVotesInRound; // The number of votes in the round.\\n uint256 feePerJurorInRound; // The fee per juror in the round.\\n uint256 pnkAtStakePerJurorInRound; // The amount of PNKs at stake for each juror in the round.\\n uint256 pnkPenaltiesInRound; // The amount of PNKs collected from penalties in the round.\\n uint256 repartition; // The index of the repartition to execute.\\n }\\n\\n struct CurrencyRate {\\n bool feePaymentAccepted;\\n uint64 rateInEth;\\n uint8 rateDecimals;\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 private constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.\\n\\n address public owner; // The owner of the contract.\\n address public instructor; // The instructor who is allowed to choose the jurors.\\n IERC20 public pinakion; // The Pinakion token contract.\\n address public jurorProsecutionModule; // The module for juror's prosecution.\\n ISortitionModuleUniversity public sortitionModule; // Sortition module for drawing.\\n Court[] public courts; // The courts.\\n IDisputeKit[] public disputeKits; // Array of dispute kits.\\n Dispute[] public disputes; // The disputes.\\n mapping(IERC20 => CurrencyRate) public currencyRates; // The price of each token in ETH.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event NewPeriod(uint256 indexed _disputeID, Period _period);\\n event AppealPossible(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event AppealDecision(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n event Draw(address indexed _address, uint256 indexed _disputeID, uint256 _roundID, uint256 _voteID);\\n event CourtCreated(\\n uint96 indexed _courtID,\\n uint96 indexed _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod,\\n uint256[] _supportedDisputeKits\\n );\\n event CourtModified(\\n uint96 indexed _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] _timesPerPeriod\\n );\\n event DisputeKitCreated(uint256 indexed _disputeKitID, IDisputeKit indexed _disputeKitAddress);\\n event DisputeKitEnabled(uint96 indexed _courtID, uint256 indexed _disputeKitID, bool indexed _enable);\\n event CourtJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint96 indexed _fromCourtID,\\n uint96 _toCourtID\\n );\\n event DisputeKitJump(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 indexed _fromDisputeKitID,\\n uint256 _toDisputeKitID\\n );\\n event JurorRewardPenalty(\\n address indexed _account,\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _degreeOfCoherencyPnk,\\n uint256 _degreeOfCoherencyFee,\\n int256 _amountPnk,\\n int256 _amountFee,\\n IERC20 _feeToken\\n );\\n event LeftoverRewardSent(\\n uint256 indexed _disputeID,\\n uint256 indexed _roundID,\\n uint256 _amountPnk,\\n uint256 _amountFee,\\n IERC20 _feeToken\\n );\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByOwner() {\\n if (owner != msg.sender) revert OwnerOnly();\\n _;\\n }\\n\\n modifier onlyByInstructor() {\\n if (instructor != msg.sender) revert InstructorOnly();\\n _;\\n }\\n\\n modifier onlyByOwnerOrInstructor() {\\n if (msg.sender != owner && msg.sender != instructor) revert OwnerOrInstructorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializer (constructor equivalent for upgradable contracts).\\n /// @param _owner The owner's address.\\n /// @param _instructor The address of the instructor.\\n /// @param _pinakion The address of the token contract.\\n /// @param _jurorProsecutionModule The address of the juror prosecution module.\\n /// @param _disputeKit The address of the default dispute kit.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the general court.\\n /// @param _courtParameters Numeric parameters of General court (minStake, alpha, feeForJuror and jurorsForCourtJump respectively).\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the general court.\\n /// @param _sortitionModuleAddress The sortition module responsible for sortition of the jurors.\\n function initialize(\\n address _owner,\\n address _instructor,\\n IERC20 _pinakion,\\n address _jurorProsecutionModule,\\n IDisputeKit _disputeKit,\\n bool _hiddenVotes,\\n uint256[4] memory _courtParameters,\\n uint256[4] memory _timesPerPeriod,\\n ISortitionModuleUniversity _sortitionModuleAddress\\n ) external initializer {\\n owner = _owner;\\n instructor = _instructor;\\n pinakion = _pinakion;\\n jurorProsecutionModule = _jurorProsecutionModule;\\n sortitionModule = _sortitionModuleAddress;\\n\\n // NULL_DISPUTE_KIT: an empty element at index 0 to indicate when a dispute kit is not supported.\\n disputeKits.push();\\n\\n // DISPUTE_KIT_CLASSIC\\n disputeKits.push(_disputeKit);\\n\\n emit DisputeKitCreated(DISPUTE_KIT_CLASSIC, _disputeKit);\\n\\n // FORKING_COURT\\n // TODO: Fill the properties for the Forking court, emit CourtCreated.\\n courts.push();\\n\\n // GENERAL_COURT\\n Court storage court = courts.push();\\n court.parent = FORKING_COURT;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _courtParameters[0];\\n court.alpha = _courtParameters[1];\\n court.feeForJuror = _courtParameters[2];\\n court.jurorsForCourtJump = _courtParameters[3];\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n emit CourtCreated(\\n GENERAL_COURT,\\n court.parent,\\n _hiddenVotes,\\n _courtParameters[0],\\n _courtParameters[1],\\n _courtParameters[2],\\n _courtParameters[3],\\n _timesPerPeriod,\\n new uint256[](0)\\n );\\n _enableDisputeKit(GENERAL_COURT, DISPUTE_KIT_CLASSIC, true);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /* @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the owner can perform upgrades (`onlyByOwner`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByOwner {\\n // NOP\\n }\\n\\n /// @notice Allows the owner to call anything on behalf of the contract.\\n /// @param _destination The destination of the call.\\n /// @param _amount The value sent with the call.\\n /// @param _data The data sent with the call.\\n function executeOwnerProposal(address _destination, uint256 _amount, bytes memory _data) external onlyByOwner {\\n (bool success, ) = _destination.call{value: _amount}(_data);\\n if (!success) revert UnsuccessfulCall();\\n }\\n\\n /// @notice Changes the `owner` storage variable.\\n /// @param _owner The new value for the `owner` storage variable.\\n function changeOwner(address payable _owner) external onlyByOwner {\\n owner = _owner;\\n }\\n\\n /// @notice Changes the `instructor` storage variable.\\n /// @param _instructor The new value for the `instructor` storage variable.\\n function changeInstructor(address _instructor) external onlyByOwnerOrInstructor {\\n instructor = _instructor;\\n }\\n\\n /// @notice Changes the `pinakion` storage variable.\\n /// @param _pinakion The new value for the `pinakion` storage variable.\\n function changePinakion(IERC20 _pinakion) external onlyByOwner {\\n pinakion = _pinakion;\\n }\\n\\n /// @notice Changes the `jurorProsecutionModule` storage variable.\\n /// @param _jurorProsecutionModule The new value for the `jurorProsecutionModule` storage variable.\\n function changeJurorProsecutionModule(address _jurorProsecutionModule) external onlyByOwner {\\n jurorProsecutionModule = _jurorProsecutionModule;\\n }\\n\\n /// @notice Changes the `_sortitionModule` storage variable.\\n /// Note that the new module should be initialized for all courts.\\n /// @param _sortitionModule The new value for the `sortitionModule` storage variable.\\n function changeSortitionModule(ISortitionModuleUniversity _sortitionModule) external onlyByOwner {\\n sortitionModule = _sortitionModule;\\n }\\n\\n /// @notice Add a new supported dispute kit module to the court.\\n /// @param _disputeKitAddress The address of the dispute kit contract.\\n function addNewDisputeKit(IDisputeKit _disputeKitAddress) external onlyByOwner {\\n uint256 disputeKitID = disputeKits.length;\\n disputeKits.push(_disputeKitAddress);\\n emit DisputeKitCreated(disputeKitID, _disputeKitAddress);\\n }\\n\\n /// @notice Creates a court under a specified parent court.\\n /// @param _parent The `parent` property value of the court.\\n /// @param _hiddenVotes The `hiddenVotes` property value of the court.\\n /// @param _minStake The `minStake` property value of the court.\\n /// @param _alpha The `alpha` property value of the court.\\n /// @param _feeForJuror The `feeForJuror` property value of the court.\\n /// @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the court.\\n /// @param _timesPerPeriod The `timesPerPeriod` property value of the court.\\n /// @param _supportedDisputeKits Indexes of dispute kits that this court will support.\\n function createCourt(\\n uint96 _parent,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod,\\n uint256[] memory _supportedDisputeKits\\n ) external onlyByOwner {\\n if (courts[_parent].minStake > _minStake) revert MinStakeLowerThanParentCourt();\\n if (_supportedDisputeKits.length == 0) revert UnsupportedDisputeKit();\\n if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent();\\n\\n uint256 courtID = courts.length;\\n Court storage court = courts.push();\\n\\n for (uint256 i = 0; i < _supportedDisputeKits.length; i++) {\\n if (_supportedDisputeKits[i] == 0 || _supportedDisputeKits[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n court.supportedDisputeKits[_supportedDisputeKits[i]] = true;\\n }\\n // Check that Classic DK support was added.\\n if (!court.supportedDisputeKits[DISPUTE_KIT_CLASSIC]) revert MustSupportDisputeKitClassic();\\n\\n court.parent = _parent;\\n court.children = new uint256[](0);\\n court.hiddenVotes = _hiddenVotes;\\n court.minStake = _minStake;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n\\n // Update the parent.\\n courts[_parent].children.push(courtID);\\n emit CourtCreated(\\n uint96(courtID),\\n _parent,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod,\\n _supportedDisputeKits\\n );\\n }\\n\\n function changeCourtParameters(\\n uint96 _courtID,\\n bool _hiddenVotes,\\n uint256 _minStake,\\n uint256 _alpha,\\n uint256 _feeForJuror,\\n uint256 _jurorsForCourtJump,\\n uint256[4] memory _timesPerPeriod\\n ) external onlyByOwner {\\n Court storage court = courts[_courtID];\\n if (_courtID != GENERAL_COURT && courts[court.parent].minStake > _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n for (uint256 i = 0; i < court.children.length; i++) {\\n if (courts[court.children[i]].minStake < _minStake) {\\n revert MinStakeLowerThanParentCourt();\\n }\\n }\\n court.minStake = _minStake;\\n court.hiddenVotes = _hiddenVotes;\\n court.alpha = _alpha;\\n court.feeForJuror = _feeForJuror;\\n court.jurorsForCourtJump = _jurorsForCourtJump;\\n court.timesPerPeriod = _timesPerPeriod;\\n emit CourtModified(\\n _courtID,\\n _hiddenVotes,\\n _minStake,\\n _alpha,\\n _feeForJuror,\\n _jurorsForCourtJump,\\n _timesPerPeriod\\n );\\n }\\n\\n /// @notice Adds/removes court's support for specified dispute kits.\\n /// @param _courtID The ID of the court.\\n /// @param _disputeKitIDs The IDs of dispute kits which support should be added/removed.\\n /// @param _enable Whether add or remove the dispute kits from the court.\\n function enableDisputeKits(uint96 _courtID, uint256[] memory _disputeKitIDs, bool _enable) external onlyByOwner {\\n for (uint256 i = 0; i < _disputeKitIDs.length; i++) {\\n if (_enable) {\\n if (_disputeKitIDs[i] == 0 || _disputeKitIDs[i] >= disputeKits.length) {\\n revert WrongDisputeKitIndex();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], true);\\n } else {\\n // Classic dispute kit must be supported by all courts.\\n if (_disputeKitIDs[i] == DISPUTE_KIT_CLASSIC) {\\n revert CannotDisableClassicDK();\\n }\\n _enableDisputeKit(_courtID, _disputeKitIDs[i], false);\\n }\\n }\\n }\\n\\n /// @notice Changes the supported fee tokens.\\n /// @param _feeToken The fee token.\\n /// @param _accepted Whether the token is supported or not as a method of fee payment.\\n function changeAcceptedFeeTokens(IERC20 _feeToken, bool _accepted) external onlyByOwner {\\n currencyRates[_feeToken].feePaymentAccepted = _accepted;\\n emit AcceptedFeeToken(_feeToken, _accepted);\\n }\\n\\n /// @notice Changes the currency rate of a fee token.\\n /// @param _feeToken The fee token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n function changeCurrencyRates(IERC20 _feeToken, uint64 _rateInEth, uint8 _rateDecimals) external onlyByOwner {\\n currencyRates[_feeToken].rateInEth = _rateInEth;\\n currencyRates[_feeToken].rateDecimals = _rateDecimals;\\n emit NewCurrencyRate(_feeToken, _rateInEth, _rateDecimals);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Sets the caller's stake in a court.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n /// Note that the existing delayed stake will be nullified as non-relevant.\\n function setStake(uint96 _courtID, uint256 _newStake) external {\\n _setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n /// @notice Sets the stake of a specified account in a court, typically to apply a delayed stake or unstake inactive jurors.\\n /// @param _account The account whose stake is being set.\\n /// @param _courtID The ID of the court.\\n /// @param _newStake The new stake.\\n function setStakeBySortitionModule(address _account, uint96 _courtID, uint256 _newStake) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n _setStake(_account, _courtID, _newStake, true, OnError.Return);\\n }\\n\\n /// @notice Transfers PNK to the juror by SortitionModule.\\n /// @param _account The account of the juror whose PNK to transfer.\\n /// @param _amount The amount to transfer.\\n function transferBySortitionModule(address _account, uint256 _amount) external {\\n if (msg.sender != address(sortitionModule)) revert SortitionModuleOnly();\\n // Note eligibility is checked in SortitionModule.\\n pinakion.safeTransfer(_account, _amount);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData\\n ) external payable override returns (uint256 disputeID) {\\n if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();\\n\\n return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value);\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external override returns (uint256 disputeID) {\\n if (!currencyRates[_feeToken].feePaymentAccepted) revert TokenNotAccepted();\\n if (_feeAmount < arbitrationCost(_extraData, _feeToken)) revert ArbitrationFeesNotEnough();\\n\\n if (!_feeToken.safeTransferFrom(msg.sender, address(this), _feeAmount)) revert TransferFailed();\\n return _createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal returns (uint256 disputeID) {\\n (uint96 courtID, , uint256 disputeKitID) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n if (!courts[courtID].supportedDisputeKits[disputeKitID]) revert DisputeKitNotSupportedByCourt();\\n\\n disputeID = disputes.length;\\n Dispute storage dispute = disputes.push();\\n dispute.courtID = courtID;\\n dispute.arbitrated = IArbitrableV2(msg.sender);\\n dispute.lastPeriodChange = block.timestamp;\\n\\n IDisputeKit disputeKit = disputeKits[disputeKitID];\\n Court storage court = courts[courtID];\\n Round storage round = dispute.rounds.push();\\n\\n // Obtain the feeForJuror in the same currency as the _feeAmount\\n uint256 feeForJuror = (_feeToken == NATIVE_CURRENCY)\\n ? court.feeForJuror\\n : convertEthToTokenAmount(_feeToken, court.feeForJuror);\\n round.nbVotes = _feeAmount / feeForJuror;\\n round.disputeKitID = disputeKitID;\\n round.pnkAtStakePerJuror = (court.minStake * court.alpha) / ONE_BASIS_POINT;\\n round.totalFeesForJurors = _feeAmount;\\n round.feeToken = IERC20(_feeToken);\\n\\n sortitionModule.createDisputeHook(disputeID, 0); // Default round ID.\\n\\n disputeKit.createDispute(disputeID, _numberOfChoices, _extraData, round.nbVotes);\\n emit DisputeCreation(disputeID, IArbitrableV2(msg.sender));\\n }\\n\\n /// @notice Passes the period of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n function passPeriod(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n Court storage court = courts[dispute.courtID];\\n\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period == Period.evidence) {\\n if (\\n currentRound == 0 &&\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]\\n ) {\\n revert EvidenceNotPassedAndNotAppeal();\\n }\\n if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing();\\n dispute.period = court.hiddenVotes ? Period.commit : Period.vote;\\n } else if (dispute.period == Period.commit) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID)\\n ) {\\n revert CommitPeriodNotPassed();\\n }\\n dispute.period = Period.vote;\\n } else if (dispute.period == Period.vote) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].areVotesAllCast(_disputeID)\\n ) {\\n revert VotePeriodNotPassed();\\n }\\n dispute.period = Period.appeal;\\n emit AppealPossible(_disputeID, dispute.arbitrated);\\n } else if (dispute.period == Period.appeal) {\\n if (\\n block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] &&\\n !disputeKits[round.disputeKitID].isAppealFunded(_disputeID)\\n ) {\\n revert AppealPeriodNotPassed();\\n }\\n dispute.period = Period.execution;\\n } else if (dispute.period == Period.execution) {\\n revert DisputePeriodIsFinal();\\n }\\n\\n dispute.lastPeriodChange = block.timestamp;\\n emit NewPeriod(_disputeID, dispute.period);\\n }\\n\\n /// @notice Draws one juror for the dispute until the number votes paid for is reached.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _juror The address of the juror to draw.\\n function draw(uint256 _disputeID, address _juror) external onlyByOwnerOrInstructor {\\n Dispute storage dispute = disputes[_disputeID];\\n uint256 currentRound = dispute.rounds.length - 1;\\n Round storage round = dispute.rounds[currentRound];\\n if (dispute.period != Period.evidence) revert NotEvidencePeriod();\\n if (round.drawnJurors.length >= round.nbVotes) revert AllJurorsDrawn();\\n\\n sortitionModule.setTransientJuror(_juror);\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n uint256 iteration = round.drawIterations + 1;\\n (address drawnAddress, uint96 fromSubcourtID) = disputeKit.draw(_disputeID, iteration);\\n if (drawnAddress == address(0)) {\\n revert NoJurorDrawn();\\n }\\n sortitionModule.lockStake(drawnAddress, round.pnkAtStakePerJuror);\\n emit Draw(drawnAddress, _disputeID, currentRound, round.drawnJurors.length);\\n round.drawnJurors.push(drawnAddress);\\n round.drawnJurorFromCourtIDs.push(fromSubcourtID != 0 ? fromSubcourtID : dispute.courtID);\\n if (round.drawnJurors.length == round.nbVotes) {\\n sortitionModule.postDrawHook(_disputeID, currentRound);\\n }\\n round.drawIterations = iteration;\\n }\\n sortitionModule.setTransientJuror(address(0));\\n }\\n\\n /// @notice Appeals the ruling of a specified dispute.\\n /// @dev Access restricted to the Dispute Kit for this `disputeID`.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _numberOfChoices Number of choices for the dispute. Can be required during court jump.\\n /// @param _extraData Extradata for the dispute. Can be required during court jump.\\n function appeal(uint256 _disputeID, uint256 _numberOfChoices, bytes memory _extraData) external payable {\\n if (msg.value < appealCost(_disputeID)) revert AppealFeesNotEnough();\\n\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.appeal) revert DisputeNotAppealable();\\n\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n if (msg.sender != address(disputeKits[round.disputeKitID])) revert DisputeKitOnly();\\n\\n uint96 newCourtID = dispute.courtID;\\n uint256 newDisputeKitID = round.disputeKitID;\\n\\n // Warning: the extra round must be created before calling disputeKit.createDispute()\\n Round storage extraRound = dispute.rounds.push();\\n\\n if (round.nbVotes >= courts[newCourtID].jurorsForCourtJump) {\\n // Jump to parent court.\\n newCourtID = courts[newCourtID].parent;\\n\\n if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {\\n // Switch to classic dispute kit if parent court doesn't support the current one.\\n newDisputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n\\n if (newCourtID != dispute.courtID) {\\n emit CourtJump(_disputeID, dispute.rounds.length - 1, dispute.courtID, newCourtID);\\n }\\n }\\n\\n dispute.courtID = newCourtID;\\n dispute.period = Period.evidence;\\n dispute.lastPeriodChange = block.timestamp;\\n\\n Court storage court = courts[newCourtID];\\n extraRound.nbVotes = msg.value / court.feeForJuror; // As many votes that can be afforded by the provided funds.\\n extraRound.pnkAtStakePerJuror = (court.minStake * court.alpha) / ONE_BASIS_POINT;\\n extraRound.totalFeesForJurors = msg.value;\\n extraRound.disputeKitID = newDisputeKitID;\\n\\n sortitionModule.createDisputeHook(_disputeID, dispute.rounds.length - 1);\\n\\n // Dispute kit was changed, so create a dispute in the new DK contract.\\n if (extraRound.disputeKitID != round.disputeKitID) {\\n emit DisputeKitJump(_disputeID, dispute.rounds.length - 1, round.disputeKitID, extraRound.disputeKitID);\\n disputeKits[extraRound.disputeKitID].createDispute(\\n _disputeID,\\n _numberOfChoices,\\n _extraData,\\n extraRound.nbVotes\\n );\\n }\\n\\n emit AppealDecision(_disputeID, dispute.arbitrated);\\n emit NewPeriod(_disputeID, Period.evidence);\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute. Can be called in parts.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The appeal round.\\n /// @param _iterations The number of iterations to run.\\n function execute(uint256 _disputeID, uint256 _round, uint256 _iterations) external {\\n Round storage round;\\n {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n\\n round = dispute.rounds[_round];\\n } // stack too deep workaround\\n\\n uint256 start = round.repartitions;\\n uint256 end = round.repartitions + _iterations;\\n\\n uint256 pnkPenaltiesInRound = round.pnkPenalties; // Keep in memory to save gas.\\n uint256 numberOfVotesInRound = round.drawnJurors.length;\\n uint256 feePerJurorInRound = round.totalFeesForJurors / numberOfVotesInRound;\\n uint256 pnkAtStakePerJurorInRound = round.pnkAtStakePerJuror;\\n uint256 coherentCount;\\n {\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n coherentCount = disputeKit.getCoherentCount(_disputeID, _round); // Total number of jurors that are eligible to a reward in this round.\\n } // stack too deep workaround\\n\\n if (coherentCount == 0) {\\n // We loop over the votes once as there are no rewards because it is not a tie and no one in this round is coherent with the final outcome.\\n if (end > numberOfVotesInRound) end = numberOfVotesInRound;\\n } else {\\n // We loop over the votes twice, first to collect the PNK penalties, and second to distribute them as rewards along with arbitration fees.\\n if (end > numberOfVotesInRound * 2) end = numberOfVotesInRound * 2;\\n }\\n round.repartitions = end;\\n\\n for (uint256 i = start; i < end; i++) {\\n if (i < numberOfVotesInRound) {\\n pnkPenaltiesInRound = _executePenalties(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n } else {\\n _executeRewards(\\n ExecuteParams({\\n disputeID: _disputeID,\\n round: _round,\\n coherentCount: coherentCount,\\n numberOfVotesInRound: numberOfVotesInRound,\\n feePerJurorInRound: feePerJurorInRound,\\n pnkAtStakePerJurorInRound: pnkAtStakePerJurorInRound,\\n pnkPenaltiesInRound: pnkPenaltiesInRound,\\n repartition: i\\n })\\n );\\n }\\n }\\n if (round.pnkPenalties != pnkPenaltiesInRound) {\\n round.pnkPenalties = pnkPenaltiesInRound; // Reentrancy risk: breaks Check-Effect-Interact\\n }\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, penalties only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n /// @return pnkPenaltiesInRoundCache The updated penalties in round cache.\\n function _executePenalties(ExecuteParams memory _params) internal returns (uint256) {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n uint256 coherence = disputeKit.getDegreeOfCoherencePenalty(\\n _params.disputeID,\\n _params.round,\\n _params.repartition,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Guard against degree exceeding 1, though it should be ensured by the dispute kit.\\n if (coherence > ONE_BASIS_POINT) {\\n coherence = ONE_BASIS_POINT;\\n }\\n\\n // Fully coherent jurors won't be penalized.\\n uint256 penalty = (round.pnkAtStakePerJuror * (ONE_BASIS_POINT - coherence)) / ONE_BASIS_POINT;\\n\\n // Unlock the PNKs affected by the penalty\\n address account = round.drawnJurors[_params.repartition];\\n sortitionModule.unlockStake(account, penalty);\\n\\n // Apply the penalty to the staked PNKs.\\n uint96 penalizedInCourtID = round.drawnJurorFromCourtIDs[_params.repartition];\\n (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) = sortitionModule.setStakePenalty(\\n account,\\n penalizedInCourtID,\\n penalty\\n );\\n _params.pnkPenaltiesInRound += availablePenalty;\\n emit JurorRewardPenalty(\\n account,\\n _params.disputeID,\\n _params.round,\\n coherence,\\n coherence,\\n -int256(availablePenalty),\\n 0,\\n round.feeToken\\n );\\n\\n if (pnkBalance == 0 || !disputeKit.isVoteActive(_params.disputeID, _params.round, _params.repartition)) {\\n // The juror is inactive or their balance is can't cover penalties anymore, unstake them from all courts.\\n sortitionModule.forcedUnstakeAllCourts(account);\\n } else if (newCourtStake < courts[penalizedInCourtID].minStake) {\\n // The juror's balance fell below the court minStake, unstake them from the court.\\n sortitionModule.forcedUnstake(account, penalizedInCourtID);\\n }\\n\\n if (_params.repartition == _params.numberOfVotesInRound - 1 && _params.coherentCount == 0) {\\n // No one was coherent, send the rewards to the owner.\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(owner).send(round.totalFeesForJurors);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(owner, round.totalFeesForJurors);\\n }\\n pinakion.safeTransfer(owner, _params.pnkPenaltiesInRound);\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n _params.pnkPenaltiesInRound,\\n round.totalFeesForJurors,\\n round.feeToken\\n );\\n }\\n return _params.pnkPenaltiesInRound;\\n }\\n\\n /// @notice Distribute the PNKs at stake and the dispute fees for the specific round of the dispute, rewards only.\\n /// @param _params The parameters for the execution, see `ExecuteParams`.\\n function _executeRewards(ExecuteParams memory _params) internal {\\n Dispute storage dispute = disputes[_params.disputeID];\\n Round storage round = dispute.rounds[_params.round];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n\\n // [0, 1] value that determines how coherent the juror was in this round, in basis points.\\n (uint256 pnkCoherence, uint256 feeCoherence) = disputeKit.getDegreeOfCoherenceReward(\\n _params.disputeID,\\n _params.round,\\n _params.repartition % _params.numberOfVotesInRound,\\n _params.feePerJurorInRound,\\n _params.pnkAtStakePerJurorInRound\\n );\\n\\n // Guard against degree exceeding 1, though it should be ensured by the dispute kit.\\n if (pnkCoherence > ONE_BASIS_POINT) {\\n pnkCoherence = ONE_BASIS_POINT;\\n }\\n if (feeCoherence > ONE_BASIS_POINT) {\\n feeCoherence = ONE_BASIS_POINT;\\n }\\n\\n address account = round.drawnJurors[_params.repartition % _params.numberOfVotesInRound];\\n uint256 pnkLocked = (round.pnkAtStakePerJuror * pnkCoherence) / ONE_BASIS_POINT;\\n\\n // Release the rest of the PNKs of the juror for this round.\\n sortitionModule.unlockStake(account, pnkLocked);\\n\\n // Compute the rewards\\n uint256 pnkReward = ((_params.pnkPenaltiesInRound / _params.coherentCount) * pnkCoherence) / ONE_BASIS_POINT; /// forge-lint: disable-line(divide-before-multiply)\\n round.sumPnkRewardPaid += pnkReward;\\n uint256 feeReward = ((round.totalFeesForJurors / _params.coherentCount) * feeCoherence) / ONE_BASIS_POINT; /// forge-lint: disable-line(divide-before-multiply)\\n round.sumFeeRewardPaid += feeReward;\\n\\n // Transfer the fee reward\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(account).send(feeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(account, feeReward);\\n }\\n\\n // Stake the PNK reward if possible, by-passes delayed stakes and other checks usually done by validateStake()\\n if (!sortitionModule.setStakeReward(account, dispute.courtID, pnkReward)) {\\n pinakion.safeTransfer(account, pnkReward);\\n }\\n\\n emit JurorRewardPenalty(\\n account,\\n _params.disputeID,\\n _params.round,\\n pnkCoherence,\\n feeCoherence,\\n int256(pnkReward),\\n int256(feeReward),\\n round.feeToken\\n );\\n\\n // Transfer any residual rewards to the owner. It may happen due to partial coherence of the jurors.\\n if (_params.repartition == _params.numberOfVotesInRound * 2 - 1) {\\n uint256 leftoverPnkReward = _params.pnkPenaltiesInRound - round.sumPnkRewardPaid;\\n uint256 leftoverFeeReward = round.totalFeesForJurors - round.sumFeeRewardPaid;\\n if (leftoverPnkReward != 0 || leftoverFeeReward != 0) {\\n if (leftoverPnkReward != 0) {\\n pinakion.safeTransfer(owner, leftoverPnkReward);\\n }\\n if (leftoverFeeReward != 0) {\\n if (round.feeToken == NATIVE_CURRENCY) {\\n // The dispute fees were paid in ETH\\n payable(owner).send(leftoverFeeReward);\\n } else {\\n // The dispute fees were paid in ERC20\\n round.feeToken.safeTransfer(owner, leftoverFeeReward);\\n }\\n }\\n emit LeftoverRewardSent(\\n _params.disputeID,\\n _params.round,\\n leftoverPnkReward,\\n leftoverFeeReward,\\n round.feeToken\\n );\\n }\\n }\\n }\\n\\n /// @notice Executes a specified dispute's ruling.\\n /// @param _disputeID The ID of the dispute.\\n function executeRuling(uint256 _disputeID) external {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period != Period.execution) revert NotExecutionPeriod();\\n if (dispute.ruled) revert RulingAlreadyExecuted();\\n\\n (uint256 winningChoice, , ) = currentRuling(_disputeID);\\n dispute.ruled = true;\\n emit Ruling(dispute.arbitrated, _disputeID, winningChoice);\\n dispute.arbitrated.rule(_disputeID, winningChoice);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes memory _extraData) public view override returns (uint256 cost) {\\n (uint96 courtID, uint256 minJurors, ) = _extraDataToCourtIDMinJurorsDisputeKit(_extraData);\\n cost = courts[courtID].feeForJuror * minJurors;\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) public view override returns (uint256 cost) {\\n cost = convertEthToTokenAmount(_feeToken, arbitrationCost(_extraData));\\n }\\n\\n /// @notice Gets the cost of appealing a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return cost The appeal cost.\\n function appealCost(uint256 _disputeID) public view returns (uint256 cost) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n if (round.nbVotes >= court.jurorsForCourtJump) {\\n // Jump to parent court.\\n if (dispute.courtID == GENERAL_COURT) {\\n // TODO: Handle the forking when appealed in General court.\\n cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.\\n } else {\\n cost = courts[court.parent].feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n } else {\\n // Stay in current court.\\n cost = court.feeForJuror * ((round.nbVotes * 2) + 1);\\n }\\n }\\n\\n /// @notice Gets the start and the end of a specified dispute's current appeal period.\\n /// @param _disputeID The ID of the dispute.\\n /// @return start The start of the appeal period.\\n /// @return end The end of the appeal period.\\n function appealPeriod(uint256 _disputeID) public view returns (uint256 start, uint256 end) {\\n Dispute storage dispute = disputes[_disputeID];\\n if (dispute.period == Period.appeal) {\\n start = dispute.lastPeriodChange;\\n end = dispute.lastPeriodChange + courts[dispute.courtID].timesPerPeriod[uint256(Period.appeal)];\\n } else {\\n start = 0;\\n end = 0;\\n }\\n }\\n\\n /// @inheritdoc IArbitratorV2\\n function currentRuling(uint256 _disputeID) public view returns (uint256 ruling, bool tied, bool overridden) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n IDisputeKit disputeKit = disputeKits[round.disputeKitID];\\n (ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);\\n }\\n\\n /// @notice Gets the round info for a specified dispute and round.\\n /// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return round The round info.\\n function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {\\n return disputes[_disputeID].rounds[_round];\\n }\\n\\n /// @notice Gets the PNK at stake per juror for a specified dispute and round.\\n /// @param _disputeID The ID of the dispute.\\n /// @param _round The round to get the info for.\\n /// @return pnkAtStakePerJuror The PNK at stake per juror.\\n function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {\\n return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;\\n }\\n\\n /// @notice Gets the number of rounds for a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return The number of rounds.\\n function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {\\n return disputes[_disputeID].rounds.length;\\n }\\n\\n /// @notice Checks if a given dispute kit is supported by a given court.\\n /// @param _courtID The ID of the court to check the support for.\\n /// @param _disputeKitID The ID of the dispute kit to check the support for.\\n /// @return Whether the dispute kit is supported or not.\\n function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {\\n return courts[_courtID].supportedDisputeKits[_disputeKitID];\\n }\\n\\n /// @notice Gets the timesPerPeriod array for a given court.\\n /// @param _courtID The ID of the court to get the times from.\\n /// @return timesPerPeriod The timesPerPeriod array for the given court.\\n function getTimesPerPeriod(uint96 _courtID) external view returns (uint256[4] memory timesPerPeriod) {\\n timesPerPeriod = courts[_courtID].timesPerPeriod;\\n }\\n\\n // ************************************* //\\n // * Public Views for Dispute Kits * //\\n // ************************************* //\\n\\n /// @notice Gets the number of votes permitted for the specified dispute in the latest round.\\n /// @param _disputeID The ID of the dispute.\\n function getNumberOfVotes(uint256 _disputeID) external view returns (uint256) {\\n Dispute storage dispute = disputes[_disputeID];\\n return dispute.rounds[dispute.rounds.length - 1].nbVotes;\\n }\\n\\n /// @notice Returns true if the dispute kit will be switched to a parent DK.\\n /// @param _disputeID The ID of the dispute.\\n /// @return Whether DK will be switched or not.\\n function isDisputeKitJumping(uint256 _disputeID) external view returns (bool) {\\n Dispute storage dispute = disputes[_disputeID];\\n Round storage round = dispute.rounds[dispute.rounds.length - 1];\\n Court storage court = courts[dispute.courtID];\\n\\n if (round.nbVotes < court.jurorsForCourtJump) {\\n return false;\\n }\\n\\n // Jump if the parent court doesn't support the current DK.\\n return !courts[court.parent].supportedDisputeKits[round.disputeKitID];\\n }\\n\\n function getDisputeKitsLength() external view returns (uint256) {\\n return disputeKits.length;\\n }\\n\\n function convertEthToTokenAmount(IERC20 _toToken, uint256 _amountInEth) public view returns (uint256) {\\n return (_amountInEth * 10 ** currencyRates[_toToken].rateDecimals) / currencyRates[_toToken].rateInEth;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @notice Toggles the dispute kit support for a given court.\\n /// @param _courtID The ID of the court to toggle the support for.\\n /// @param _disputeKitID The ID of the dispute kit to toggle the support for.\\n /// @param _enable Whether to enable or disable the support. Note that classic dispute kit should always be enabled.\\n function _enableDisputeKit(uint96 _courtID, uint256 _disputeKitID, bool _enable) internal {\\n courts[_courtID].supportedDisputeKits[_disputeKitID] = _enable;\\n emit DisputeKitEnabled(_courtID, _disputeKitID, _enable);\\n }\\n\\n /// @notice If called only once then set _onError to Revert, otherwise set it to Return\\n /// @param _account The account to set the stake for.\\n /// @param _courtID The ID of the court to set the stake for.\\n /// @param _newStake The new stake.\\n /// @param _noDelay True if the stake change should not be delayed.\\n /// @param _onError Whether to revert or return false on error.\\n /// @return Whether the stake was successfully set or not.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _noDelay,\\n OnError _onError\\n ) internal returns (bool) {\\n if (_courtID == FORKING_COURT || _courtID >= courts.length) {\\n _stakingFailed(_onError, StakingResult.CannotStakeInThisCourt); // Staking directly into the forking court is not allowed.\\n return false;\\n }\\n if (_newStake != 0 && _newStake < courts[_courtID].minStake) {\\n _stakingFailed(_onError, StakingResult.CannotStakeLessThanMinStake); // Staking less than the minimum stake is not allowed.\\n return false;\\n }\\n (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) = sortitionModule.validateStake(\\n _account,\\n _courtID,\\n _newStake,\\n _noDelay\\n );\\n if (stakingResult != StakingResult.Successful) {\\n _stakingFailed(_onError, stakingResult);\\n return false;\\n }\\n if (pnkDeposit > 0) {\\n if (!pinakion.safeTransferFrom(_account, address(this), pnkDeposit)) {\\n _stakingFailed(_onError, StakingResult.StakingTransferFailed);\\n return false;\\n }\\n }\\n if (pnkWithdrawal > 0) {\\n if (!pinakion.safeTransfer(_account, pnkWithdrawal)) {\\n _stakingFailed(_onError, StakingResult.UnstakingTransferFailed);\\n return false;\\n }\\n }\\n sortitionModule.setStake(_account, _courtID, pnkDeposit, pnkWithdrawal, _newStake);\\n\\n return true;\\n }\\n\\n /// @notice It may revert depending on the _onError parameter.\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure virtual {\\n if (_onError == OnError.Return) return;\\n if (_result == StakingResult.StakingTransferFailed) revert StakingTransferFailed();\\n if (_result == StakingResult.UnstakingTransferFailed) revert UnstakingTransferFailed();\\n if (_result == StakingResult.CannotStakeInMoreCourts) revert StakingInTooManyCourts();\\n if (_result == StakingResult.CannotStakeInThisCourt) revert StakingNotPossibleInThisCourt();\\n if (_result == StakingResult.CannotStakeLessThanMinStake) revert StakingLessThanCourtMinStake();\\n if (_result == StakingResult.CannotStakeZeroWhenNoStake) revert StakingZeroWhenNoStake();\\n }\\n\\n /// @notice Gets a court ID, the minimum number of jurors and an ID of a dispute kit from a specified extra data bytes array.\\n /// @dev If `_extraData` contains an incorrect value then this value will be switched to default.\\n /// @param _extraData The extra data bytes array. The first 32 bytes are the court ID, the next are the minimum number of jurors and the last are the dispute kit ID.\\n /// @return courtID The court ID.\\n /// @return minJurors The minimum number of jurors required.\\n /// @return disputeKitID The ID of the dispute kit.\\n function _extraDataToCourtIDMinJurorsDisputeKit(\\n bytes memory _extraData\\n ) internal view returns (uint96 courtID, uint256 minJurors, uint256 disputeKitID) {\\n // Note that if the extradata doesn't contain 32 bytes for the dispute kit ID it'll return the default 0 index.\\n if (_extraData.length >= 64) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n courtID := mload(add(_extraData, 0x20))\\n minJurors := mload(add(_extraData, 0x40))\\n disputeKitID := mload(add(_extraData, 0x60))\\n }\\n if (courtID == FORKING_COURT || courtID >= courts.length) {\\n courtID = GENERAL_COURT;\\n }\\n if (minJurors == 0) {\\n minJurors = DEFAULT_NB_OF_JURORS;\\n }\\n if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKits.length) {\\n disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.\\n }\\n } else {\\n courtID = GENERAL_COURT;\\n minJurors = DEFAULT_NB_OF_JURORS;\\n disputeKitID = DISPUTE_KIT_CLASSIC;\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error OwnerOnly();\\n error InstructorOnly();\\n error OwnerOrInstructorOnly();\\n error DisputeKitOnly();\\n error SortitionModuleOnly();\\n error UnsuccessfulCall();\\n error InvalidDisputKitParent();\\n error MinStakeLowerThanParentCourt();\\n error UnsupportedDisputeKit();\\n error InvalidForkingCourtAsParent();\\n error WrongDisputeKitIndex();\\n error CannotDisableClassicDK();\\n error StakingInTooManyCourts();\\n error StakingNotPossibleInThisCourt();\\n error StakingLessThanCourtMinStake();\\n error StakingTransferFailed();\\n error UnstakingTransferFailed();\\n error ArbitrationFeesNotEnough();\\n error DisputeKitNotSupportedByCourt();\\n error MustSupportDisputeKitClassic();\\n error TokenNotAccepted();\\n error EvidenceNotPassedAndNotAppeal();\\n error DisputeStillDrawing();\\n error CommitPeriodNotPassed();\\n error VotePeriodNotPassed();\\n error AppealPeriodNotPassed();\\n error NotEvidencePeriod();\\n error AppealFeesNotEnough();\\n error DisputeNotAppealable();\\n error NotExecutionPeriod();\\n error RulingAlreadyExecuted();\\n error DisputePeriodIsFinal();\\n error TransferFailed();\\n error AllJurorsDrawn();\\n error NoJurorDrawn();\\n error StakingZeroWhenNoStake();\\n}\\n\",\"keccak256\":\"0x6a0daf9a8720b0618dc69c8b29794fad12f5477d4ec96c778c7c140150b8214d\",\"license\":\"MIT\"},\"src/arbitration/university/SortitionModuleUniversity.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"./KlerosCoreUniversity.sol\\\";\\nimport \\\"./ISortitionModuleUniversity.sol\\\";\\nimport \\\"../interfaces/IDisputeKit.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\nimport \\\"../../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleUniversity\\n/// @notice An adapted version of the SortitionModule contract for educational purposes.\\ncontract SortitionModuleUniversity is ISortitionModuleUniversity, UUPSProxiable, Initializable {\\n string public constant override version = \\\"2.0.0\\\";\\n\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n struct Juror {\\n mapping(uint96 => uint256) stakesByCourtID; // The stakes of the juror in particular courts.\\n uint96[] courtIDs; // The IDs of courts where the juror's stake path ends. A stake path is a path from the general court to a court the juror directly staked in using `_setStake`.\\n uint256 stakedPnk; // The juror's total amount of tokens staked in subcourts. Reflects actual pnk balance.\\n uint256 lockedPnk; // The juror's total amount of tokens locked in disputes. Can reflect actual pnk balance when stakedPnk are fully withdrawn.\\n }\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public owner; // The owner of the contract.\\n KlerosCoreUniversity public core; // The core arbitrator contract.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n mapping(address account => Juror) public jurors; // The jurors.\\n address private transientJuror; // The juror address used between calls within the same transaction.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @notice Emitted when a juror stakes in a court.\\n /// @param _address The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @param _amount The amount of tokens staked in the court.\\n /// @param _amountAllCourts The amount of tokens staked in all courts.\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount, uint256 _amountAllCourts);\\n\\n /// @notice Emitted when a juror's stake is locked.\\n /// @param _address The address of the juror.\\n /// @param _relativeAmount The amount of tokens locked.\\n /// @param _unlock Whether the stake is locked or unlocked.\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n /// @notice Emitted when leftover PNK is available.\\n /// @param _account The account of the juror.\\n /// @param _amount The amount of PNK available.\\n event LeftoverPNK(address indexed _account, uint256 _amount);\\n\\n /// @notice Emitted when leftover PNK is withdrawn.\\n /// @param _account The account of the juror withdrawing PNK.\\n /// @param _amount The amount of PNK withdrawn.\\n event LeftoverPNKWithdrawn(address indexed _account, uint256 _amount);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByOwner() {\\n if (owner != msg.sender) revert OwnerOnly();\\n _;\\n }\\n\\n modifier onlyByCore() {\\n if (address(core) != msg.sender) revert KlerosCoreOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializer (constructor equivalent for upgradable contracts).\\n /// @param _core The KlerosCore.\\n function initialize(address _owner, KlerosCoreUniversity _core) external initializer {\\n owner = _owner;\\n core = _core;\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /**\\n * @dev Access Control to perform implementation upgrades (UUPS Proxiable)\\n * @dev Only the owner can perform upgrades (`onlyByOwner`)\\n */\\n function _authorizeUpgrade(address) internal view override onlyByOwner {\\n // NOP\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc ISortitionModule\\n function passPhase() external override onlyByCore {\\n // NOP\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function executeDelayedStakes(uint256 _iterations) external override onlyByCore {\\n // NOP\\n }\\n\\n /// @inheritdoc ISortitionModuleUniversity\\n function setTransientJuror(address _juror) external override onlyByCore {\\n transientJuror = _juror;\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function createTree(uint96 _courtID, bytes memory _extraData) external {\\n // NOP\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function createDisputeHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors++;\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function postDrawHook(uint256 /*_disputeID*/, uint256 /*_roundID*/) external override onlyByCore {\\n disputesWithoutJurors--;\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function validateStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool /*_noDelay*/\\n )\\n external\\n view\\n override\\n onlyByCore\\n returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult)\\n {\\n Juror storage juror = jurors[_account];\\n uint256 currentStake = _stakeOf(_account, _courtID);\\n\\n uint256 nbCourts = juror.courtIDs.length;\\n if (currentStake == 0 && nbCourts >= MAX_STAKE_PATHS) {\\n return (0, 0, StakingResult.CannotStakeInMoreCourts); // Prevent staking beyond MAX_STAKE_PATHS but unstaking is always allowed.\\n }\\n\\n if (currentStake == 0 && _newStake == 0) {\\n return (0, 0, StakingResult.CannotStakeZeroWhenNoStake); // Forbid staking 0 amount when current stake is 0 to avoid flaky behaviour.\\n }\\n\\n if (_newStake >= currentStake) {\\n pnkDeposit = _newStake - currentStake;\\n } else {\\n pnkWithdrawal = currentStake - _newStake;\\n // Ensure locked tokens remain in the contract. They can only be released during Execution.\\n uint256 possibleWithdrawal = juror.stakedPnk > juror.lockedPnk ? juror.stakedPnk - juror.lockedPnk : 0;\\n if (pnkWithdrawal > possibleWithdrawal) {\\n pnkWithdrawal = possibleWithdrawal;\\n }\\n }\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) external override onlyByCore {\\n _setStake(_account, _courtID, _pnkDeposit, _pnkWithdrawal, _newStake);\\n }\\n\\n function setStakePenalty(\\n address _account,\\n uint96 _courtID,\\n uint256 _penalty\\n ) external override onlyByCore returns (uint256 pnkBalance, uint256 newCourtStake, uint256 availablePenalty) {\\n Juror storage juror = jurors[_account];\\n availablePenalty = _penalty;\\n newCourtStake = _stakeOf(_account, _courtID);\\n if (juror.stakedPnk < _penalty) {\\n availablePenalty = juror.stakedPnk;\\n }\\n\\n if (availablePenalty == 0) return (juror.stakedPnk, newCourtStake, 0); // No penalty to apply.\\n\\n uint256 currentStake = _stakeOf(_account, _courtID);\\n uint256 newStake = 0;\\n if (currentStake >= availablePenalty) {\\n newStake = currentStake - availablePenalty;\\n }\\n _setStake(_account, _courtID, 0, availablePenalty, newStake);\\n pnkBalance = juror.stakedPnk; // updated by _setStake()\\n newCourtStake = _stakeOf(_account, _courtID); // updated by _setStake()\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function setStakeReward(\\n address _account,\\n uint96 _courtID,\\n uint256 _reward\\n ) external override onlyByCore returns (bool success) {\\n if (_reward == 0) return true; // No reward to add.\\n\\n uint256 currentStake = _stakeOf(_account, _courtID);\\n if (currentStake == 0) return false; // Juror has been unstaked, don't increase their stake.\\n\\n uint256 newStake = currentStake + _reward;\\n _setStake(_account, _courtID, _reward, 0, newStake);\\n return true;\\n }\\n\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _pnkDeposit,\\n uint256 _pnkWithdrawal,\\n uint256 _newStake\\n ) internal {\\n Juror storage juror = jurors[_account];\\n uint256 currentStake = _stakeOf(_account, _courtID);\\n if (_pnkDeposit > 0) {\\n if (currentStake == 0) {\\n juror.courtIDs.push(_courtID);\\n }\\n // Increase juror's balance by deposited amount.\\n juror.stakedPnk += _pnkDeposit;\\n } else {\\n juror.stakedPnk -= _pnkWithdrawal;\\n if (_newStake == 0) {\\n // Cleanup\\n for (uint256 i = juror.courtIDs.length; i > 0; i--) {\\n if (juror.courtIDs[i - 1] == _courtID) {\\n juror.courtIDs[i - 1] = juror.courtIDs[juror.courtIDs.length - 1];\\n juror.courtIDs.pop();\\n break;\\n }\\n }\\n }\\n }\\n\\n bool finished = false;\\n uint96 currentCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n juror.stakesByCourtID[currentCourtID] += _newStake;\\n juror.stakesByCourtID[currentCourtID] -= currentStake;\\n if (currentCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currentCourtID, , , , , ) = core.courts(currentCourtID);\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake, juror.stakedPnk);\\n }\\n\\n function lockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk += _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, false);\\n }\\n\\n function unlockStake(address _account, uint256 _relativeAmount) external override onlyByCore {\\n jurors[_account].lockedPnk -= _relativeAmount;\\n emit StakeLocked(_account, _relativeAmount, true);\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function forcedUnstakeAllCourts(address _account) external override onlyByCore {\\n uint96[] memory courtIDs = getJurorCourtIDs(_account);\\n for (uint256 j = courtIDs.length; j > 0; j--) {\\n core.setStakeBySortitionModule(_account, courtIDs[j - 1], 0);\\n }\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function forcedUnstake(address _account, uint96 _courtID) external override onlyByCore {\\n core.setStakeBySortitionModule(_account, _courtID, 0);\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function withdrawLeftoverPNK(address _account) external override {\\n // Can withdraw the leftover PNK if fully unstaked, has no tokens locked and has positive balance.\\n // This withdrawal can't be triggered by calling setStake() in KlerosCore because current stake is technically 0, thus it is done via separate function.\\n uint256 amount = getJurorLeftoverPNK(_account);\\n if (amount == 0) revert NotEligibleForWithdrawal();\\n jurors[_account].stakedPnk = 0;\\n core.transferBySortitionModule(_account, amount);\\n emit LeftoverPNKWithdrawn(_account, amount);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc ISortitionModule\\n function draw(uint96, uint256, uint256) public view override returns (address drawnAddress, uint96 fromSubcourtID) {\\n drawnAddress = transientJuror;\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function getJurorBalance(\\n address _juror,\\n uint96 _courtID\\n )\\n external\\n view\\n override\\n returns (uint256 totalStaked, uint256 totalLocked, uint256 stakedInCourt, uint256 nbCourts)\\n {\\n Juror storage juror = jurors[_juror];\\n totalStaked = juror.stakedPnk;\\n totalLocked = juror.lockedPnk;\\n nbCourts = juror.courtIDs.length;\\n for (uint256 i = 0; i < nbCourts; i++) {\\n if (juror.courtIDs[i] == _courtID) {\\n stakedInCourt = juror.stakesByCourtID[_courtID];\\n break;\\n }\\n }\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function getJurorCourtIDs(address _juror) public view override returns (uint96[] memory) {\\n return jurors[_juror].courtIDs;\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function isJurorStaked(address _juror) external view override returns (bool) {\\n return jurors[_juror].stakedPnk > 0;\\n }\\n\\n /// @inheritdoc ISortitionModule\\n function getJurorLeftoverPNK(address _juror) public view override returns (uint256) {\\n Juror storage juror = jurors[_juror];\\n if (juror.courtIDs.length == 0 && juror.lockedPnk == 0) {\\n return juror.stakedPnk;\\n }\\n return 0;\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @notice Gets the stake of a juror in a court.\\n ///\\n /// @dev Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in\\n /// but acceptable for this educational implementation.\\n ///\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return stakedInCourt The amount of tokens staked by the juror in the court.\\n function _stakeOf(address _juror, uint96 _courtID) internal view returns (uint256 stakedInCourt) {\\n Juror storage juror = jurors[_juror];\\n for (uint256 i = 0; i < juror.courtIDs.length; i++) {\\n if (juror.courtIDs[i] == _courtID) {\\n stakedInCourt = juror.stakesByCourtID[_courtID];\\n break;\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error OwnerOnly();\\n error KlerosCoreOnly();\\n error NotEligibleForWithdrawal();\\n}\\n\",\"keccak256\":\"0x518a3b161ea7c1199aed0932c71ec866106bfb13b24e633bd2fd0924c136403d\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n// Courts\\nuint96 constant FORKING_COURT = 0; // Index of the forking court.\\nuint96 constant GENERAL_COURT = 1; // Index of the default (general) court.\\n\\n// Dispute Kits\\nuint256 constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.\\nuint256 constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.\\n\\n// Sortition Module\\nuint256 constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.\\nuint256 constant DEFAULT_K = 6; // Default number of children per node.\\n\\n// Defaults\\nuint256 constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.\\nIERC20 constant NATIVE_CURRENCY = IERC20(address(0)); // The native currency, such as ETH on Arbitrum, Optimism and Ethereum L1.\\n\\n// Units\\nuint256 constant ONE_BASIS_POINT = 10000;\\n\\nenum OnError {\\n Revert,\\n Return\\n}\\n\\nenum StakingResult {\\n Successful,\\n Delayed,\\n StakingTransferFailed,\\n UnstakingTransferFailed,\\n CannotStakeInMoreCourts,\\n CannotStakeInThisCourt,\\n CannotStakeLessThanMinStake,\\n CannotStakeMoreThanMaxStakePerJuror,\\n CannotStakeMoreThanMaxTotalStaked,\\n CannotStakeZeroWhenNoStake\\n}\\n\",\"keccak256\":\"0xb8c96c842259ca1384e8450dfb214f0fcd604829c84293dd3f8981f3421b66c9\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.24;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n///\\n/// @notice Wrappers around ERC20 operations\\n///\\n/// @dev Throws on failure (when the token contract returns false).\\n/// Tokens that return no value (and instead revert or throw on failure) are also supported.\\n/// Non-reverting calls are assumed to be successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @notice Increases the allowance granted to `spender` by the caller.\\n /// @param _token Token to transfer.\\n /// @param _spender The address which will spend the funds.\\n /// @param _addedValue The amount of tokens to increase the allowance by.\\n function increaseAllowance(IERC20 _token, address _spender, uint256 _addedValue) internal returns (bool) {\\n _token.approve(_spender, _token.allowance(address(this), _spender) + _addedValue);\\n return true;\\n }\\n\\n /// @notice Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @notice Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recipient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\\n\",\"keccak256\":\"0x36b92f984484f9dfd63a40ccb1c1e23cde0085db36ec8adb7afe7e98ef667bd7\",\"license\":\"MIT\"},\"src/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) \\n\\npragma solidity ^0.8.24;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to the proxy constructor\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1))\\n bytes32 private constant _INITIALIZABLE_STORAGE =\\n 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error AlreadyInitialized();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `initializer()`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n if (!(isTopLevelCall && initialized < 1) && !(address(this).code.length == 0 && initialized == 1)) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert AlreadyInitialized();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert AlreadyInitialized();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := _INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0xdad09e5f773fa6940dbd8c28480f602a7eaa3c70d3da9d06df140187cbf5dad4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxiable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.24;\\n\\n/// @title UUPS Proxiable\\n/// @author Simon Malatrait \\n/// @notice This contract implements an upgradeability mechanism designed for UUPS proxies.\\n///\\n/// @dev Adapted from \\n/// The functions included here can perform an upgrade of an UUPS Proxy, when this contract is set as the implementation behind such a proxy.\\n///\\n/// IMPORTANT: A UUPS proxy requires its upgradeability functions to be in the implementation as opposed to the transparent proxy.\\n/// This means that if the proxy is upgraded to an implementation that does not support this interface, it will no longer be upgradeable.\\n///\\n/// A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n/// reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n/// `UUPSProxiable` with a custom implementation of upgrades.\\n///\\n/// The `_authorizeUpgrade` function must be overridden to include access restriction to the upgrade mechanism.\\nabstract contract UUPSProxiable {\\n // ************************************* //\\n // * Event * //\\n // ************************************* //\\n\\n /// @notice Emitted when the `implementation` has been successfully upgraded.\\n /// @param newImplementation Address of the new implementation the proxy is now forwarding calls to.\\n event Upgraded(address indexed newImplementation);\\n\\n // ************************************* //\\n // * Error * //\\n // ************************************* //\\n\\n /// @notice The call is from an unauthorized context.\\n error UUPSUnauthorizedCallContext();\\n\\n /// @notice The storage `slot` is unsupported as a UUID.\\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\\n\\n /// @notice The `implementation` is not UUPS-compliant\\n error InvalidImplementation(address implementation);\\n\\n /// Failed Delegated call\\n error FailedDelegateCall();\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev Storage slot with the address of the current implementation.\\n /// @dev This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// @dev validated in the constructor.\\n /// @dev NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /// @dev Storage variable of the proxiable contract address.\\n /// @dev It is used to check whether or not the current call is from the proxy.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address private immutable __self = address(this);\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n /// @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract.\\n /// @dev Called by {upgradeToAndCall}.\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @notice Upgrade mechanism including access control and UUPS-compliance.\\n /// @param newImplementation Address of the new implementation contract.\\n /// @param data Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n /// @dev Reverts if the execution is not performed via delegatecall or the execution\\n /// context is not of a proxy with an ERC1967-compliant implementation pointing to self.\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual {\\n _authorizeUpgrade(newImplementation);\\n\\n // Check that the execution is being performed through a delegatecall call and that the execution context is\\n // a proxy contract with an implementation (as defined in ERC1967) pointing to self.\\n if (address(this) == __self || _getImplementation() != __self) {\\n revert UUPSUnauthorizedCallContext();\\n }\\n\\n try UUPSProxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n if (slot != IMPLEMENTATION_SLOT) {\\n revert UUPSUnsupportedProxiableUUID(slot);\\n }\\n // Store the new implementation address to the implementation storage slot.\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, newImplementation)\\n }\\n emit Upgraded(newImplementation);\\n\\n if (data.length != 0) {\\n // The return data is not checked (checking, in case of success, that the newImplementation code is non-empty if the return data is empty) because the authorized callee is trusted.\\n /// @custom:oz-upgrades-unsafe-allow delegatecall\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n revert FailedDelegateCall();\\n }\\n }\\n } catch {\\n revert InvalidImplementation(newImplementation);\\n }\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @notice Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the\\n /// implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n ///\\n /// @dev IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n /// bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n /// function revert if invoked through a proxy. This is guaranteed by the if statement.\\n function proxiableUUID() external view virtual returns (bytes32) {\\n if (address(this) != __self) {\\n // Must not be called through delegatecall\\n revert UUPSUnauthorizedCallContext();\\n }\\n return IMPLEMENTATION_SLOT;\\n }\\n\\n /// @notice Returns the version of the implementation.\\n /// @return Version string.\\n function version() external view virtual returns (string memory);\\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\",\"keccak256\":\"0xa369061748e8a7b02873d597d4c78a2a09328111f04a97428b1c209e82cf5414\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a080604052346100c157306080525f516020611d075f395f51905f525460ff8160401c166100b3576002600160401b03196001600160401b03821601610060575b604051611c4190816100c68239608051818181610d720152610e3a0152f35b6001600160401b0319166001600160401b039081175f516020611d075f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80610041565b62dc149f60e41b5f5260045ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f905f3560e01c9081630343274414611336575080630b274f2e1461131e57806321e1625e1461129857806335975f4a1461127f578063485cc9551461107a5780634f1ef28614610dea57806352d1902d14610d58578063543f8a3614610cea57806354fd4d5014610c745780635d2d784614610c425780636624192f14610c05578063664bffc314610bbe57806369f4587714610aa2578063771a27cb14610a5d5780638da5cb5b14610a37578063965af6c7146109ae5780639d560867146109105780639fbb56f1146108e4578063aa9ebfb7146107c6578063aac03ad21461044e578063b4ebe8381461040b578063c70ba3b914610378578063d045e00214610341578063d09f392d146102e8578063d1c1df4814610224578063dca5f6b0146101df578063f1a531041461017b5763f2f4eb2614610152575f80fd5b3461017857806003193601126101785760206001600160a01b0360015416604051908152f35b80fd5b503461017857602036600319011261017857610195611350565b6001600160a01b036001541633036101d1576001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19600454161760045580f35b600482628448c760e31b8152fd5b503461017857602036600319011261017857604080916001600160a01b03610205611350565b1681526003602052206003600282015491015482519182526020820152f35b50346101785760403660031901126101785761023e611350565b610246611414565b916001600160a01b0381921681526003602052604081209160028301549260038101549060018101956001600160601b038754959116905b8581106102a4575b50505060809450604051938452602084015260408301526060820152f35b816001600160601b036102b7838b611b4f565b90549060031b1c16146102cc5760010161027e565b5090919250608095505f5260205260405f2054905f8080610286565b5034610178576102f7366113fe565b50506001600160a01b03600154163303610333576002545f19811461031f5760010160025580f35b602482634e487b7160e01b81526011600452fd5b80628448c760e31b60049252fd5b50346101785760603660031901126101785760409061035e61142a565b506001600160a01b03600454169082519182526020820152f35b503461017857608036600319011261017857610392611350565b61039a611414565b60643580151503610407576001600160a01b036001541633036103f957906103c59160443591611a76565b906040519283526020830152600a8110156103e557606092506040820152f35b602483634e487b7160e01b81526021600452fd5b600483628448c760e31b8152fd5b8280fd5b50346101785760403660031901126101785761042561142a565b5060243567ffffffffffffffff811161044a576104469036906004016113b8565b5080f35b5080fd5b50346101785760a036600319011261017857610468611350565b610470611414565b60443591608435906001600160a01b036001541633036107b8576001600160a01b0381169384865260036020526104ab846040882093611b83565b908015610684578115610620575b6104c86002840191825461148e565b90555b8390865b8015610520575050509160609160027f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c36940154906001600160601b036040519316835260208301526040820152a280f35b6001600160601b0383165f528360205260405f2061053f86825461148e565b90556001600160601b0383165f528360205260405f20610560838254611754565b90556001600160601b0383166001810361057d57505060016104cf565b90925060c06001600160a01b036001541691602460405180948193630fad06e960e11b835260048301525afa9081156106155788916105be575b50916104cf565b905060c0813d821161060d575b816105d860c09383611366565b81010312610605578051906001600160601b0382168203610609576020015180151503610605575f6105b7565b8780fd5b8880fd5b3d91506105cb565b6040513d8a823e3d90fd5b60018301805490680100000000000000008210156106705761064c828892600161066b95018155611b4f565b9091906001600160601b038084549260031b9316831b921b1916179055565b6104b9565b602489634e487b7160e01b81526041600452fd5b50600282016106966064358254611754565b9055826104cb57939291906001810194855495866001600160601b038616975b6106c8575b50509091929394506104cb565b5f1981018181116107a457886001600160601b036106e68386611b4f565b90549060031b1c161461070357506106fd9061156b565b806106b6565b91929394959697505081545f198101908111610790579061064c6001600160601b036107326107419486611b4f565b90549060031b1c169184611b4f565b8054801561077c575f19019061076f61075a8383611b4f565b6001600160601b0382549160031b1b19169055565b5590849392915f806106bb565b602488634e487b7160e01b81526031600452fd5b602489634e487b7160e01b81526011600452fd5b60248a634e487b7160e01b81526011600452fd5b600485628448c760e31b8152fd5b5034610178576020366003190112610178576107e0611350565b6001600160a01b036001541633036101d157806108046001600160a01b03926114af565b90815192839116925b610815578380f35b6001546001600160a01b03165f1982018281116108d05783518110156108bc57906001600160601b036020879360051b8601015116813b15610407578291606483926040519485938492630761c14d60e01b84528b600485015260248401528160448401525af180156108b157610898575b50506108929061156b565b8061080d565b816108a291611366565b6108ad57835f610887565b8380fd5b6040513d84823e3d90fd5b602486634e487b7160e01b81526032600452fd5b602486634e487b7160e01b81526011600452fd5b5034610178576020366003190112610178576020610908610903611350565b611a3a565b604051908152f35b50346101785760403660031901126101785761092a611350565b90610933611414565b6001600160a01b03600154163381036103f9578293813b156109a95760646001600160a01b03918580946001600160601b036040519788968795630761c14d60e01b87521660048601521660248401528160448401525af180156108b1576109985750f35b816109a291611366565b6101785780f35b505050fd5b5034610178576040366003190112610178576109c8611350565b602435906001600160a01b036001541633036103f95760406001600160a01b037f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09216928385526003602052600382862001610a25828254611754565b9055815190815260016020820152a280f35b50346101785780600319360112610178576001600160a01b036020915416604051908152f35b503461017857610a6c36611440565b926001600160a01b03600193929354163303610333576060610a8f858585611761565b9060405192835260208301526040820152f35b5034610b92576020366003190112610b9257610abc611350565b610ac581611a3a565b908115610b96576001600160a01b031690815f5260036020525f60026040822001556001600160a01b0360015416803b15610b92575f80916044604051809481937f42c37fa30000000000000000000000000000000000000000000000000000000083528860048401528760248401525af18015610b8757610b71575b5060207f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c91604051908152a280f35b610b7e9193505f90611366565b5f916020610b42565b6040513d5f823e3d90fd5b5f80fd5b7fdc604fd1000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610b9257610bcc36611440565b6001600160a01b03600193929354163303610bf757602092610bed92611577565b6040519015158152f35b628448c760e31b5f5260045ffd5b34610b92576020366003190112610b92576001600160a01b03610c26611350565b165f5260036020526020600260405f2001541515604051908152f35b34610b9257610c50366113fe565b50506001600160a01b03600154163303610bf757610c6f60025461156b565b600255005b34610b92575f366003190112610b92576040805190610c938183611366565b6005825260208201917f322e302e3000000000000000000000000000000000000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b34610b92576020366003190112610b9257610d0b610d06611350565b6114af565b6040518091602082016020835281518091526020604084019201905f5b818110610d36575050500390f35b82516001600160601b0316845285945060209384019390920191600101610d28565b34610b92575f366003190112610b92576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610dc25760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b7fe07c8dba000000000000000000000000000000000000000000000000000000005f5260045ffd5b6040366003190112610b9257610dfe611350565b60243567ffffffffffffffff8111610b9257610e1e9036906004016113b8565b906001600160a01b035f54163303611052576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001680301490811561101d575b50610dc2576001600160a01b038116916040517f52d1902d000000000000000000000000000000000000000000000000000000008152602081600481875afa5f9181610fe9575b50610edd57837f0c760937000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc859203610fbe5750827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2805180610f58575b005b5f926020849301905af43d15610fb9573d610f728161139c565b90610f806040519283611366565b81525f60203d92013e5b15610f9157005b7f736436ba000000000000000000000000000000000000000000000000000000005f5260045ffd5b610f8a565b7faa1d49a4000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091506020813d602011611015575b8161100560209383611366565b81010312610b9257519085610eac565b3d9150610ff8565b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141583610e65565b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610b92576040366003190112610b9257611093611350565b6024356001600160a01b038116809103610b92577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5460ff8160401c16159267ffffffffffffffff82168480611275575b159081611257575b5061122f5767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e556001600160a01b0391846111f0575b501673ffffffffffffffffffffffffffffffffffffffff195f5416175f5573ffffffffffffffffffffffffffffffffffffffff19600154161760015561117357005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e54167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5584611131565b7f0dc149f0000000000000000000000000000000000000000000000000000000005f5260045ffd5b303b1591508161126a575b5015856110ec565b600191501485611262565b50600181106110e4565b34610b92576020366003190112610b9257610f5661147a565b34610b92576040366003190112610b92576112b1611350565b602435906001600160a01b03600154163303610bf75760406001600160a01b037f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0921692835f5260036020526003825f200161130e82825461148e565b905581519081525f6020820152a2005b34610b92575f366003190112610b9257610f5661147a565b34610b92575f366003190112610b92576020906002548152f35b600435906001600160a01b0382168203610b9257565b90601f8019910116810190811067ffffffffffffffff82111761138857604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161138857601f01601f191660200190565b81601f82011215610b92578035906113cf8261139c565b926113dd6040519485611366565b82845260208383010111610b9257815f926020809301838601378301015290565b6040906003190112610b92576004359060243590565b602435906001600160601b0382168203610b9257565b600435906001600160601b0382168203610b9257565b6060906003190112610b92576004356001600160a01b0381168103610b9257906024356001600160601b0381168103610b92579060443590565b6001600160a01b03600154163303610bf757565b9190820180921161149b57565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03165f526003602052600160405f2001604051808260208294549384815201905f5260205f20925f905b80600183011061153a57611506945491818110611520575b10611509575b500382611366565b90565b60601c6001600160601b031681526020015f6114fe565b9260206001916001600160601b03851681520193016114f8565b91600291935060406001916001600160601b038754818116835260601c1660208201520194019201849293916114e0565b801561149b575f190190565b91801561174c576115888284611b83565b801561174457816115989161148e565b906001600160a01b03841693845f5260036020526115ba8460405f2092611b83565b8015611714575b6115d06002830193845461148e565b835584915f5b80156116275750505050916060917f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369354906001600160601b036040519316835260208301526040820152a2600190565b6001600160601b0384165f528160205260405f2061164687825461148e565b90556001600160601b0384165f528160205260405f20611667848254611754565b90556001600160601b0384166001810361168457505060016115d6565b90935060c06001600160a01b036001541691602460405180948193630fad06e960e11b835260048301525afa908115610b87575f916116c5575b50926115d6565b905060c0813d821161170c575b816116df60c09383611366565b81010312610b92578051906001600160601b0382168203610b92576020015180151503610b92575f6116be565b3d91506116d2565b600182018054680100000000000000008110156113885761064c8161173f9360018a94018155611b4f565b6115c1565b505050505f90565b505050600190565b9190820391821161149b57565b919290926001600160a01b03831693845f52600360205260405f20918092600261178b8488611b83565b9101918254908110611a32575b8415611a265750506117aa8286611b83565b955f9684811015611a12575b50805f52600360205260405f206117cd8488611b83565b9060028101916117de878454611754565b83558915611933575b85915f5b801561184657505050506060611843959697987f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369254604051916001600160601b038816835260208301526040820152a25494611b83565b91565b6001600160601b0384165f528160205260405f206118658d825461148e565b90556001600160601b0384165f528160205260405f20611886848254611754565b90556001600160601b038416600181036118a357505060016117eb565b90935060c06001600160a01b036001541691602460405180948193630fad06e960e11b835260048301525afa908115610b87575f916118e4575b50926117eb565b905060c0813d821161192b575b816118fe60c09383611366565b81010312610b92578051906001600160601b0382168203610b92576020015180151503610b92575f6118dd565b3d91506118f1565b979695949392919060018101988954998a6001600160601b0388169b5b611966575b5050909192939495969798506117e7565b5f19810181811161149b578c6001600160601b036119848386611b4f565b90549060031b1c16146119a1575061199b9061156b565b80611950565b9192939495969798999a9b50508154905f19820191821161149b5761064c6001600160601b036107326119d49486611b4f565b805480156119fe575f1901906119ed61075a8383611b4f565b559088979695949392915f80611955565b634e487b7160e01b5f52603160045260245ffd5b611a1f9197508490611754565b955f6117b6565b965094505f9392505050565b935083611798565b6001600160a01b03165f52600360205260405f2060018101541580611a6a575b611a6357505f90565b6002015490565b50600381015415611a5a565b9092915f91611a9b5f956001600160a01b0383165f52600360205260405f2092611b83565b926001820154841580918192611b43575b50611b335780611b2b575b611b1c57838310611ad457505090611ace91611754565b91905f90565b92611ae192919550611754565b92600360028201549101548082115f14611b1457611afe91611754565b808411611b0c575b50611ace565b92505f611b06565b50505f611afe565b5050505090505f905f90600990565b508215611ab7565b505050505090505f905f90600490565b6004915010155f611aac565b9190918054831015611b6f575f52600c600160205f2084821c0193160290565b634e487b7160e01b5f52603260045260245ffd5b91906001600160a01b035f93165f52600360205260405f205f91600182018054935b848110611bb4575b5050505050565b6001600160601b03611bc68284611b4f565b90549060031b1c166001600160601b03841614611be557600101611ba5565b5050909293506001600160601b039150165f5260205260405f2054905f80808080611bad56fea2646970667358221220610dcaf880c7003b3c15c538c4a9a9b4f317449d0eba3fbf1a60083d71651a8464736f6c634300081e0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e", + "deployedBytecode": "0x6080806040526004361015610012575f80fd5b5f905f3560e01c9081630343274414611336575080630b274f2e1461131e57806321e1625e1461129857806335975f4a1461127f578063485cc9551461107a5780634f1ef28614610dea57806352d1902d14610d58578063543f8a3614610cea57806354fd4d5014610c745780635d2d784614610c425780636624192f14610c05578063664bffc314610bbe57806369f4587714610aa2578063771a27cb14610a5d5780638da5cb5b14610a37578063965af6c7146109ae5780639d560867146109105780639fbb56f1146108e4578063aa9ebfb7146107c6578063aac03ad21461044e578063b4ebe8381461040b578063c70ba3b914610378578063d045e00214610341578063d09f392d146102e8578063d1c1df4814610224578063dca5f6b0146101df578063f1a531041461017b5763f2f4eb2614610152575f80fd5b3461017857806003193601126101785760206001600160a01b0360015416604051908152f35b80fd5b503461017857602036600319011261017857610195611350565b6001600160a01b036001541633036101d1576001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19600454161760045580f35b600482628448c760e31b8152fd5b503461017857602036600319011261017857604080916001600160a01b03610205611350565b1681526003602052206003600282015491015482519182526020820152f35b50346101785760403660031901126101785761023e611350565b610246611414565b916001600160a01b0381921681526003602052604081209160028301549260038101549060018101956001600160601b038754959116905b8581106102a4575b50505060809450604051938452602084015260408301526060820152f35b816001600160601b036102b7838b611b4f565b90549060031b1c16146102cc5760010161027e565b5090919250608095505f5260205260405f2054905f8080610286565b5034610178576102f7366113fe565b50506001600160a01b03600154163303610333576002545f19811461031f5760010160025580f35b602482634e487b7160e01b81526011600452fd5b80628448c760e31b60049252fd5b50346101785760603660031901126101785760409061035e61142a565b506001600160a01b03600454169082519182526020820152f35b503461017857608036600319011261017857610392611350565b61039a611414565b60643580151503610407576001600160a01b036001541633036103f957906103c59160443591611a76565b906040519283526020830152600a8110156103e557606092506040820152f35b602483634e487b7160e01b81526021600452fd5b600483628448c760e31b8152fd5b8280fd5b50346101785760403660031901126101785761042561142a565b5060243567ffffffffffffffff811161044a576104469036906004016113b8565b5080f35b5080fd5b50346101785760a036600319011261017857610468611350565b610470611414565b60443591608435906001600160a01b036001541633036107b8576001600160a01b0381169384865260036020526104ab846040882093611b83565b908015610684578115610620575b6104c86002840191825461148e565b90555b8390865b8015610520575050509160609160027f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c36940154906001600160601b036040519316835260208301526040820152a280f35b6001600160601b0383165f528360205260405f2061053f86825461148e565b90556001600160601b0383165f528360205260405f20610560838254611754565b90556001600160601b0383166001810361057d57505060016104cf565b90925060c06001600160a01b036001541691602460405180948193630fad06e960e11b835260048301525afa9081156106155788916105be575b50916104cf565b905060c0813d821161060d575b816105d860c09383611366565b81010312610605578051906001600160601b0382168203610609576020015180151503610605575f6105b7565b8780fd5b8880fd5b3d91506105cb565b6040513d8a823e3d90fd5b60018301805490680100000000000000008210156106705761064c828892600161066b95018155611b4f565b9091906001600160601b038084549260031b9316831b921b1916179055565b6104b9565b602489634e487b7160e01b81526041600452fd5b50600282016106966064358254611754565b9055826104cb57939291906001810194855495866001600160601b038616975b6106c8575b50509091929394506104cb565b5f1981018181116107a457886001600160601b036106e68386611b4f565b90549060031b1c161461070357506106fd9061156b565b806106b6565b91929394959697505081545f198101908111610790579061064c6001600160601b036107326107419486611b4f565b90549060031b1c169184611b4f565b8054801561077c575f19019061076f61075a8383611b4f565b6001600160601b0382549160031b1b19169055565b5590849392915f806106bb565b602488634e487b7160e01b81526031600452fd5b602489634e487b7160e01b81526011600452fd5b60248a634e487b7160e01b81526011600452fd5b600485628448c760e31b8152fd5b5034610178576020366003190112610178576107e0611350565b6001600160a01b036001541633036101d157806108046001600160a01b03926114af565b90815192839116925b610815578380f35b6001546001600160a01b03165f1982018281116108d05783518110156108bc57906001600160601b036020879360051b8601015116813b15610407578291606483926040519485938492630761c14d60e01b84528b600485015260248401528160448401525af180156108b157610898575b50506108929061156b565b8061080d565b816108a291611366565b6108ad57835f610887565b8380fd5b6040513d84823e3d90fd5b602486634e487b7160e01b81526032600452fd5b602486634e487b7160e01b81526011600452fd5b5034610178576020366003190112610178576020610908610903611350565b611a3a565b604051908152f35b50346101785760403660031901126101785761092a611350565b90610933611414565b6001600160a01b03600154163381036103f9578293813b156109a95760646001600160a01b03918580946001600160601b036040519788968795630761c14d60e01b87521660048601521660248401528160448401525af180156108b1576109985750f35b816109a291611366565b6101785780f35b505050fd5b5034610178576040366003190112610178576109c8611350565b602435906001600160a01b036001541633036103f95760406001600160a01b037f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09216928385526003602052600382862001610a25828254611754565b9055815190815260016020820152a280f35b50346101785780600319360112610178576001600160a01b036020915416604051908152f35b503461017857610a6c36611440565b926001600160a01b03600193929354163303610333576060610a8f858585611761565b9060405192835260208301526040820152f35b5034610b92576020366003190112610b9257610abc611350565b610ac581611a3a565b908115610b96576001600160a01b031690815f5260036020525f60026040822001556001600160a01b0360015416803b15610b92575f80916044604051809481937f42c37fa30000000000000000000000000000000000000000000000000000000083528860048401528760248401525af18015610b8757610b71575b5060207f71bb1b604559acc3db697ccf2aa4228d727cd5b133d6ffa419518d51c117c95c91604051908152a280f35b610b7e9193505f90611366565b5f916020610b42565b6040513d5f823e3d90fd5b5f80fd5b7fdc604fd1000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610b9257610bcc36611440565b6001600160a01b03600193929354163303610bf757602092610bed92611577565b6040519015158152f35b628448c760e31b5f5260045ffd5b34610b92576020366003190112610b92576001600160a01b03610c26611350565b165f5260036020526020600260405f2001541515604051908152f35b34610b9257610c50366113fe565b50506001600160a01b03600154163303610bf757610c6f60025461156b565b600255005b34610b92575f366003190112610b92576040805190610c938183611366565b6005825260208201917f322e302e3000000000000000000000000000000000000000000000000000000083528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b34610b92576020366003190112610b9257610d0b610d06611350565b6114af565b6040518091602082016020835281518091526020604084019201905f5b818110610d36575050500390f35b82516001600160601b0316845285945060209384019390920191600101610d28565b34610b92575f366003190112610b92576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610dc25760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b7fe07c8dba000000000000000000000000000000000000000000000000000000005f5260045ffd5b6040366003190112610b9257610dfe611350565b60243567ffffffffffffffff8111610b9257610e1e9036906004016113b8565b906001600160a01b035f54163303611052576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001680301490811561101d575b50610dc2576001600160a01b038116916040517f52d1902d000000000000000000000000000000000000000000000000000000008152602081600481875afa5f9181610fe9575b50610edd57837f0c760937000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc859203610fbe5750827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2805180610f58575b005b5f926020849301905af43d15610fb9573d610f728161139c565b90610f806040519283611366565b81525f60203d92013e5b15610f9157005b7f736436ba000000000000000000000000000000000000000000000000000000005f5260045ffd5b610f8a565b7faa1d49a4000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091506020813d602011611015575b8161100560209383611366565b81010312610b9257519085610eac565b3d9150610ff8565b90506001600160a01b037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141583610e65565b7f596dcdb8000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610b92576040366003190112610b9257611093611350565b6024356001600160a01b038116809103610b92577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5460ff8160401c16159267ffffffffffffffff82168480611275575b159081611257575b5061122f5767ffffffffffffffff1982166001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e556001600160a01b0391846111f0575b501673ffffffffffffffffffffffffffffffffffffffff195f5416175f5573ffffffffffffffffffffffffffffffffffffffff19600154161760015561117357005b68ff0000000000000000197ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e54167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e5584611131565b7f0dc149f0000000000000000000000000000000000000000000000000000000005f5260045ffd5b303b1591508161126a575b5015856110ec565b600191501485611262565b50600181106110e4565b34610b92576020366003190112610b9257610f5661147a565b34610b92576040366003190112610b92576112b1611350565b602435906001600160a01b03600154163303610bf75760406001600160a01b037f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b0921692835f5260036020526003825f200161130e82825461148e565b905581519081525f6020820152a2005b34610b92575f366003190112610b9257610f5661147a565b34610b92575f366003190112610b92576020906002548152f35b600435906001600160a01b0382168203610b9257565b90601f8019910116810190811067ffffffffffffffff82111761138857604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161138857601f01601f191660200190565b81601f82011215610b92578035906113cf8261139c565b926113dd6040519485611366565b82845260208383010111610b9257815f926020809301838601378301015290565b6040906003190112610b92576004359060243590565b602435906001600160601b0382168203610b9257565b600435906001600160601b0382168203610b9257565b6060906003190112610b92576004356001600160a01b0381168103610b9257906024356001600160601b0381168103610b92579060443590565b6001600160a01b03600154163303610bf757565b9190820180921161149b57565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03165f526003602052600160405f2001604051808260208294549384815201905f5260205f20925f905b80600183011061153a57611506945491818110611520575b10611509575b500382611366565b90565b60601c6001600160601b031681526020015f6114fe565b9260206001916001600160601b03851681520193016114f8565b91600291935060406001916001600160601b038754818116835260601c1660208201520194019201849293916114e0565b801561149b575f190190565b91801561174c576115888284611b83565b801561174457816115989161148e565b906001600160a01b03841693845f5260036020526115ba8460405f2092611b83565b8015611714575b6115d06002830193845461148e565b835584915f5b80156116275750505050916060917f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369354906001600160601b036040519316835260208301526040820152a2600190565b6001600160601b0384165f528160205260405f2061164687825461148e565b90556001600160601b0384165f528160205260405f20611667848254611754565b90556001600160601b0384166001810361168457505060016115d6565b90935060c06001600160a01b036001541691602460405180948193630fad06e960e11b835260048301525afa908115610b87575f916116c5575b50926115d6565b905060c0813d821161170c575b816116df60c09383611366565b81010312610b92578051906001600160601b0382168203610b92576020015180151503610b92575f6116be565b3d91506116d2565b600182018054680100000000000000008110156113885761064c8161173f9360018a94018155611b4f565b6115c1565b505050505f90565b505050600190565b9190820391821161149b57565b919290926001600160a01b03831693845f52600360205260405f20918092600261178b8488611b83565b9101918254908110611a32575b8415611a265750506117aa8286611b83565b955f9684811015611a12575b50805f52600360205260405f206117cd8488611b83565b9060028101916117de878454611754565b83558915611933575b85915f5b801561184657505050506060611843959697987f70ca4ec64687bf265f39041896f3dbf10b9f650503cb38f2b3569fdce7489c369254604051916001600160601b038816835260208301526040820152a25494611b83565b91565b6001600160601b0384165f528160205260405f206118658d825461148e565b90556001600160601b0384165f528160205260405f20611886848254611754565b90556001600160601b038416600181036118a357505060016117eb565b90935060c06001600160a01b036001541691602460405180948193630fad06e960e11b835260048301525afa908115610b87575f916118e4575b50926117eb565b905060c0813d821161192b575b816118fe60c09383611366565b81010312610b92578051906001600160601b0382168203610b92576020015180151503610b92575f6118dd565b3d91506118f1565b979695949392919060018101988954998a6001600160601b0388169b5b611966575b5050909192939495969798506117e7565b5f19810181811161149b578c6001600160601b036119848386611b4f565b90549060031b1c16146119a1575061199b9061156b565b80611950565b9192939495969798999a9b50508154905f19820191821161149b5761064c6001600160601b036107326119d49486611b4f565b805480156119fe575f1901906119ed61075a8383611b4f565b559088979695949392915f80611955565b634e487b7160e01b5f52603160045260245ffd5b611a1f9197508490611754565b955f6117b6565b965094505f9392505050565b935083611798565b6001600160a01b03165f52600360205260405f2060018101541580611a6a575b611a6357505f90565b6002015490565b50600381015415611a5a565b9092915f91611a9b5f956001600160a01b0383165f52600360205260405f2092611b83565b926001820154841580918192611b43575b50611b335780611b2b575b611b1c57838310611ad457505090611ace91611754565b91905f90565b92611ae192919550611754565b92600360028201549101548082115f14611b1457611afe91611754565b808411611b0c575b50611ace565b92505f611b06565b50505f611afe565b5050505090505f905f90600990565b508215611ab7565b505050505090505f905f90600490565b6004915010155f611aac565b9190918054831015611b6f575f52600c600160205f2084821c0193160290565b634e487b7160e01b5f52603260045260245ffd5b91906001600160a01b035f93165f52600360205260405f205f91600182018054935b848110611bb4575b5050505050565b6001600160601b03611bc68284611b4f565b90549060031b1c166001600160601b03841614611be557600101611ba5565b5050909293506001600160601b039150165f5260205260405f2054905f80808080611bad56fea2646970667358221220610dcaf880c7003b3c15c538c4a9a9b4f317449d0eba3fbf1a60083d71651a8464736f6c634300081e0033", "devdoc": { - "details": "An adapted version of the SortitionModule contract for educational purposes.", "errors": { "AlreadyInitialized()": [ { @@ -594,22 +810,44 @@ { "details": "The contract is not initializing." } - ], - "UUPSUnauthorizedCallContext()": [ - { - "details": "The call is from an unauthorized context." - } - ], - "UUPSUnsupportedProxiableUUID(bytes32)": [ - { - "details": "The storage `slot` is unsupported as a UUID." - } ] }, "events": { "Initialized(uint64)": { "details": "Triggered when the contract has been initialized or reinitialized." }, + "LeftoverPNK(address,uint256)": { + "params": { + "_account": "The account of the juror.", + "_amount": "The amount of PNK available." + } + }, + "LeftoverPNKWithdrawn(address,uint256)": { + "params": { + "_account": "The account of the juror withdrawing PNK.", + "_amount": "The amount of PNK withdrawn." + } + }, + "NewPhase(uint8)": { + "params": { + "_phase": "The new phase." + } + }, + "StakeLocked(address,uint256,bool)": { + "params": { + "_address": "The address of the juror.", + "_relativeAmount": "The amount of tokens locked.", + "_unlock": "Whether the stake is locked or unlocked." + } + }, + "StakeSet(address,uint256,uint256,uint256)": { + "params": { + "_address": "The address of the juror.", + "_amount": "The amount of tokens staked in the court.", + "_amountAllCourts": "The amount of tokens staked in all courts.", + "_courtID": "The ID of the court." + } + }, "Upgraded(address)": { "params": { "newImplementation": "Address of the new implementation the proxy is now forwarding calls to." @@ -619,74 +857,176 @@ "kind": "dev", "methods": { "constructor": { - "details": "Constructor, initializing the implementation to reduce attack surface." + "custom:oz-upgrades-unsafe-allow": "constructor" }, - "draw(bytes32,uint256,uint256)": { - "details": "Draw an ID from a tree using a number. Note that this function reverts if the sum of all values in the tree is 0.", + "createDisputeHook(uint256,uint256)": { + "params": { + "_disputeID": "The ID of the dispute.", + "_roundID": "The ID of the round." + } + }, + "createTree(uint96,bytes)": { + "params": { + "_courtID": "The ID of the court.", + "_extraData": "Extra data that contains the number of children each node in the tree should have." + } + }, + "draw(uint96,uint256,uint256)": { + "details": "that this function reverts if the sum of all values in the tree is 0. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended.", + "params": { + "_coreDisputeID": "Index of the dispute in Kleros Core.", + "_courtID": "The ID of the court.", + "_nonce": "Nonce to hash with random number." + }, "returns": { - "drawnAddress": "The drawn address. `O(k * log_k(n))` where `k` is the maximum number of children per node in the tree, and `n` is the maximum number of nodes ever appended." + "drawnAddress": "The drawn address." + } + }, + "executeDelayedStakes(uint256)": { + "params": { + "_iterations": "The number of delayed stakes to execute." + } + }, + "forcedUnstake(address,uint96)": { + "details": "`O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", + "params": { + "_account": "The juror to unstake.", + "_courtID": "The ID of the court." + } + }, + "forcedUnstakeAllCourts(address)": { + "details": "`O(n * (p * log_k(j)) )` where `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", + "params": { + "_account": "The juror to unstake." } }, "getJurorBalance(address,uint96)": { - "details": "Gets the stake of a juror in a court. Warning: `O(n)` complexity where `n` is the number of courts the juror has staked in but acceptable for this educational implementation.", "params": { "_courtID": "The ID of the court.", "_juror": "The address of the juror." }, "returns": { - "nbCourts": "The number of courts the juror has staked in.", - "stakedInCourt": "The amount of tokens staked by the juror in the court.", - "totalLocked": "The total amount of tokens locked by the juror in the court.", - "totalStaked": "The total amount of tokens staked by the juror in the court." + "nbCourts": "The number of courts the juror has directly staked in.", + "stakedInCourt": "The amount of tokens staked in the specified court including locked tokens and penalty deductions.", + "totalLocked": "The total amount of tokens locked in disputes.", + "totalStaked": "The total amount of tokens staked including locked tokens and penalty deductions. Equivalent to the effective stake in the General court." } }, "getJurorCourtIDs(address)": { - "details": "Gets the court identifiers where a specific `_juror` has staked.", "params": { "_juror": "The address of the juror." } }, + "getJurorLeftoverPNK(address)": { + "params": { + "_juror": "The address of the juror." + }, + "returns": { + "_0": "Whether the juror has leftover PNK." + } + }, "initialize(address,address)": { - "details": "Initializer (constructor equivalent for upgradable contracts).", "params": { "_core": "The KlerosCore." } }, - "notifyRandomNumber(uint256)": { - "details": "Saves the random number to use it in sortition. Not used by this contract because the storing of the number is inlined in passPhase().", + "isJurorStaked(address)": { "params": { - "_randomNumber": "Random number returned by RNG contract." + "_juror": "The address of the juror." + }, + "returns": { + "_0": "Whether the juror is staked or not." + } + }, + "lockStake(address,uint256)": { + "params": { + "_account": "The address of the juror.", + "_relativeAmount": "The amount to lock." + } + }, + "postDrawHook(uint256,uint256)": { + "params": { + "_disputeID": "The ID of the dispute.", + "_roundID": "The ID of the round." } }, "proxiableUUID()": { - "details": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." + "details": "IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the if statement." }, - "setJurorInactive(address)": { - "details": "Unstakes the inactive juror from all courts. `O(n * (p * log_k(j)) )` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", + "setStake(address,uint96,uint256,uint256,uint256)": { + "details": "`O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", "params": { - "_account": "The juror to unstake." + "_account": "The address of the juror.", + "_courtID": "The ID of the court.", + "_newStake": "The new stake.", + "_pnkDeposit": "The amount of PNK to be deposited.", + "_pnkWithdrawal": "The amount of PNK to be withdrawn." } }, - "setStake(address,uint96,uint256,bool)": { - "details": "Sets the specified juror's stake in a court. `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", + "setStakePenalty(address,uint96,uint256)": { + "details": "`O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", "params": { "_account": "The address of the juror.", - "_alreadyTransferred": "True if the tokens were already transferred from juror. Only relevant for delayed stakes.", "_courtID": "The ID of the court.", - "_newStake": "The new stake." + "_penalty": "The amount of PNK to be deducted." }, "returns": { - "pnkDeposit": "The amount of PNK to be deposited.", - "pnkWithdrawal": "The amount of PNK to be withdrawn.", - "stakingResult": "The result of the staking operation." + "availablePenalty": "The amount of PNK that was actually deducted.", + "newCourtStake": "The updated stake of the juror in the court.", + "pnkBalance": "The updated total PNK balance of the juror, including the penalty." + } + }, + "setStakeReward(address,uint96,uint256)": { + "details": "`O(n + p * log_k(j))` where `O(n + p * log_k(j))` where `n` is the number of courts the juror has staked in, `p` is the depth of the court tree, `k` is the minimum number of children per node of one of these courts' sortition sum tree, and `j` is the maximum number of jurors that ever staked in one of these courts simultaneously.", + "params": { + "_account": "The address of the juror.", + "_courtID": "The ID of the court.", + "_reward": "The amount of PNK to be deposited as a reward." + }, + "returns": { + "success": "True if the reward was added successfully." + } + }, + "unlockStake(address,uint256)": { + "params": { + "_account": "The address of the juror.", + "_relativeAmount": "The amount to unlock." } }, "upgradeToAndCall(address,bytes)": { - "details": "Upgrade mechanism including access control and UUPS-compliance.Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", + "details": "Reverts if the execution is not performed via delegatecall or the execution context is not of a proxy with an ERC1967-compliant implementation pointing to self.", "params": { "data": "Data used in a delegate call to `newImplementation` if non-empty. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.", "newImplementation": "Address of the new implementation contract." } + }, + "validateStake(address,uint96,uint256,bool)": { + "details": "No state changes should be made when returning stakingResult != Successful, otherwise delayed stakes might break invariants.", + "params": { + "_account": "The address of the juror.", + "_courtID": "The ID of the court.", + "_newStake": "The new stake.", + "_noDelay": "True if the stake change should not be delayed." + }, + "returns": { + "pnkDeposit": "The amount of PNK to be deposited.", + "pnkWithdrawal": "The amount of PNK to be withdrawn.", + "stakingResult": "The result of the staking operation." + } + }, + "withdrawLeftoverPNK(address)": { + "details": "that since locked and staked PNK are async it is possible for the juror to have positive staked PNK balance while having 0 stake in courts and 0 locked tokens (eg. when the juror fully unstaked during dispute and later got his tokens unlocked). In this case the juror can use this function to withdraw the leftover tokens. Also note that if the juror has some leftover PNK while not fully unstaked he'll have to manually unstake from all courts to trigger this function.", + "params": { + "_account": "The juror whose PNK to withdraw." + } + } + }, + "stateVariables": { + "version": { + "return": "Version string.", + "returns": { + "_0": "Version string." + } } }, "title": "SortitionModuleUniversity", @@ -703,37 +1043,133 @@ { "notice": "The `implementation` is not UUPS-compliant" } + ], + "UUPSUnauthorizedCallContext()": [ + { + "notice": "The call is from an unauthorized context." + } + ], + "UUPSUnsupportedProxiableUUID(bytes32)": [ + { + "notice": "The storage `slot` is unsupported as a UUID." + } ] }, "events": { + "LeftoverPNK(address,uint256)": { + "notice": "Emitted when leftover PNK is available." + }, + "LeftoverPNKWithdrawn(address,uint256)": { + "notice": "Emitted when leftover PNK is withdrawn." + }, + "NewPhase(uint8)": { + "notice": "Emitted when the phase is changed." + }, + "StakeLocked(address,uint256,bool)": { + "notice": "Emitted when a juror's stake is locked." + }, + "StakeSet(address,uint256,uint256,uint256)": { + "notice": "Emitted when a juror stakes in a court." + }, "Upgraded(address)": { "notice": "Emitted when the `implementation` has been successfully upgraded." } }, "kind": "user", - "methods": {}, + "methods": { + "createDisputeHook(uint256,uint256)": { + "notice": "Triggers the state changes after dispute creation." + }, + "createTree(uint96,bytes)": { + "notice": "Create a sortition sum tree at the specified key." + }, + "draw(uint96,uint256,uint256)": { + "notice": "Draw an ID from a tree using a number." + }, + "executeDelayedStakes(uint256)": { + "notice": "Executes the next delayed stakes." + }, + "forcedUnstake(address,uint96)": { + "notice": "Unstakes the inactive juror from a specific court." + }, + "forcedUnstakeAllCourts(address)": { + "notice": "Unstakes the inactive juror from all courts." + }, + "getJurorBalance(address,uint96)": { + "notice": "Gets the balance of a juror in a court." + }, + "getJurorCourtIDs(address)": { + "notice": "Gets the court identifiers where a specific `_juror` has staked." + }, + "getJurorLeftoverPNK(address)": { + "notice": "Checks if the juror has any leftover PNK in the contract." + }, + "initialize(address,address)": { + "notice": "Initializer (constructor equivalent for upgradable contracts)." + }, + "isJurorStaked(address)": { + "notice": "Checks if the juror is staked in any court." + }, + "lockStake(address,uint256)": { + "notice": "Locks the tokens of the drawn juror." + }, + "passPhase()": { + "notice": "Passes the phase." + }, + "postDrawHook(uint256,uint256)": { + "notice": "Triggers the state changes after drawing." + }, + "proxiableUUID()": { + "notice": "Implementation of the ERC1822 `proxiableUUID` function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade." + }, + "setStake(address,uint96,uint256,uint256,uint256)": { + "notice": "Update the state of the stakes, called by KC at the end of setStake flow." + }, + "setStakePenalty(address,uint96,uint256)": { + "notice": "Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution." + }, + "setStakeReward(address,uint96,uint256)": { + "notice": "Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution." + }, + "unlockStake(address,uint256)": { + "notice": "Unlocks the tokens of the drawn juror." + }, + "upgradeToAndCall(address,bytes)": { + "notice": "Upgrade mechanism including access control and UUPS-compliance." + }, + "validateStake(address,uint96,uint256,bool)": { + "notice": "Validate the specified juror's new stake for a court." + }, + "version()": { + "notice": "Returns the version of the implementation." + }, + "withdrawLeftoverPNK(address)": { + "notice": "Gives back the locked PNKs in case the juror fully unstaked earlier." + } + }, + "notice": "An adapted version of the SortitionModule contract for educational purposes.", "version": 1 }, "storageLayout": { "storage": [ { - "astId": 26933, + "astId": 30225, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", - "label": "governor", + "label": "owner", "offset": 0, "slot": "0", "type": "t_address" }, { - "astId": 26936, + "astId": 30228, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCoreUniversity)26904" + "type": "t_contract(KlerosCoreUniversity)30192" }, { - "astId": 26938, + "astId": 30230, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "disputesWithoutJurors", "offset": 0, @@ -741,15 +1177,15 @@ "type": "t_uint256" }, { - "astId": 26943, + "astId": 30235, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "jurors", "offset": 0, "slot": "3", - "type": "t_mapping(t_address,t_struct(Juror)26931_storage)" + "type": "t_mapping(t_address,t_struct(Juror)30223_storage)" }, { - "astId": 26945, + "astId": 30237, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "transientJuror", "offset": 0, @@ -769,17 +1205,17 @@ "label": "uint96[]", "numberOfBytes": "32" }, - "t_contract(KlerosCoreUniversity)26904": { + "t_contract(KlerosCoreUniversity)30192": { "encoding": "inplace", "label": "contract KlerosCoreUniversity", "numberOfBytes": "20" }, - "t_mapping(t_address,t_struct(Juror)26931_storage)": { + "t_mapping(t_address,t_struct(Juror)30223_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct SortitionModuleUniversity.Juror)", "numberOfBytes": "32", - "value": "t_struct(Juror)26931_storage" + "value": "t_struct(Juror)30223_storage" }, "t_mapping(t_uint96,t_uint256)": { "encoding": "mapping", @@ -788,12 +1224,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Juror)26931_storage": { + "t_struct(Juror)30223_storage": { "encoding": "inplace", "label": "struct SortitionModuleUniversity.Juror", "members": [ { - "astId": 26923, + "astId": 30215, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "stakesByCourtID", "offset": 0, @@ -801,7 +1237,7 @@ "type": "t_mapping(t_uint96,t_uint256)" }, { - "astId": 26926, + "astId": 30218, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "courtIDs", "offset": 0, @@ -809,7 +1245,7 @@ "type": "t_array(t_uint96)dyn_storage" }, { - "astId": 26928, + "astId": 30220, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "stakedPnk", "offset": 0, @@ -817,7 +1253,7 @@ "type": "t_uint256" }, { - "astId": 26930, + "astId": 30222, "contract": "src/arbitration/university/SortitionModuleUniversity.sol:SortitionModuleUniversity", "label": "lockedPnk", "offset": 0, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json index e098e68d0..642ee37b3 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + "address": "0x9f55804177e7E44E558616cD7d06B865788214cA", "abi": [ { "inputs": [ @@ -26,44 +26,44 @@ "type": "receive" } ], - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", + "transactionHash": "0x816a335385508eb3b23f6e38ecbdb464110275a0059895f982bfb692c8e7a452", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", - "transactionIndex": 1, - "gasUsed": "210047", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010800000020000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3", - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", + "contractAddress": "0x9f55804177e7E44E558616cD7d06B865788214cA", + "transactionIndex": 2, + "gasUsed": "180483", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000008000000000000000000000000000000000000000000", + "blockHash": "0xeb89982fc4a65212a277169f078d43cd1578b93b962c37ded52f9ddeb92610af", + "transactionHash": "0x816a335385508eb3b23f6e38ecbdb464110275a0059895f982bfb692c8e7a452", "logs": [ { - "transactionIndex": 1, - "blockNumber": 96308572, - "transactionHash": "0xb26dc1c9ca9c3ed561a1d9c3feaad474af38bc90ea240f927053e5e5868d6a7e", - "address": "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + "transactionIndex": 2, + "blockNumber": 193533797, + "transactionHash": "0x816a335385508eb3b23f6e38ecbdb464110275a0059895f982bfb692c8e7a452", + "address": "0x9f55804177e7E44E558616cD7d06B865788214cA", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0x6a08d6d6cf180ae6bf3126f86fbedfd17212528b22a7a9403addd2dd6b1109c3" + "logIndex": 1, + "blockHash": "0xeb89982fc4a65212a277169f078d43cd1578b93b962c37ded52f9ddeb92610af" } ], - "blockNumber": 96308572, - "cumulativeGasUsed": "210047", + "blockNumber": 193533797, + "cumulativeGasUsed": "214736", "status": 1, "byzantium": true }, "args": [ - "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", - "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000005ab37f38778bc175852fa353056591d91c744ce6" + "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", + "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000a34dbbd0e5e1d09bd683455f9dbc393797bc558f" ], "numDeployments": 1, - "solcInputHash": "a5602534c00c2f67ca4b6a1cab8c717e", - "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\":\"SortitionModuleUniversityProxy\"},\"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 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\":\"0x4393c05bbfda204b9992e1e546142a0fbf4c92a1c4061f5985463d02a71b84d4\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n// Adapted from \\n\\n/**\\n * @authors: [@malatrax]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\npragma solidity 0.8.24;\\n\\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 */\\ncontract UUPSProxy {\\n /**\\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 */\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n *\\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 */\\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 /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n */\\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 /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0x7aa5f14ce351299722ac1a1afca9e65e1c795f32ea3e9702b0d5faaf7ca822a0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220cbf6c95b71e3c03306025a1af7f6aa4f021b4a8c8f5a8c68988b35c4442edb4964736f6c63430008180033", + "solcInputHash": "d547d738900bce1310e91a5d1adfc179", + "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"SortitionModuleUniversityProxy\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[],\"viaIR\":true},\"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 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 DisputeKitGatedShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy 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 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 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\":\"0x3160bd320b23c6ec0c21862b455c3044a9b33654ae84a1b6cd76255626c9154b\",\"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/// @notice This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n///\\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/// We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// 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 /// @notice Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// @dev If `_data` is nonempty, it's used as data in a delegate call to `_implementation`.\\n /// This will typically be an encoded 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\":\"0x2d7b1f81e525787f1b8b033ce381a81cb5f39e411ff31490e019113205a661cd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234610144576102148038038061001981610148565b928339810190604081830312610144578051906001600160a01b0382168203610144576020810151906001600160401b038211610144570182601f8201121561014457805161006f61006a82610181565b610148565b9181835260208301946020838301011161014457815f926020809301875e83010152817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5551806100c9575b6040516077908161019d8239f35b5f9283925af43d1561013f573d6100e261006a82610181565b9081525f60203d92013e5b156100fa575f80806100bb565b60405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c656400000000000000006044820152606490fd5b6100ed565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761016d57604052565b634e487b7160e01b5f52604160045260245ffd5b6001600160401b03811161016d57601f01601f19166020019056fe60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220cebc238294db6f217e59b4194d65c951358927be9872c8bda288fff77348423e64736f6c634300081e0033", + "deployedBytecode": "0x60806040525f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15603d573d5ff35b3d5ffdfea2646970667358221220cebc238294db6f217e59b4194d65c951358927be9872c8bda288fff77348423e64736f6c634300081e0033", "devdoc": { "kind": "dev", "methods": {}, diff --git a/contracts/deployments/contractsEthers.ts b/contracts/deployments/contractsEthers.ts index b5da4705e..dbddee21e 100644 --- a/contracts/deployments/contractsEthers.ts +++ b/contracts/deployments/contractsEthers.ts @@ -18,6 +18,7 @@ import { klerosCoreUniversityConfig as devnetCoreUniversityConfig, sortitionModuleUniversityConfig as devnetSortitionUniversityConfig, disputeKitClassicUniversityConfig as devnetDkClassicUniversityConfig, + disputeTemplateRegistryUniversityConfig as devnetDtrUniversityConfig, disputeResolverUniversityConfig as devnetDrUniversityConfig, } from "./devnet.viem"; import { @@ -206,7 +207,7 @@ export const getContracts = async (provider: ethers.Provider, deployment: Deploy { dkClassicConfig: devnetDkClassicUniversityConfig, drConfig: devnetDrUniversityConfig, - dtrConfig: devnetDtrConfig, + dtrConfig: devnetDtrUniversityConfig, evidenceConfig: devnetEvidenceConfig, policyRegistryConfig: devnetPolicyRegistryConfig, batcherConfig: devnetBatcherConfig, diff --git a/contracts/deployments/contractsViem.ts b/contracts/deployments/contractsViem.ts index 7a7338d71..f072acd9f 100644 --- a/contracts/deployments/contractsViem.ts +++ b/contracts/deployments/contractsViem.ts @@ -19,6 +19,7 @@ import { klerosCoreUniversityConfig as devnetCoreUniversityConfig, sortitionModuleUniversityConfig as devnetSortitionUniversityConfig, disputeKitClassicUniversityConfig as devnetDkClassicUniversityConfig, + disputeTemplateRegistryUniversityConfig as devnetDtrUniversityConfig, disputeResolverUniversityConfig as devnetDrUniversityConfig, } from "./devnet.viem"; import { @@ -172,7 +173,7 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont sortition: getContractConfig({ config: devnetSortitionUniversityConfig, chainId }), disputeKitClassic: getContractConfig({ config: devnetDkClassicUniversityConfig, chainId }), disputeResolver: getContractConfig({ config: devnetDrUniversityConfig, chainId }), - disputeTemplateRegistry: getContractConfig({ config: devnetDtrConfig, chainId }), // FIXME: should not be shared with devnet + disputeTemplateRegistry: getContractConfig({ config: devnetDtrUniversityConfig, chainId }), evidence: getContractConfig({ config: devnetEvidenceConfig, chainId }), // Not arbitrator specific policyRegistry: getContractConfig({ config: devnetPolicyRegistryConfig, chainId }), // Not arbitrator specific transactionBatcher: getContractConfig({ config: devnetBatcherConfig, chainId }), // Not arbitrator specific diff --git a/contracts/deployments/devnet.viem.ts b/contracts/deployments/devnet.viem.ts index f7a7214bd..9cfb583b9 100644 --- a/contracts/deployments/devnet.viem.ts +++ b/contracts/deployments/devnet.viem.ts @@ -2630,25 +2630,43 @@ export const disputeKitClassicConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x82F2089442979A6b56c80274D144575980092F91) */ export const disputeKitClassicUniversityAbi = [ { type: "fallback", stateMutability: "payable" }, { type: "receive", stateMutability: "payable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "AppealFeeIsAlreadyPaid" }, + { type: "error", inputs: [], name: "AppealPeriodIsOver" }, + { type: "error", inputs: [], name: "AppealPeriodIsOverForLoser" }, + { type: "error", inputs: [], name: "ChoiceOutOfBounds" }, + { type: "error", inputs: [], name: "CoreIsPaused" }, + { type: "error", inputs: [], name: "DisputeJumpedToParentDK" }, + { type: "error", inputs: [], name: "DisputeNotResolved" }, + { type: "error", inputs: [], name: "EmptyCommit" }, + { type: "error", inputs: [], name: "EmptyVoteIDs" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, + { type: "error", inputs: [], name: "HashDoesNotMatchHiddenVoteCommitment" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", type: "address" }], name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "JurorHasToOwnTheVote" }, + { type: "error", inputs: [], name: "KlerosCoreOnly" }, + { type: "error", inputs: [], name: "NotActiveForCoreDisputeID" }, + { type: "error", inputs: [], name: "NotCommitPeriod" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "NotVotePeriod" }, + { type: "error", inputs: [], name: "OwnerOnly" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], name: "UUPSUnsupportedProxiableUUID", }, + { type: "error", inputs: [], name: "UnsuccessfulCall" }, + { type: "error", inputs: [], name: "VoteAlreadyCast" }, { type: "event", anonymous: false, @@ -2881,13 +2899,6 @@ export const disputeKitClassicUniversityAbi = [ outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -2942,8 +2953,15 @@ export const disputeKitClassicUniversityAbi = [ }, { type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", + inputs: [{ name: "_jumpDisputeKitID", internalType: "uint256", type: "uint256" }], + name: "changeJumpDisputeKitID", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_owner", internalType: "address payable", type: "address" }], + name: "changeOwner", outputs: [], stateMutability: "nonpayable", }, @@ -2954,6 +2972,13 @@ export const disputeKitClassicUniversityAbi = [ outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "coreDisputeIDToActive", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -2967,7 +2992,7 @@ export const disputeKitClassicUniversityAbi = [ { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, ], name: "createDispute", outputs: [], @@ -3002,9 +3027,19 @@ export const disputeKitClassicUniversityAbi = [ { name: "_nonce", internalType: "uint256", type: "uint256" }, ], name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + outputs: [ + { name: "drawnAddress", internalType: "address", type: "address" }, + { name: "fromSubcourtID", internalType: "uint96", type: "uint96" }, + ], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "earlyCourtJump", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "pure", + }, { type: "function", inputs: [ @@ -3012,7 +3047,7 @@ export const disputeKitClassicUniversityAbi = [ { name: "_amount", internalType: "uint256", type: "uint256" }, { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", }, @@ -3045,8 +3080,24 @@ export const disputeKitClassicUniversityAbi = [ { name: "", internalType: "uint256", type: "uint256" }, { name: "", internalType: "uint256", type: "uint256" }, ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "getDegreeOfCoherencePenalty", + outputs: [{ name: "pnkCoherence", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + ], + name: "getDegreeOfCoherenceReward", + outputs: [ + { name: "pnkCoherence", internalType: "uint256", type: "uint256" }, + { name: "feeCoherence", internalType: "uint256", type: "uint256" }, + ], stateMutability: "view", }, { @@ -3056,6 +3107,43 @@ export const disputeKitClassicUniversityAbi = [ outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "getJumpDisputeKitID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + ], + name: "getLocalDisputeRoundID", + outputs: [ + { name: "localDisputeID", internalType: "uint256", type: "uint256" }, + { name: "localRoundID", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "", internalType: "contract IDisputeKit", type: "address" }, + { name: "_currentNbVotes", internalType: "uint256", type: "uint256" }, + ], + name: "getNbVotesAfterAppeal", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfRounds", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3068,7 +3156,7 @@ export const disputeKitClassicUniversityAbi = [ { name: "winningChoice", internalType: "uint256", type: "uint256" }, { name: "tied", internalType: "bool", type: "bool" }, { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, + { name: "totalCommitted", internalType: "uint256", type: "uint256" }, { name: "nbVoters", internalType: "uint256", type: "uint256" }, { name: "choiceCount", internalType: "uint256", type: "uint256" }, ], @@ -3092,21 +3180,34 @@ export const disputeKitClassicUniversityAbi = [ }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [ + { name: "_choice", internalType: "uint256", type: "uint256" }, + { name: "_salt", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "string", type: "string" }, + ], + name: "hashVote", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, + { name: "_owner", internalType: "address", type: "address" }, { name: "_core", internalType: "contract KlerosCore", type: "address" }, + { name: "_wNative", internalType: "address", type: "address" }, + { name: "_jumpDisputeKitID", internalType: "uint256", type: "uint256" }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "isAppealFunded", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3118,6 +3219,20 @@ export const disputeKitClassicUniversityAbi = [ outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "jumpDisputeKitID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [], @@ -3125,6 +3240,13 @@ export const disputeKitClassicUniversityAbi = [ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "singleDrawPerJuror", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3135,6 +3257,20 @@ export const disputeKitClassicUniversityAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "wNative", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3162,14 +3298,14 @@ export const disputeKitClassicUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x82F2089442979A6b56c80274D144575980092F91) */ export const disputeKitClassicUniversityAddress = { - 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + 421614: "0x82F2089442979A6b56c80274D144575980092F91", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x82F2089442979A6b56c80274D144575980092F91) */ export const disputeKitClassicUniversityConfig = { address: disputeKitClassicUniversityAddress, @@ -3181,24 +3317,42 @@ export const disputeKitClassicUniversityConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x602ADa1cE706404BFb5417e497cdDae934436081) */ export const disputeKitClassicUniversityImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "AppealFeeIsAlreadyPaid" }, + { type: "error", inputs: [], name: "AppealPeriodIsOver" }, + { type: "error", inputs: [], name: "AppealPeriodIsOverForLoser" }, + { type: "error", inputs: [], name: "ChoiceOutOfBounds" }, + { type: "error", inputs: [], name: "CoreIsPaused" }, + { type: "error", inputs: [], name: "DisputeJumpedToParentDK" }, + { type: "error", inputs: [], name: "DisputeNotResolved" }, + { type: "error", inputs: [], name: "EmptyCommit" }, + { type: "error", inputs: [], name: "EmptyVoteIDs" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, + { type: "error", inputs: [], name: "HashDoesNotMatchHiddenVoteCommitment" }, { type: "error", inputs: [{ name: "implementation", internalType: "address", type: "address" }], name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "JurorHasToOwnTheVote" }, + { type: "error", inputs: [], name: "KlerosCoreOnly" }, + { type: "error", inputs: [], name: "NotActiveForCoreDisputeID" }, + { type: "error", inputs: [], name: "NotCommitPeriod" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "NotVotePeriod" }, + { type: "error", inputs: [], name: "OwnerOnly" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], name: "UUPSUnsupportedProxiableUUID", }, + { type: "error", inputs: [], name: "UnsuccessfulCall" }, + { type: "error", inputs: [], name: "VoteAlreadyCast" }, { type: "event", anonymous: false, @@ -3431,13 +3585,6 @@ export const disputeKitClassicUniversityImplementationAbi = [ outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "ONE_BASIS_POINT", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -3492,8 +3639,15 @@ export const disputeKitClassicUniversityImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", + inputs: [{ name: "_jumpDisputeKitID", internalType: "uint256", type: "uint256" }], + name: "changeJumpDisputeKitID", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_owner", internalType: "address payable", type: "address" }], + name: "changeOwner", outputs: [], stateMutability: "nonpayable", }, @@ -3504,6 +3658,13 @@ export const disputeKitClassicUniversityImplementationAbi = [ outputs: [{ name: "", internalType: "contract KlerosCore", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "coreDisputeIDToActive", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -3517,7 +3678,7 @@ export const disputeKitClassicUniversityImplementationAbi = [ { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { name: "_numberOfChoices", internalType: "uint256", type: "uint256" }, { name: "_extraData", internalType: "bytes", type: "bytes" }, - { name: "_nbVotes", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, ], name: "createDispute", outputs: [], @@ -3552,9 +3713,19 @@ export const disputeKitClassicUniversityImplementationAbi = [ { name: "_nonce", internalType: "uint256", type: "uint256" }, ], name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + outputs: [ + { name: "drawnAddress", internalType: "address", type: "address" }, + { name: "fromSubcourtID", internalType: "uint96", type: "uint96" }, + ], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "earlyCourtJump", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "pure", + }, { type: "function", inputs: [ @@ -3562,7 +3733,7 @@ export const disputeKitClassicUniversityImplementationAbi = [ { name: "_amount", internalType: "uint256", type: "uint256" }, { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", }, @@ -3595,8 +3766,24 @@ export const disputeKitClassicUniversityImplementationAbi = [ { name: "", internalType: "uint256", type: "uint256" }, { name: "", internalType: "uint256", type: "uint256" }, ], - name: "getDegreeOfCoherence", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "getDegreeOfCoherencePenalty", + outputs: [{ name: "pnkCoherence", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + { name: "_voteID", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + ], + name: "getDegreeOfCoherenceReward", + outputs: [ + { name: "pnkCoherence", internalType: "uint256", type: "uint256" }, + { name: "feeCoherence", internalType: "uint256", type: "uint256" }, + ], stateMutability: "view", }, { @@ -3606,6 +3793,43 @@ export const disputeKitClassicUniversityImplementationAbi = [ outputs: [{ name: "fundedChoices", internalType: "uint256[]", type: "uint256[]" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "getJumpDisputeKitID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_coreRoundID", internalType: "uint256", type: "uint256" }, + ], + name: "getLocalDisputeRoundID", + outputs: [ + { name: "localDisputeID", internalType: "uint256", type: "uint256" }, + { name: "localRoundID", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "", internalType: "contract IDisputeKit", type: "address" }, + { name: "_currentNbVotes", internalType: "uint256", type: "uint256" }, + ], + name: "getNbVotesAfterAppeal", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "_localDisputeID", internalType: "uint256", type: "uint256" }], + name: "getNumberOfRounds", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3618,7 +3842,7 @@ export const disputeKitClassicUniversityImplementationAbi = [ { name: "winningChoice", internalType: "uint256", type: "uint256" }, { name: "tied", internalType: "bool", type: "bool" }, { name: "totalVoted", internalType: "uint256", type: "uint256" }, - { name: "totalCommited", internalType: "uint256", type: "uint256" }, + { name: "totalCommitted", internalType: "uint256", type: "uint256" }, { name: "nbVoters", internalType: "uint256", type: "uint256" }, { name: "choiceCount", internalType: "uint256", type: "uint256" }, ], @@ -3642,21 +3866,34 @@ export const disputeKitClassicUniversityImplementationAbi = [ }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [ + { name: "_choice", internalType: "uint256", type: "uint256" }, + { name: "_salt", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "string", type: "string" }, + ], + name: "hashVote", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, + { name: "_owner", internalType: "address", type: "address" }, { name: "_core", internalType: "contract KlerosCore", type: "address" }, + { name: "_wNative", internalType: "address", type: "address" }, + { name: "_jumpDisputeKitID", internalType: "uint256", type: "uint256" }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_coreDisputeID", internalType: "uint256", type: "uint256" }], + name: "isAppealFunded", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -3671,24 +3908,59 @@ export const disputeKitClassicUniversityImplementationAbi = [ { type: "function", inputs: [], - name: "proxiableUUID", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + name: "jumpDisputeKitID", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "newImplementation", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "singleDrawPerJuror", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "wNative", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_coreDisputeID", internalType: "uint256", type: "uint256" }, { name: "_beneficiary", internalType: "address payable", @@ -3704,14 +3976,14 @@ export const disputeKitClassicUniversityImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x602ADa1cE706404BFb5417e497cdDae934436081) */ export const disputeKitClassicUniversityImplementationAddress = { - 421614: "0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B", + 421614: "0x602ADa1cE706404BFb5417e497cdDae934436081", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x602ADa1cE706404BFb5417e497cdDae934436081) */ export const disputeKitClassicUniversityImplementationConfig = { address: disputeKitClassicUniversityImplementationAddress, @@ -3723,7 +3995,7 @@ export const disputeKitClassicUniversityImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x82F2089442979A6b56c80274D144575980092F91) */ export const disputeKitClassicUniversityProxyAbi = [ { @@ -3739,14 +4011,14 @@ export const disputeKitClassicUniversityProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x82F2089442979A6b56c80274D144575980092F91) */ export const disputeKitClassicUniversityProxyAddress = { - 421614: "0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5", + 421614: "0x82F2089442979A6b56c80274D144575980092F91", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x82F2089442979A6b56c80274D144575980092F91) */ export const disputeKitClassicUniversityProxyConfig = { address: disputeKitClassicUniversityProxyAddress, @@ -9062,7 +9334,7 @@ export const disputeResolverRulerConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D) */ export const disputeResolverUniversityAbi = [ { @@ -9081,6 +9353,11 @@ export const disputeResolverUniversityAbi = [ ], stateMutability: "nonpayable", }, + { type: "error", inputs: [], name: "ArbitratorOnly" }, + { type: "error", inputs: [], name: "DisputeAlreadyRuled" }, + { type: "error", inputs: [], name: "OwnerOnly" }, + { type: "error", inputs: [], name: "RulingOutOfBounds" }, + { type: "error", inputs: [], name: "ShouldBeAtLeastTwoRulingOptions" }, { type: "event", anonymous: false, @@ -9109,12 +9386,6 @@ export const disputeResolverUniversityAbi = [ type: "uint256", indexed: false, }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, ], name: "DisputeRequest", }, @@ -9172,8 +9443,8 @@ export const disputeResolverUniversityAbi = [ }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", + inputs: [{ name: "_owner", internalType: "address", type: "address" }], + name: "changeOwner", outputs: [], stateMutability: "nonpayable", }, @@ -9210,21 +9481,6 @@ export const disputeResolverUniversityAbi = [ outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], stateMutability: "payable", }, - { - type: "function", - inputs: [ - { name: "_arbitratorExtraData", internalType: "bytes", type: "bytes" }, - { name: "_disputeTemplateUri", internalType: "string", type: "string" }, - { - name: "_numberOfRulingOptions", - internalType: "uint256", - type: "uint256", - }, - ], - name: "createDisputeForTemplateUri", - outputs: [{ name: "disputeID", internalType: "uint256", type: "uint256" }], - stateMutability: "payable", - }, { type: "function", inputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -9244,7 +9500,7 @@ export const disputeResolverUniversityAbi = [ { type: "function", inputs: [], - name: "governor", + name: "owner", outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, @@ -9278,14 +9534,14 @@ export const disputeResolverUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D) */ export const disputeResolverUniversityAddress = { - 421614: "0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4", + 421614: "0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x8a7902Ef9a5308C7DF0A68A28EEDd6D83436993D) */ export const disputeResolverUniversityConfig = { address: disputeResolverUniversityAddress, @@ -9473,14 +9729,15 @@ export const disputeTemplateRegistryConfig = { } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Implementation +// DisputeTemplateRegistryUniversity ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x75A5D16e9A699162506E4d79D68CF646e6600ba1) */ -export const disputeTemplateRegistryImplementationAbi = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, +export const disputeTemplateRegistryUniversityAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, { @@ -9489,6 +9746,7 @@ export const disputeTemplateRegistryImplementationAbi = [ name: "InvalidImplementation", }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "OwnerOnly" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", @@ -9554,21 +9812,14 @@ export const disputeTemplateRegistryImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], - name: "changeGovernor", + inputs: [{ name: "_owner", internalType: "address", type: "address" }], + name: "changeOwner", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], + inputs: [{ name: "_owner", internalType: "address", type: "address" }], name: "initialize", outputs: [], stateMutability: "nonpayable", @@ -9576,9 +9827,9 @@ export const disputeTemplateRegistryImplementationAbi = [ { type: "function", inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", @@ -9622,31 +9873,6 @@ export const disputeTemplateRegistryImplementationAbi = [ outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, -] as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) - */ -export const disputeTemplateRegistryImplementationAddress = { - 421614: "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", -} as const; - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) - */ -export const disputeTemplateRegistryImplementationConfig = { - address: disputeTemplateRegistryImplementationAddress, - abi: disputeTemplateRegistryImplementationAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeTemplateRegistry_Proxy -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) - */ -export const disputeTemplateRegistryProxyAbi = [ { type: "constructor", inputs: [ @@ -9655,35 +9881,32 @@ export const disputeTemplateRegistryProxyAbi = [ ], stateMutability: "nonpayable", }, - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x75A5D16e9A699162506E4d79D68CF646e6600ba1) */ -export const disputeTemplateRegistryProxyAddress = { - 421614: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", +export const disputeTemplateRegistryUniversityAddress = { + 421614: "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x75A5D16e9A699162506E4d79D68CF646e6600ba1) */ -export const disputeTemplateRegistryProxyConfig = { - address: disputeTemplateRegistryProxyAddress, - abi: disputeTemplateRegistryProxyAbi, +export const disputeTemplateRegistryUniversityConfig = { + address: disputeTemplateRegistryUniversityAddress, + abi: disputeTemplateRegistryUniversityAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule +// DisputeTemplateRegistryUniversity_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC3f638389635bF33E019c845FdaF2ed9bca3DF67) */ -export const evidenceModuleAbi = [ - { type: "fallback", stateMutability: "payable" }, - { type: "receive", stateMutability: "payable" }, +export const disputeTemplateRegistryUniversityImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, { @@ -9692,6 +9915,7 @@ export const evidenceModuleAbi = [ name: "InvalidImplementation", }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "OwnerOnly" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", @@ -9703,25 +9927,31 @@ export const evidenceModuleAbi = [ anonymous: false, inputs: [ { - name: "_externalDisputeID", + name: "_templateId", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_party", - internalType: "address", - type: "address", + name: "_templateTag", + internalType: "string", + type: "string", indexed: true, }, { - name: "_evidence", + name: "_templateData", + internalType: "string", + type: "string", + indexed: false, + }, + { + name: "_templateDataMappings", internalType: "string", type: "string", indexed: false, }, ], - name: "Evidence", + name: "DisputeTemplate", }, { type: "event", @@ -9751,14 +9981,14 @@ export const evidenceModuleAbi = [ }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [{ name: "_owner", internalType: "address", type: "address" }], + name: "changeOwner", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "_governor", internalType: "address", type: "address" }], + inputs: [{ name: "_owner", internalType: "address", type: "address" }], name: "initialize", outputs: [], stateMutability: "nonpayable", @@ -9766,9 +9996,9 @@ export const evidenceModuleAbi = [ { type: "function", inputs: [], - name: "initialize2", - outputs: [], - stateMutability: "nonpayable", + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", @@ -9780,13 +10010,21 @@ export const evidenceModuleAbi = [ { type: "function", inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, + { name: "_templateTag", internalType: "string", type: "string" }, + { name: "_templateData", internalType: "string", type: "string" }, + { name: "_templateDataMappings", internalType: "string", type: "string" }, ], - name: "submitEvidence", - outputs: [], + name: "setDisputeTemplate", + outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "templates", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -9804,6 +10042,31 @@ export const evidenceModuleAbi = [ outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC3f638389635bF33E019c845FdaF2ed9bca3DF67) + */ +export const disputeTemplateRegistryUniversityImplementationAddress = { + 421614: "0xC3f638389635bF33E019c845FdaF2ed9bca3DF67", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xC3f638389635bF33E019c845FdaF2ed9bca3DF67) + */ +export const disputeTemplateRegistryUniversityImplementationConfig = { + address: disputeTemplateRegistryUniversityImplementationAddress, + abi: disputeTemplateRegistryUniversityImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeTemplateRegistryUniversity_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x75A5D16e9A699162506E4d79D68CF646e6600ba1) + */ +export const disputeTemplateRegistryUniversityProxyAbi = [ { type: "constructor", inputs: [ @@ -9812,31 +10075,33 @@ export const evidenceModuleAbi = [ ], stateMutability: "nonpayable", }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x75A5D16e9A699162506E4d79D68CF646e6600ba1) */ -export const evidenceModuleAddress = { - 421614: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", +export const disputeTemplateRegistryUniversityProxyAddress = { + 421614: "0x75A5D16e9A699162506E4d79D68CF646e6600ba1", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x75A5D16e9A699162506E4d79D68CF646e6600ba1) */ -export const evidenceModuleConfig = { - address: evidenceModuleAddress, - abi: evidenceModuleAbi, +export const disputeTemplateRegistryUniversityProxyConfig = { + address: disputeTemplateRegistryUniversityProxyAddress, + abi: disputeTemplateRegistryUniversityProxyAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// EvidenceModule_Implementation +// DisputeTemplateRegistry_Implementation ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) */ -export const evidenceModuleImplementationAbi = [ +export const disputeTemplateRegistryImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [], name: "AlreadyInitialized" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, @@ -9857,25 +10122,31 @@ export const evidenceModuleImplementationAbi = [ anonymous: false, inputs: [ { - name: "_externalDisputeID", + name: "_templateId", internalType: "uint256", type: "uint256", indexed: true, }, { - name: "_party", - internalType: "address", - type: "address", + name: "_templateTag", + internalType: "string", + type: "string", indexed: true, }, { - name: "_evidence", + name: "_templateData", + internalType: "string", + type: "string", + indexed: false, + }, + { + name: "_templateDataMappings", internalType: "string", type: "string", indexed: false, }, ], - name: "Evidence", + name: "DisputeTemplate", }, { type: "event", @@ -9903,6 +10174,13 @@ export const evidenceModuleImplementationAbi = [ ], name: "Upgraded", }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "changeGovernor", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], @@ -9934,13 +10212,21 @@ export const evidenceModuleImplementationAbi = [ { type: "function", inputs: [ - { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, - { name: "_evidence", internalType: "string", type: "string" }, + { name: "_templateTag", internalType: "string", type: "string" }, + { name: "_templateData", internalType: "string", type: "string" }, + { name: "_templateDataMappings", internalType: "string", type: "string" }, ], - name: "submitEvidence", - outputs: [], + name: "setDisputeTemplate", + outputs: [{ name: "templateId", internalType: "uint256", type: "uint256" }], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [], + name: "templates", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -9961,14 +10247,350 @@ export const evidenceModuleImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) */ -export const evidenceModuleImplementationAddress = { - 421614: "0x450Aa35da0ad8B282C5d910254055651417C2200", +export const disputeTemplateRegistryImplementationAddress = { + 421614: "0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xBc9B5643C9B1C478DAe1b950e886CC50D8d868b1) + */ +export const disputeTemplateRegistryImplementationConfig = { + address: disputeTemplateRegistryImplementationAddress, + abi: disputeTemplateRegistryImplementationAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// DisputeTemplateRegistry_Proxy +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) + */ +export const disputeTemplateRegistryProxyAbi = [ + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) + */ +export const disputeTemplateRegistryProxyAddress = { + 421614: "0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xc852F94f90E3B06Da6eCfB61d76561ECfb94613f) + */ +export const disputeTemplateRegistryProxyConfig = { + address: disputeTemplateRegistryProxyAddress, + abi: disputeTemplateRegistryProxyAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// EvidenceModule +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) + */ +export const evidenceModuleAbi = [ + { type: "fallback", stateMutability: "payable" }, + { type: "receive", stateMutability: "payable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_party", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_evidence", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "Evidence", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_evidence", internalType: "string", type: "string" }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "constructor", + inputs: [ + { name: "_implementation", internalType: "address", type: "address" }, + { name: "_data", internalType: "bytes", type: "bytes" }, + ], + stateMutability: "nonpayable", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) + */ +export const evidenceModuleAddress = { + 421614: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49) + */ +export const evidenceModuleConfig = { + address: evidenceModuleAddress, + abi: evidenceModuleAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// EvidenceModule_Implementation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) + */ +export const evidenceModuleImplementationAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { type: "error", inputs: [], name: "AlreadyInitialized" }, + { type: "error", inputs: [], name: "FailedDelegateCall" }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "InvalidImplementation", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_externalDisputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_party", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_evidence", + internalType: "string", + type: "string", + indexed: false, + }, + ], + name: "Evidence", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "newImplementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { + type: "function", + inputs: [], + name: "governor", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_governor", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "initialize2", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "_externalDisputeID", internalType: "uint256", type: "uint256" }, + { name: "_evidence", internalType: "string", type: "string" }, + ], + name: "submitEvidence", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, +] as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) + */ +export const evidenceModuleImplementationAddress = { + 421614: "0x450Aa35da0ad8B282C5d910254055651417C2200", +} as const; + +/** + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x450Aa35da0ad8B282C5d910254055651417C2200) */ export const evidenceModuleImplementationConfig = { address: evidenceModuleImplementationAddress, @@ -10945,12 +11567,6 @@ export const iHomeGatewayAbi = [ type: "uint256", indexed: false, }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, ], name: "CrossChainDisputeIncoming", }, @@ -10982,12 +11598,6 @@ export const iHomeGatewayAbi = [ type: "uint256", indexed: false, }, - { - name: "_templateUri", - internalType: "string", - type: "string", - indexed: false, - }, ], name: "DisputeRequest", }, @@ -11081,16 +11691,14 @@ export const iHomeGatewayAbi = [ type: "uint256", }, { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, { name: "choices", internalType: "uint256", type: "uint256" }, { name: "extraData", internalType: "bytes", type: "bytes" }, ], }, - { name: "_feeAmount", internalType: "uint256", type: "uint256" }, ], name: "relayCreateDispute", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", }, { type: "function", @@ -11122,15 +11730,15 @@ export const iHomeGatewayAbi = [ type: "uint256", }, { name: "templateId", internalType: "uint256", type: "uint256" }, - { name: "templateUri", internalType: "string", type: "string" }, { name: "choices", internalType: "uint256", type: "uint256" }, { name: "extraData", internalType: "bytes", type: "bytes" }, ], }, + { name: "_feeAmount", internalType: "uint256", type: "uint256" }, ], name: "relayCreateDispute", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", }, { type: "function", @@ -14457,7 +15065,7 @@ export const klerosCoreSnapshotProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f) */ export const klerosCoreUniversityAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -14467,10 +15075,8 @@ export const klerosCoreUniversityAbi = [ { type: "error", inputs: [], name: "AppealFeesNotEnough" }, { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, { type: "error", inputs: [], name: "CannotDisableClassicDK" }, { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, { type: "error", inputs: [], name: "DisputeKitOnly" }, { type: "error", inputs: [], name: "DisputeNotAppealable" }, @@ -14478,8 +15084,6 @@ export const klerosCoreUniversityAbi = [ { type: "error", inputs: [], name: "DisputeStillDrawing" }, { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, { type: "error", inputs: [], name: "InstructorOnly" }, { type: "error", inputs: [], name: "InvalidDisputKitParent" }, { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, @@ -14494,12 +15098,15 @@ export const klerosCoreUniversityAbi = [ { type: "error", inputs: [], name: "NotEvidencePeriod" }, { type: "error", inputs: [], name: "NotExecutionPeriod" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "OwnerOnly" }, + { type: "error", inputs: [], name: "OwnerOrInstructorOnly" }, { 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: "StakingNotPossibleInThisCourt" }, { 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" }, @@ -14571,8 +15178,8 @@ export const klerosCoreUniversityAbi = [ inputs: [ { name: "_courtID", - internalType: "uint256", - type: "uint256", + internalType: "uint96", + type: "uint96", indexed: true, }, { @@ -14843,6 +15450,12 @@ export const klerosCoreUniversityAbi = [ type: "event", anonymous: false, inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, { name: "_disputeID", internalType: "uint256", @@ -14856,13 +15469,62 @@ export const klerosCoreUniversityAbi = [ indexed: true, }, { - name: "_pnkAmount", + name: "_degreeOfCoherencyPnk", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_feeAmount", + name: "_degreeOfCoherencyFee", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_amountPnk", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_amountFee", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "JurorRewardPenalty", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_amountPnk", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_amountFee", internalType: "uint256", type: "uint256", indexed: false, @@ -14945,55 +15607,6 @@ export const klerosCoreUniversityAbi = [ ], name: "Ruling", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, { type: "event", anonymous: false, @@ -15105,13 +15718,6 @@ export const klerosCoreUniversityAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [{ name: "_instructor", internalType: "address", type: "address" }], @@ -15132,6 +15738,13 @@ export const klerosCoreUniversityAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_owner", internalType: "address payable", type: "address" }], + name: "changeOwner", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], @@ -15173,7 +15786,6 @@ export const klerosCoreUniversityAbi = [ { name: "alpha", internalType: "uint256", type: "uint256" }, { name: "feeForJuror", internalType: "uint256", type: "uint256" }, { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, ], stateMutability: "view", }, @@ -15312,7 +15924,7 @@ export const klerosCoreUniversityAbi = [ { name: "_amount", internalType: "uint256", type: "uint256" }, { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", }, @@ -15344,6 +15956,16 @@ export const klerosCoreUniversityAbi = [ outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + ], + name: "getPnkAtStakePerJuror", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -15372,6 +15994,11 @@ export const klerosCoreUniversityAbi = [ { name: "repartitions", internalType: "uint256", type: "uint256" }, { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, { name: "drawnJurors", internalType: "address[]", type: "address[]" }, + { + name: "drawnJurorFromCourtIDs", + internalType: "uint96[]", + type: "uint96[]", + }, { name: "sumFeeRewardPaid", internalType: "uint256", @@ -15388,6 +16015,7 @@ export const klerosCoreUniversityAbi = [ type: "address", }, { name: "drawIterations", internalType: "uint256", type: "uint256" }, + { name: "__gap", internalType: "uint256[10]", type: "uint256[10]" }, ], }, ], @@ -15406,17 +16034,10 @@ export const klerosCoreUniversityAbi = [ ], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, + { name: "_owner", internalType: "address", type: "address" }, { name: "_instructor", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, { @@ -15481,6 +16102,13 @@ export const klerosCoreUniversityAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], @@ -15518,7 +16146,6 @@ export const klerosCoreUniversityAbi = [ { name: "_account", internalType: "address", type: "address" }, { name: "_courtID", internalType: "uint96", type: "uint96" }, { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, ], name: "setStakeBySortitionModule", outputs: [], @@ -15537,6 +16164,16 @@ export const klerosCoreUniversityAbi = [ ], stateMutability: "view", }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + ], + name: "transferBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -15547,6 +16184,13 @@ export const klerosCoreUniversityAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "constructor", inputs: [ @@ -15558,14 +16202,14 @@ export const klerosCoreUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f) */ export const klerosCoreUniversityAddress = { - 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + 421614: "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f) */ export const klerosCoreUniversityConfig = { address: klerosCoreUniversityAddress, @@ -15577,7 +16221,7 @@ export const klerosCoreUniversityConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0) */ export const klerosCoreUniversityImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -15586,10 +16230,8 @@ export const klerosCoreUniversityImplementationAbi = [ { type: "error", inputs: [], name: "AppealFeesNotEnough" }, { type: "error", inputs: [], name: "AppealPeriodNotPassed" }, { type: "error", inputs: [], name: "ArbitrationFeesNotEnough" }, - { type: "error", inputs: [], name: "ArraysLengthMismatch" }, { type: "error", inputs: [], name: "CannotDisableClassicDK" }, { type: "error", inputs: [], name: "CommitPeriodNotPassed" }, - { type: "error", inputs: [], name: "DepthLevelMax" }, { type: "error", inputs: [], name: "DisputeKitNotSupportedByCourt" }, { type: "error", inputs: [], name: "DisputeKitOnly" }, { type: "error", inputs: [], name: "DisputeNotAppealable" }, @@ -15597,8 +16239,6 @@ export const klerosCoreUniversityImplementationAbi = [ { type: "error", inputs: [], name: "DisputeStillDrawing" }, { type: "error", inputs: [], name: "EvidenceNotPassedAndNotAppeal" }, { type: "error", inputs: [], name: "FailedDelegateCall" }, - { type: "error", inputs: [], name: "GovernorOnly" }, - { type: "error", inputs: [], name: "GovernorOrInstructorOnly" }, { type: "error", inputs: [], name: "InstructorOnly" }, { type: "error", inputs: [], name: "InvalidDisputKitParent" }, { type: "error", inputs: [], name: "InvalidForkingCourtAsParent" }, @@ -15613,12 +16253,15 @@ export const klerosCoreUniversityImplementationAbi = [ { type: "error", inputs: [], name: "NotEvidencePeriod" }, { type: "error", inputs: [], name: "NotExecutionPeriod" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "OwnerOnly" }, + { type: "error", inputs: [], name: "OwnerOrInstructorOnly" }, { 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: "StakingNotPossibleInThisCourt" }, { 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" }, @@ -15690,8 +16333,8 @@ export const klerosCoreUniversityImplementationAbi = [ inputs: [ { name: "_courtID", - internalType: "uint256", - type: "uint256", + internalType: "uint96", + type: "uint96", indexed: true, }, { @@ -15962,6 +16605,12 @@ export const klerosCoreUniversityImplementationAbi = [ type: "event", anonymous: false, inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, { name: "_disputeID", internalType: "uint256", @@ -15975,13 +16624,62 @@ export const klerosCoreUniversityImplementationAbi = [ indexed: true, }, { - name: "_pnkAmount", + name: "_degreeOfCoherencyPnk", internalType: "uint256", type: "uint256", indexed: false, }, { - name: "_feeAmount", + name: "_degreeOfCoherencyFee", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_amountPnk", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_amountFee", + internalType: "int256", + type: "int256", + indexed: false, + }, + { + name: "_feeToken", + internalType: "contract IERC20", + type: "address", + indexed: false, + }, + ], + name: "JurorRewardPenalty", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_disputeID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_roundID", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "_amountPnk", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "_amountFee", internalType: "uint256", type: "uint256", indexed: false, @@ -16064,55 +16762,6 @@ export const klerosCoreUniversityImplementationAbi = [ ], name: "Ruling", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "_account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "_disputeID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_roundID", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "_degreeOfCoherency", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_pnkAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeAmount", - internalType: "int256", - type: "int256", - indexed: false, - }, - { - name: "_feeToken", - internalType: "contract IERC20", - type: "address", - indexed: false, - }, - ], - name: "TokenAndETHShift", - }, { type: "event", anonymous: false, @@ -16224,13 +16873,6 @@ export const klerosCoreUniversityImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [{ name: "_governor", internalType: "address payable", type: "address" }], - name: "changeGovernor", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [{ name: "_instructor", internalType: "address", type: "address" }], @@ -16251,6 +16893,13 @@ export const klerosCoreUniversityImplementationAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "_owner", internalType: "address payable", type: "address" }], + name: "changeOwner", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "_pinakion", internalType: "contract IERC20", type: "address" }], @@ -16292,7 +16941,6 @@ export const klerosCoreUniversityImplementationAbi = [ { name: "alpha", internalType: "uint256", type: "uint256" }, { name: "feeForJuror", internalType: "uint256", type: "uint256" }, { name: "jurorsForCourtJump", internalType: "uint256", type: "uint256" }, - { name: "disabled", internalType: "bool", type: "bool" }, ], stateMutability: "view", }, @@ -16431,7 +17079,7 @@ export const klerosCoreUniversityImplementationAbi = [ { name: "_amount", internalType: "uint256", type: "uint256" }, { name: "_data", internalType: "bytes", type: "bytes" }, ], - name: "executeGovernorProposal", + name: "executeOwnerProposal", outputs: [], stateMutability: "nonpayable", }, @@ -16463,6 +17111,16 @@ export const klerosCoreUniversityImplementationAbi = [ outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, + { + type: "function", + inputs: [ + { name: "_disputeID", internalType: "uint256", type: "uint256" }, + { name: "_round", internalType: "uint256", type: "uint256" }, + ], + name: "getPnkAtStakePerJuror", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -16491,6 +17149,11 @@ export const klerosCoreUniversityImplementationAbi = [ { name: "repartitions", internalType: "uint256", type: "uint256" }, { name: "pnkPenalties", internalType: "uint256", type: "uint256" }, { name: "drawnJurors", internalType: "address[]", type: "address[]" }, + { + name: "drawnJurorFromCourtIDs", + internalType: "uint96[]", + type: "uint96[]", + }, { name: "sumFeeRewardPaid", internalType: "uint256", @@ -16507,6 +17170,7 @@ export const klerosCoreUniversityImplementationAbi = [ type: "address", }, { name: "drawIterations", internalType: "uint256", type: "uint256" }, + { name: "__gap", internalType: "uint256[10]", type: "uint256[10]" }, ], }, ], @@ -16525,17 +17189,10 @@ export const klerosCoreUniversityImplementationAbi = [ ], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, + { name: "_owner", internalType: "address", type: "address" }, { name: "_instructor", internalType: "address", type: "address" }, { name: "_pinakion", internalType: "contract IERC20", type: "address" }, { @@ -16600,6 +17257,13 @@ export const klerosCoreUniversityImplementationAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [{ name: "_disputeID", internalType: "uint256", type: "uint256" }], @@ -16637,7 +17301,6 @@ export const klerosCoreUniversityImplementationAbi = [ { name: "_account", internalType: "address", type: "address" }, { name: "_courtID", internalType: "uint96", type: "uint96" }, { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, ], name: "setStakeBySortitionModule", outputs: [], @@ -16656,6 +17319,16 @@ export const klerosCoreUniversityImplementationAbi = [ ], stateMutability: "view", }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_amount", internalType: "uint256", type: "uint256" }, + ], + name: "transferBySortitionModule", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -16666,17 +17339,24 @@ export const klerosCoreUniversityImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0) */ export const klerosCoreUniversityImplementationAddress = { - 421614: "0xF74DaBfC5F5dbdBD07636637204d9C35326D2906", + 421614: "0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xF74DaBfC5F5dbdBD07636637204d9C35326D2906) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xb75b0cc01af4aD0D65D50082ae0717004D479Aa0) */ export const klerosCoreUniversityImplementationConfig = { address: klerosCoreUniversityImplementationAddress, @@ -16688,7 +17368,7 @@ export const klerosCoreUniversityImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f) */ export const klerosCoreUniversityProxyAbi = [ { @@ -16704,14 +17384,14 @@ export const klerosCoreUniversityProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f) */ export const klerosCoreUniversityProxyAddress = { - 421614: "0x5AB37F38778Bc175852fA353056591D91c744ce6", + 421614: "0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5AB37F38778Bc175852fA353056591D91c744ce6) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f) */ export const klerosCoreUniversityProxyConfig = { address: klerosCoreUniversityProxyAddress, @@ -19560,7 +20240,7 @@ export const sortitionModuleConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f55804177e7E44E558616cD7d06B865788214cA) */ export const sortitionModuleUniversityAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -19572,7 +20252,10 @@ export const sortitionModuleUniversityAbi = [ inputs: [{ name: "implementation", internalType: "address", type: "address" }], name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "KlerosCoreOnly" }, + { type: "error", inputs: [], name: "NotEligibleForWithdrawal" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "OwnerOnly" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", @@ -19592,6 +20275,44 @@ export const sortitionModuleUniversityAbi = [ ], name: "Initialized", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "LeftoverPNK", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "LeftoverPNKWithdrawn", + }, { type: "event", anonymous: false, @@ -19647,6 +20368,12 @@ export const sortitionModuleUniversityAbi = [ type: "uint256", indexed: false, }, + { + name: "_amountAllCourts", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], name: "StakeSet", }, @@ -19689,7 +20416,7 @@ export const sortitionModuleUniversityAbi = [ { type: "function", inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, { name: "_extraData", internalType: "bytes", type: "bytes" }, ], name: "createTree", @@ -19705,14 +20432,41 @@ export const sortitionModuleUniversityAbi = [ }, { type: "function", - inputs: [ - { name: "", internalType: "bytes32", type: "bytes32" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [ + { name: "", internalType: "uint96", type: "uint96" }, + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + ], + name: "draw", + outputs: [ + { name: "drawnAddress", internalType: "address", type: "address" }, + { name: "fromSubcourtID", internalType: "uint96", type: "uint96" }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], + name: "executeDelayedStakes", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + ], + name: "forcedUnstake", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "forcedUnstakeAllCourts", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", @@ -19738,15 +20492,15 @@ export const sortitionModuleUniversityAbi = [ }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "_juror", internalType: "address", type: "address" }], + name: "getJurorLeftoverPNK", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, + { name: "_owner", internalType: "address", type: "address" }, { name: "_core", internalType: "contract KlerosCoreUniversity", @@ -19786,18 +20540,15 @@ export const sortitionModuleUniversityAbi = [ }, { type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", + inputs: [], + name: "passPhase", outputs: [], stateMutability: "nonpayable", }, @@ -19820,8 +20571,14 @@ export const sortitionModuleUniversityAbi = [ }, { type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, + { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + ], + name: "setStake", outputs: [], stateMutability: "nonpayable", }, @@ -19830,19 +20587,25 @@ export const sortitionModuleUniversityAbi = [ inputs: [ { name: "_account", internalType: "address", type: "address" }, { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + { name: "_penalty", internalType: "uint256", type: "uint256" }, ], - name: "setStake", + name: "setStakePenalty", outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, + { name: "pnkBalance", internalType: "uint256", type: "uint256" }, + { name: "newCourtStake", internalType: "uint256", type: "uint256" }, + { name: "availablePenalty", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_reward", internalType: "uint256", type: "uint256" }, ], + name: "setStakeReward", + outputs: [{ name: "success", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { @@ -19872,6 +20635,40 @@ export const sortitionModuleUniversityAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "bool", type: "bool" }, + ], + name: "validateStake", + outputs: [ + { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, + { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, + { + name: "stakingResult", + internalType: "enum StakingResult", + type: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "withdrawLeftoverPNK", + outputs: [], + stateMutability: "nonpayable", + }, { type: "constructor", inputs: [ @@ -19883,14 +20680,14 @@ export const sortitionModuleUniversityAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f55804177e7E44E558616cD7d06B865788214cA) */ export const sortitionModuleUniversityAddress = { - 421614: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + 421614: "0x9f55804177e7E44E558616cD7d06B865788214cA", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f55804177e7E44E558616cD7d06B865788214cA) */ export const sortitionModuleUniversityConfig = { address: sortitionModuleUniversityAddress, @@ -19902,7 +20699,7 @@ export const sortitionModuleUniversityConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x270e3D63d3d275604df0a1Bd312E1255DCd96936) */ export const sortitionModuleUniversityImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -19913,7 +20710,10 @@ export const sortitionModuleUniversityImplementationAbi = [ inputs: [{ name: "implementation", internalType: "address", type: "address" }], name: "InvalidImplementation", }, + { type: "error", inputs: [], name: "KlerosCoreOnly" }, + { type: "error", inputs: [], name: "NotEligibleForWithdrawal" }, { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "OwnerOnly" }, { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", @@ -19933,6 +20733,44 @@ export const sortitionModuleUniversityImplementationAbi = [ ], name: "Initialized", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "LeftoverPNK", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "_account", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "_amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "LeftoverPNKWithdrawn", + }, { type: "event", anonymous: false, @@ -19988,6 +20826,12 @@ export const sortitionModuleUniversityImplementationAbi = [ type: "uint256", indexed: false, }, + { + name: "_amountAllCourts", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], name: "StakeSet", }, @@ -20030,7 +20874,7 @@ export const sortitionModuleUniversityImplementationAbi = [ { type: "function", inputs: [ - { name: "_key", internalType: "bytes32", type: "bytes32" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, { name: "_extraData", internalType: "bytes", type: "bytes" }, ], name: "createTree", @@ -20047,14 +20891,41 @@ export const sortitionModuleUniversityImplementationAbi = [ { type: "function", inputs: [ - { name: "", internalType: "bytes32", type: "bytes32" }, + { name: "", internalType: "uint96", type: "uint96" }, { name: "", internalType: "uint256", type: "uint256" }, { name: "", internalType: "uint256", type: "uint256" }, ], name: "draw", - outputs: [{ name: "drawnAddress", internalType: "address", type: "address" }], + outputs: [ + { name: "drawnAddress", internalType: "address", type: "address" }, + { name: "fromSubcourtID", internalType: "uint96", type: "uint96" }, + ], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "_iterations", internalType: "uint256", type: "uint256" }], + name: "executeDelayedStakes", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + ], + name: "forcedUnstake", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "forcedUnstakeAllCourts", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [ @@ -20079,15 +20950,15 @@ export const sortitionModuleUniversityImplementationAbi = [ }, { type: "function", - inputs: [], - name: "governor", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "_juror", internalType: "address", type: "address" }], + name: "getJurorLeftoverPNK", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "_governor", internalType: "address", type: "address" }, + { name: "_owner", internalType: "address", type: "address" }, { name: "_core", internalType: "contract KlerosCoreUniversity", @@ -20127,18 +20998,15 @@ export const sortitionModuleUniversityImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_randomNumber", internalType: "uint256", type: "uint256" }], - name: "notifyRandomNumber", - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "owner", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "_account", internalType: "address", type: "address" }, - { name: "_relativeAmount", internalType: "uint256", type: "uint256" }, - ], - name: "penalizeStake", + inputs: [], + name: "passPhase", outputs: [], stateMutability: "nonpayable", }, @@ -20161,8 +21029,14 @@ export const sortitionModuleUniversityImplementationAbi = [ }, { type: "function", - inputs: [{ name: "_account", internalType: "address", type: "address" }], - name: "setJurorInactive", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_pnkDeposit", internalType: "uint256", type: "uint256" }, + { name: "_pnkWithdrawal", internalType: "uint256", type: "uint256" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + ], + name: "setStake", outputs: [], stateMutability: "nonpayable", }, @@ -20171,19 +21045,25 @@ export const sortitionModuleUniversityImplementationAbi = [ inputs: [ { name: "_account", internalType: "address", type: "address" }, { name: "_courtID", internalType: "uint96", type: "uint96" }, - { name: "_newStake", internalType: "uint256", type: "uint256" }, - { name: "_alreadyTransferred", internalType: "bool", type: "bool" }, + { name: "_penalty", internalType: "uint256", type: "uint256" }, ], - name: "setStake", + name: "setStakePenalty", outputs: [ - { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, - { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, - { - name: "stakingResult", - internalType: "enum StakingResult", - type: "uint8", - }, + { name: "pnkBalance", internalType: "uint256", type: "uint256" }, + { name: "newCourtStake", internalType: "uint256", type: "uint256" }, + { name: "availablePenalty", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_reward", internalType: "uint256", type: "uint256" }, ], + name: "setStakeReward", + outputs: [{ name: "success", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { @@ -20213,17 +21093,51 @@ export const sortitionModuleUniversityImplementationAbi = [ outputs: [], stateMutability: "payable", }, + { + type: "function", + inputs: [ + { name: "_account", internalType: "address", type: "address" }, + { name: "_courtID", internalType: "uint96", type: "uint96" }, + { name: "_newStake", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "bool", type: "bool" }, + ], + name: "validateStake", + outputs: [ + { name: "pnkDeposit", internalType: "uint256", type: "uint256" }, + { name: "pnkWithdrawal", internalType: "uint256", type: "uint256" }, + { + name: "stakingResult", + internalType: "enum StakingResult", + type: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "version", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "_account", internalType: "address", type: "address" }], + name: "withdrawLeftoverPNK", + outputs: [], + stateMutability: "nonpayable", + }, ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x270e3D63d3d275604df0a1Bd312E1255DCd96936) */ export const sortitionModuleUniversityImplementationAddress = { - 421614: "0x5CAD621D69E0535422aCFaCC0017bC32beC7A486", + 421614: "0x270e3D63d3d275604df0a1Bd312E1255DCd96936", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x5CAD621D69E0535422aCFaCC0017bC32beC7A486) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x270e3D63d3d275604df0a1Bd312E1255DCd96936) */ export const sortitionModuleUniversityImplementationConfig = { address: sortitionModuleUniversityImplementationAddress, @@ -20235,7 +21149,7 @@ export const sortitionModuleUniversityImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f55804177e7E44E558616cD7d06B865788214cA) */ export const sortitionModuleUniversityProxyAbi = [ { @@ -20251,14 +21165,14 @@ export const sortitionModuleUniversityProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f55804177e7E44E558616cD7d06B865788214cA) */ export const sortitionModuleUniversityProxyAddress = { - 421614: "0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79", + 421614: "0x9f55804177e7E44E558616cD7d06B865788214cA", } as const; /** - * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x4B2c2d048921f694cCE3AEa35698c6B1f5fcbb79) + * [__View Contract on Arbitrum Sepolia Arbiscan__](https://sepolia.arbiscan.io/address/0x9f55804177e7E44E558616cD7d06B865788214cA) */ export const sortitionModuleUniversityProxyConfig = { address: sortitionModuleUniversityProxyAddress, diff --git a/contracts/scripts/utils/contracts.ts b/contracts/scripts/utils/contracts.ts index 50bcac2f6..fcfb91ac8 100644 --- a/contracts/scripts/utils/contracts.ts +++ b/contracts/scripts/utils/contracts.ts @@ -41,6 +41,7 @@ export const getContractNames = (coreType: Core) => { disputeKitShutter: "DisputeKitShutter", disputeKitGated: "DisputeKitGated", disputeKitGatedShutter: "DisputeKitGatedShutter", + disputeTemplateRegistry: "DisputeTemplateRegistry", disputeResolver: "DisputeResolver", }, [Cores.UNIVERSITY]: { @@ -50,6 +51,7 @@ export const getContractNames = (coreType: Core) => { disputeKitShutter: "DisputeKitShutterUniversity", disputeKitGated: "DisputeKitGatedUniversity", disputeKitGatedShutter: "DisputeKitGatedShutterUniversity", + disputeTemplateRegistry: "DisputeTemplateRegistryUniversity", disputeResolver: "DisputeResolverUniversity", }, }; @@ -59,7 +61,6 @@ export const getContractNames = (coreType: Core) => { return { ...coreSpecificNames[coreType], evidence: "EvidenceModule", - disputeTemplateRegistry: "DisputeTemplateRegistry", policyRegistry: "PolicyRegistry", batcher: "TransactionBatcher", chainlinkRng: "ChainlinkRNG", diff --git a/contracts/scripts/utils/execution.ts b/contracts/scripts/utils/execution.ts index b35709d5d..763eb9191 100644 --- a/contracts/scripts/utils/execution.ts +++ b/contracts/scripts/utils/execution.ts @@ -5,7 +5,7 @@ import { type BuilderTransaction, template, transaction, transactionBuilderUrl } const governableAbi = [ { inputs: [], - name: "owner", + name: "governor", outputs: [ { internalType: "address", @@ -25,7 +25,7 @@ export const execute = async (tx: ContractTransaction) => { const { ethers } = hre; const contract = await ethers.getContractAt(governableAbi, tx.to); - const owner = await contract.owner(); + const owner = await contract.governor(); const isContract = (await ethers.provider.getCode(owner)).length > 2; if (isContract) { // Don't execute, just log the tx. It must be submitted for execution separately. diff --git a/contracts/src/proxy/KlerosProxies.sol b/contracts/src/proxy/KlerosProxies.sol index 7db79b67c..9eb9f8ffc 100644 --- a/contracts/src/proxy/KlerosProxies.sol +++ b/contracts/src/proxy/KlerosProxies.sol @@ -31,6 +31,10 @@ contract DisputeKitSybilResistantProxy is UUPSProxy { constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} } +contract DisputeTemplateRegistryUniversityProxy is UUPSProxy { + constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} +} + contract DisputeTemplateRegistryProxy is UUPSProxy { constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {} } diff --git a/contracts/test/integration/getContractsEthers.test.ts b/contracts/test/integration/getContractsEthers.test.ts index 8bd2b9cf5..40ff2b8f4 100644 --- a/contracts/test/integration/getContractsEthers.test.ts +++ b/contracts/test/integration/getContractsEthers.test.ts @@ -86,7 +86,7 @@ const universityContractMapping: ContractMapping = { disputeKitGated: { name: "DisputeKitGatedUniversity", optional: true }, disputeKitGatedShutter: { name: "DisputeKitGatedShutterUniversity", optional: true }, disputeResolver: { name: "DisputeResolverUniversity" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, + disputeTemplateRegistry: { name: "DisputeTemplateRegistryUniversity" }, evidence: { name: "EvidenceModule" }, policyRegistry: { name: "PolicyRegistry" }, transactionBatcher: { name: "TransactionBatcher" }, diff --git a/contracts/test/integration/getContractsViem.test.ts b/contracts/test/integration/getContractsViem.test.ts index 67c5a92af..b9813a404 100644 --- a/contracts/test/integration/getContractsViem.test.ts +++ b/contracts/test/integration/getContractsViem.test.ts @@ -66,7 +66,7 @@ const universityContractMapping: ContractMapping = { disputeKitGated: { name: "DisputeKitGatedUniversity", optional: true }, disputeKitGatedShutter: { name: "DisputeKitGatedShutterUniversity", optional: true }, disputeResolver: { name: "DisputeResolverUniversity" }, - disputeTemplateRegistry: { name: "DisputeTemplateRegistry" }, + disputeTemplateRegistry: { name: "DisputeTemplateRegistryUniversity" }, evidence: { name: "EvidenceModule" }, policyRegistry: { name: "PolicyRegistry" }, transactionBatcher: { name: "TransactionBatcher" },