diff --git a/contracts/README.md b/contracts/README.md index 5c68bf569..2a00abd5b 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,16 +10,16 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Arbitrum One -- [DisputeKitClassicNeo: proxy](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9), [implementation](https://arbiscan.io/address/0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3) -- [DisputeResolverNeo](https://arbiscan.io/address/0x3645F9e08D80E47c82aD9E33fCB4EA703822C831) -- [DisputeTemplateRegistry: proxy](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25), [implementation](https://arbiscan.io/address/0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb) -- [EvidenceModule: proxy](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005), [implementation](https://arbiscan.io/address/0x827411b3e98bAe8c441efBf26842A1670f8f378F) -- [KlerosCoreNeo: proxy](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1), [implementation](https://arbiscan.io/address/0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284) +- [DisputeKitClassicNeo: proxy](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421), [implementation](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) +- [DisputeResolverNeo](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) +- [DisputeTemplateRegistry: proxy](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2), [implementation](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) +- [EvidenceModule: proxy](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3), [implementation](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) +- [KlerosCoreNeo: proxy](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea), [implementation](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) - [KlerosV2NeoEarlyUser](https://arbiscan.io/address/0xfE34a72c55e512601E7d491A9c5b36373cE34d63) - [Pinakion](https://arbiscan.io/address/0x330bD769382cFc6d50175903434CCC8D206DCAE5) -- [PolicyRegistry: proxy](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547), [implementation](https://arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) -- [RandomizerRNG: proxy](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4), [implementation](https://arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) -- [SortitionModuleNeo: proxy](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f), [implementation](https://arbiscan.io/address/0xf327200420F21BAafce8F1C03B1EEdF926074B95) +- [PolicyRegistry: proxy](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c), [implementation](https://arbiscan.io/address/0x15E5964C7751dF8563eA4bC000301582C79BC454) +- [RandomizerRNG: proxy](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3), [implementation](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) +- [SortitionModuleNeo: proxy](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D), [implementation](https://arbiscan.io/address/0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851) - [TransactionBatcher](https://arbiscan.io/address/0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF) ### Official Testnet diff --git a/contracts/config/courts.v2.mainnet-neo.json b/contracts/config/courts.v2.mainnet-neo.json new file mode 100644 index 000000000..5020b8016 --- /dev/null +++ b/contracts/config/courts.v2.mainnet-neo.json @@ -0,0 +1,17 @@ +[ + { + "id": 1, + "parent": 0, + "hiddenVotes": true, + "minStake": "150000000000000000000", + "alpha": "10000", + "feeForJuror": "5000000000000000", + "jurorsForCourtJump": "511", + "timesPerPeriod": [ + 280800, + 583200, + 583200, + 388800 + ] + } +] diff --git a/contracts/config/policies.v2.mainnet-neo.json b/contracts/config/policies.v2.mainnet-neo.json new file mode 100644 index 000000000..fcd3c685c --- /dev/null +++ b/contracts/config/policies.v2.mainnet-neo.json @@ -0,0 +1,9 @@ +[ + { + "name": "General Court", + "description": "**Court Purpose:**\n\nThe General court exists as the top court in the hierarchy. All appeals made in subcourts will make their way to the General Court.", + "summary": "**Guidelines:**\n - All policies of a court also apply to all of its child subcourts.\n - Jurors should cast their vote with a suitable verification.\n - Jurors should not rule in favor of a side who have engaged in immoral activities (example: rule reject on “revenge porn” images even if they would otherwise fit into the category).\n - “Refuse to arbitrate” should be used for disputes where both sides of the dispute have engaged in activities which are immoral (ex: refuse to rule on an assassination market dispute).\n Immoral activities include: Murder, slavery, rape, violence, theft and perjury.\n - Rulings should be made based on the “state of the world” at the time a dispute was created. (Ex: in a dispute concerning membership of a smart contract on a curated list of “bug free” contracts, jurors should not take into account changes made to the contract after the dispute is raised.) In particular, jurors should base their rulings on court policies and arbitrable application primary documents as they exist at the time of the creation of the dispute, disregarding later modifications.\n - To ensure fairness to jurors who vote at different times within a voting period, jurors should disregard any evidence that is both 1) submitted after the end of the evidence period of the initial round of a dispute AND 2) cannot be reasonably considered to have been readily, publicly available to jurors. Jurors may, however, consider arguments that are submitted later that are based upon existing evidence and/or information which a juror considering the case during the evidence period of the initial round could reasonably have been expected to find themselves. (Ex: a party submits a new photo of a damaged product in an insurance case after the evidence period; this photo should not be considered by jurors. Ex: in a dispute over whether a token satisfies the criteria of a curated list of ERC20 tokens, an argument that reminds jurors of a definitional element of the ERC20 standard is submitted; this is publicly available and can be considered by jurors. Ex: in a dispute over whether a token satisfies a decentralization criterion for an exchange listing, an argument that invokes the distribution of tokens over different Ethereum addresses, as publicly available from sites such as Etherscan, can be considered by jurors.)\n - When considering an appeal of a case that has originated in a lower court, jurors should consider whether 1) evaluating the case requires specialized skills which jurors in the appellate court cannot be expected to have (ex: evaluating the quality of an English to Korean translation when knowledge of Korean is not a requirement of the appellate court) and 2) whether there is evidence that an attack was performed against this case in the lower court (ex: bribes, p+epsilon attacks, 51% attacks, etc). If there is no evidence of an attack AND appellate court jurors cannot be reasonably expected to have the required skills to independently evaluate the case, jurors should vote to uphold the lower court ruling. Evidence related to the presence of attacks on Kleros should be considered by jurors even if it would otherwise violate the above points on evidence admissibility.\n - Jurors should attempt to interpret disputes according to the “spirit of the dispute” unless the arbitrable contract or the policies of the subcourt state otherwise.\n - Jurors should interpret disputes without assuming the existence of gods, spirits or other supernatural beings unless the arbitrable contract or the policies of the subcourt state otherwise.", + "court": 1, + "uri": "/ipfs/QmVtRvx1WHpTcndPyUQos8osKkoFtvZYVLExyjgGxGHP6F/General-Court-Policy.json" + } +] diff --git a/contracts/deploy/00-home-chain-arbitration-neo.ts b/contracts/deploy/00-home-chain-arbitration-neo.ts index b724bf429..4ce2c1213 100644 --- a/contracts/deploy/00-home-chain-arbitration-neo.ts +++ b/contracts/deploy/00-home-chain-arbitration-neo.ts @@ -3,7 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types"; import { getContractAddress } from "./utils/getContractAddress"; import { deployUpgradable } from "./utils/deployUpgradable"; import { changeCurrencyRate } from "./utils/klerosCoreHelper"; -import { HomeChains, isSkipped, isDevnet, PNK, ETH, isMainnet } from "./utils"; +import { HomeChains, isSkipped, isDevnet, PNK, ETH } from "./utils"; import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy"; import { deployERC20AndFaucet, deployERC721 } from "./utils/deployTokens"; import { DisputeKitClassic, KlerosCoreNeo } from "../typechain-types"; @@ -25,6 +25,10 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) await getContractOrDeploy(hre, "TransactionBatcher", { from: deployer, args: [], log: true }); + await deployUpgradable(deployments, "PolicyRegistry", { from: deployer, args: [deployer], log: true }); + + await deployUpgradable(deployments, "EvidenceModule", { from: deployer, args: [deployer], log: true }); + const randomizerOracle = await getContractOrDeploy(hre, "RandomizerOracle", { from: deployer, contract: "RandomizerMock", @@ -32,10 +36,6 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) log: true, }); - await deployUpgradable(deployments, "PolicyRegistry", { from: deployer, args: [deployer], log: true }); - - await deployUpgradable(deployments, "EvidenceModule", { from: deployer, args: [deployer], log: true }); - const rng = await deployUpgradable(deployments, "RandomizerRNG", { from: deployer, args: [randomizerOracle.target, deployer], diff --git a/contracts/deployments/arbitrum.ts b/contracts/deployments/arbitrum.ts index e84b7dc77..4fbccb430 100644 --- a/contracts/deployments/arbitrum.ts +++ b/contracts/deployments/arbitrum.ts @@ -504,7 +504,7 @@ export default { ], }, DisputeKitClassicNeo: { - address: "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + address: "0x70B464be85A547144C72485eBa2577E5D3A45421", abi: [ { stateMutability: "payable", @@ -1453,7 +1453,7 @@ export default { ], }, DisputeKitClassicNeo_Implementation: { - address: "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", + address: "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", abi: [ { inputs: [], @@ -2383,7 +2383,7 @@ export default { ], }, DisputeKitClassicNeo_Proxy: { - address: "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + address: "0x70B464be85A547144C72485eBa2577E5D3A45421", abi: [ { inputs: [ @@ -2412,7 +2412,7 @@ export default { ], }, DisputeResolverNeo: { - address: "0x3645F9e08D80E47c82aD9E33fCB4EA703822C831", + address: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", abi: [ { inputs: [ @@ -2707,7 +2707,7 @@ export default { ], }, DisputeTemplateRegistry: { - address: "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", abi: [ { stateMutability: "payable", @@ -2947,7 +2947,7 @@ export default { ], }, DisputeTemplateRegistry_Implementation: { - address: "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", + address: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", abi: [ { inputs: [], @@ -3168,7 +3168,7 @@ export default { ], }, DisputeTemplateRegistry_Proxy: { - address: "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + address: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", abi: [ { inputs: [ @@ -3197,7 +3197,7 @@ export default { ], }, EvidenceModule: { - address: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", abi: [ { stateMutability: "payable", @@ -3394,7 +3394,7 @@ export default { ], }, EvidenceModule_Implementation: { - address: "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + address: "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", abi: [ { inputs: [], @@ -3572,7 +3572,7 @@ export default { ], }, EvidenceModule_Proxy: { - address: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", abi: [ { inputs: [ @@ -3601,7 +3601,7 @@ export default { ], }, KlerosCoreNeo: { - address: "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", abi: [ { stateMutability: "payable", @@ -5561,7 +5561,7 @@ export default { ], }, KlerosCoreNeo_Implementation: { - address: "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", + address: "0x17c39AB53A7072b167A74a85D47b30385c98ae89", abi: [ { inputs: [], @@ -7502,7 +7502,7 @@ export default { ], }, KlerosCoreNeo_Proxy: { - address: "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + address: "0x991d2df165670b9cac3B022f4B68D65b664222ea", abi: [ { inputs: [ @@ -8941,7 +8941,7 @@ export default { ], }, PolicyRegistry: { - address: "0x26c1980120F1C82cF611D666CE81D2b54d018547", + address: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", abi: [ { stateMutability: "payable", @@ -9175,7 +9175,7 @@ export default { ], }, PolicyRegistry_Implementation: { - address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + address: "0x15E5964C7751dF8563eA4bC000301582C79BC454", abi: [ { inputs: [], @@ -9390,7 +9390,7 @@ export default { ], }, PolicyRegistry_Proxy: { - address: "0x26c1980120F1C82cF611D666CE81D2b54d018547", + address: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", abi: [ { inputs: [ @@ -9423,7 +9423,7 @@ export default { abi: [], }, RandomizerRNG: { - address: "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + address: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", abi: [ { stateMutability: "payable", @@ -9575,7 +9575,7 @@ export default { inputs: [ { internalType: "uint256", - name: "", + name: "requestId", type: "uint256", }, ], @@ -9583,7 +9583,7 @@ export default { outputs: [ { internalType: "uint256", - name: "", + name: "number", type: "uint256", }, ], @@ -9670,7 +9670,7 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "requester", type: "address", }, ], @@ -9678,7 +9678,7 @@ export default { outputs: [ { internalType: "uint256", - name: "", + name: "requestId", type: "uint256", }, ], @@ -9748,7 +9748,7 @@ export default { ], }, RandomizerRNG_Implementation: { - address: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + address: "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", abi: [ { inputs: [], @@ -9897,7 +9897,7 @@ export default { inputs: [ { internalType: "uint256", - name: "", + name: "requestId", type: "uint256", }, ], @@ -9905,7 +9905,7 @@ export default { outputs: [ { internalType: "uint256", - name: "", + name: "number", type: "uint256", }, ], @@ -9992,7 +9992,7 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "requester", type: "address", }, ], @@ -10000,7 +10000,7 @@ export default { outputs: [ { internalType: "uint256", - name: "", + name: "requestId", type: "uint256", }, ], @@ -10054,7 +10054,7 @@ export default { ], }, RandomizerRNG_Proxy: { - address: "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + address: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", abi: [ { inputs: [ @@ -10083,7 +10083,7 @@ export default { ], }, SortitionModuleNeo: { - address: "0x614498118850184c62f82d08261109334bFB050f", + address: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", abi: [ { stateMutability: "payable", @@ -10675,7 +10675,7 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "account", type: "address", }, ], @@ -10712,12 +10712,12 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "jurorAccount", type: "address", }, { internalType: "uint96", - name: "", + name: "courtId", type: "uint96", }, ], @@ -11109,7 +11109,7 @@ export default { ], }, SortitionModuleNeo_Implementation: { - address: "0xf327200420F21BAafce8F1C03B1EEdF926074B95", + address: "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", abi: [ { inputs: [], @@ -11698,7 +11698,7 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "account", type: "address", }, ], @@ -11735,12 +11735,12 @@ export default { inputs: [ { internalType: "address", - name: "", + name: "jurorAccount", type: "address", }, { internalType: "uint96", - name: "", + name: "courtId", type: "uint96", }, ], @@ -12116,7 +12116,7 @@ export default { ], }, SortitionModuleNeo_Proxy: { - address: "0x614498118850184c62f82d08261109334bFB050f", + address: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", abi: [ { inputs: [ diff --git a/contracts/deployments/arbitrum/DisputeKitClassicNeo.json b/contracts/deployments/arbitrum/DisputeKitClassicNeo.json index ba4083a3d..7546d8f08 100644 --- a/contracts/deployments/arbitrum/DisputeKitClassicNeo.json +++ b/contracts/deployments/arbitrum/DisputeKitClassicNeo.json @@ -1,5 +1,5 @@ { - "address": "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", "abi": [ { "stateMutability": "payable", @@ -946,44 +946,44 @@ "type": "constructor" } ], - "transactionHash": "0x83bbf99250151bfa2d6c447cf28df352cc8148074af5096725595ec05a4500b4", + "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", - "transactionIndex": 2, - "gasUsed": "5403468", - "logsBloom": "0x00000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa31c04677fc6a6a70f3714cf96105c68352d67a22d6b22af440b0e3d33d55856", - "transactionHash": "0x83bbf99250151bfa2d6c447cf28df352cc8148074af5096725595ec05a4500b4", + "contractAddress": "0x70B464be85A547144C72485eBa2577E5D3A45421", + "transactionIndex": 3, + "gasUsed": "370687", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000004000000000000000000000000000000000000000000400000000800000000000000000000000000000000", + "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577", + "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", "logs": [ { - "transactionIndex": 2, - "blockNumber": 190274518, - "transactionHash": "0x83bbf99250151bfa2d6c447cf28df352cc8148074af5096725595ec05a4500b4", - "address": "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + "transactionIndex": 3, + "blockNumber": 272063168, + "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", + "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xa31c04677fc6a6a70f3714cf96105c68352d67a22d6b22af440b0e3d33d55856" + "logIndex": 9, + "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577" } ], - "blockNumber": 190274518, - "cumulativeGasUsed": "6129030", + "blockNumber": 272063168, + "cumulativeGasUsed": "1689314", "status": 1, "byzantium": true }, "args": [ - "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", + "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":{},\"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\":\"DisputeKitClassicNeoProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201794998342bb1cd2ef0f3a37df1807bf3e7ce8cccf145231219f8598e7a8b2c664736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201794998342bb1cd2ef0f3a37df1807bf3e7ce8cccf145231219f8598e7a8b2c664736f6c63430008180033", "execute": { "methodName": "initialize", "args": [ @@ -991,27 +991,16 @@ "0x0000000000000000000000000000000000000000" ] }, - "implementation": "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", + "implementation": "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "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 }, "storageLayout": { diff --git a/contracts/deployments/arbitrum/DisputeKitClassicNeo_Implementation.json b/contracts/deployments/arbitrum/DisputeKitClassicNeo_Implementation.json index 3ff57715f..f625c12f2 100644 --- a/contracts/deployments/arbitrum/DisputeKitClassicNeo_Implementation.json +++ b/contracts/deployments/arbitrum/DisputeKitClassicNeo_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", + "address": "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", "abi": [ { "inputs": [], @@ -927,41 +927,41 @@ "type": "function" } ], - "transactionHash": "0x6300d47b56f66f0adf530ad46ebbb08bd2e62a12fa76ab6df41d0401a9f2a28a", + "transactionHash": "0x55b05d40229187d2ea671deddd74bfb03c8a87030e758471cc69517e4acc7017", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", - "transactionIndex": 3, - "gasUsed": "53499406", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbb460c13a1875062b8e6474805e14f6e5677b1575b2e4dc0fb033ad4a5644c92", - "transactionHash": "0x6300d47b56f66f0adf530ad46ebbb08bd2e62a12fa76ab6df41d0401a9f2a28a", + "contractAddress": "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", + "transactionIndex": 4, + "gasUsed": "5464689", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000100000000000000000000000000000", + "blockHash": "0xdf2f7e52651128bdfd5fe62a821eb239cc08a76ffceb07acdc6603e4af406e92", + "transactionHash": "0x55b05d40229187d2ea671deddd74bfb03c8a87030e758471cc69517e4acc7017", "logs": [ { - "transactionIndex": 3, - "blockNumber": 190274507, - "transactionHash": "0x6300d47b56f66f0adf530ad46ebbb08bd2e62a12fa76ab6df41d0401a9f2a28a", - "address": "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", + "transactionIndex": 4, + "blockNumber": 272063151, + "transactionHash": "0x55b05d40229187d2ea671deddd74bfb03c8a87030e758471cc69517e4acc7017", + "address": "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0xbb460c13a1875062b8e6474805e14f6e5677b1575b2e4dc0fb033ad4a5644c92" + "logIndex": 10, + "blockHash": "0xdf2f7e52651128bdfd5fe62a821eb239cc08a76ffceb07acdc6603e4af406e92" } ], - "blockNumber": 190274507, - "cumulativeGasUsed": "55769866", + "blockNumber": 272063151, + "cumulativeGasUsed": "6287281", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "47a03c54c72f5d4984b62ca6f84025dc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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 v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\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 amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` 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 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` 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 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"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.18;\\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\":\"0x347240e5b541bb5df305e4e6ec8ab324a04effa722af31db03cd1d9fdcd039ec\",\"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.18;\\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 => 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\":\"0x53eb90e3209b47a218bd9eb25bd64bcff4edca51829cb7bfff35ed68f9cee05c\",\"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.18;\\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 => uint256) paidFees; // Tracks the fees paid for each choice in this round.\\n mapping(uint256 => bool) hasPaid; // True if this choice was fully funded, false otherwise.\\n mapping(address => mapping(uint256 => 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\":\"0x18bacae1d55cb3ebc4fa88cac18b2ce7c444a97b892bfca5d0a8ae38ee50c5f5\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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 _arbitrableDisputeID The identifier of the dispute in the Arbitrable 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 _arbitrableDisputeID,\\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\":\"0x7babeb6a4180e75dc50a42762f449b32ad0a67cf58a3cb6bf3e5306ac9364507\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"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.18;\\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\":\"0x72cdf621c11d1d84b851edb1ef7607ac950ba7038154c85005ccc86cdd43e71b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\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\":\"0x47960dd772c9dafeefa2e6b9414c7045b5dcc68df735c1fccda6af48ca089858\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0xdc648a85f2816fa323e9f7f4accac3d9384187d0123bdfb1f9b89ce25ea64679\",\"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.18;\\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\":\"0x37a19df56a98cd466fb6e70b8c56e13bfc439221bfabd8c5108d36d0e3ffc0e5\",\"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.18;\\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\":\"0xcfffacf78b92e89a0123aff2c86188abc5327bb59b223f04e1cc1267234bd828\",\"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.18;\\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\":\"0xbac7476deeee8ebbfc895a42e8b50a01c7549164a48ee2ddb0e2307946ee35f9\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051613eeb6200010360003960008181611588015281816115b101526117a90152613eeb6000f3fe6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613186565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613186565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613186565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131b4565b610785565b34801561029857600080fd5b506102ac6102a73660046131f1565b610c10565b005b6102ac6102bc36600461322a565b610d0d565b6102ac6102cf366004613339565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613186565b6117fa565b6040516101b3939291906133d8565b34801561032457600080fd5b506102ac610333366004613444565b6118c0565b34801561034457600080fd5b50610358610353366004613186565b611bcd565b6040516101b39190613496565b34801561037157600080fd5b506102216103803660046134da565b611c91565b34801561039157600080fd5b506103a56103a0366004613515565b611dd6565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613186565b611e8e565b3480156103fe57600080fd5b506102ac61040d366004613541565b611f05565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613599565b611fd1565b34801561045457600080fd5b506102ac610463366004613631565b6126ac565b34801561047457600080fd5b50610488610483366004613515565b6126f8565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461364e565b6127be565b3480156104f657600080fd5b506101a7610505366004613515565b612993565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b36600461322a565b612a2e565b34801561054c57600080fd5b5061022161055b36600461322a565b612d37565b34801561056c57600080fd5b506102ac61057b366004613631565b612e8a565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136d5565b600091825260208220600590910201805490925082906105e690600190613701565b815481106105f6576105f66136d5565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136d5565b6000918252602082206005909102018054909250829061066590600190613701565b81548110610675576106756136d5565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107169190613740565b5090935060049250610726915050565b816004811115610738576107386137a7565b0361077b57600061074888611bcd565b905080516001036107795780600081518110610766576107666136d5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f79190613740565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137bd565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136d5565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137d8565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613814565b610a93919061382b565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136d5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136d5565b9060005260206000200154815260200190815260200160002054610b28919061384d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613814565b610b67919061382b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136d5565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b815260040161084690613860565b600083815260036020526040812054600280549091908110610d8957610d896136d5565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613897565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137d8565b50509050868103610f30576127109150610fb1565b612710611388610f408686613701565b610f4a9190613814565b610f54919061382b565b610f5e8542613701565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc490600190613701565b81548110610fd457610fd46136d5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138bb565b6110619190613701565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138bb565b905060006127106111448784613814565b61114e919061382b565b611158908361384d565b60008c8152600686016020526040812054919250908211156112095760008c815260068601602052604090205434906111919084613701565b116111b65760008c81526006860160205260409020546111b19083613701565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061384d565b909155505060008c81526006860160205260408120805483929061125a90849061384d565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061384d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a85015460011015611537578285600901546113499190613701565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137bd565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161384d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138bb565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016115049392919061390e565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d8334613701565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ed6565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e968339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138bb565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e9683398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e968339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b03168360405161173391906139a8565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e9683398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138d4565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138d4565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136d5565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119869190613740565b5090935060019250611996915050565b8160048111156119a8576119a86137a7565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136d5565b60009182526020822060059091020180549092508290611a8890600190613701565b81548110611a9857611a986136d5565b90600052602060002090600c0201905060005b86811015611b66573382898984818110611ac757611ac76136d5565b9050602002013581548110611ade57611ade6136d5565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139c4565b8582898984818110611b2957611b296136d5565b9050602002013581548110611b4057611b406136d5565b600091825260209091206001600490920201015580611b5e816139fb565b915050611aab565b5086869050816005016000828254611b7e919061384d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bbb908b908b908b90613a46565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611bf357611bf36136d5565b60009182526020822060059091020180549092508290611c1590600190613701565b81548110611c2557611c256136d5565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c8357602002820191906000526020600020905b815481526020019060010190808311611c6f575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cb557611cb56136d5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce957611ce96136d5565b90600052602060002090600c02016000018681548110611d0b57611d0b6136d5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d91906137d8565b506003850154919350915060ff168015611db157508183600201541480611db15750805b15611dc457612710945050505050611dcd565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611e0757611e076136d5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3b57611e3b6136d5565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eb257611eb26136d5565b60009182526020822060059091020180549092508290611ed490600190613701565b81548110611ee457611ee46136d5565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f2f5760405162461bcd60e51b815260040161084690613a6a565b6000836001600160a01b03168383604051611f4a91906139a8565b60006040518083038185875af1925050503d8060008114611f87576040519150601f19603f3d011682016040523d82523d6000602084013e611f8c565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611ff557611ff56136d5565b600091825260209091206002600590920201015460ff16156120295760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120979190613740565b50909350600292506120a7915050565b8160048111156120b9576120b96137a7565b146121145760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b856121565760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b60008881526003602052604081205460028054909190811061217a5761217a6136d5565b9060005260206000209060050201905080600101548611156121d55760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e890600190613701565b815481106121f8576121f86136d5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122779190613740565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f69190613aac565b505050505091505060005b8a8110156125725733848d8d8481811061231d5761231d6136d5565b9050602002013581548110612334576123346136d5565b60009182526020909120600490910201546001600160a01b03161461236b5760405162461bcd60e51b8152600401610846906139c4565b8115806123de575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123b3576123b36136d5565b90506020020135815481106123ca576123ca6136d5565b906000526020600020906004020160010154145b6124505760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c83818110612463576124636136d5565b905060200201358154811061247a5761247a6136d5565b600091825260209091206003600490920201015460ff16156124d35760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124e7576124e76136d5565b90506020020135815481106124fe576124fe6136d5565b60009182526020909120600260049092020101556001848d8d84818110612527576125276136d5565b905060200201358154811061253e5761253e6136d5565b60009182526020909120600490910201600301805460ff19169115159190911790558061256a816139fb565b915050612301565b508a8a905083600401600082825461258a919061384d565b90915550506000898152600284016020526040812080548c92906125af90849061384d565b9091555050600183015489036125de57600383015460ff16156125d95760038301805460ff191690555b612657565b60018301546000908152600284016020526040808220548b83529120540361262057600383015460ff166125d95760038301805460ff19166001179055612657565b60018301546000908152600284016020526040808220548b83529120541115612657576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161269693929190613b16565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126d65760405162461bcd60e51b815260040161084690613a6a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612726576127266136d5565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061275a5761275a6136d5565b90600052602060002090600c0201600001878154811061277c5761277c6136d5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127e85760405162461bcd60e51b815260040161084690613b46565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612873858783613bd8565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128ee91906138bb565b6128f89190613701565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612981908a908a908a90613c98565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129b7576129b76136d5565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129eb576129eb6136d5565b90600052602060002090600c02016000018481548110612a0d57612a0d6136d5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a5b5760405162461bcd60e51b815260040161084690613b46565b600083815260036020526040902054600280548592908110612a7f57612a7f6136d5565b600091825260209091206002600590920201015460ff1615612ab35760405162461bcd60e51b815260040161084690613860565b600084815260036020526040812054600280549091908110612ad757612ad76136d5565b60009182526020822060059091020180549092508290612af990600190613701565b81548110612b0957612b096136d5565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b929190613cce565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c059190613740565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8d9190613cce565b9650612c998988612f03565b15612d2657604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d2b565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d5b57612d5b6136d5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d8f57612d8f6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e1291906137d8565b5091509150826004015460001480612e41575080158015612e4157506000828152600284016020526040902054155b15612e53576000945050505050612e84565b8015612e68575050600401549150612e849050565b506000908152600290910160205260409020549150612e849050565b92915050565b6000546001600160a01b03163314612eb45760405162461bcd60e51b815260040161084690613a6a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612f005760405162461bcd60e51b815260040161084690613a6a565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f759190613740565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ff891906138bb565b6130029190613701565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613043573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261306b9190810190613d7e565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130eb9190613cce565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131669190613e5f565b5050915091508281613178919061384d565b909110159695505050505050565b60006020828403121561319857600080fd5b5035919050565b6001600160a01b0381168114612f0057600080fd5b600080600080608085870312156131ca57600080fd5b8435935060208501356131dc8161319f565b93969395505050506040820135916060013590565b6000806040838503121561320457600080fd5b823561320f8161319f565b9150602083013561321f8161319f565b809150509250929050565b6000806040838503121561323d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132855761328561324c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132b3576132b361324c565b604052919050565b60006001600160401b038311156132d4576132d461324c565b6132e7601f8401601f191660200161328b565b90508281528383830111156132fb57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261332357600080fd5b613332838335602085016132bb565b9392505050565b6000806040838503121561334c57600080fd5b82356133578161319f565b915060208301356001600160401b0381111561337257600080fd5b61337e85828601613312565b9150509250929050565b60005b838110156133a357818101518382015260200161338b565b50506000910152565b600081518084526133c4816020860160208601613388565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dcd60608301846133ac565b60008083601f84011261340b57600080fd5b5081356001600160401b0381111561342257600080fd5b6020830191508360208260051b850101111561343d57600080fd5b9250929050565b6000806000806060858703121561345a57600080fd5b8435935060208501356001600160401b0381111561347757600080fd5b613483878288016133f9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134ce578351835292840192918401916001016134b2565b50909695505050505050565b600080600080600060a086880312156134f257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561352a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561355657600080fd5b83356135618161319f565b92506020840135915060408401356001600160401b0381111561358357600080fd5b61358f86828701613312565b9150509250925092565b60008060008060008060a087890312156135b257600080fd5b8635955060208701356001600160401b03808211156135d057600080fd5b6135dc8a838b016133f9565b90975095506040890135945060608901359350608089013591508082111561360357600080fd5b508701601f8101891361361557600080fd5b613624898235602084016132bb565b9150509295509295509295565b60006020828403121561364357600080fd5b81356133328161319f565b60008060008060006080868803121561366657600080fd5b853594506020860135935060408601356001600160401b038082111561368b57600080fd5b818801915088601f83011261369f57600080fd5b8135818111156136ae57600080fd5b8960208285010111156136c057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e8457612e846136eb565b80516001600160601b038116811461372b57600080fd5b919050565b8051801515811461372b57600080fd5b600080600080600060a0868803121561375857600080fd5b61376186613714565b945060208601516137718161319f565b60408701519094506005811061378657600080fd5b925061379460608701613730565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137cf57600080fd5b61333282613730565b6000806000606084860312156137ed57600080fd5b835192506137fd60208501613730565b915061380b60408501613730565b90509250925092565b8082028115828204841417612e8457612e846136eb565b60008261384857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e8457612e846136eb565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600080604083850312156138aa57600080fd5b505080516020909101519092909150565b6000602082840312156138cd57600080fd5b5051919050565b600181811c908216806138e857607f821691505b60208210810361390857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845461392e816138d4565b8060608701526080600180841660008114613950576001811461396a57613998565b60ff1985168984015283151560051b890183019550613998565b896000528660002060005b858110156139905781548b8201860152908301908801613975565b8a0184019650505b50939a9950505050505050505050565b600082516139ba818460208701613388565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b600060018201613a0d57613a0d6136eb565b5060010190565b81835260006001600160fb1b03831115613a2d57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a5a604083018587613a14565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ac757600080fd5b613ad088613714565b9650613ade60208901613730565b955060408801519450606088015193506080880151925060a08801519150613b0860c08901613730565b905092959891949750929550565b604081526000613b2a604083018587613a14565b8281036020840152613b3c81856133ac565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f82111561179757600081815260208120601f850160051c81016020861015613bb15750805b601f850160051c820191505b81811015613bd057828155600101613bbd565b505050505050565b6001600160401b03831115613bef57613bef61324c565b613c0383613bfd83546138d4565b83613b8a565b6000601f841160018114613c375760008515613c1f5750838201355b600019600387901b1c1916600186901b178355613c91565b600083815260209020601f19861690835b82811015613c685786850135825560209485019460019092019101613c48565b5086821015613c855760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ce057600080fd5b81516133328161319f565b600082601f830112613cfc57600080fd5b815160206001600160401b03821115613d1757613d1761324c565b8160051b613d2682820161328b565b9283528481018201928281019087851115613d4057600080fd5b83870192505b84831015613d68578251613d598161319f565b82529183019190830190613d46565b979650505050505050565b805161372b8161319f565b600060208284031215613d9057600080fd5b81516001600160401b0380821115613da757600080fd5b908301906101608286031215613dbc57600080fd5b613dc4613262565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613e0c57600080fd5b613e1887828601613ceb565b60c08301525060e0838101519082015261010080840151908201526101209150613e43828401613d73565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e7557600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122027208ff103467ed9323af634c5e37e1c1dd6321b1d0fa4cf70ec605004157b6064736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101825760003560e01c80636d4cd8ea116100d7578063b6ede54011610085578063b6ede540146104ca578063ba66fde7146104ea578063be4676041461050a578063d2b8035a14610520578063da3beb8c14610540578063e349ad3014610412578063e4c0aaf414610560578063f2f4eb261461058057600080fd5b80636d4cd8ea146103d2578063751accd0146103f2578063796490f9146104125780637c04034e146104285780638e42646014610448578063a7cc08fe14610468578063b34bfaa8146104b457600080fd5b80634f1ef286116101345780634f1ef286146102c157806352d1902d146102d4578063564a565d146102e95780635c92e2f61461031857806365540b9614610338578063675926f61461036557806369f3f0411461038557600080fd5b80630baa64d1146101875780630c340a24146101bc5780631200aabc146101f45780631c3db16d1461022f578063362c34791461026c578063485cc9551461028c5780634b2f0ea0146102ae575b600080fd5b34801561019357600080fd5b506101a76101a2366004613186565b6105a0565b60405190151581526020015b60405180910390f35b3480156101c857600080fd5b506000546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020016101b3565b34801561020057600080fd5b5061022161020f366004613186565b60036020526000908152604090205481565b6040519081526020016101b3565b34801561023b57600080fd5b5061024f61024a366004613186565b610617565b6040805193845291151560208401521515908201526060016101b3565b34801561027857600080fd5b506102216102873660046131b4565b610785565b34801561029857600080fd5b506102ac6102a73660046131f1565b610c10565b005b6102ac6102bc36600461322a565b610d0d565b6102ac6102cf366004613339565b611574565b3480156102e057600080fd5b5061022161179c565b3480156102f557600080fd5b50610309610304366004613186565b6117fa565b6040516101b3939291906133d8565b34801561032457600080fd5b506102ac610333366004613444565b6118c0565b34801561034457600080fd5b50610358610353366004613186565b611bcd565b6040516101b39190613496565b34801561037157600080fd5b506102216103803660046134da565b611c91565b34801561039157600080fd5b506103a56103a0366004613515565b611dd6565b604080519687529415156020870152938501929092526060840152608083015260a082015260c0016101b3565b3480156103de57600080fd5b506101a76103ed366004613186565b611e8e565b3480156103fe57600080fd5b506102ac61040d366004613541565b611f05565b34801561041e57600080fd5b5061022161271081565b34801561043457600080fd5b506102ac610443366004613599565b611fd1565b34801561045457600080fd5b506102ac610463366004613631565b6126ac565b34801561047457600080fd5b50610488610483366004613515565b6126f8565b604080516001600160a01b039095168552602085019390935291830152151560608201526080016101b3565b3480156104c057600080fd5b50610221614e2081565b3480156104d657600080fd5b506102ac6104e536600461364e565b6127be565b3480156104f657600080fd5b506101a7610505366004613515565b612993565b34801561051657600080fd5b5061022161138881565b34801561052c57600080fd5b506101dc61053b36600461322a565b612a2e565b34801561054c57600080fd5b5061022161055b36600461322a565b612d37565b34801561056c57600080fd5b506102ac61057b366004613631565b612e8a565b34801561058c57600080fd5b506001546101dc906001600160a01b031681565b6000818152600360205260408120546002805483929081106105c4576105c46136d5565b600091825260208220600590910201805490925082906105e690600190613701565b815481106105f6576105f66136d5565b60009182526020909120600c90910201805460059091015414949350505050565b6000806000806002600360008781526020019081526020016000205481548110610643576106436136d5565b6000918252602082206005909102018054909250829061066590600190613701565b81548110610675576106756136d5565b60009182526020909120600c90910201600381015460ff1694509050836106a05780600101546106a3565b60005b60015460405163564a565d60e01b8152600481018990529196506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156106f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107169190613740565b5090935060049250610726915050565b816004811115610738576107386137a7565b0361077b57600061074888611bcd565b905080516001036107795780600081518110610766576107666136d5565b6020026020010151965060009550600194505b505b5050509193909250565b60015460405163564a565d60e01b81526004810186905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa1580156107d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f79190613740565b5093505050508061084f5760405162461bcd60e51b815260206004820152601b60248201527f446973707574652073686f756c64206265207265736f6c7665642e000000000060448201526064015b60405180910390fd5b600160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906137bd565b156109045760405162461bcd60e51b815260206004820152600e60248201526d10dbdc99481a5cc81c185d5cd95960921b6044820152606401610846565b600086815260036020526040812054600280549091908110610928576109286136d5565b6000918252602080832088845260036005909302019182019052604082205481549193508391811061095c5761095c6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018d9052600c9390930290910193506001600160a01b031690631c3db16d90602401606060405180830381865afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db91906137d8565b5050600087815260078401602052604090205490915060ff16610a25576001600160a01b038816600090815260088301602090815260408083208984529091529020549450610b6a565b808603610a9a576000868152600683016020526040902054610a48576000610a93565b600086815260068301602090815260408083205460098601546001600160a01b038d1685526008870184528285208b8652909352922054610a899190613814565b610a93919061382b565b9450610b6a565b600081815260078301602052604090205460ff16610b6a5781600601600083600a01600181548110610ace57610ace6136d5565b906000526020600020015481526020019081526020016000205482600601600084600a01600081548110610b0457610b046136d5565b9060005260206000200154815260200190815260200160002054610b28919061384d565b60098301546001600160a01b038a16600090815260088501602090815260408083208b8452909152902054610b5d9190613814565b610b67919061382b565b94505b6001600160a01b038816600090815260088301602090815260408083208984529091528120558415610c04576040516001600160a01b0389169086156108fc029087906000818181858888f15050604080518a8152602081018a90526001600160a01b038d1694508b93508d92507f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae910160405180910390a45b50505050949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff1680610c59575080546001600160401b03808416911610155b15610c765760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b038316908117600160401b178255600080546001600160a01b038781166001600160a01b0319928316179092556001805492871692909116919091179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b600082815260036020526040902054600280548492908110610d3157610d316136d5565b600091825260209091206002600590920201015460ff1615610d655760405162461bcd60e51b815260040161084690613860565b600083815260036020526040812054600280549091908110610d8957610d896136d5565b906000526020600020906005020190508060010154831115610ded5760405162461bcd60e51b815260206004820181905260248201527f5468657265206973206e6f20737563682072756c696e6720746f2066756e642e6044820152606401610846565b60015460405163afe15cfb60e01b81526004810186905260009182916001600160a01b039091169063afe15cfb906024016040805180830381865afa158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190613897565b91509150814210158015610e7157508042105b610eb65760405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606401610846565b604051631c3db16d60e01b81526004810187905260009081903090631c3db16d90602401606060405180830381865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906137d8565b50509050868103610f30576127109150610fb1565b612710611388610f408686613701565b610f4a9190613814565b610f54919061382b565b610f5e8542613701565b10610fab5760405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606401610846565b614e2091505b84546000908690610fc490600190613701565b81548110610fd457610fd46136d5565b60009182526020822060018054604051637e37c78b60e11b8152600481018f9052600c949094029092019450916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa158015611033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105791906138bb565b6110619190613701565b60008a815260078401602052604090205490915060ff16156110c55760405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606401610846565b600154604051632cf6413f60e11b8152600481018c90526000916001600160a01b0316906359ec827e90602401602060405180830381865afa15801561110f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113391906138bb565b905060006127106111448784613814565b61114e919061382b565b611158908361384d565b60008c8152600686016020526040812054919250908211156112095760008c815260068601602052604090205434906111919084613701565b116111b65760008c81526006860160205260409020546111b19083613701565b6111b8565b345b9050336001600160a01b0316848e7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08f85604051611200929190918252602082015260400190565b60405180910390a45b33600090815260088601602090815260408083208f84529091528120805483929061123590849061384d565b909155505060008c81526006860160205260408120805483929061125a90849061384d565b909155505060008c8152600686016020526040902054821161132c5760008c81526006860160205260408120546009870180549192909161129c90849061384d565b9250508190555084600a018c908060018154018082558091505060019003906000526020600020016000909190919091505560018560070160008e815260200190815260200160002060006101000a81548160ff0219169083151502179055508b848e7fed764996238e4c1c873ae3af7ae2f00f1f6f4f10b9ac7d4bbea4a764c5dea00960405160405180910390a45b600a85015460011015611537578285600901546113499190613701565b60098601556001546040516319b8152960e01b8152600481018f90526001600160a01b03909116906319b8152990602401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb91906137bd565b156113d45760028a01805460ff191660011790556114b7565b895460038b0160006113e787600161384d565b81526020019081526020016000208190555060008a6000016001816001815401808255809150500390600052602060002090600c02019050600160009054906101000a90046001600160a01b03166001600160a01b031663c71f42538f6040518263ffffffff1660e01b815260040161146291815260200190565b602060405180830381865afa15801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a391906138bb565b600b820155600301805460ff191660011790555b600160009054906101000a90046001600160a01b03166001600160a01b031663c3569902848f8d600101548e6004016040518563ffffffff1660e01b81526004016115049392919061390e565b6000604051808303818588803b15801561151d57600080fd5b505af1158015611531573d6000803e3d6000fd5b50505050505b8034111561156557336108fc61154d8334613701565b6040518115909202916000818181858888f150505050505b50505050505050505050505050565b61157d82612ed6565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806115fb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115ef600080516020613e968339815191525490565b6001600160a01b031614155b156116195760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611673575060408051601f3d908101601f19168201909252611670918101906138bb565b60015b61169b57604051630c76093760e01b81526001600160a01b0383166004820152602401610846565b600080516020613e9683398151915281146116cc57604051632a87526960e21b815260048101829052602401610846565b600080516020613e968339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611797576000836001600160a01b03168360405161173391906139a8565b600060405180830381855af49150503d806000811461176e576040519150601f19603f3d011682016040523d82523d6000602084013e611773565b606091505b5050905080611795576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117e75760405163703e46dd60e11b815260040160405180910390fd5b50600080516020613e9683398151915290565b6002818154811061180a57600080fd5b600091825260209091206005909102016001810154600282015460048301805492945060ff909116929161183d906138d4565b80601f0160208091040260200160405190810160405280929190818152602001828054611869906138d4565b80156118b65780601f1061188b576101008083540402835291602001916118b6565b820191906000526020600020905b81548152906001019060200180831161189957829003601f168201915b5050505050905083565b6000848152600360205260409020546002805486929081106118e4576118e46136d5565b600091825260209091206002600590920201015460ff16156119185760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018790526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015611962573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119869190613740565b5090935060019250611996915050565b8160048111156119a8576119a86137a7565b14611a055760405162461bcd60e51b815260206004820152602760248201527f54686520646973707574652073686f756c6420626520696e20436f6d6d6974206044820152663832b934b7b21760c91b6064820152608401610846565b82611a425760405162461bcd60e51b815260206004820152600d60248201526c22b6b83a3c9031b7b6b6b4ba1760991b6044820152606401610846565b600086815260036020526040812054600280549091908110611a6657611a666136d5565b60009182526020822060059091020180549092508290611a8890600190613701565b81548110611a9857611a986136d5565b90600052602060002090600c0201905060005b86811015611b66573382898984818110611ac757611ac76136d5565b9050602002013581548110611ade57611ade6136d5565b60009182526020909120600490910201546001600160a01b031614611b155760405162461bcd60e51b8152600401610846906139c4565b8582898984818110611b2957611b296136d5565b9050602002013581548110611b4057611b406136d5565b600091825260209091206001600490920201015580611b5e816139fb565b915050611aab565b5086869050816005016000828254611b7e919061384d565b9091555050604051339089907f05cc2f1c94966f1c961b410a50f3d3ffb64501346753a258177097ea23707f0890611bbb908b908b908b90613a46565b60405180910390a35050505050505050565b6000818152600360205260408120546002805460609392908110611bf357611bf36136d5565b60009182526020822060059091020180549092508290611c1590600190613701565b81548110611c2557611c256136d5565b90600052602060002090600c0201905080600a01805480602002602001604051908101604052809291908181526020018280548015611c8357602002820191906000526020600020905b815481526020019060010190808311611c6f575b505050505092505050919050565b600085815260036020526040812054600280548392908110611cb557611cb56136d5565b60009182526020808320898452600360059093020191820190526040822054815491935083918110611ce957611ce96136d5565b90600052602060002090600c02016000018681548110611d0b57611d0b6136d5565b600091825260208220600154604051631c3db16d60e01b815260048082018e905293909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d91906137d8565b506003850154919350915060ff168015611db157508183600201541480611db15750805b15611dc457612710945050505050611dcd565b60009450505050505b95945050505050565b60008060008060008060006002600360008c81526020019081526020016000205481548110611e0757611e076136d5565b600091825260208083208c8452600360059093020191820190526040822054815491935083918110611e3b57611e3b6136d5565b600091825260208083206001600c909302019182015460038301546004840154600585015485549f87526002909501909352604090942054909f60ff9094169e50909c50909a9950975095505050505050565b600081815260036020526040812054600280548392908110611eb257611eb26136d5565b60009182526020822060059091020180549092508290611ed490600190613701565b81548110611ee457611ee46136d5565b60009182526020909120600c90910201805460049091015414949350505050565b6000546001600160a01b03163314611f2f5760405162461bcd60e51b815260040161084690613a6a565b6000836001600160a01b03168383604051611f4a91906139a8565b60006040518083038185875af1925050503d8060008114611f87576040519150601f19603f3d011682016040523d82523d6000602084013e611f8c565b606091505b50509050806117955760405162461bcd60e51b8152602060048201526011602482015270155b9cdd58d8d95cdcd99d5b0818d85b1b607a1b6044820152606401610846565b600086815260036020526040902054600280548892908110611ff557611ff56136d5565b600091825260209091206002600590920201015460ff16156120295760405162461bcd60e51b815260040161084690613860565b60015460405163564a565d60e01b8152600481018990526000916001600160a01b03169063564a565d9060240160a060405180830381865afa158015612073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120979190613740565b50909350600292506120a7915050565b8160048111156120b9576120b96137a7565b146121145760405162461bcd60e51b815260206004820152602560248201527f54686520646973707574652073686f756c6420626520696e20566f74652070656044820152643934b7b21760d91b6064820152608401610846565b856121565760405162461bcd60e51b8152602060048201526012602482015271139bc81d9bdd195251081c1c9bdd9a59195960721b6044820152606401610846565b60008881526003602052604081205460028054909190811061217a5761217a6136d5565b9060005260206000209060050201905080600101548611156121d55760405162461bcd60e51b815260206004820152601460248201527343686f696365206f7574206f6620626f756e647360601b6044820152606401610846565b805460009082906121e890600190613701565b815481106121f8576121f86136d5565b60009182526020822060015460405163564a565d60e01b8152600481018f9052600c9390930290910193506001600160a01b03169063564a565d9060240160a060405180830381865afa158015612253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122779190613740565b5050600154604051630fad06e960e11b81526001600160601b03851660048201529394506000936001600160a01b039091169250631f5a0dd2915060240160e060405180830381865afa1580156122d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f69190613aac565b505050505091505060005b8a8110156125725733848d8d8481811061231d5761231d6136d5565b9050602002013581548110612334576123346136d5565b60009182526020909120600490910201546001600160a01b03161461236b5760405162461bcd60e51b8152600401610846906139c4565b8115806123de575060408051602081018c90529081018a905260600160405160208183030381529060405280519060200120846000018d8d848181106123b3576123b36136d5565b90506020020135815481106123ca576123ca6136d5565b906000526020600020906004020160010154145b6124505760405162461bcd60e51b815260206004820152603d60248201527f54686520636f6d6d6974206d757374206d61746368207468652063686f69636560448201527f20696e20636f7572747320776974682068696464656e20766f7465732e0000006064820152608401610846565b838c8c83818110612463576124636136d5565b905060200201358154811061247a5761247a6136d5565b600091825260209091206003600490920201015460ff16156124d35760405162461bcd60e51b81526020600482015260126024820152712b37ba329030b63932b0b23c9031b0b9ba1760711b6044820152606401610846565b89848d8d848181106124e7576124e76136d5565b90506020020135815481106124fe576124fe6136d5565b60009182526020909120600260049092020101556001848d8d84818110612527576125276136d5565b905060200201358154811061253e5761253e6136d5565b60009182526020909120600490910201600301805460ff19169115159190911790558061256a816139fb565b915050612301565b508a8a905083600401600082825461258a919061384d565b90915550506000898152600284016020526040812080548c92906125af90849061384d565b9091555050600183015489036125de57600383015460ff16156125d95760038301805460ff191690555b612657565b60018301546000908152600284016020526040808220548b83529120540361262057600383015460ff166125d95760038301805460ff19166001179055612657565b60018301546000908152600284016020526040808220548b83529120541115612657576001830189905560038301805460ff191690555b88336001600160a01b03168d7fa000893c71384499023d2d7b21234f7b9e80c78e0330f357dcd667ff578bd3a48e8e8c60405161269693929190613b16565b60405180910390a4505050505050505050505050565b6000546001600160a01b031633146126d65760405162461bcd60e51b815260040161084690613a6a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060006002600360008a81526020019081526020016000205481548110612726576127266136d5565b600091825260208083208a845260036005909302019182019052604082205481549193508391811061275a5761275a6136d5565b90600052602060002090600c0201600001878154811061277c5761277c6136d5565b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169c909b5091995060ff16975095505050505050565b6001546001600160a01b031633146127e85760405162461bcd60e51b815260040161084690613b46565b60028054600181018255600091909152600581027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf81018690557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace8101907f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad201612873858783613bd8565b50805460018054604051637e37c78b60e11b8152600481018b9052600385019260009290916001600160a01b039091169063fc6f8f1690602401602060405180830381865afa1580156128ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128ee91906138bb565b6128f89190613701565b81526020808201929092526040908101600090812093909355835460018181018655858552838520600b600c909302019182018890556003808301805460ff19169092179091558b855290925291829020849055905188907fd3106f74c2d30a4b9230e756a3e78bde53865d40f6af4c479bb010ebaab5810890612981908a908a908a90613c98565b60405180910390a25050505050505050565b6000838152600360205260408120546002805483929081106129b7576129b76136d5565b600091825260208083208784526003600590930201918201905260408220548154919350839181106129eb576129eb6136d5565b90600052602060002090600c02016000018481548110612a0d57612a0d6136d5565b600091825260209091206004909102016003015460ff169695505050505050565b6001546000906001600160a01b03163314612a5b5760405162461bcd60e51b815260040161084690613b46565b600083815260036020526040902054600280548592908110612a7f57612a7f6136d5565b600091825260209091206002600590920201015460ff1615612ab35760405162461bcd60e51b815260040161084690613860565b600084815260036020526040812054600280549091908110612ad757612ad76136d5565b60009182526020822060059091020180549092508290612af990600190613701565b81548110612b0957612b096136d5565b90600052602060002090600c020190506000600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b929190613cce565b60015460405163564a565d60e01b8152600481018a90529192506000916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c059190613740565b5050604051632638506b60e11b81526001600160601b03841660048201819052602482018d9052604482018c90529394506001600160a01b0386169250634c70a0d69150606401602060405180830381865afa158015612c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8d9190613cce565b9650612c998988612f03565b15612d2657604080516080810182526001600160a01b03898116825260006020808401828152948401828152606085018381528a5460018082018d558c8652939094209551600490940290950180546001600160a01b0319169390941692909217835593519382019390935591516002830155516003909101805460ff1916911515919091179055612d2b565b600096505b50505050505092915050565b600082815260036020526040812054600280548392908110612d5b57612d5b6136d5565b60009182526020808320868452600360059093020191820190526040822054815491935083918110612d8f57612d8f6136d5565b600091825260208220600154604051631c3db16d60e01b8152600481018a9052600c93909302909101935082916001600160a01b0390911690631c3db16d90602401606060405180830381865afa158015612dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e1291906137d8565b5091509150826004015460001480612e41575080158015612e4157506000828152600284016020526040902054155b15612e53576000945050505050612e84565b8015612e68575050600401549150612e849050565b506000908152600290910160205260409020549150612e849050565b92915050565b6000546001600160a01b03163314612eb45760405162461bcd60e51b815260040161084690613a6a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612f005760405162461bcd60e51b815260040161084690613a6a565b50565b60015460405163564a565d60e01b81526004810184905260009182916001600160a01b039091169063564a565d9060240160a060405180830381865afa158015612f51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f759190613740565b505060018054604051637e37c78b60e11b8152600481018a90529495506000946001600160a01b039091169350638a9bb02a9250889190849063fc6f8f1690602401602060405180830381865afa158015612fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ff891906138bb565b6130029190613701565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381865afa158015613043573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261306b9190810190613d7e565b602001519050600080600160009054906101000a90046001600160a01b03166001600160a01b0316632e1daf2f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130eb9190613cce565b604051631a383be960e31b81526001600160a01b0388811660048301526001600160601b0387166024830152919091169063d1c1df4890604401608060405180830381865afa158015613142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131669190613e5f565b5050915091508281613178919061384d565b909110159695505050505050565b60006020828403121561319857600080fd5b5035919050565b6001600160a01b0381168114612f0057600080fd5b600080600080608085870312156131ca57600080fd5b8435935060208501356131dc8161319f565b93969395505050506040820135916060013590565b6000806040838503121561320457600080fd5b823561320f8161319f565b9150602083013561321f8161319f565b809150509250929050565b6000806040838503121561323d57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156132855761328561324c565b60405290565b604051601f8201601f191681016001600160401b03811182821017156132b3576132b361324c565b604052919050565b60006001600160401b038311156132d4576132d461324c565b6132e7601f8401601f191660200161328b565b90508281528383830111156132fb57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261332357600080fd5b613332838335602085016132bb565b9392505050565b6000806040838503121561334c57600080fd5b82356133578161319f565b915060208301356001600160401b0381111561337257600080fd5b61337e85828601613312565b9150509250929050565b60005b838110156133a357818101518382015260200161338b565b50506000910152565b600081518084526133c4816020860160208601613388565b601f01601f19169290920160200192915050565b8381528215156020820152606060408201526000611dcd60608301846133ac565b60008083601f84011261340b57600080fd5b5081356001600160401b0381111561342257600080fd5b6020830191508360208260051b850101111561343d57600080fd5b9250929050565b6000806000806060858703121561345a57600080fd5b8435935060208501356001600160401b0381111561347757600080fd5b613483878288016133f9565b9598909750949560400135949350505050565b6020808252825182820181905260009190848201906040850190845b818110156134ce578351835292840192918401916001016134b2565b50909695505050505050565b600080600080600060a086880312156134f257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561352a57600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561355657600080fd5b83356135618161319f565b92506020840135915060408401356001600160401b0381111561358357600080fd5b61358f86828701613312565b9150509250925092565b60008060008060008060a087890312156135b257600080fd5b8635955060208701356001600160401b03808211156135d057600080fd5b6135dc8a838b016133f9565b90975095506040890135945060608901359350608089013591508082111561360357600080fd5b508701601f8101891361361557600080fd5b613624898235602084016132bb565b9150509295509295509295565b60006020828403121561364357600080fd5b81356133328161319f565b60008060008060006080868803121561366657600080fd5b853594506020860135935060408601356001600160401b038082111561368b57600080fd5b818801915088601f83011261369f57600080fd5b8135818111156136ae57600080fd5b8960208285010111156136c057600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612e8457612e846136eb565b80516001600160601b038116811461372b57600080fd5b919050565b8051801515811461372b57600080fd5b600080600080600060a0868803121561375857600080fd5b61376186613714565b945060208601516137718161319f565b60408701519094506005811061378657600080fd5b925061379460608701613730565b9150608086015190509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137cf57600080fd5b61333282613730565b6000806000606084860312156137ed57600080fd5b835192506137fd60208501613730565b915061380b60408501613730565b90509250925092565b8082028115828204841417612e8457612e846136eb565b60008261384857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115612e8457612e846136eb565b6020808252601e908201527f44697370757465206a756d70656420746f206120706172656e7420444b210000604082015260600190565b600080604083850312156138aa57600080fd5b505080516020909101519092909150565b6000602082840312156138cd57600080fd5b5051919050565b600181811c908216806138e857607f821691505b60208210810361390857634e487b7160e01b600052602260045260246000fd5b50919050565b838152600060208481840152606060408401526000845461392e816138d4565b8060608701526080600180841660008114613950576001811461396a57613998565b60ff1985168984015283151560051b890183019550613998565b896000528660002060005b858110156139905781548b8201860152908301908801613975565b8a0184019650505b50939a9950505050505050505050565b600082516139ba818460208701613388565b9190910192915050565b6020808252601f908201527f5468652063616c6c65722068617320746f206f776e2074686520766f74652e00604082015260600190565b600060018201613a0d57613a0d6136eb565b5060010190565b81835260006001600160fb1b03831115613a2d57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000613a5a604083018587613a14565b9050826020830152949350505050565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600080600080600080600060e0888a031215613ac757600080fd5b613ad088613714565b9650613ade60208901613730565b955060408801519450606088015193506080880151925060a08801519150613b0860c08901613730565b905092959891949750929550565b604081526000613b2a604083018587613a14565b8281036020840152613b3c81856133ac565b9695505050505050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b601f82111561179757600081815260208120601f850160051c81016020861015613bb15750805b601f850160051c820191505b81811015613bd057828155600101613bbd565b505050505050565b6001600160401b03831115613bef57613bef61324c565b613c0383613bfd83546138d4565b83613b8a565b6000601f841160018114613c375760008515613c1f5750838201355b600019600387901b1c1916600186901b178355613c91565b600083815260209020601f19861690835b82811015613c685786850135825560209485019460019092019101613c48565b5086821015613c855760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b600060208284031215613ce057600080fd5b81516133328161319f565b600082601f830112613cfc57600080fd5b815160206001600160401b03821115613d1757613d1761324c565b8160051b613d2682820161328b565b9283528481018201928281019087851115613d4057600080fd5b83870192505b84831015613d68578251613d598161319f565b82529183019190830190613d46565b979650505050505050565b805161372b8161319f565b600060208284031215613d9057600080fd5b81516001600160401b0380821115613da757600080fd5b908301906101608286031215613dbc57600080fd5b613dc4613262565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115613e0c57600080fd5b613e1887828601613ceb565b60c08301525060e0838101519082015261010080840151908201526101209150613e43828401613d73565b9181019190915261014091820151918101919091529392505050565b60008060008060808587031215613e7557600080fd5b50508251602084015160408501516060909501519196909550909250905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122027208ff103467ed9323af634c5e37e1c1dd6321b1d0fa4cf70ec605004157b6064736f6c63430008120033", + "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", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -1238,7 +1238,7 @@ "storageLayout": { "storage": [ { - "astId": 10426, + "astId": 17736, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "governor", "offset": 0, @@ -1246,23 +1246,23 @@ "type": "t_address" }, { - "astId": 10429, + "astId": 17739, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCore)1891" + "type": "t_contract(KlerosCore)7051" }, { - "astId": 10433, + "astId": 17743, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "disputes", "offset": 0, "slot": "2", - "type": "t_array(t_struct(Dispute)10365_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)17675_storage)dyn_storage" }, { - "astId": 10437, + "astId": 17747, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreDisputeIDToLocal", "offset": 0, @@ -1276,20 +1276,20 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(Dispute)10365_storage)dyn_storage": { - "base": "t_struct(Dispute)10365_storage", + "t_array(t_struct(Dispute)17675_storage)dyn_storage": { + "base": "t_struct(Dispute)17675_storage", "encoding": "dynamic_array", "label": "struct DisputeKitClassic.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)10403_storage)dyn_storage": { - "base": "t_struct(Round)10403_storage", + "t_array(t_struct(Round)17713_storage)dyn_storage": { + "base": "t_struct(Round)17713_storage", "encoding": "dynamic_array", "label": "struct DisputeKitClassic.Round[]", "numberOfBytes": "32" }, - "t_array(t_struct(Vote)10412_storage)dyn_storage": { - "base": "t_struct(Vote)10412_storage", + "t_array(t_struct(Vote)17722_storage)dyn_storage": { + "base": "t_struct(Vote)17722_storage", "encoding": "dynamic_array", "label": "struct DisputeKitClassic.Vote[]", "numberOfBytes": "32" @@ -1315,7 +1315,7 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(KlerosCore)1891": { + "t_contract(KlerosCore)7051": { "encoding": "inplace", "label": "contract KlerosCore", "numberOfBytes": "20" @@ -1341,20 +1341,20 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Dispute)10365_storage": { + "t_struct(Dispute)17675_storage": { "encoding": "inplace", "label": "struct DisputeKitClassic.Dispute", "members": [ { - "astId": 10354, + "astId": 17664, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "rounds", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Round)10403_storage)dyn_storage" + "type": "t_array(t_struct(Round)17713_storage)dyn_storage" }, { - "astId": 10356, + "astId": 17666, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "numberOfChoices", "offset": 0, @@ -1362,7 +1362,7 @@ "type": "t_uint256" }, { - "astId": 10358, + "astId": 17668, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "jumped", "offset": 0, @@ -1370,7 +1370,7 @@ "type": "t_bool" }, { - "astId": 10362, + "astId": 17672, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "coreRoundIDToLocal", "offset": 0, @@ -1378,7 +1378,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 10364, + "astId": 17674, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "extraData", "offset": 0, @@ -1388,20 +1388,20 @@ ], "numberOfBytes": "160" }, - "t_struct(Round)10403_storage": { + "t_struct(Round)17713_storage": { "encoding": "inplace", "label": "struct DisputeKitClassic.Round", "members": [ { - "astId": 10369, + "astId": 17679, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "votes", "offset": 0, "slot": "0", - "type": "t_array(t_struct(Vote)10412_storage)dyn_storage" + "type": "t_array(t_struct(Vote)17722_storage)dyn_storage" }, { - "astId": 10371, + "astId": 17681, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "winningChoice", "offset": 0, @@ -1409,7 +1409,7 @@ "type": "t_uint256" }, { - "astId": 10375, + "astId": 17685, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "counts", "offset": 0, @@ -1417,7 +1417,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 10377, + "astId": 17687, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "tied", "offset": 0, @@ -1425,7 +1425,7 @@ "type": "t_bool" }, { - "astId": 10379, + "astId": 17689, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalVoted", "offset": 0, @@ -1433,7 +1433,7 @@ "type": "t_uint256" }, { - "astId": 10381, + "astId": 17691, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "totalCommitted", "offset": 0, @@ -1441,7 +1441,7 @@ "type": "t_uint256" }, { - "astId": 10385, + "astId": 17695, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "paidFees", "offset": 0, @@ -1449,7 +1449,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 10389, + "astId": 17699, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "hasPaid", "offset": 0, @@ -1457,7 +1457,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 10395, + "astId": 17705, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "contributions", "offset": 0, @@ -1465,7 +1465,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 10397, + "astId": 17707, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "feeRewards", "offset": 0, @@ -1473,7 +1473,7 @@ "type": "t_uint256" }, { - "astId": 10400, + "astId": 17710, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "fundedChoices", "offset": 0, @@ -1481,7 +1481,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 10402, + "astId": 17712, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "nbVotes", "offset": 0, @@ -1491,12 +1491,12 @@ ], "numberOfBytes": "384" }, - "t_struct(Vote)10412_storage": { + "t_struct(Vote)17722_storage": { "encoding": "inplace", "label": "struct DisputeKitClassic.Vote", "members": [ { - "astId": 10405, + "astId": 17715, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "account", "offset": 0, @@ -1504,7 +1504,7 @@ "type": "t_address" }, { - "astId": 10407, + "astId": 17717, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "commit", "offset": 0, @@ -1512,7 +1512,7 @@ "type": "t_bytes32" }, { - "astId": 10409, + "astId": 17719, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "choice", "offset": 0, @@ -1520,7 +1520,7 @@ "type": "t_uint256" }, { - "astId": 10411, + "astId": 17721, "contract": "src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic", "label": "voted", "offset": 0, diff --git a/contracts/deployments/arbitrum/DisputeKitClassicNeo_Proxy.json b/contracts/deployments/arbitrum/DisputeKitClassicNeo_Proxy.json index 849cb4f08..bfc0c7eae 100644 --- a/contracts/deployments/arbitrum/DisputeKitClassicNeo_Proxy.json +++ b/contracts/deployments/arbitrum/DisputeKitClassicNeo_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", "abi": [ { "inputs": [ @@ -26,64 +26,53 @@ "type": "receive" } ], - "transactionHash": "0x83bbf99250151bfa2d6c447cf28df352cc8148074af5096725595ec05a4500b4", + "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", - "transactionIndex": 2, - "gasUsed": "5403468", - "logsBloom": "0x00000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa31c04677fc6a6a70f3714cf96105c68352d67a22d6b22af440b0e3d33d55856", - "transactionHash": "0x83bbf99250151bfa2d6c447cf28df352cc8148074af5096725595ec05a4500b4", + "contractAddress": "0x70B464be85A547144C72485eBa2577E5D3A45421", + "transactionIndex": 3, + "gasUsed": "370687", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000004000000000000000000000000000000000000000000400000000800000000000000000000000000000000", + "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577", + "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", "logs": [ { - "transactionIndex": 2, - "blockNumber": 190274518, - "transactionHash": "0x83bbf99250151bfa2d6c447cf28df352cc8148074af5096725595ec05a4500b4", - "address": "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + "transactionIndex": 3, + "blockNumber": 272063168, + "transactionHash": "0xd259302573f9813ae47fc2f9b011f616f4be126418e783b38dd925f204d906fc", + "address": "0x70B464be85A547144C72485eBa2577E5D3A45421", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xa31c04677fc6a6a70f3714cf96105c68352d67a22d6b22af440b0e3d33d55856" + "logIndex": 9, + "blockHash": "0x9ef5590771fb4a09e609e46729eb2f307ec8c215acedbd827de6d56b3a8f2577" } ], - "blockNumber": 190274518, - "cumulativeGasUsed": "6129030", + "blockNumber": 272063168, + "cumulativeGasUsed": "1689314", "status": 1, "byzantium": true }, "args": [ - "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", + "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", "0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000000000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":{},\"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\":\"DisputeKitClassicNeoProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201794998342bb1cd2ef0f3a37df1807bf3e7ce8cccf145231219f8598e7a8b2c664736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212201794998342bb1cd2ef0f3a37df1807bf3e7ce8cccf145231219f8598e7a8b2c664736f6c63430008180033", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "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 }, "storageLayout": { diff --git a/contracts/deployments/arbitrum/DisputeResolverNeo.json b/contracts/deployments/arbitrum/DisputeResolverNeo.json index fd2baccc4..3f2f457ae 100644 --- a/contracts/deployments/arbitrum/DisputeResolverNeo.json +++ b/contracts/deployments/arbitrum/DisputeResolverNeo.json @@ -1,5 +1,5 @@ { - "address": "0x3645F9e08D80E47c82aD9E33fCB4EA703822C831", + "address": "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", "abi": [ { "inputs": [ @@ -292,31 +292,31 @@ "type": "function" } ], - "transactionHash": "0x9ba92334c5402d993a9a60aaf500bcb635e873c842d8090aeefcda55078f232b", + "transactionHash": "0x31858b192f3efb673fbb83a4fc627c7813a0f7c49f426c627ab7477727f925d3", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x3645F9e08D80E47c82aD9E33fCB4EA703822C831", - "transactionIndex": 5, - "gasUsed": "2134587", + "contractAddress": "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", + "transactionIndex": 2, + "gasUsed": "1523128", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcb9f12fa8df46e56f3f8b3eeed8c90a2f4970a6ec98d31d4ebed990074749444", - "transactionHash": "0x9ba92334c5402d993a9a60aaf500bcb635e873c842d8090aeefcda55078f232b", + "blockHash": "0xa074596c02c8018797fdb3db47e7398f7a135f54120d7942bad487b987363cb3", + "transactionHash": "0x31858b192f3efb673fbb83a4fc627c7813a0f7c49f426c627ab7477727f925d3", "logs": [], - "blockNumber": 264735059, - "cumulativeGasUsed": "3004228", + "blockNumber": 272063364, + "cumulativeGasUsed": "1773126", "status": 1, "byzantium": true }, "args": [ - "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", - "0x52c9f5634361eD3641016e5d9783310f9EFf9e25" + "0x991d2df165670b9cac3B022f4B68D65b664222ea", + "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2" ], "numDeployments": 1, - "solcInputHash": "f19dd93709e3528a31abc3896e421201", - "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\":\"shanghai\",\"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.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\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\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"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": "0x608060405234801561000f575f80fd5b50604051610e77380380610e7783398101604081905261002e91610080565b5f80546001600160a01b03199081163317909155600180546001600160a01b03948516908316179055600280549290931691161790556100b8565b6001600160a01b038116811461007d575f80fd5b50565b5f8060408385031215610091575f80fd5b825161009c81610069565b60208401519092506100ad81610069565b809150509250929050565b610db2806100c55f395ff3fe60806040526004361061009a575f3560e01c8063908bb29511610062578063908bb29514610167578063a0af81f014610188578063dc653511146101a7578063e09997d9146101ba578063e4c0aaf4146101e5578063fc548f0814610204575f80fd5b80630c340a241461009e578063311a6c56146100d95780634660ebbe146100fa578063564a565d146101195780636cc6cde114610148575b5f80fd5b3480156100a9575f80fd5b505f546100bc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e4575f80fd5b506100f86100f3366004610892565b610223565b005b348015610105575f80fd5b506100f86101143660046108c9565b6103c1565b348015610124575f80fd5b506101386101333660046108eb565b61040c565b6040516100d09493929190610945565b348015610153575f80fd5b506001546100bc906001600160a01b031681565b61017a6101753660046109b8565b6104d3565b6040519081526020016100d0565b348015610193575f80fd5b506002546100bc906001600160a01b031681565b61017a6101b5366004610a3a565b61053e565b3480156101c5575f80fd5b5061017a6101d43660046108eb565b60046020525f908152604090205481565b3480156101f0575f80fd5b506100f86101ff3660046108c9565b61059b565b34801561020f575f80fd5b506100f861021e3660046108c9565b6105e5565b5f82815260046020526040812054600380549192918390811061024857610248610b3e565b5f918252602090912060015460049092020191506001600160a01b031633146102c65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561030c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102bd565b600181015460ff161561036d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102bd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b5f546001600160a01b031633146103ea5760405162461bcd60e51b81526004016102bd90610b52565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061041b575f80fd5b905f5260205f2090600402015f91509050805f01805461043a90610b94565b80601f016020809104026020016040519081016040528092919081815260200182805461046690610b94565b80156104b15780601f10610488576101008083540402835291602001916104b1565b820191905f5260205f20905b81548152906001019060200180831161049457829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b5f610534868660405180602001604052805f81525060405180602001604052805f81525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250610630915050565b9695505050505050565b5f610590878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92018290525060408051602081019091529081528a93509150889050610630565b979650505050505050565b5f546001600160a01b031633146105c45760405162461bcd60e51b81526004016102bd90610b52565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461060e5760405162461bcd60e51b81526004016102bd90610b52565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001821161068d5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102bd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106c39086908c908c90600401610bcc565b60206040518083038185885af11580156106df573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906107049190610c01565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284375f920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107809082610c64565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092555f858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a994174916107f6918b918b9101610d24565b6020604051808303815f875af1158015610812573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108369190610c01565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061087e90869086908b90610d5e565b60405180910390a350509695505050505050565b5f80604083850312156108a3575f80fd5b50508035926020909101359150565b6001600160a01b03811681146108c6575f80fd5b50565b5f602082840312156108d9575f80fd5b81356108e4816108b2565b9392505050565b5f602082840312156108fb575f80fd5b5035919050565b5f81518084525f5b818110156109265760208185018101518683018201520161090a565b505f602082860101526020601f19601f83011685010191505092915050565b608081525f6109576080830187610902565b9415156020830152506040810192909252606090910152919050565b5f8083601f840112610983575f80fd5b50813567ffffffffffffffff81111561099a575f80fd5b6020830191508360208285010111156109b1575f80fd5b9250929050565b5f805f805f606086880312156109cc575f80fd5b853567ffffffffffffffff808211156109e3575f80fd5b6109ef89838a01610973565b90975095506020880135915080821115610a07575f80fd5b50610a1488828901610973565b96999598509660400135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f8060808789031215610a4f575f80fd5b863567ffffffffffffffff80821115610a66575f80fd5b610a728a838b01610973565b90985096506020890135915080821115610a8a575f80fd5b610a968a838b01610973565b90965094506040890135915080821115610aae575f80fd5b818901915089601f830112610ac1575f80fd5b813581811115610ad357610ad3610a26565b604051601f8201601f19908116603f01168101908382118183101715610afb57610afb610a26565b816040528281528c6020848701011115610b13575f80fd5b826020860160208301375f602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b5f52603260045260245ffd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610ba857607f821691505b602082108103610bc657634e487b7160e01b5f52602260045260245ffd5b50919050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b5f60208284031215610c11575f80fd5b5051919050565b601f821115610c5f57805f5260205f20601f840160051c81016020851015610c3d5750805b601f840160051c820191505b81811015610c5c575f8155600101610c49565b50505b505050565b815167ffffffffffffffff811115610c7e57610c7e610a26565b610c9281610c8c8454610b94565b84610c18565b602080601f831160018114610cc5575f8415610cae5750858301515b5f19600386901b1c1916600185901b178555610d1c565b5f85815260208120601f198616915b82811015610cf357888601518255948401946001909101908401610cd4565b5085821015610d1057878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b606081525f6060820152608060208201525f610d436080830185610902565b8281036040840152610d558185610902565b95945050505050565b838152826020820152606060408201525f610d55606083018461090256fea26469706673582212202f06821afe2dc67aa9b742921cfa42255f005dae6ccfbfd52c59e636945618b564736f6c63430008180033", - "deployedBytecode": "0x60806040526004361061009a575f3560e01c8063908bb29511610062578063908bb29514610167578063a0af81f014610188578063dc653511146101a7578063e09997d9146101ba578063e4c0aaf4146101e5578063fc548f0814610204575f80fd5b80630c340a241461009e578063311a6c56146100d95780634660ebbe146100fa578063564a565d146101195780636cc6cde114610148575b5f80fd5b3480156100a9575f80fd5b505f546100bc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e4575f80fd5b506100f86100f3366004610892565b610223565b005b348015610105575f80fd5b506100f86101143660046108c9565b6103c1565b348015610124575f80fd5b506101386101333660046108eb565b61040c565b6040516100d09493929190610945565b348015610153575f80fd5b506001546100bc906001600160a01b031681565b61017a6101753660046109b8565b6104d3565b6040519081526020016100d0565b348015610193575f80fd5b506002546100bc906001600160a01b031681565b61017a6101b5366004610a3a565b61053e565b3480156101c5575f80fd5b5061017a6101d43660046108eb565b60046020525f908152604090205481565b3480156101f0575f80fd5b506100f86101ff3660046108c9565b61059b565b34801561020f575f80fd5b506100f861021e3660046108c9565b6105e5565b5f82815260046020526040812054600380549192918390811061024857610248610b3e565b5f918252602090912060015460049092020191506001600160a01b031633146102c65760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79207468652061726269747261746f722063616e2065786563757465206044820152643a3434b99760d91b60648201526084015b60405180910390fd5b806003015483111561030c5760405162461bcd60e51b815260206004820152600f60248201526e24b73b30b634b210393ab634b7339760891b60448201526064016102bd565b600181015460ff161561036d5760405162461bcd60e51b8152602060048201526024808201527f54686973206469737075746520686173206265656e2072756c656420616c726560448201526330b23c9760e11b60648201526084016102bd565b6001818101805460ff1916909117905560028101839055604051838152849033907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a350505050565b5f546001600160a01b031633146103ea5760405162461bcd60e51b81526004016102bd90610b52565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061041b575f80fd5b905f5260205f2090600402015f91509050805f01805461043a90610b94565b80601f016020809104026020016040519081016040528092919081815260200182805461046690610b94565b80156104b15780601f10610488576101008083540402835291602001916104b1565b820191905f5260205f20905b81548152906001019060200180831161049457829003601f168201915b5050505060018301546002840154600390940154929360ff9091169290915084565b5f610534868660405180602001604052805f81525060405180602001604052805f81525088888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152508a9250610630915050565b9695505050505050565b5f610590878787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92018290525060408051602081019091529081528a93509150889050610630565b979650505050505050565b5f546001600160a01b031633146105c45760405162461bcd60e51b81526004016102bd90610b52565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461060e5760405162461bcd60e51b81526004016102bd90610b52565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6001821161068d5760405162461bcd60e51b8152602060048201526024808201527f53686f756c64206265206174206c6561737420322072756c696e67206f70746960448201526337b7399760e11b60648201526084016102bd565b60015460405163c13517e160e01b81526001600160a01b039091169063c13517e19034906106c39086908c908c90600401610bcc565b60206040518083038185885af11580156106df573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906107049190610c01565b600380546040805160a06020601f8d018190040282018101909252608081018b8152949550919382918c908c90819085018382808284375f920182905250938552505050602080830182905260408301829052606090920187905283546001810185559381522081519192600402019081906107809082610c64565b5060208281015160018301805460ff19169115159190911790556040808401516002808501919091556060909401516003909301929092555f858152600491829052828120859055925491516312a6505d60e21b81526001600160a01b0390921691634a994174916107f6918b918b9101610d24565b6020604051808303815f875af1158015610812573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108369190610c01565b60015460405191925084916001600160a01b03909116907f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869061087e90869086908b90610d5e565b60405180910390a350509695505050505050565b5f80604083850312156108a3575f80fd5b50508035926020909101359150565b6001600160a01b03811681146108c6575f80fd5b50565b5f602082840312156108d9575f80fd5b81356108e4816108b2565b9392505050565b5f602082840312156108fb575f80fd5b5035919050565b5f81518084525f5b818110156109265760208185018101518683018201520161090a565b505f602082860101526020601f19601f83011685010191505092915050565b608081525f6109576080830187610902565b9415156020830152506040810192909252606090910152919050565b5f8083601f840112610983575f80fd5b50813567ffffffffffffffff81111561099a575f80fd5b6020830191508360208285010111156109b1575f80fd5b9250929050565b5f805f805f606086880312156109cc575f80fd5b853567ffffffffffffffff808211156109e3575f80fd5b6109ef89838a01610973565b90975095506020880135915080821115610a07575f80fd5b50610a1488828901610973565b96999598509660400135949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f8060808789031215610a4f575f80fd5b863567ffffffffffffffff80821115610a66575f80fd5b610a728a838b01610973565b90985096506020890135915080821115610a8a575f80fd5b610a968a838b01610973565b90965094506040890135915080821115610aae575f80fd5b818901915089601f830112610ac1575f80fd5b813581811115610ad357610ad3610a26565b604051601f8201601f19908116603f01168101908382118183101715610afb57610afb610a26565b816040528281528c6020848701011115610b13575f80fd5b826020860160208301375f602084830101528096505050505050606087013590509295509295509295565b634e487b7160e01b5f52603260045260245ffd5b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b600181811c90821680610ba857607f821691505b602082108103610bc657634e487b7160e01b5f52602260045260245ffd5b50919050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f909201601f1916010192915050565b5f60208284031215610c11575f80fd5b5051919050565b601f821115610c5f57805f5260205f20601f840160051c81016020851015610c3d5750805b601f840160051c820191505b81811015610c5c575f8155600101610c49565b50505b505050565b815167ffffffffffffffff811115610c7e57610c7e610a26565b610c9281610c8c8454610b94565b84610c18565b602080601f831160018114610cc5575f8415610cae5750858301515b5f19600386901b1c1916600185901b178555610d1c565b5f85815260208120601f198616915b82811015610cf357888601518255948401946001909101908401610cd4565b5085821015610d1057878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b606081525f6060820152608060208201525f610d436080830185610902565b8281036040840152610d558185610902565b95945050505050565b838152826020820152606060408201525f610d55606083018461090256fea26469706673582212202f06821afe2dc67aa9b742921cfa42255f005dae6ccfbfd52c59e636945618b564736f6c63430008180033", + "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", "devdoc": { "events": { "DisputeRequest(address,uint256,uint256,uint256,string)": { @@ -394,7 +394,7 @@ "storageLayout": { "storage": [ { - "astId": 97, + "astId": 14991, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "governor", "offset": 0, @@ -402,31 +402,31 @@ "type": "t_address" }, { - "astId": 100, + "astId": 14994, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitrator", "offset": 0, "slot": "1", - "type": "t_contract(IArbitratorV2)644" + "type": "t_contract(IArbitratorV2)23044" }, { - "astId": 103, + "astId": 14997, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "templateRegistry", "offset": 0, "slot": "2", - "type": "t_contract(IDisputeTemplateRegistry)670" + "type": "t_contract(IDisputeTemplateRegistry)23215" }, { - "astId": 107, + "astId": 15001, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "disputes", "offset": 0, "slot": "3", - "type": "t_array(t_struct(DisputeStruct)95_storage)dyn_storage" + "type": "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage" }, { - "astId": 111, + "astId": 15005, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitratorDisputeIDToLocalID", "offset": 0, @@ -440,8 +440,8 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(DisputeStruct)95_storage)dyn_storage": { - "base": "t_struct(DisputeStruct)95_storage", + "t_array(t_struct(DisputeStruct)14989_storage)dyn_storage": { + "base": "t_struct(DisputeStruct)14989_storage", "encoding": "dynamic_array", "label": "struct DisputeResolver.DisputeStruct[]", "numberOfBytes": "32" @@ -456,12 +456,12 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(IArbitratorV2)644": { + "t_contract(IArbitratorV2)23044": { "encoding": "inplace", "label": "contract IArbitratorV2", "numberOfBytes": "20" }, - "t_contract(IDisputeTemplateRegistry)670": { + "t_contract(IDisputeTemplateRegistry)23215": { "encoding": "inplace", "label": "contract IDisputeTemplateRegistry", "numberOfBytes": "20" @@ -473,12 +473,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(DisputeStruct)95_storage": { + "t_struct(DisputeStruct)14989_storage": { "encoding": "inplace", "label": "struct DisputeResolver.DisputeStruct", "members": [ { - "astId": 88, + "astId": 14982, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "arbitratorExtraData", "offset": 0, @@ -486,7 +486,7 @@ "type": "t_bytes_storage" }, { - "astId": 90, + "astId": 14984, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "isRuled", "offset": 0, @@ -494,7 +494,7 @@ "type": "t_bool" }, { - "astId": 92, + "astId": 14986, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "ruling", "offset": 0, @@ -502,7 +502,7 @@ "type": "t_uint256" }, { - "astId": 94, + "astId": 14988, "contract": "src/arbitration/arbitrables/DisputeResolver.sol:DisputeResolver", "label": "numberOfRulingOptions", "offset": 0, diff --git a/contracts/deployments/arbitrum/DisputeTemplateRegistry.json b/contracts/deployments/arbitrum/DisputeTemplateRegistry.json index 4f4cb137c..4e5470eca 100644 --- a/contracts/deployments/arbitrum/DisputeTemplateRegistry.json +++ b/contracts/deployments/arbitrum/DisputeTemplateRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", "abi": [ { "stateMutability": "payable", @@ -237,66 +237,54 @@ "type": "constructor" } ], - "transactionHash": "0xe1333e26dfa0e2d8ce79566792006d3e200d9edb6527ccf95498dd2bf5ef014f", + "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", - "transactionIndex": 1, - "gasUsed": "5371417", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc03c1213d3813fe680268f81116f23e12776f1f34f5d12f56346e8fadef35991", - "transactionHash": "0xe1333e26dfa0e2d8ce79566792006d3e200d9edb6527ccf95498dd2bf5ef014f", + "contractAddress": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", + "transactionIndex": 19, + "gasUsed": "380009", + "logsBloom": "0x00000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000004000000000000000000000000000000000000000000", + "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc", + "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274710, - "transactionHash": "0xe1333e26dfa0e2d8ce79566792006d3e200d9edb6527ccf95498dd2bf5ef014f", - "address": "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + "transactionIndex": 19, + "blockNumber": 272063329, + "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", + "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xc03c1213d3813fe680268f81116f23e12776f1f34f5d12f56346e8fadef35991" + "logIndex": 237, + "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc" } ], - "blockNumber": 190274710, - "cumulativeGasUsed": "5371417", + "blockNumber": 272063329, + "cumulativeGasUsed": "14853054", "status": 1, "byzantium": true }, "args": [ - "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", + "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"DisputeTemplateRegistryProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", "execute": { "methodName": "initialize", "args": [ "0xf1C7c037891525E360C59f708739Ac09A7670c59" ] }, - "implementation": "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", + "implementation": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Implementation.json b/contracts/deployments/arbitrum/DisputeTemplateRegistry_Implementation.json index e30818460..e8100c7c6 100644 --- a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Implementation.json +++ b/contracts/deployments/arbitrum/DisputeTemplateRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", + "address": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", "abi": [ { "inputs": [], @@ -218,41 +218,41 @@ "type": "function" } ], - "transactionHash": "0x9fabdce3bf382d4cc9c1d89adcf76bc8757997c8cd982efbbb7d422e2c88969f", + "transactionHash": "0xb30d787cd00260e1a283592ae874afc7abc01499ef7f97b6c89c604eb5a07948", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", - "transactionIndex": 1, - "gasUsed": "11112509", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000004000000000000000000000000000000000200000000000000000000000000000000000000000000000000", - "blockHash": "0x70bf531c7737f422055468c1ef315500525d65152d0178e7966c83f15b49f523", - "transactionHash": "0x9fabdce3bf382d4cc9c1d89adcf76bc8757997c8cd982efbbb7d422e2c88969f", + "contractAddress": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", + "transactionIndex": 2, + "gasUsed": "980209", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000800000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd7765587214aeea42b020462049f2b9cedead6e1d9a20028c2b8efd50656fb5b", + "transactionHash": "0xb30d787cd00260e1a283592ae874afc7abc01499ef7f97b6c89c604eb5a07948", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274683, - "transactionHash": "0x9fabdce3bf382d4cc9c1d89adcf76bc8757997c8cd982efbbb7d422e2c88969f", - "address": "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", + "transactionIndex": 2, + "blockNumber": 272063313, + "transactionHash": "0xb30d787cd00260e1a283592ae874afc7abc01499ef7f97b6c89c604eb5a07948", + "address": "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x70bf531c7737f422055468c1ef315500525d65152d0178e7966c83f15b49f523" + "logIndex": 3, + "blockHash": "0xd7765587214aeea42b020462049f2b9cedead6e1d9a20028c2b8efd50656fb5b" } ], - "blockNumber": 190274683, - "cumulativeGasUsed": "11112509", + "blockNumber": 272063313, + "cumulativeGasUsed": "1140433", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":\"_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\":\"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\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"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\":{\"DisputeTemplate(uint256,string,string,string)\":{\"details\":\"To be emitted when a new dispute template is created.\",\"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\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"initialize(address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the 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.\"},\"setDisputeTemplate(string,string,string)\":{\"details\":\"Registers a new dispute template.\",\"params\":{\"_templateData\":\"The data of the template.\",\"_templateDataMappings\":\"The data mappings of the template.\",\"_templateTag\":\"The tag of the template (optional).\"}},\"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.\"}}},\"stateVariables\":{\"governor\":{\"details\":\"The governor of the contract.\"},\"templates\":{\"details\":\"The number of templates.\"}},\"title\":\"Dispute Template Registry\",\"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/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/DisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\nimport \\\"./interfaces/IDisputeTemplateRegistry.sol\\\";\\n\\n/// @title Dispute Template Registry\\n/// @dev A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev The governor of the contract.\\n address public governor;\\n\\n /// @dev The number of templates.\\n uint256 public templates;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor 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\\n /// @param _governor Governor of the contract.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\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 Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Registers a new dispute template.\\n /// @param _templateTag The tag of the template (optional).\\n /// @param _templateData The data of the template.\\n /// @param _templateDataMappings The data mappings of the template.\\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\",\"keccak256\":\"0x71dbee3e78a5bdc33f5abef3f76b314fc1ea4c41ea0f8e419133dee61679dc11\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0x88b0038d226532e6cf862a485d162f7bca61ac3d361d6801146b55a240f091ac\",\"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.18;\\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\":\"0xcfffacf78b92e89a0123aff2c86188abc5327bb59b223f04e1cc1267234bd828\",\"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.18;\\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\":\"0xbac7476deeee8ebbfc895a42e8b50a01c7549164a48ee2ddb0e2307946ee35f9\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108d66100fc600039600081816101d1015281816101fa01526103f701526108d66000f3fe6080604052600436106100605760003560e01c80630c340a24146100655780633a283d7d146100a25780634a994174146100c65780634f1ef286146100e657806352d1902d146100fb578063c4d66de814610110578063e4c0aaf414610130575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b860015481565b604051908152602001610099565b3480156100d257600080fd5b506100b86100e136600461065e565b610150565b6100f96100f4366004610702565b6101bd565b005b34801561010757600080fd5b506100b86103ea565b34801561011c57600080fd5b506100f961012b366004610764565b610448565b34801561013c57600080fd5b506100f961014b366004610764565b610532565b60018054600091826101618361077f565b9190505590508360405161017591906107ca565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101ae929190610812565b60405180910390a39392505050565b6101c68261057e565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061024457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102386000805160206108818339815191525490565b6001600160a01b031614155b156102625760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102bc575060408051601f3d908101601f191682019092526102b991810190610840565b60015b6102e957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610881833981519152811461031a57604051632a87526960e21b8152600481018290526024016102e0565b6000805160206108818339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156103e5576000836001600160a01b03168360405161038191906107ca565b600060405180830381855af49150503d80600081146103bc576040519150601f19603f3d011682016040523d82523d6000602084013e6103c1565b606091505b50509050806103e3576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104355760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061088183398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104925750805467ffffffffffffffff808416911610155b156104af5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b81526004016102e090610859565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105a85760405162461bcd60e51b81526004016102e090610859565b50565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156105dc576105dc6105ab565b604051601f8501601f19908116603f01168101908282118183101715610604576106046105ab565b8160405280935085815286868601111561061d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261064857600080fd5b610657838335602085016105c1565b9392505050565b60008060006060848603121561067357600080fd5b833567ffffffffffffffff8082111561068b57600080fd5b61069787838801610637565b945060208601359150808211156106ad57600080fd5b6106b987838801610637565b935060408601359150808211156106cf57600080fd5b506106dc86828701610637565b9150509250925092565b80356001600160a01b03811681146106fd57600080fd5b919050565b6000806040838503121561071557600080fd5b61071e836106e6565b9150602083013567ffffffffffffffff81111561073a57600080fd5b8301601f8101851361074b57600080fd5b61075a858235602084016105c1565b9150509250929050565b60006020828403121561077657600080fd5b610657826106e6565b60006001820161079f57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156107c15781810151838201526020016107a9565b50506000910152565b600082516107dc8184602087016107a6565b9190910192915050565b600081518084526107fe8160208601602086016107a6565b601f01601f19169290920160200192915050565b60408152600061082560408301856107e6565b828103602084015261083781856107e6565b95945050505050565b60006020828403121561085257600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122015d1bbce6086c1434ece6b4aa9d74ae473176448e9bdd9e5b84f97f81b81664064736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a24146100655780633a283d7d146100a25780634a994174146100c65780634f1ef286146100e657806352d1902d146100fb578063c4d66de814610110578063e4c0aaf414610130575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b860015481565b604051908152602001610099565b3480156100d257600080fd5b506100b86100e136600461065e565b610150565b6100f96100f4366004610702565b6101bd565b005b34801561010757600080fd5b506100b86103ea565b34801561011c57600080fd5b506100f961012b366004610764565b610448565b34801561013c57600080fd5b506100f961014b366004610764565b610532565b60018054600091826101618361077f565b9190505590508360405161017591906107ca565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101ae929190610812565b60405180910390a39392505050565b6101c68261057e565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061024457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102386000805160206108818339815191525490565b6001600160a01b031614155b156102625760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102bc575060408051601f3d908101601f191682019092526102b991810190610840565b60015b6102e957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610881833981519152811461031a57604051632a87526960e21b8152600481018290526024016102e0565b6000805160206108818339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156103e5576000836001600160a01b03168360405161038191906107ca565b600060405180830381855af49150503d80600081146103bc576040519150601f19603f3d011682016040523d82523d6000602084013e6103c1565b606091505b50509050806103e3576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104355760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061088183398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104925750805467ffffffffffffffff808416911610155b156104af5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b81526004016102e090610859565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105a85760405162461bcd60e51b81526004016102e090610859565b50565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156105dc576105dc6105ab565b604051601f8501601f19908116603f01168101908282118183101715610604576106046105ab565b8160405280935085815286868601111561061d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261064857600080fd5b610657838335602085016105c1565b9392505050565b60008060006060848603121561067357600080fd5b833567ffffffffffffffff8082111561068b57600080fd5b61069787838801610637565b945060208601359150808211156106ad57600080fd5b6106b987838801610637565b935060408601359150808211156106cf57600080fd5b506106dc86828701610637565b9150509250925092565b80356001600160a01b03811681146106fd57600080fd5b919050565b6000806040838503121561071557600080fd5b61071e836106e6565b9150602083013567ffffffffffffffff81111561073a57600080fd5b8301601f8101851361074b57600080fd5b61075a858235602084016105c1565b9150509250929050565b60006020828403121561077657600080fd5b610657826106e6565b60006001820161079f57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156107c15781810151838201526020016107a9565b50506000910152565b600082516107dc8184602087016107a6565b9190910192915050565b600081518084526107fe8160208601602086016107a6565b601f01601f19169290920160200192915050565b60408152600061082560408301856107e6565b828103602084015261083781856107e6565b95945050505050565b60006020828403121561085257600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122015d1bbce6086c1434ece6b4aa9d74ae473176448e9bdd9e5b84f97f81b81664064736f6c63430008120033", + "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\":\"_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\":\"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\"}],\"devdoc\":{\"details\":\"A contract to maintain a registry of dispute templates.\",\"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\":{\"DisputeTemplate(uint256,string,string,string)\":{\"details\":\"To be emitted when a new dispute template is created.\",\"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\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"initialize(address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the 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.\"},\"setDisputeTemplate(string,string,string)\":{\"details\":\"Registers a new dispute template.\",\"params\":{\"_templateData\":\"The data of the template.\",\"_templateDataMappings\":\"The data mappings of the template.\",\"_templateTag\":\"The tag of the template (optional).\"}},\"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.\"}}},\"stateVariables\":{\"governor\":{\"details\":\"The governor of the contract.\"},\"templates\":{\"details\":\"The number of templates.\"}},\"title\":\"Dispute Template Registry\",\"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/DisputeTemplateRegistry.sol\":\"DisputeTemplateRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"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/// @dev A contract to maintain a registry of dispute templates.\\ncontract DisputeTemplateRegistry is IDisputeTemplateRegistry, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n /// @dev The governor of the contract.\\n address public governor;\\n\\n /// @dev The number of templates.\\n uint256 public templates;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor 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\\n /// @param _governor Governor of the contract.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\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 Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Registers a new dispute template.\\n /// @param _templateTag The tag of the template (optional).\\n /// @param _templateData The data of the template.\\n /// @param _templateDataMappings The data mappings of the template.\\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\",\"keccak256\":\"0xb6898a1fa7ec85c1aa12f4cb5b7a5407ab2a9105c36d6f08c77982982672758a\",\"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\"},\"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": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516108d66100fc600039600081816101d1015281816101fa01526103f701526108d66000f3fe6080604052600436106100605760003560e01c80630c340a24146100655780633a283d7d146100a25780634a994174146100c65780634f1ef286146100e657806352d1902d146100fb578063c4d66de814610110578063e4c0aaf414610130575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b860015481565b604051908152602001610099565b3480156100d257600080fd5b506100b86100e136600461065e565b610150565b6100f96100f4366004610702565b6101bd565b005b34801561010757600080fd5b506100b86103ea565b34801561011c57600080fd5b506100f961012b366004610764565b610448565b34801561013c57600080fd5b506100f961014b366004610764565b610532565b60018054600091826101618361077f565b9190505590508360405161017591906107ca565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101ae929190610812565b60405180910390a39392505050565b6101c68261057e565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061024457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102386000805160206108818339815191525490565b6001600160a01b031614155b156102625760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102bc575060408051601f3d908101601f191682019092526102b991810190610840565b60015b6102e957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610881833981519152811461031a57604051632a87526960e21b8152600481018290526024016102e0565b6000805160206108818339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156103e5576000836001600160a01b03168360405161038191906107ca565b600060405180830381855af49150503d80600081146103bc576040519150601f19603f3d011682016040523d82523d6000602084013e6103c1565b606091505b50509050806103e3576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104355760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061088183398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104925750805467ffffffffffffffff808416911610155b156104af5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b81526004016102e090610859565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105a85760405162461bcd60e51b81526004016102e090610859565b50565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156105dc576105dc6105ab565b604051601f8501601f19908116603f01168101908282118183101715610604576106046105ab565b8160405280935085815286868601111561061d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261064857600080fd5b610657838335602085016105c1565b9392505050565b60008060006060848603121561067357600080fd5b833567ffffffffffffffff8082111561068b57600080fd5b61069787838801610637565b945060208601359150808211156106ad57600080fd5b6106b987838801610637565b935060408601359150808211156106cf57600080fd5b506106dc86828701610637565b9150509250925092565b80356001600160a01b03811681146106fd57600080fd5b919050565b6000806040838503121561071557600080fd5b61071e836106e6565b9150602083013567ffffffffffffffff81111561073a57600080fd5b8301601f8101851361074b57600080fd5b61075a858235602084016105c1565b9150509250929050565b60006020828403121561077657600080fd5b610657826106e6565b60006001820161079f57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156107c15781810151838201526020016107a9565b50506000910152565b600082516107dc8184602087016107a6565b9190910192915050565b600081518084526107fe8160208601602086016107a6565b601f01601f19169290920160200192915050565b60408152600061082560408301856107e6565b828103602084015261083781856107e6565b95945050505050565b60006020828403121561085257600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220977df6a0b32ff9f925b16c822cbefa6381b9d1bcdec0a17337085ad8366f688b64736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a24146100655780633a283d7d146100a25780634a994174146100c65780634f1ef286146100e657806352d1902d146100fb578063c4d66de814610110578063e4c0aaf414610130575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100ae57600080fd5b506100b860015481565b604051908152602001610099565b3480156100d257600080fd5b506100b86100e136600461065e565b610150565b6100f96100f4366004610702565b6101bd565b005b34801561010757600080fd5b506100b86103ea565b34801561011c57600080fd5b506100f961012b366004610764565b610448565b34801561013c57600080fd5b506100f961014b366004610764565b610532565b60018054600091826101618361077f565b9190505590508360405161017591906107ca565b6040518091039020817ef7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff992485856040516101ae929190610812565b60405180910390a39392505050565b6101c68261057e565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061024457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102386000805160206108818339815191525490565b6001600160a01b031614155b156102625760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156102bc575060408051601f3d908101601f191682019092526102b991810190610840565b60015b6102e957604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610881833981519152811461031a57604051632a87526960e21b8152600481018290526024016102e0565b6000805160206108818339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156103e5576000836001600160a01b03168360405161038191906107ca565b600060405180830381855af49150503d80600081146103bc576040519150601f19603f3d011682016040523d82523d6000602084013e6103c1565b606091505b50509050806103e3576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104355760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061088183398151915290565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104925750805467ffffffffffffffff808416911610155b156104af5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b81526004016102e090610859565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105a85760405162461bcd60e51b81526004016102e090610859565b50565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156105dc576105dc6105ab565b604051601f8501601f19908116603f01168101908282118183101715610604576106046105ab565b8160405280935085815286868601111561061d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261064857600080fd5b610657838335602085016105c1565b9392505050565b60008060006060848603121561067357600080fd5b833567ffffffffffffffff8082111561068b57600080fd5b61069787838801610637565b945060208601359150808211156106ad57600080fd5b6106b987838801610637565b935060408601359150808211156106cf57600080fd5b506106dc86828701610637565b9150509250925092565b80356001600160a01b03811681146106fd57600080fd5b919050565b6000806040838503121561071557600080fd5b61071e836106e6565b9150602083013567ffffffffffffffff81111561073a57600080fd5b8301601f8101851361074b57600080fd5b61075a858235602084016105c1565b9150509250929050565b60006020828403121561077657600080fd5b610657826106e6565b60006001820161079f57634e487b7160e01b600052601160045260246000fd5b5060010190565b60005b838110156107c15781810151838201526020016107a9565b50506000910152565b600082516107dc8184602087016107a6565b9190910192915050565b600081518084526107fe8160208601602086016107a6565b601f01601f19169290920160200192915050565b60408152600061082560408301856107e6565b828103602084015261083781856107e6565b95945050505050565b60006020828403121561085257600080fd5b5051919050565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b60408201526060019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220977df6a0b32ff9f925b16c822cbefa6381b9d1bcdec0a17337085ad8366f688b64736f6c63430008180033", "devdoc": { "details": "A contract to maintain a registry of dispute templates.", "errors": { @@ -368,7 +368,7 @@ "storageLayout": { "storage": [ { - "astId": 5254, + "astId": 6884, "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", "label": "governor", "offset": 0, @@ -376,7 +376,7 @@ "type": "t_address" }, { - "astId": 5257, + "astId": 6887, "contract": "src/arbitration/DisputeTemplateRegistry.sol:DisputeTemplateRegistry", "label": "templates", "offset": 0, diff --git a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Proxy.json b/contracts/deployments/arbitrum/DisputeTemplateRegistry_Proxy.json index 6245741f4..b398c42e7 100644 --- a/contracts/deployments/arbitrum/DisputeTemplateRegistry_Proxy.json +++ b/contracts/deployments/arbitrum/DisputeTemplateRegistry_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0xe1333e26dfa0e2d8ce79566792006d3e200d9edb6527ccf95498dd2bf5ef014f", + "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", - "transactionIndex": 1, - "gasUsed": "5371417", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc03c1213d3813fe680268f81116f23e12776f1f34f5d12f56346e8fadef35991", - "transactionHash": "0xe1333e26dfa0e2d8ce79566792006d3e200d9edb6527ccf95498dd2bf5ef014f", + "contractAddress": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", + "transactionIndex": 19, + "gasUsed": "380009", + "logsBloom": "0x00000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000004000000000000000000000000000000000000000000", + "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc", + "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274710, - "transactionHash": "0xe1333e26dfa0e2d8ce79566792006d3e200d9edb6527ccf95498dd2bf5ef014f", - "address": "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + "transactionIndex": 19, + "blockNumber": 272063329, + "transactionHash": "0x5dca20bf0f91cac286b8550a1431f5df523599ba2940e5b99b377d8abede9720", + "address": "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 0, - "blockHash": "0xc03c1213d3813fe680268f81116f23e12776f1f34f5d12f56346e8fadef35991" + "logIndex": 237, + "blockHash": "0xe0292fb12b680dd0be51cb110aac65972d0fc6c26744782e368735aa496482cc" } ], - "blockNumber": 190274710, - "cumulativeGasUsed": "5371417", + "blockNumber": 272063329, + "cumulativeGasUsed": "14853054", "status": 1, "byzantium": true }, "args": [ - "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", + "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"DisputeTemplateRegistryProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea2646970667358221220677e943f9d34953f9ff6f8c97da0b7a4317d9f65361d9eade87930e19a594d4264736f6c63430008180033", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/EvidenceModule.json b/contracts/deployments/arbitrum/EvidenceModule.json index 7a7a1e2bb..d8211d308 100644 --- a/contracts/deployments/arbitrum/EvidenceModule.json +++ b/contracts/deployments/arbitrum/EvidenceModule.json @@ -1,5 +1,5 @@ { - "address": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", "abi": [ { "stateMutability": "payable", @@ -194,66 +194,54 @@ "type": "constructor" } ], - "transactionHash": "0x209385fe4a2fa64e1241c0a5b93e027cf1059724b0385df32851a86a7065ef8f", + "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + "contractAddress": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", "transactionIndex": 3, - "gasUsed": "5342039", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000400000000000000000000000000000100000000000080", - "blockHash": "0x0a5b4182237e39e332bed794964d094fe2efbe1f22d1157305f16aa28aac3ab0", - "transactionHash": "0x209385fe4a2fa64e1241c0a5b93e027cf1059724b0385df32851a86a7065ef8f", + "gasUsed": "366311", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000008000080100000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29", + "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", "logs": [ { "transactionIndex": 3, - "blockNumber": 190274441, - "transactionHash": "0x209385fe4a2fa64e1241c0a5b93e027cf1059724b0385df32851a86a7065ef8f", - "address": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + "blockNumber": 272063086, + "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", + "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 6, - "blockHash": "0x0a5b4182237e39e332bed794964d094fe2efbe1f22d1157305f16aa28aac3ab0" + "logIndex": 5, + "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29" } ], - "blockNumber": 190274441, - "cumulativeGasUsed": "7385404", + "blockNumber": 272063086, + "cumulativeGasUsed": "658598", "status": 1, "byzantium": true }, "args": [ - "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"EvidenceModuleProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", "execute": { "methodName": "initialize", "args": [ "0xf1C7c037891525E360C59f708739Ac09A7670c59" ] }, - "implementation": "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + "implementation": "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/EvidenceModule_Implementation.json b/contracts/deployments/arbitrum/EvidenceModule_Implementation.json index 8ed78b10e..f8ef79972 100644 --- a/contracts/deployments/arbitrum/EvidenceModule_Implementation.json +++ b/contracts/deployments/arbitrum/EvidenceModule_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + "address": "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", "abi": [ { "inputs": [], @@ -175,41 +175,41 @@ "type": "function" } ], - "transactionHash": "0x6a1bf67af1366f78f0863f2fa1e72362c86f432bbc9ffb699fe26461a546e043", + "transactionHash": "0x19a1a512de73e310a395404f6f497542c0b00a127497131e8831ebce739aee87", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + "contractAddress": "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", "transactionIndex": 6, - "gasUsed": "10124687", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000008000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8b61458ccb051d2f92cc638b230525bc7ff1b858ba2b17ae63a6d8123aa0d6d9", - "transactionHash": "0x6a1bf67af1366f78f0863f2fa1e72362c86f432bbc9ffb699fe26461a546e043", + "gasUsed": "835359", + "logsBloom": "0x00000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000400000000000000000040000000000000", + "blockHash": "0x0b6f53904a072c3bcf2579d5be1a00adcb505f02a9a2c25d7f779b89f83fad91", + "transactionHash": "0x19a1a512de73e310a395404f6f497542c0b00a127497131e8831ebce739aee87", "logs": [ { "transactionIndex": 6, - "blockNumber": 190274430, - "transactionHash": "0x6a1bf67af1366f78f0863f2fa1e72362c86f432bbc9ffb699fe26461a546e043", - "address": "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + "blockNumber": 272063053, + "transactionHash": "0x19a1a512de73e310a395404f6f497542c0b00a127497131e8831ebce739aee87", + "address": "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 7, - "blockHash": "0x8b61458ccb051d2f92cc638b230525bc7ff1b858ba2b17ae63a6d8123aa0d6d9" + "logIndex": 18, + "blockHash": "0x0b6f53904a072c3bcf2579d5be1a00adcb505f02a9a2c25d7f779b89f83fad91" } ], - "blockNumber": 190274430, - "cumulativeGasUsed": "15648605", + "blockNumber": 272063053, + "cumulativeGasUsed": "2023644", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "47a03c54c72f5d4984b62ca6f84025dc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":\"_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\":\"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\"},{\"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\":{\"Evidence(uint256,address,string)\":{\"details\":\"To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\",\"params\":{\"_evidence\":\"IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\",\"_party\":\"The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\"}},\"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.\"},\"initialize(address)\":{\"details\":\"Initializer.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"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.\"},\"submitEvidence(uint256,string)\":{\"details\":\"Submits evidence for a dispute.\",\"params\":{\"_evidence\":\"IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\"}},\"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\":\"Evidence Module\",\"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/evidence/EvidenceModule.sol\":\"EvidenceModule\"},\"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 v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\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 amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` 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 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` 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 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/arbitration/evidence/EvidenceModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @fnanni-0]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n/// @custom:tools: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport \\\"../interfaces/IEvidence.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title Evidence Module\\ncontract EvidenceModule is IEvidence, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor 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.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\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 // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submits evidence for a dispute.\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\\n /// @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'.\\n function submitEvidence(uint256 _externalDisputeID, string calldata _evidence) external {\\n emit Evidence(_externalDisputeID, msg.sender, _evidence);\\n }\\n}\\n\",\"keccak256\":\"0x32d2c14255a266083094597f009f557e2db62727fb8a8fa9cf3f1760be58300c\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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 _arbitrableDisputeID The identifier of the dispute in the Arbitrable 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 _arbitrableDisputeID,\\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\":\"0x7babeb6a4180e75dc50a42762f449b32ad0a67cf58a3cb6bf3e5306ac9364507\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IEvidence.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\n/// @title IEvidence\\ninterface IEvidence {\\n /// @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\\n /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\\n /// @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'\\n event Evidence(uint256 indexed _externalDisputeID, address indexed _party, string _evidence);\\n}\\n\",\"keccak256\":\"0x3350da62267a5dad4616dafd9916fe3bfa4cdabfce124709ac3b7d087361e8c4\",\"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.18;\\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\":\"0xcfffacf78b92e89a0123aff2c86188abc5327bb59b223f04e1cc1267234bd828\",\"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.18;\\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\":\"0xbac7476deeee8ebbfc895a42e8b50a01c7549164a48ee2ddb0e2307946ee35f9\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516107896100fc6000396000818161011801528181610141015261033e01526107896000f3fe60806040526004361061004a5760003560e01c80630c340a241461004f5780634f1ef2861461008c57806352d1902d146100a1578063a6a7f0eb146100c4578063c4d66de8146100e4575b600080fd5b34801561005b57600080fd5b5060005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009f61009a36600461055c565b610104565b005b3480156100ad57600080fd5b506100b6610331565b604051908152602001610083565b3480156100d057600080fd5b5061009f6100df36600461061e565b61038f565b3480156100f057600080fd5b5061009f6100ff36600461069a565b6103d8565b61010d826104c2565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061018b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661017f6000805160206107348339815191525490565b6001600160a01b031614155b156101a95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610203575060408051601f3d908101601f19168201909252610200918101906106bc565b60015b61023057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610734833981519152811461026157604051632a87526960e21b815260048101829052602401610227565b6000805160206107348339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561032c576000836001600160a01b0316836040516102c891906106d5565b600060405180830381855af49150503d8060008114610303576040519150601f19603f3d011682016040523d82523d6000602084013e610308565b606091505b505090508061032a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461037c5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061073483398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516103cb929190610704565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104225750805467ffffffffffffffff808416911610155b1561043f5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146105275760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610227565b50565b80356001600160a01b038116811461054157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561056f57600080fd5b6105788361052a565b9150602083013567ffffffffffffffff8082111561059557600080fd5b818501915085601f8301126105a957600080fd5b8135818111156105bb576105bb610546565b604051601f8201601f19908116603f011681019083821181831017156105e3576105e3610546565b816040528281528860208487010111156105fc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006040848603121561063357600080fd5b83359250602084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b81358181111561067557600080fd5b87602082850101111561068757600080fd5b6020830194508093505050509250925092565b6000602082840312156106ac57600080fd5b6106b58261052a565b9392505050565b6000602082840312156106ce57600080fd5b5051919050565b6000825160005b818110156106f657602081860181015185830152016106dc565b506000920191825250919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205fc8c90f1a2225055493c5f6b104c59445091844b74319a7bfee8e88d28bd25664736f6c63430008120033", - "deployedBytecode": "0x60806040526004361061004a5760003560e01c80630c340a241461004f5780634f1ef2861461008c57806352d1902d146100a1578063a6a7f0eb146100c4578063c4d66de8146100e4575b600080fd5b34801561005b57600080fd5b5060005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009f61009a36600461055c565b610104565b005b3480156100ad57600080fd5b506100b6610331565b604051908152602001610083565b3480156100d057600080fd5b5061009f6100df36600461061e565b61038f565b3480156100f057600080fd5b5061009f6100ff36600461069a565b6103d8565b61010d826104c2565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061018b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661017f6000805160206107348339815191525490565b6001600160a01b031614155b156101a95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610203575060408051601f3d908101601f19168201909252610200918101906106bc565b60015b61023057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610734833981519152811461026157604051632a87526960e21b815260048101829052602401610227565b6000805160206107348339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561032c576000836001600160a01b0316836040516102c891906106d5565b600060405180830381855af49150503d8060008114610303576040519150601f19603f3d011682016040523d82523d6000602084013e610308565b606091505b505090508061032a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461037c5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061073483398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516103cb929190610704565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104225750805467ffffffffffffffff808416911610155b1561043f5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146105275760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610227565b50565b80356001600160a01b038116811461054157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561056f57600080fd5b6105788361052a565b9150602083013567ffffffffffffffff8082111561059557600080fd5b818501915085601f8301126105a957600080fd5b8135818111156105bb576105bb610546565b604051601f8201601f19908116603f011681019083821181831017156105e3576105e3610546565b816040528281528860208487010111156105fc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006040848603121561063357600080fd5b83359250602084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b81358181111561067557600080fd5b87602082850101111561068757600080fd5b6020830194508093505050509250925092565b6000602082840312156106ac57600080fd5b6106b58261052a565b9392505050565b6000602082840312156106ce57600080fd5b5051919050565b6000825160005b818110156106f657602081860181015185830152016106dc565b506000920191825250919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212205fc8c90f1a2225055493c5f6b104c59445091844b74319a7bfee8e88d28bd25664736f6c63430008120033", + "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\":\"_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\":\"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\"},{\"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\":{\"Evidence(uint256,address,string)\":{\"details\":\"To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\",\"_party\":\"The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\"}},\"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.\"},\"initialize(address)\":{\"details\":\"Initializer.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"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.\"},\"submitEvidence(uint256,string)\":{\"details\":\"Submits evidence for a dispute.\",\"params\":{\"_evidence\":\"Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\",\"_externalDisputeID\":\"Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\"}},\"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\":\"Evidence Module\",\"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/evidence/EvidenceModule.sol\":\"EvidenceModule\"},\"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/evidence/EvidenceModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @fnanni-0]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n/// @custom:tools: []\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"../interfaces/IArbitratorV2.sol\\\";\\nimport \\\"../interfaces/IEvidence.sol\\\";\\nimport \\\"../../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/// @title Evidence Module\\ncontract EvidenceModule is IEvidence, Initializable, UUPSProxiable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The governor of the contract.\\n\\n // ************************************* //\\n // * Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Access not allowed: Governor 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.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\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 // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submits evidence for a dispute.\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n function submitEvidence(uint256 _externalDisputeID, string calldata _evidence) external {\\n emit Evidence(_externalDisputeID, msg.sender, _evidence);\\n }\\n}\\n\",\"keccak256\":\"0x9b21c4a5c84c28b437f46e74ee5ff37fcea326f33e5947a7bd45cb3de349c737\",\"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/IEvidence.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title IEvidence\\ninterface IEvidence {\\n /// @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\\n /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.\\n /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\\n /// @param _evidence Stringified evidence object, example: '{\\\"name\\\" : \\\"Justification\\\", \\\"description\\\" : \\\"Description\\\", \\\"fileURI\\\" : \\\"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\\\"}'.\\n event Evidence(uint256 indexed _externalDisputeID, address indexed _party, string _evidence);\\n}\\n\",\"keccak256\":\"0xa881a6604ffe43044edee5a789363e19b78af854092fe1e322d75a140150714c\",\"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": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516107896100fc6000396000818161011801528181610141015261033e01526107896000f3fe60806040526004361061004a5760003560e01c80630c340a241461004f5780634f1ef2861461008c57806352d1902d146100a1578063a6a7f0eb146100c4578063c4d66de8146100e4575b600080fd5b34801561005b57600080fd5b5060005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009f61009a36600461055c565b610104565b005b3480156100ad57600080fd5b506100b6610331565b604051908152602001610083565b3480156100d057600080fd5b5061009f6100df36600461061e565b61038f565b3480156100f057600080fd5b5061009f6100ff36600461069a565b6103d8565b61010d826104c2565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061018b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661017f6000805160206107348339815191525490565b6001600160a01b031614155b156101a95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610203575060408051601f3d908101601f19168201909252610200918101906106bc565b60015b61023057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610734833981519152811461026157604051632a87526960e21b815260048101829052602401610227565b6000805160206107348339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561032c576000836001600160a01b0316836040516102c891906106d5565b600060405180830381855af49150503d8060008114610303576040519150601f19603f3d011682016040523d82523d6000602084013e610308565b606091505b505090508061032a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461037c5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061073483398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516103cb929190610704565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104225750805467ffffffffffffffff808416911610155b1561043f5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146105275760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610227565b50565b80356001600160a01b038116811461054157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561056f57600080fd5b6105788361052a565b9150602083013567ffffffffffffffff8082111561059557600080fd5b818501915085601f8301126105a957600080fd5b8135818111156105bb576105bb610546565b604051601f8201601f19908116603f011681019083821181831017156105e3576105e3610546565b816040528281528860208487010111156105fc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006040848603121561063357600080fd5b83359250602084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b81358181111561067557600080fd5b87602082850101111561068757600080fd5b6020830194508093505050509250925092565b6000602082840312156106ac57600080fd5b6106b58261052a565b9392505050565b6000602082840312156106ce57600080fd5b5051919050565b6000825160005b818110156106f657602081860181015185830152016106dc565b506000920191825250919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220c08240d858da02adbb503702fd299ec43c5673d84235a7e1553c27254364cc7864736f6c63430008180033", + "deployedBytecode": "0x60806040526004361061004a5760003560e01c80630c340a241461004f5780634f1ef2861461008c57806352d1902d146100a1578063a6a7f0eb146100c4578063c4d66de8146100e4575b600080fd5b34801561005b57600080fd5b5060005461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009f61009a36600461055c565b610104565b005b3480156100ad57600080fd5b506100b6610331565b604051908152602001610083565b3480156100d057600080fd5b5061009f6100df36600461061e565b61038f565b3480156100f057600080fd5b5061009f6100ff36600461069a565b6103d8565b61010d826104c2565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061018b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661017f6000805160206107348339815191525490565b6001600160a01b031614155b156101a95760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610203575060408051601f3d908101601f19168201909252610200918101906106bc565b60015b61023057604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610734833981519152811461026157604051632a87526960e21b815260048101829052602401610227565b6000805160206107348339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561032c576000836001600160a01b0316836040516102c891906106d5565b600060405180830381855af49150503d8060008114610303576040519150601f19603f3d011682016040523d82523d6000602084013e610308565b606091505b505090508061032a576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461037c5760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061073483398151915290565b336001600160a01b0316837f39935cf45244bc296a03d6aef1cf17779033ee27090ce9c68d432367ce10699684846040516103cb929190610704565b60405180910390a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104225750805467ffffffffffffffff808416911610155b1561043f5760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6000546001600160a01b031633146105275760405162461bcd60e51b815260206004820152602260248201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6044820152613c9760f11b6064820152608401610227565b50565b80356001600160a01b038116811461054157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561056f57600080fd5b6105788361052a565b9150602083013567ffffffffffffffff8082111561059557600080fd5b818501915085601f8301126105a957600080fd5b8135818111156105bb576105bb610546565b604051601f8201601f19908116603f011681019083821181831017156105e3576105e3610546565b816040528281528860208487010111156105fc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006040848603121561063357600080fd5b83359250602084013567ffffffffffffffff8082111561065257600080fd5b818601915086601f83011261066657600080fd5b81358181111561067557600080fd5b87602082850101111561068757600080fd5b6020830194508093505050509250925092565b6000602082840312156106ac57600080fd5b6106b58261052a565b9392505050565b6000602082840312156106ce57600080fd5b5051919050565b6000825160005b818110156106f657602081860181015185830152016106dc565b506000920191825250919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220c08240d858da02adbb503702fd299ec43c5673d84235a7e1553c27254364cc7864736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -237,7 +237,7 @@ "Evidence(uint256,address,string)": { "details": "To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).", "params": { - "_evidence": "IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'", + "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID.", "_party": "The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party." } @@ -268,7 +268,7 @@ "submitEvidence(uint256,string)": { "details": "Submits evidence for a dispute.", "params": { - "_evidence": "IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'.", + "_evidence": "Stringified evidence object, example: '{\"name\" : \"Justification\", \"description\" : \"Description\", \"fileURI\" : \"/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc\"}'.", "_externalDisputeID": "Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right evidence group ID." } }, @@ -308,7 +308,7 @@ "storageLayout": { "storage": [ { - "astId": 14252, + "astId": 21562, "contract": "src/arbitration/evidence/EvidenceModule.sol:EvidenceModule", "label": "governor", "offset": 0, diff --git a/contracts/deployments/arbitrum/EvidenceModule_Proxy.json b/contracts/deployments/arbitrum/EvidenceModule_Proxy.json index 66d67e975..e92870b8b 100644 --- a/contracts/deployments/arbitrum/EvidenceModule_Proxy.json +++ b/contracts/deployments/arbitrum/EvidenceModule_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0x209385fe4a2fa64e1241c0a5b93e027cf1059724b0385df32851a86a7065ef8f", + "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + "contractAddress": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", "transactionIndex": 3, - "gasUsed": "5342039", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000400000000000000000000000000000100000000000080", - "blockHash": "0x0a5b4182237e39e332bed794964d094fe2efbe1f22d1157305f16aa28aac3ab0", - "transactionHash": "0x209385fe4a2fa64e1241c0a5b93e027cf1059724b0385df32851a86a7065ef8f", + "gasUsed": "366311", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000008000080100000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29", + "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", "logs": [ { "transactionIndex": 3, - "blockNumber": 190274441, - "transactionHash": "0x209385fe4a2fa64e1241c0a5b93e027cf1059724b0385df32851a86a7065ef8f", - "address": "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + "blockNumber": 272063086, + "transactionHash": "0x2bc8a01e82dccd7083b5195c3e8cab2b3d5a1f7ac95a162c81e0f6801b5c5b70", + "address": "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 6, - "blockHash": "0x0a5b4182237e39e332bed794964d094fe2efbe1f22d1157305f16aa28aac3ab0" + "logIndex": 5, + "blockHash": "0x7e2d9da6677d008068faf9339fe4e662ff7806ca1f41666125e8fec1295fda29" } ], - "blockNumber": 190274441, - "cumulativeGasUsed": "7385404", + "blockNumber": 272063086, + "cumulativeGasUsed": "658598", "status": 1, "byzantium": true }, "args": [ - "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"EvidenceModuleProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206156b4d247e9775a938a1d5238ff9222ccea78aa0d46323980701cdafc6c1e2d64736f6c63430008180033", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/KlerosCoreNeo.json b/contracts/deployments/arbitrum/KlerosCoreNeo.json index f232baee2..9baef41f8 100644 --- a/contracts/deployments/arbitrum/KlerosCoreNeo.json +++ b/contracts/deployments/arbitrum/KlerosCoreNeo.json @@ -1,5 +1,5 @@ { - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "abi": [ { "stateMutability": "payable", @@ -1957,50 +1957,50 @@ "type": "constructor" } ], - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", - "transactionIndex": 1, - "gasUsed": "6872493", - "logsBloom": "0x00800000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000020000000000000010000801402000000000000008000000000000000000000000000000080a00000000000000000000000080000000000000000000000000000000000008000000000000000000000200000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001201000000000000000000000000000000000000000000000000000000", - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594", - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", + "contractAddress": "0x991d2df165670b9cac3B022f4B68D65b664222ea", + "transactionIndex": 2, + "gasUsed": "836960", + "logsBloom": "0x00000002000200000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000420000000000000010000800402000000000000008000000000000000000000000000000000800000000000080000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000200000000004000000000000000060000000001001000000800000000000000000000000000000000000000000000000", + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247", + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000b7c292cd9fd3d20de84a71ae1caf054eeb6374a9" + "0x00000000000000000000000070b464be85a547144c72485eba2577e5d3a45421" ], "data": "0x", - "logIndex": 0, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 1, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" }, { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 2, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" }, { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -2008,36 +2008,36 @@ "0x0000000000000000000000000000000000000000000000000000000000000001" ], "data": "0x", - "logIndex": 2, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 3, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" }, { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 3, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 4, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" } ], - "blockNumber": 190274596, - "cumulativeGasUsed": "6872493", + "blockNumber": 272063254, + "cumulativeGasUsed": "918567", "status": 1, "byzantium": true }, "args": [ - "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", - "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b7c292cd9fd3d20de84a71ae1caf054eeb6374a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000220000000000000000000000000614498118850184c62f82d08261109334bfb050f000000000000000000000000fe34a72c55e512601e7d491a9c5b36373ce34d6300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" + "0x17c39AB53A7072b167A74a85D47b30385c98ae89", + "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070b464be85a547144c72485eba2577e5d3a45421000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000022000000000000000000000000021a9402adb818744b296e1d1be58c804118dc03d000000000000000000000000fe34a72c55e512601e7d491a9c5b36373ce34d6300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"KlerosCoreNeoProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206184205afef335e3929cbe6d07c51961f33c4cbe24e68a0b19e4f7ab6df6903064736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206184205afef335e3929cbe6d07c51961f33c4cbe24e68a0b19e4f7ab6df6903064736f6c63430008180033", "execute": { "methodName": "initialize", "args": [ @@ -2045,18 +2045,12 @@ "0xf1C7c037891525E360C59f708739Ac09A7670c59", "0x330bD769382cFc6d50175903434CCC8D206DCAE5", "0x0000000000000000000000000000000000000000", - "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + "0x70B464be85A547144C72485eBa2577E5D3A45421", false, [ - { - "type": "BigNumber", - "hex": "0x0ad78ebc5ac6200000" - }, + "200000000000000000000", 10000, - { - "type": "BigNumber", - "hex": "0x016345785d8a0000" - }, + "100000000000000000", 256 ], [ @@ -2066,26 +2060,14 @@ 10 ], "0x05", - "0x614498118850184c62f82d08261109334bFB050f", + "0x21A9402aDb818744B296e1d1BE58C804118DC03D", "0xfE34a72c55e512601E7d491A9c5b36373cE34d63" ] }, - "implementation": "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", + "implementation": "0x17c39AB53A7072b167A74a85D47b30385c98ae89", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/KlerosCoreNeo_Implementation.json b/contracts/deployments/arbitrum/KlerosCoreNeo_Implementation.json index 59235f52d..125cbddf9 100644 --- a/contracts/deployments/arbitrum/KlerosCoreNeo_Implementation.json +++ b/contracts/deployments/arbitrum/KlerosCoreNeo_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", + "address": "0x17c39AB53A7072b167A74a85D47b30385c98ae89", "abi": [ { "inputs": [], @@ -1938,41 +1938,41 @@ "type": "function" } ], - "transactionHash": "0x15041bed9edfbecc26711e8c3b8ba9aeacca656a2dd114c347b4a1a3fdfc8ab8", + "transactionHash": "0xaa469a2f62a3878ebcff21ffd98aa6d122a7be02023cb96368643ac633ae9432", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", + "contractAddress": "0x17c39AB53A7072b167A74a85D47b30385c98ae89", "transactionIndex": 1, - "gasUsed": "79108010", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000800000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2a076e231ed11bd4d8f71ed89478ab0633426ba0610ae805aaa634ec922576ee", - "transactionHash": "0x15041bed9edfbecc26711e8c3b8ba9aeacca656a2dd114c347b4a1a3fdfc8ab8", + "gasUsed": "8005052", + "logsBloom": "0x00000000000000000000000000000000000100000000080000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8f113477ad1660b3518ba04ed04a4e9b322974b3f2bf748a2754ff27a2967dbd", + "transactionHash": "0xaa469a2f62a3878ebcff21ffd98aa6d122a7be02023cb96368643ac633ae9432", "logs": [ { "transactionIndex": 1, - "blockNumber": 190274584, - "transactionHash": "0x15041bed9edfbecc26711e8c3b8ba9aeacca656a2dd114c347b4a1a3fdfc8ab8", - "address": "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", + "blockNumber": 272063219, + "transactionHash": "0xaa469a2f62a3878ebcff21ffd98aa6d122a7be02023cb96368643ac633ae9432", + "address": "0x17c39AB53A7072b167A74a85D47b30385c98ae89", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", "logIndex": 0, - "blockHash": "0x2a076e231ed11bd4d8f71ed89478ab0633426ba0610ae805aaa634ec922576ee" + "blockHash": "0x8f113477ad1660b3518ba04ed04a4e9b322974b3f2bf748a2754ff27a2967dbd" } ], - "blockNumber": 190274584, - "cumulativeGasUsed": "79108010", + "blockNumber": 272063219, + "cumulativeGasUsed": "8005052", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "47a03c54c72f5d4984b62ca6f84025dc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrableNotWhitelisted\",\"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\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEligibleForStaking\",\"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\":\"StakingMoreThanMaxStakePerJuror\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingMoreThanMaxTotalStaked\",\"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\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"arbitrableWhitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"changeArbitrableWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"_jurorNft\",\"type\":\"address\"}],\"name\":\"changeJurorNft\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"},{\"internalType\":\"contract IERC721\",\"name\":\"_jurorNft\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorNft\",\"outputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"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.\"}},\"changeArbitrableWhitelist(address,bool)\":{\"details\":\"Adds or removes an arbitrable from whitelist.\",\"params\":{\"_allowed\":\"Whether add or remove permission.\",\"_arbitrable\":\"Arbitrable address.\"}},\"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.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` storage variable.\"}},\"changeJurorNft(address)\":{\"details\":\"Changes the `jurorNft` storage variable.\",\"params\":{\"_jurorNft\":\"The new value for the `jurorNft` 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],bytes,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.\",\"_sortitionExtraData\":\"Extra data for sortition module.\",\"_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,uint256)\":{\"details\":\"Draws jurors for the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\"}},\"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. Note: Reward distributions are forbidden during pause.\",\"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],bytes,address,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.\",\"_guardian\":\"The guardian's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_jurorNft\":\"NFT contract to vet the jurors.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionExtraData\":\"The extra data for sortition module.\",\"_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.\"}},\"pause()\":{\"details\":\"Pause staking and reward execution. Can only be done by guardian or governor.\"},\"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. Note: Staking and unstaking is forbidden during pause.\",\"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.\"}},\"unpause()\":{\"details\":\"Unpause staking and reward execution. Can only be done by governor.\"},\"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\":\"KlerosCoreNeo Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\",\"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/KlerosCoreNeo.sol\":\"KlerosCoreNeo\"},\"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 v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\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 amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` 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 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` 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 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 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 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 ERC721 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 {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon 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 ERC721\\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 caller.\\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\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\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[EIP 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\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"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.18;\\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 => 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\":\"0x53eb90e3209b47a218bd9eb25bd64bcff4edca51829cb7bfff35ed68f9cee05c\",\"license\":\"MIT\"},\"src/arbitration/KlerosCoreNeo.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.18;\\n\\nimport \\\"./KlerosCoreBase.sol\\\";\\nimport {UUPSProxiable} from \\\"../proxy/UUPSProxiable.sol\\\";\\nimport {Initializable} from \\\"../proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\n/// @title KlerosCoreNeo\\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 KlerosCoreNeo is KlerosCoreBase, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n mapping(address => bool) public arbitrableWhitelist; // Arbitrable whitelist.\\n IERC721 public jurorNft; // Eligible jurors NFT.\\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 _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 _jurorNft NFT contract to vet 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 IERC721 _jurorNft\\n ) external reinitializer(2) {\\n super._initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress\\n );\\n jurorNft = _jurorNft;\\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 Changes the `jurorNft` storage variable.\\n /// @param _jurorNft The new value for the `jurorNft` storage variable.\\n function changeJurorNft(IERC721 _jurorNft) external onlyByGovernor {\\n jurorNft = _jurorNft;\\n }\\n\\n /// @dev 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 onlyByGovernor {\\n arbitrableWhitelist[_arbitrable] = _allowed;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// Note: Staking and unstaking is forbidden during pause.\\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 override whenNotPaused {\\n if (jurorNft.balanceOf(msg.sender) == 0) revert NotEligibleForStaking();\\n super._setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal override returns (uint256 disputeID) {\\n if (!arbitrableWhitelist[msg.sender]) revert ArbitrableNotWhitelisted();\\n return super._createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure override {\\n super._stakingFailed(_onError, _result);\\n if (_result == StakingResult.CannotStakeMoreThanMaxStakePerJuror) revert StakingMoreThanMaxStakePerJuror();\\n if (_result == StakingResult.CannotStakeMoreThanMaxTotalStaked) revert StakingMoreThanMaxTotalStaked();\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error NotEligibleForStaking();\\n error StakingMoreThanMaxStakePerJuror();\\n error StakingMoreThanMaxTotalStaked();\\n error ArbitrableNotWhitelisted();\\n}\\n\",\"keccak256\":\"0x22538831e9b64ad57629e609f95d6a19cb1c25524da3d764878e51fd8bf9b29d\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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 _arbitrableDisputeID The identifier of the dispute in the Arbitrable 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 _arbitrableDisputeID,\\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\":\"0x7babeb6a4180e75dc50a42762f449b32ad0a67cf58a3cb6bf3e5306ac9364507\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"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.18;\\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\":\"0x72cdf621c11d1d84b851edb1ef7607ac950ba7038154c85005ccc86cdd43e71b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\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\":\"0x47960dd772c9dafeefa2e6b9414c7045b5dcc68df735c1fccda6af48ca089858\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0xdc648a85f2816fa323e9f7f4accac3d9384187d0123bdfb1f9b89ce25ea64679\",\"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.18;\\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\":\"0x37a19df56a98cd466fb6e70b8c56e13bfc439221bfabd8c5108d36d0e3ffc0e5\",\"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.18;\\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\":\"0xcfffacf78b92e89a0123aff2c86188abc5327bb59b223f04e1cc1267234bd828\",\"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.18;\\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\":\"0xbac7476deeee8ebbfc895a42e8b50a01c7549164a48ee2ddb0e2307946ee35f9\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615ba462000103600039600081816119040152818161192d0152611b240152615ba46000f3fe6080604052600436106102c95760003560e01c806382d022371161017b578063c71f4253116100d7578063f6506db411610085578063f6506db414610968578063f7434ea914610988578063fbb519e7146109a8578063fbf405b0146109c8578063fc6f8f16146109e8578063fe4037e614610a08578063fe524c3914610a2857600080fd5b8063c71f425314610893578063cf0c38f8146108b3578063d07368bd146108d3578063d2b8035a146108f3578063d4d1d76a14610913578063d98493f614610928578063e4c0aaf41461094857600080fd5b8063acdbf51d11610134578063acdbf51d146107a8578063afe15cfb146107c8578063b0049637146107fd578063b44d573c1461081d578063c13517e11461084d578063c258bb1914610860578063c35699021461088057600080fd5b806382d02237146106e65780638456cb591461070657806386541b241461071b5780638a9bb02a1461073b5780638bb0487514610768578063a072b86c1461078857600080fd5b80632e2e936a1161022a57806352d1902d116101e357806352d1902d14610606578063564a565d1461061b57806359ec827e1461064c5780635c975abb1461066c578063751accd0146106865780637717a6e8146106a65780637934c0be146106c657600080fd5b80632e2e936a146105515780632fcb4f04146105715780633cfd1184146105915780633f4ba83a146105be578063452a9320146105d35780634f1ef286146105f357600080fd5b806319b815291161028757806319b81529146104035780631c3db16d146104335780631d7e6892146104705780631f5a0dd2146104905780632c053739146104f15780632d29a47b146105115780632e1daf2f1461053157600080fd5b8062f5822c146102ce5780630219da79146102f05780630b7414bc146103685780630c340a2414610388578063115d5376146103b55780631860592b146103d5575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004614d05565b610a48565b005b3480156102fc57600080fd5b5061033b61030b366004614d05565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037457600080fd5b506102ee610383366004614e13565b610a95565b34801561039457600080fd5b506000546103a8906001600160a01b031681565b60405161035f9190614e74565b3480156103c157600080fd5b506102ee6103d0366004614e88565b610bd6565b3480156103e157600080fd5b506103f56103f0366004614ea1565b61110d565b60405190815260200161035f565b34801561040f57600080fd5b5061042361041e366004614e88565b611167565b604051901515815260200161035f565b34801561043f57600080fd5b5061045361044e366004614e88565b611260565b60408051938452911515602084015215159082015260600161035f565b34801561047c57600080fd5b506102ee61048b366004614ecd565b611361565b34801561049c57600080fd5b506104b06104ab366004614e88565b6113b7565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161035f565b3480156104fd57600080fd5b506102ee61050c366004614fe2565b611416565b34801561051d57600080fd5b506102ee61052c3660046150cf565b611520565b34801561053d57600080fd5b506004546103a8906001600160a01b031681565b34801561055d57600080fd5b50600b546103a8906001600160a01b031681565b34801561057d57600080fd5b506102ee61058c366004614d05565b6117b6565b34801561059d57600080fd5b506105b16105ac3660046150fb565b611803565b60405161035f9190615139565b3480156105ca57600080fd5b506102ee61186d565b3480156105df57600080fd5b506001546103a8906001600160a01b031681565b6102ee610601366004615147565b6118f0565b34801561061257600080fd5b506103f5611b17565b34801561062757600080fd5b5061063b610636366004614e88565b611b75565b60405161035f9594939291906151ce565b34801561065857600080fd5b506103f5610667366004614e88565b611bd1565b34801561067857600080fd5b506009546104239060ff1681565b34801561069257600080fd5b506102ee6106a136600461520d565b611d26565b3480156106b257600080fd5b506102ee6106c1366004615265565b611dd0565b3480156106d257600080fd5b506102ee6106e1366004614ecd565b611e93565b3480156106f257600080fd5b506102ee610701366004615281565b611f12565b34801561071257600080fd5b506102ee611fcf565b34801561072757600080fd5b506102ee6107363660046152d3565b61206f565b34801561074757600080fd5b5061075b610756366004615341565b612256565b60405161035f91906153a7565b34801561077457600080fd5b506102ee610783366004614e88565b6123e2565b34801561079457600080fd5b506102ee6107a336600461544c565b612546565b3480156107b457600080fd5b506103a86107c3366004614e88565b6128b7565b3480156107d457600080fd5b506107e86107e3366004614e88565b6128e1565b6040805192835260208301919091520161035f565b34801561080957600080fd5b506102ee610818366004614d05565b61298d565b34801561082957600080fd5b50610423610838366004614d05565b600a6020526000908152604090205460ff1681565b6103f561085b36600461550c565b6129da565b34801561086c57600080fd5b506102ee61087b366004614d05565b612a12565b6102ee61088e36600461553c565b612a5f565b34801561089f57600080fd5b506103f56108ae366004614e88565b612f33565b3480156108bf57600080fd5b506003546103a8906001600160a01b031681565b3480156108df57600080fd5b506102ee6108ee366004614d05565b612f9b565b3480156108ff57600080fd5b506102ee61090e366004615341565b613044565b34801561091f57600080fd5b506006546103f5565b34801561093457600080fd5b506103f56109433660046155bd565b613359565b34801561095457600080fd5b506102ee610963366004614d05565b6133a6565b34801561097457600080fd5b506103f5610983366004615608565b6133f3565b34801561099457600080fd5b506103f56109a336600461566e565b6134d9565b3480156109b457600080fd5b506102ee6109c33660046156a2565b613525565b3480156109d457600080fd5b506002546103a8906001600160a01b031681565b3480156109f457600080fd5b506103f5610a03366004614e88565b613565565b348015610a1457600080fd5b506102ee610a23366004614d05565b613594565b348015610a3457600080fd5b50610423610a43366004615265565b6135e1565b6000546001600160a01b03163314610a735760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610ac05760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bd0578115610b5f57828181518110610ae457610ae46156f3565b602002602001015160001480610b1757506006548351849083908110610b0c57610b0c6156f3565b602002602001015110155b15610b3557604051633d58a98960e11b815260040160405180910390fd5b610b5a84848381518110610b4b57610b4b6156f3565b60200260200101516001613629565b610bbe565b6001838281518110610b7357610b736156f3565b602002602001015103610b99576040516356d111fd60e11b815260040160405180910390fd5b610bbe84848381518110610baf57610baf6156f3565b60200260200101516000613629565b80610bc88161571f565b915050610ac3565b50505050565b600060078281548110610beb57610beb6156f3565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c1e57610c1e6156f3565b6000918252602082206003850154600c909202019250610c4090600190615738565b90506000836003018281548110610c5957610c596156f3565b600091825260208220600b909102019150600185015460ff166004811115610c8357610c83615196565b03610d5e5781158015610cd257506001840154600684019060ff166004811115610caf57610caf615196565b60048110610cbf57610cbf6156f3565b01546002850154610cd09042615738565b105b15610cf057604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d18576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d2f576002610d32565b60015b60018086018054909160ff1990911690836004811115610d5457610d54615196565b02179055506110bf565b60018085015460ff166004811115610d7857610d78615196565b03610e88576001840154600684019060ff166004811115610d9b57610d9b615196565b60048110610dab57610dab6156f3565b01546002850154610dbc9042615738565b108015610e5357506006816000015481548110610ddb57610ddb6156f3565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e51919061574b565b155b15610e7157604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610d54565b6002600185015460ff166004811115610ea357610ea3615196565b03610ff1576001840154600684019060ff166004811115610ec657610ec6615196565b60048110610ed657610ed66156f3565b01546002850154610ee79042615738565b108015610f7e57506006816000015481548110610f0657610f066156f3565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610f58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7c919061574b565b155b15610f9c57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36110bf565b6003600185015460ff16600481111561100c5761100c615196565b03611086576001840154600684019060ff16600481111561102f5761102f615196565b6004811061103f5761103f6156f3565b015460028501546110509042615738565b101561106f57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610d54565b6004600185015460ff1660048111156110a1576110a1615196565b036110bf576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110fe9160ff1690615768565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061114a90600160481b900460ff16600a61585a565b6111549084615869565b61115e9190615896565b90505b92915050565b6000806007838154811061117d5761117d6156f3565b60009182526020822060036004909202019081018054919350906111a390600190615738565b815481106111b3576111b36156f3565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106111e8576111e86156f3565b90600052602060002090600c0201905080600501548260030154101561121357506000949350505050565b80546005805490916001600160601b0316908110611233576112336156f3565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b60008060008060078581548110611279576112796156f3565b600091825260208220600360049092020190810180549193509061129f90600190615738565b815481106112af576112af6156f3565b90600052602060002090600b02019050600060068260000154815481106112d8576112d86156f3565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa15801561132d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135191906158aa565b9199909850909650945050505050565b6000546001600160a01b0316331461138c5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b600581815481106113c757600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061145f575080546001600160401b03808416911610155b1561147c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556114af8d8d8d8d8d8d8d8d8d8d6136b1565b600b80546001600160a01b0319166001600160a01b038516179055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff161561154457604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061155a5761155a6156f3565b600091825260209091206004918202019150600182015460ff16600481111561158557611585615196565b146115a357604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106115b8576115b86156f3565b6000918252602082206004600b909202019081015490935091506115dc84836158e2565b60058401546006850154600286015492935090916000906115fe908390615896565b90506000866001015490506000806006896000015481548110611623576116236156f3565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa15801561167f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a391906158f5565b915050806000036116bf57838611156116ba578395505b6116df565b6116ca846002615869565b8611156116df576116dc846002615869565b95505b60048801869055865b8681101561179557848110156117415761173a6040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061396c565b9550611783565b6117836040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613e3d565b8061178d8161571f565b9150506116e8565b50848860050154146117a957600588018590555b5050505050505050505050565b6000546001600160a01b031633146117e15760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61180b614c35565b6005826001600160601b031681548110611827576118276156f3565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b81548152602001906001019080831161184e5750505050509050919050565b6000546001600160a01b031633146118985760405163c383977560e01b815260040160405180910390fd5b60095460ff166118bb5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6118f982614375565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061197757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661196b600080516020615b4f8339815191525490565b6001600160a01b031614155b156119955760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119ef575060408051601f3d908101601f191682019092526119ec918101906158f5565b60015b611a175781604051630c76093760e01b8152600401611a0e9190614e74565b60405180910390fd5b600080516020615b4f8339815191528114611a4857604051632a87526960e21b815260048101829052602401611a0e565b600080516020615b4f8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b11576000836001600160a01b031683604051611aaf9190615932565b600060405180830381855af49150503d8060008114611aea576040519150601f19603f3d011682016040523d82523d6000602084013e611aef565b606091505b5050905080610bd0576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b625760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615b4f83398151915290565b60078181548110611b8557600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611be757611be76156f3565b6000918252602082206003600490920201908101805491935090611c0d90600190615738565b81548110611c1d57611c1d6156f3565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611c5257611c526156f3565b90600052602060002090600c020190508060050154826003015410611cf15782546001600160601b031660001901611c93576001600160ff1b039350611d1e565b6003820154611ca3906002615869565b611cae9060016158e2565b81546005805490916001600160601b0316908110611cce57611cce6156f3565b90600052602060002090600c020160040154611cea9190615869565b9350611d1e565b6003820154611d01906002615869565b611d0c9060016158e2565b8160040154611d1b9190615869565b93505b505050919050565b6000546001600160a01b03163314611d515760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611d6c9190615932565b60006040518083038185875af1925050503d8060008114611da9576040519150601f19603f3d011682016040523d82523d6000602084013e611dae565b606091505b5050905080610bd0576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611df457604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611e24903390600401614e74565b602060405180830381865afa158015611e41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6591906158f5565b600003611e85576040516326b551e560e11b815260040160405180910390fd5b611b113383836000806143a3565b6000546001600160a01b03163314611ebe5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f3d5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611ff557506000546001600160a01b03163314155b1561201357604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561203757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b0316331461209a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120b8576120b86156f3565b90600052602060002090600c0201905060016001600160601b0316886001600160601b03161415801561211a575080546005805488926001600160601b0316908110612106576121066156f3565b90600052602060002090600c020160020154115b1561213857604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121bd5786600583600101838154811061215f5761215f6156f3565b90600052602060002001548154811061217a5761217a6156f3565b90600052602060002090600c02016002015410156121ab57604051639717078960e01b815260040160405180910390fd5b806121b58161571f565b91505061213b565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556122009060068301908490614c53565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516122449695949392919061594e565b60405180910390a25050505050505050565b6122bc60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106122cf576122cf6156f3565b906000526020600020906004020160030182815481106122f1576122f16156f3565b90600052602060002090600b020160405180610160016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682018054806020026020016040519081016040528092919081815260200182805480156123a057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612382575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106123f7576123f76156f3565b600091825260209091206004918202019150600182015460ff16600481111561242257612422615196565b1461244057604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff161561246b5760405163c977f8d360e01b815260040160405180910390fd5b600061247683611260565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561252957600080fd5b505af115801561253d573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125715760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b03168154811061258e5761258e6156f3565b90600052602060002090600c02016002015411156125bf57604051639717078960e01b815260040160405180910390fd5b80516000036125e15760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661260857604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156127065783818151811061265b5761265b6156f3565b60200260200101516000148061268e57506006548451859083908110612683576126836156f3565b602002602001015110155b156126ac57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106126c6576126c66156f3565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080806126fe9061571f565b915050612640565b5060016000908152600a8201602052604090205460ff1661273a576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c161781556040805160008152602081019182905251612772916001840191614c91565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127b59060068301908790614c53565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916127e79186918991016159ad565b600060405180830381600087803b15801561280157600080fd5b505af1158015612815573d6000803e3d6000fd5b5050505060058b6001600160601b031681548110612835576128356156f3565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d906128a2908e908e908e908e908e908e908d906159c6565b60405180910390a35050505050505050505050565b600681815481106128c757600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106128f9576128f96156f3565b6000918252602090912060049091020190506003600182015460ff16600481111561292657612926615196565b0361297e576002810154815460058054929550916001600160601b03909116908110612954576129546156f3565b600091825260209091206009600c909202010154600282015461297791906158e2565b9150612987565b60009250600091505b50915091565b6000546001600160a01b031633146129b85760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006129e5826134d9565b341015612a0557604051630e3360f160e21b815260040160405180910390fd5b61115e838360003461455d565b6000546001600160a01b03163314612a3d5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a6883611bd1565b341015612a8857604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612a9d57612a9d6156f3565b6000918252602090912060049091020190506003600182015460ff166004811115612aca57612aca615196565b14612ae8576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612afe90600190615738565b81548110612b0e57612b0e6156f3565b90600052602060002090600b020190506006816000015481548110612b3557612b356156f3565b6000918252602090912001546001600160a01b03163314612b695760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612bac57612bac6156f3565b90600052602060002090600c020160050154846003015410612cb5576005836001600160601b031681548110612be457612be46156f3565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612c1757612c176156f3565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c4357600191505b84546001600160601b03848116911614612cb557845460038601546001600160601b0390911690612c7690600190615738565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612cf857612cf86156f3565b90600052602060002090600c02019050806004015434612d189190615896565b826003018190555061271081600301548260020154612d379190615869565b612d419190615896565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d7891615738565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612db657600080fd5b505af1158015612dca573d6000803e3d6000fd5b505086548454149150612eb090505784546003870154612dec90600190615738565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e3a57612e3a6156f3565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612e7d918d918d918d9190600401615a43565b600060405180830381600087803b158015612e9757600080fd5b505af1158015612eab573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612f209190615768565b60405180910390a2505050505050505050565b60008060078381548110612f4957612f496156f3565b906000526020600020906004020190508060030160018260030180549050612f719190615738565b81548110612f8157612f816156f3565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612fc65760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110613059576130596156f3565b9060005260206000209060040201905060006001826003018054905061307f9190615738565b90506000826003018281548110613098576130986156f3565b600091825260208220600b909102019150600184015460ff1660048111156130c2576130c2615196565b146130e057604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106130f9576130f96156f3565b6000918252602082200154600a8401546001600160a01b039091169250905b868110801561312e575060038401546006850154105b156133365760006001600160a01b03841663d2b8035a8a8461314f8161571f565b955061315b90876158e2565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af115801561319e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c29190615a73565b90506001600160a01b0381166131d85750613118565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261320e928692909101615a90565b600060405180830381600087803b15801561322857600080fd5b505af115801561323c573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91613289918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133305760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561331757600080fd5b505af115801561332b573d6000803e3d6000fd5b505050505b50613118565b8084600a01600082825461334a91906158e2565b90915550505050505050505050565b600061339e826103f086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134d992505050565b949350505050565b6000546001600160a01b031633146133d15760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff1661342c5760405163e51cf7bf60e01b815260040160405180910390fd5b613437858585613359565b82101561345757604051630e3360f160e21b815260040160405180910390fd5b61346c6001600160a01b038416333085614599565b613489576040516312171d8360e31b815260040160405180910390fd5b6134cd8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925087915061455d9050565b90505b95945050505050565b60008060006134e784614675565b5091509150806005836001600160601b031681548110613509576135096156f3565b90600052602060002090600c02016004015461339e9190615869565b6004546001600160a01b0316331461355057604051639d6cab9960e01b815260040160405180910390fd5b61355e8484848460016143a3565b5050505050565b60006007828154811061357a5761357a6156f3565b600091825260209091206003600490920201015492915050565b6000546001600160a01b031633146135bf5760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b0316815481106135ff576135ff6156f3565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b031681548110613646576136466156f3565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c926137a3928791016159ad565b600060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b03191681556040805183815260208101909152909350915050805161383f916001840191602090910190614c91565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561388e9060068301908690614c53565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916138c1916001918891016159ad565b600060405180830381600087803b1580156138db57600080fd5b505af11580156138ef573d6000803e3d6000fd5b5050825487516020808a01516040808c015160608d0151825160008152948501928390526001600160601b039096169750600196507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d95613957958f959094938e91906159c6565b60405180910390a36117a96001806001613629565b6000806007836000015181548110613986576139866156f3565b906000526020600020906004020190506000816003018460200151815481106139b1576139b16156f3565b90600052602060002090600b02019050600060068260000154815481106139da576139da6156f3565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a8491906158f5565b9050612710811115613a9557506127105b6000612710613aa48382615738565b8560010154613ab39190615869565b613abd9190615896565b9050808760c001818151613ad191906158e2565b90525060e0870151600685018054600092908110613af157613af16156f3565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613b32918591879101615a90565b600060405180830381600087803b158015613b4c57600080fd5b505af1158015613b60573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c9250613b95918591879101615a90565b600060405180830381600087803b158015613baf57600080fd5b505af1158015613bc3573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e786613c0387615aa9565b60098b0154604051613c259392916000916001600160a01b0390911690615ac5565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613c8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cb0919061574b565b613d16576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e9991613ce391859101614e74565b600060405180830381600087803b158015613cfd57600080fd5b505af1158015613d11573d6000803e3d6000fd5b505050505b60018860600151613d279190615738565b8860e00151148015613d3b57506040880151155b15613e2c5760098501546001600160a01b0316613d84576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613dab565b60005460028601546009870154613da9926001600160a01b03918216929116906146fc565b505b60005460c0890151600254613dce926001600160a01b03918216929116906146fc565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613e2393909290916001600160a01b0390911690615ae9565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613e5657613e566156f3565b90600052602060002090600402019050600081600301836020015181548110613e8157613e816156f3565b90600052602060002090600b0201905060006006826000015481548110613eaa57613eaa6156f3565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ee991615b08565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f6d91906158f5565b9050612710811115613f7e57506127105b60008360060186606001518760e00151613f989190615b08565b81548110613fa857613fa86156f3565b600091825260208220015460018601546001600160a01b03909116925061271090613fd4908590615869565b613fde9190615896565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791614010918691869101615a90565b600060405180830381600087803b15801561402a57600080fd5b505af115801561403e573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f925061407191869101614e74565b602060405180830381865afa15801561408e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140b2919061574b565b6140cf576002546140cd906001600160a01b031683836146fc565b505b60006127108489604001518a60c001516140e99190615896565b6140f39190615869565b6140fd9190615896565b90508086600801600082825461411391906158e2565b925050819055506000612710858a6040015189600201546141349190615896565b61413e9190615869565b6141489190615896565b90508087600701600082825461415e91906158e2565b909155505060025461417a906001600160a01b031685846146fc565b5060098701546001600160a01b03166141b8576040516001600160a01b0385169082156108fc029083906000818181858888f19350505050506141d3565b60098701546141d1906001600160a01b031685836146fc565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792614223928c928a928a9290911690615ac5565b60405180910390a460018960600151600261423e9190615869565b6142489190615738565b8960e001510361436a57600087600801548a60c001516142689190615738565b90506000886007015489600201546142809190615738565b90508115158061428f57508015155b156117a95781156142b9576000546002546142b7916001600160a01b039182169116846146fc565b505b80156143205760098901546001600160a01b03166142ff57600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050614320565b60005460098a015461431e916001600160a01b039182169116836146fc565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916128a291879187916001600160a01b0390911690615ae9565b505050505050505050565b6000546001600160a01b031633146143a05760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b03851615806143c557506005546001600160601b038616115b156143dd576143d58260046147c9565b5060006134d0565b831580159061441857506005856001600160601b031681548110614403576144036156f3565b90600052602060002090600c02016002015484105b15614428576143d58260056147c9565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af115801561449b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144bf9190615b1c565b9194509250905060008160078111156144da576144da615196565b146144f5576144e985826147c9565b600093505050506134d0565b821561452257600254614513906001600160a01b03168a3086614599565b614522576144e98560016147c9565b811561454e5760025461453f906001600160a01b03168a846146fc565b61454e576144e98560026147c9565b50600198975050505050505050565b336000908152600a602052604081205460ff1661458d57604051630407618360e31b815260040160405180910390fd5b6134d085858585614837565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516145fe9190615932565b6000604051808303816000865af19150503d806000811461463b576040519150601f19603f3d011682016040523d82523d6000602084013e614640565b606091505b509150915081801561466a57508051158061466a57508080602001905181019061466a919061574b565b979650505050505050565b600080600060408451106146ea575050506020810151604082015160608301516001600160601b03831615806146b657506005546001600160601b03841610155b156146c057600192505b816000036146cd57600391505b8015806146dc57506006548110155b156146e5575060015b6146f5565b506001915060039050815b9193909250565b6000806000856001600160a01b0316858560405160240161471e929190615a90565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516147539190615932565b6000604051808303816000865af19150503d8060008114614790576040519150601f19603f3d011682016040523d82523d6000602084013e614795565b606091505b50915091508180156147bf5750805115806147bf5750808060200190518101906147bf919061574b565b9695505050505050565b6147d38282614b1e565b60068160078111156147e7576147e7615196565b0361480557604051636590e91560e01b815260040160405180910390fd5b600781600781111561481957614819615196565b03611b13576040516358859f1d60e01b815260040160405180910390fd5b600080600061484586614675565b92505091506005826001600160601b031681548110614866576148666156f3565b60009182526020808320848452600a600c90930201919091019052604090205460ff166148a65760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614931576149316156f3565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614967576149676156f3565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156149b2576149ad8a846004015461110d565b6149b8565b82600401545b90506149c4818a615896565b6003808401919091558683558301546002840154612710916149e591615869565b6149ef9190615896565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b158015614a6257600080fd5b505af1158015614a76573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b8152600401614ab09493929190615a43565b600060405180830381600087803b158015614aca57600080fd5b505af1158015614ade573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6001826001811115614b3257614b32615196565b03614b3b575050565b6001816007811115614b4f57614b4f615196565b03614b6d57604051630f323ed960e11b815260040160405180910390fd5b6002816007811115614b8157614b81615196565b03614b9f5760405163e45e13a360e01b815260040160405180910390fd5b6003816007811115614bb357614bb3615196565b03614bd157604051631d91d0ed60e31b815260040160405180910390fd5b6004816007811115614be557614be5615196565b03614c03576040516321f1774b60e11b815260040160405180910390fd5b6005816007811115614c1757614c17615196565b03611b1357604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b8260048101928215614c81579160200282015b82811115614c81578251825591602001919060010190614c66565b50614c8d929150614ccb565b5090565b828054828255906000526020600020908101928215614c815791602002820182811115614c81578251825591602001919060010190614c66565b5b80821115614c8d5760008155600101614ccc565b6001600160a01b03811681146143a057600080fd5b8035614d0081614ce0565b919050565b600060208284031215614d1757600080fd5b8135614d2281614ce0565b9392505050565b80356001600160601b0381168114614d0057600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d7e57614d7e614d40565b604052919050565b600082601f830112614d9757600080fd5b813560206001600160401b03821115614db257614db2614d40565b8160051b614dc1828201614d56565b9283528481018201928281019087851115614ddb57600080fd5b83870192505b8483101561466a57823582529183019190830190614de1565b80151581146143a057600080fd5b8035614d0081614dfa565b600080600060608486031215614e2857600080fd5b614e3184614d29565b925060208401356001600160401b03811115614e4c57600080fd5b614e5886828701614d86565b9250506040840135614e6981614dfa565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614e9a57600080fd5b5035919050565b60008060408385031215614eb457600080fd5b8235614ebf81614ce0565b946020939093013593505050565b60008060408385031215614ee057600080fd5b8235614eeb81614ce0565b91506020830135614efb81614dfa565b809150509250929050565b600082601f830112614f1757600080fd5b604051608081018181106001600160401b0382111715614f3957614f39614d40565b604052806080840185811115614f4e57600080fd5b845b81811015614f68578035835260209283019201614f50565b509195945050505050565b600082601f830112614f8457600080fd5b81356001600160401b03811115614f9d57614f9d614d40565b614fb0601f8201601f1916602001614d56565b818152846020838601011115614fc557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e03121561500457600080fd5b8b3561500f81614ce0565b9a5060208c013561501f81614ce0565b995061502d60408d01614cf5565b985061503b60608d01614cf5565b975061504960808d01614cf5565b965061505760a08d01614e08565b95506150668d60c08e01614f06565b94506150768d6101408e01614f06565b93506101c08c01356001600160401b0381111561509257600080fd5b61509e8e828f01614f73565b9350506150ae6101e08d01614cf5565b91506150bd6102008d01614cf5565b90509295989b509295989b9093969950565b6000806000606084860312156150e457600080fd5b505081359360208301359350604090920135919050565b60006020828403121561510d57600080fd5b61115e82614d29565b8060005b6004811015610bd057815184526020938401939091019060010161511a565b608081016111618284615116565b6000806040838503121561515a57600080fd5b823561516581614ce0565b915060208301356001600160401b0381111561518057600080fd5b61518c85828601614f73565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b600581106151ca57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016151fa60408301866151ac565b9215156060820152608001529392505050565b60008060006060848603121561522257600080fd5b833561522d81614ce0565b92506020840135915060408401356001600160401b0381111561524f57600080fd5b61525b86828701614f73565b9150509250925092565b6000806040838503121561527857600080fd5b614ebf83614d29565b60008060006060848603121561529657600080fd5b83356152a181614ce0565b925060208401356001600160401b03811681146152bd57600080fd5b9150604084013560ff81168114614e6957600080fd5b6000806000806000806000610140888a0312156152ef57600080fd5b6152f888614d29565b9650602088013561530881614dfa565b955060408801359450606088013593506080880135925060a088013591506153338960c08a01614f06565b905092959891949750929550565b6000806040838503121561535457600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561539c5781516001600160a01b031687529582019590820190600101615377565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152615402610180850183615363565b60e0860151610100868101919091528601516101208087019190915286015190925061014061543b818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561546b57600080fd5b6154748a614d29565b985060208a013561548481614dfa565b975060408a0135965060608a0135955060808a0135945060a08a013593506154af8b60c08c01614f06565b92506101408a01356001600160401b03808211156154cc57600080fd5b6154d88d838e01614f73565b93506101608c01359150808211156154ef57600080fd5b506154fc8c828d01614d86565b9150509295985092959850929598565b6000806040838503121561551f57600080fd5b8235915060208301356001600160401b0381111561518057600080fd5b60008060006060848603121561555157600080fd5b833592506020840135915060408401356001600160401b0381111561524f57600080fd5b60008083601f84011261558757600080fd5b5081356001600160401b0381111561559e57600080fd5b6020830191508360208285010111156155b657600080fd5b9250929050565b6000806000604084860312156155d257600080fd5b83356001600160401b038111156155e857600080fd5b6155f486828701615575565b9094509250506020840135614e6981614ce0565b60008060008060006080868803121561562057600080fd5b8535945060208601356001600160401b0381111561563d57600080fd5b61564988828901615575565b909550935050604086013561565d81614ce0565b949793965091946060013592915050565b60006020828403121561568057600080fd5b81356001600160401b0381111561569657600080fd5b61339e84828501614f73565b600080600080608085870312156156b857600080fd5b84356156c381614ce0565b93506156d160208601614d29565b92506040850135915060608501356156e881614dfa565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161573157615731615709565b5060010190565b8181038181111561116157611161615709565b60006020828403121561575d57600080fd5b8151614d2281614dfa565b6020810161116182846151ac565b600181815b808511156157b157816000190482111561579757615797615709565b808516156157a457918102915b93841c939080029061577b565b509250929050565b6000826157c857506001611161565b816157d557506000611161565b81600181146157eb57600281146157f557615811565b6001915050611161565b60ff84111561580657615806615709565b50506001821b611161565b5060208310610133831016604e8410600b8410161715615834575081810a611161565b61583e8383615776565b806000190482111561585257615852615709565b029392505050565b600061115e60ff8416836157b9565b808202811582820484141761116157611161615709565b634e487b7160e01b600052601260045260246000fd5b6000826158a5576158a5615880565b500490565b6000806000606084860312156158bf57600080fd5b8351925060208401516158d181614dfa565b6040850151909250614e6981614dfa565b8082018082111561116157611161615709565b60006020828403121561590757600080fd5b5051919050565b60005b83811015615929578181015183820152602001615911565b50506000910152565b6000825161594481846020870161590e565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261466a60a0830184615116565b6000815180845261599981602086016020860161590e565b601f01601f19169290920160200192915050565b82815260406020820152600061339e6040830184615981565b60006101408083018a1515845260208a818601528960408601528860608601528760808601526159f960a0860188615116565b6101208501929092528451908190526101608401918086019160005b81811015615a3157835185529382019392820192600101615a15565b50929c9b505050505050505050505050565b848152836020820152608060408201526000615a626080830185615981565b905082606083015295945050505050565b600060208284031215615a8557600080fd5b8151614d2281614ce0565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b8201615abe57615abe615709565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615b1757615b17615880565b500690565b600080600060608486031215615b3157600080fd5b8351925060208401519150604084015160088110614e6957600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212201f0b9f849845b8b65a615034f5f999cef3db03f8c4028737a0791e145cb079e964736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102c95760003560e01c806382d022371161017b578063c71f4253116100d7578063f6506db411610085578063f6506db414610968578063f7434ea914610988578063fbb519e7146109a8578063fbf405b0146109c8578063fc6f8f16146109e8578063fe4037e614610a08578063fe524c3914610a2857600080fd5b8063c71f425314610893578063cf0c38f8146108b3578063d07368bd146108d3578063d2b8035a146108f3578063d4d1d76a14610913578063d98493f614610928578063e4c0aaf41461094857600080fd5b8063acdbf51d11610134578063acdbf51d146107a8578063afe15cfb146107c8578063b0049637146107fd578063b44d573c1461081d578063c13517e11461084d578063c258bb1914610860578063c35699021461088057600080fd5b806382d02237146106e65780638456cb591461070657806386541b241461071b5780638a9bb02a1461073b5780638bb0487514610768578063a072b86c1461078857600080fd5b80632e2e936a1161022a57806352d1902d116101e357806352d1902d14610606578063564a565d1461061b57806359ec827e1461064c5780635c975abb1461066c578063751accd0146106865780637717a6e8146106a65780637934c0be146106c657600080fd5b80632e2e936a146105515780632fcb4f04146105715780633cfd1184146105915780633f4ba83a146105be578063452a9320146105d35780634f1ef286146105f357600080fd5b806319b815291161028757806319b81529146104035780631c3db16d146104335780631d7e6892146104705780631f5a0dd2146104905780632c053739146104f15780632d29a47b146105115780632e1daf2f1461053157600080fd5b8062f5822c146102ce5780630219da79146102f05780630b7414bc146103685780630c340a2414610388578063115d5376146103b55780631860592b146103d5575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004614d05565b610a48565b005b3480156102fc57600080fd5b5061033b61030b366004614d05565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037457600080fd5b506102ee610383366004614e13565b610a95565b34801561039457600080fd5b506000546103a8906001600160a01b031681565b60405161035f9190614e74565b3480156103c157600080fd5b506102ee6103d0366004614e88565b610bd6565b3480156103e157600080fd5b506103f56103f0366004614ea1565b61110d565b60405190815260200161035f565b34801561040f57600080fd5b5061042361041e366004614e88565b611167565b604051901515815260200161035f565b34801561043f57600080fd5b5061045361044e366004614e88565b611260565b60408051938452911515602084015215159082015260600161035f565b34801561047c57600080fd5b506102ee61048b366004614ecd565b611361565b34801561049c57600080fd5b506104b06104ab366004614e88565b6113b7565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161035f565b3480156104fd57600080fd5b506102ee61050c366004614fe2565b611416565b34801561051d57600080fd5b506102ee61052c3660046150cf565b611520565b34801561053d57600080fd5b506004546103a8906001600160a01b031681565b34801561055d57600080fd5b50600b546103a8906001600160a01b031681565b34801561057d57600080fd5b506102ee61058c366004614d05565b6117b6565b34801561059d57600080fd5b506105b16105ac3660046150fb565b611803565b60405161035f9190615139565b3480156105ca57600080fd5b506102ee61186d565b3480156105df57600080fd5b506001546103a8906001600160a01b031681565b6102ee610601366004615147565b6118f0565b34801561061257600080fd5b506103f5611b17565b34801561062757600080fd5b5061063b610636366004614e88565b611b75565b60405161035f9594939291906151ce565b34801561065857600080fd5b506103f5610667366004614e88565b611bd1565b34801561067857600080fd5b506009546104239060ff1681565b34801561069257600080fd5b506102ee6106a136600461520d565b611d26565b3480156106b257600080fd5b506102ee6106c1366004615265565b611dd0565b3480156106d257600080fd5b506102ee6106e1366004614ecd565b611e93565b3480156106f257600080fd5b506102ee610701366004615281565b611f12565b34801561071257600080fd5b506102ee611fcf565b34801561072757600080fd5b506102ee6107363660046152d3565b61206f565b34801561074757600080fd5b5061075b610756366004615341565b612256565b60405161035f91906153a7565b34801561077457600080fd5b506102ee610783366004614e88565b6123e2565b34801561079457600080fd5b506102ee6107a336600461544c565b612546565b3480156107b457600080fd5b506103a86107c3366004614e88565b6128b7565b3480156107d457600080fd5b506107e86107e3366004614e88565b6128e1565b6040805192835260208301919091520161035f565b34801561080957600080fd5b506102ee610818366004614d05565b61298d565b34801561082957600080fd5b50610423610838366004614d05565b600a6020526000908152604090205460ff1681565b6103f561085b36600461550c565b6129da565b34801561086c57600080fd5b506102ee61087b366004614d05565b612a12565b6102ee61088e36600461553c565b612a5f565b34801561089f57600080fd5b506103f56108ae366004614e88565b612f33565b3480156108bf57600080fd5b506003546103a8906001600160a01b031681565b3480156108df57600080fd5b506102ee6108ee366004614d05565b612f9b565b3480156108ff57600080fd5b506102ee61090e366004615341565b613044565b34801561091f57600080fd5b506006546103f5565b34801561093457600080fd5b506103f56109433660046155bd565b613359565b34801561095457600080fd5b506102ee610963366004614d05565b6133a6565b34801561097457600080fd5b506103f5610983366004615608565b6133f3565b34801561099457600080fd5b506103f56109a336600461566e565b6134d9565b3480156109b457600080fd5b506102ee6109c33660046156a2565b613525565b3480156109d457600080fd5b506002546103a8906001600160a01b031681565b3480156109f457600080fd5b506103f5610a03366004614e88565b613565565b348015610a1457600080fd5b506102ee610a23366004614d05565b613594565b348015610a3457600080fd5b50610423610a43366004615265565b6135e1565b6000546001600160a01b03163314610a735760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610ac05760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bd0578115610b5f57828181518110610ae457610ae46156f3565b602002602001015160001480610b1757506006548351849083908110610b0c57610b0c6156f3565b602002602001015110155b15610b3557604051633d58a98960e11b815260040160405180910390fd5b610b5a84848381518110610b4b57610b4b6156f3565b60200260200101516001613629565b610bbe565b6001838281518110610b7357610b736156f3565b602002602001015103610b99576040516356d111fd60e11b815260040160405180910390fd5b610bbe84848381518110610baf57610baf6156f3565b60200260200101516000613629565b80610bc88161571f565b915050610ac3565b50505050565b600060078281548110610beb57610beb6156f3565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c1e57610c1e6156f3565b6000918252602082206003850154600c909202019250610c4090600190615738565b90506000836003018281548110610c5957610c596156f3565b600091825260208220600b909102019150600185015460ff166004811115610c8357610c83615196565b03610d5e5781158015610cd257506001840154600684019060ff166004811115610caf57610caf615196565b60048110610cbf57610cbf6156f3565b01546002850154610cd09042615738565b105b15610cf057604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d18576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d2f576002610d32565b60015b60018086018054909160ff1990911690836004811115610d5457610d54615196565b02179055506110bf565b60018085015460ff166004811115610d7857610d78615196565b03610e88576001840154600684019060ff166004811115610d9b57610d9b615196565b60048110610dab57610dab6156f3565b01546002850154610dbc9042615738565b108015610e5357506006816000015481548110610ddb57610ddb6156f3565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e51919061574b565b155b15610e7157604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610d54565b6002600185015460ff166004811115610ea357610ea3615196565b03610ff1576001840154600684019060ff166004811115610ec657610ec6615196565b60048110610ed657610ed66156f3565b01546002850154610ee79042615738565b108015610f7e57506006816000015481548110610f0657610f066156f3565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610f58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7c919061574b565b155b15610f9c57604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36110bf565b6003600185015460ff16600481111561100c5761100c615196565b03611086576001840154600684019060ff16600481111561102f5761102f615196565b6004811061103f5761103f6156f3565b015460028501546110509042615738565b101561106f57604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610d54565b6004600185015460ff1660048111156110a1576110a1615196565b036110bf576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110fe9160ff1690615768565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061114a90600160481b900460ff16600a61585a565b6111549084615869565b61115e9190615896565b90505b92915050565b6000806007838154811061117d5761117d6156f3565b60009182526020822060036004909202019081018054919350906111a390600190615738565b815481106111b3576111b36156f3565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106111e8576111e86156f3565b90600052602060002090600c0201905080600501548260030154101561121357506000949350505050565b80546005805490916001600160601b0316908110611233576112336156f3565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b60008060008060078581548110611279576112796156f3565b600091825260208220600360049092020190810180549193509061129f90600190615738565b815481106112af576112af6156f3565b90600052602060002090600b02019050600060068260000154815481106112d8576112d86156f3565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa15801561132d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135191906158aa565b9199909850909650945050505050565b6000546001600160a01b0316331461138c5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b600581815481106113c757600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff168061145f575080546001600160401b03808416911610155b1561147c5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556114af8d8d8d8d8d8d8d8d8d8d6136b1565b600b80546001600160a01b0319166001600160a01b038516179055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff161561154457604051636f1dac1d60e01b815260040160405180910390fd5b6000806007858154811061155a5761155a6156f3565b600091825260209091206004918202019150600182015460ff16600481111561158557611585615196565b146115a357604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106115b8576115b86156f3565b6000918252602082206004600b909202019081015490935091506115dc84836158e2565b60058401546006850154600286015492935090916000906115fe908390615896565b90506000866001015490506000806006896000015481548110611623576116236156f3565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa15801561167f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a391906158f5565b915050806000036116bf57838611156116ba578395505b6116df565b6116ca846002615869565b8611156116df576116dc846002615869565b95505b60048801869055865b8681101561179557848110156117415761173a6040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061396c565b9550611783565b6117836040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613e3d565b8061178d8161571f565b9150506116e8565b50848860050154146117a957600588018590555b5050505050505050505050565b6000546001600160a01b031633146117e15760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61180b614c35565b6005826001600160601b031681548110611827576118276156f3565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b81548152602001906001019080831161184e5750505050509050919050565b6000546001600160a01b031633146118985760405163c383977560e01b815260040160405180910390fd5b60095460ff166118bb5760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6118f982614375565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061197757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661196b600080516020615b4f8339815191525490565b6001600160a01b031614155b156119955760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119ef575060408051601f3d908101601f191682019092526119ec918101906158f5565b60015b611a175781604051630c76093760e01b8152600401611a0e9190614e74565b60405180910390fd5b600080516020615b4f8339815191528114611a4857604051632a87526960e21b815260048101829052602401611a0e565b600080516020615b4f8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611b11576000836001600160a01b031683604051611aaf9190615932565b600060405180830381855af49150503d8060008114611aea576040519150601f19603f3d011682016040523d82523d6000602084013e611aef565b606091505b5050905080610bd0576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b625760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615b4f83398151915290565b60078181548110611b8557600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611be757611be76156f3565b6000918252602082206003600490920201908101805491935090611c0d90600190615738565b81548110611c1d57611c1d6156f3565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611c5257611c526156f3565b90600052602060002090600c020190508060050154826003015410611cf15782546001600160601b031660001901611c93576001600160ff1b039350611d1e565b6003820154611ca3906002615869565b611cae9060016158e2565b81546005805490916001600160601b0316908110611cce57611cce6156f3565b90600052602060002090600c020160040154611cea9190615869565b9350611d1e565b6003820154611d01906002615869565b611d0c9060016158e2565b8160040154611d1b9190615869565b93505b505050919050565b6000546001600160a01b03163314611d515760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611d6c9190615932565b60006040518083038185875af1925050503d8060008114611da9576040519150601f19603f3d011682016040523d82523d6000602084013e611dae565b606091505b5050905080610bd0576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611df457604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611e24903390600401614e74565b602060405180830381865afa158015611e41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6591906158f5565b600003611e85576040516326b551e560e11b815260040160405180910390fd5b611b113383836000806143a3565b6000546001600160a01b03163314611ebe5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f3d5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611ff557506000546001600160a01b03163314155b1561201357604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561203757604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b0316331461209a5760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120b8576120b86156f3565b90600052602060002090600c0201905060016001600160601b0316886001600160601b03161415801561211a575080546005805488926001600160601b0316908110612106576121066156f3565b90600052602060002090600c020160020154115b1561213857604051639717078960e01b815260040160405180910390fd5b60005b60018201548110156121bd5786600583600101838154811061215f5761215f6156f3565b90600052602060002001548154811061217a5761217a6156f3565b90600052602060002090600c02016002015410156121ab57604051639717078960e01b815260040160405180910390fd5b806121b58161571f565b91505061213b565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556122009060068301908490614c53565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a8888888888886040516122449695949392919061594e565b60405180910390a25050505050505050565b6122bc60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106122cf576122cf6156f3565b906000526020600020906004020160030182815481106122f1576122f16156f3565b90600052602060002090600b020160405180610160016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682018054806020026020016040519081016040528092919081815260200182805480156123a057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612382575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106123f7576123f76156f3565b600091825260209091206004918202019150600182015460ff16600481111561242257612422615196565b1461244057604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff161561246b5760405163c977f8d360e01b815260040160405180910390fd5b600061247683611260565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561252957600080fd5b505af115801561253d573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125715760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b03168154811061258e5761258e6156f3565b90600052602060002090600c02016002015411156125bf57604051639717078960e01b815260040160405180910390fd5b80516000036125e15760405163402585f560e01b815260040160405180910390fd5b6001600160601b03891661260857604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156127065783818151811061265b5761265b6156f3565b60200260200101516000148061268e57506006548451859083908110612683576126836156f3565b602002602001015110155b156126ac57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106126c6576126c66156f3565b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080806126fe9061571f565b915050612640565b5060016000908152600a8201602052604090205460ff1661273a576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c161781556040805160008152602081019182905251612772916001840191614c91565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127b59060068301908790614c53565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916127e79186918991016159ad565b600060405180830381600087803b15801561280157600080fd5b505af1158015612815573d6000803e3d6000fd5b5050505060058b6001600160601b031681548110612835576128356156f3565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d906128a2908e908e908e908e908e908e908d906159c6565b60405180910390a35050505050505050505050565b600681815481106128c757600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106128f9576128f96156f3565b6000918252602090912060049091020190506003600182015460ff16600481111561292657612926615196565b0361297e576002810154815460058054929550916001600160601b03909116908110612954576129546156f3565b600091825260209091206009600c909202010154600282015461297791906158e2565b9150612987565b60009250600091505b50915091565b6000546001600160a01b031633146129b85760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006129e5826134d9565b341015612a0557604051630e3360f160e21b815260040160405180910390fd5b61115e838360003461455d565b6000546001600160a01b03163314612a3d5760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a6883611bd1565b341015612a8857604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612a9d57612a9d6156f3565b6000918252602090912060049091020190506003600182015460ff166004811115612aca57612aca615196565b14612ae8576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612afe90600190615738565b81548110612b0e57612b0e6156f3565b90600052602060002090600b020190506006816000015481548110612b3557612b356156f3565b6000918252602090912001546001600160a01b03163314612b695760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612bac57612bac6156f3565b90600052602060002090600c020160050154846003015410612cb5576005836001600160601b031681548110612be457612be46156f3565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612c1757612c176156f3565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c4357600191505b84546001600160601b03848116911614612cb557845460038601546001600160601b0390911690612c7690600190615738565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612cf857612cf86156f3565b90600052602060002090600c02019050806004015434612d189190615896565b826003018190555061271081600301548260020154612d379190615869565b612d419190615896565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d7891615738565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612db657600080fd5b505af1158015612dca573d6000803e3d6000fd5b505086548454149150612eb090505784546003870154612dec90600190615738565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e3a57612e3a6156f3565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612e7d918d918d918d9190600401615a43565b600060405180830381600087803b158015612e9757600080fd5b505af1158015612eab573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612f209190615768565b60405180910390a2505050505050505050565b60008060078381548110612f4957612f496156f3565b906000526020600020906004020190508060030160018260030180549050612f719190615738565b81548110612f8157612f816156f3565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612fc65760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b600060078381548110613059576130596156f3565b9060005260206000209060040201905060006001826003018054905061307f9190615738565b90506000826003018281548110613098576130986156f3565b600091825260208220600b909102019150600184015460ff1660048111156130c2576130c2615196565b146130e057604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106130f9576130f96156f3565b6000918252602082200154600a8401546001600160a01b039091169250905b868110801561312e575060038401546006850154105b156133365760006001600160a01b03841663d2b8035a8a8461314f8161571f565b955061315b90876158e2565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af115801561319e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c29190615a73565b90506001600160a01b0381166131d85750613118565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e9261320e928692909101615a90565b600060405180830381600087803b15801561322857600080fd5b505af115801561323c573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b91613289918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133305760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b15801561331757600080fd5b505af115801561332b573d6000803e3d6000fd5b505050505b50613118565b8084600a01600082825461334a91906158e2565b90915550505050505050505050565b600061339e826103f086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134d992505050565b949350505050565b6000546001600160a01b031633146133d15760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff1661342c5760405163e51cf7bf60e01b815260040160405180910390fd5b613437858585613359565b82101561345757604051630e3360f160e21b815260040160405180910390fd5b61346c6001600160a01b038416333085614599565b613489576040516312171d8360e31b815260040160405180910390fd5b6134cd8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925087915061455d9050565b90505b95945050505050565b60008060006134e784614675565b5091509150806005836001600160601b031681548110613509576135096156f3565b90600052602060002090600c02016004015461339e9190615869565b6004546001600160a01b0316331461355057604051639d6cab9960e01b815260040160405180910390fd5b61355e8484848460016143a3565b5050505050565b60006007828154811061357a5761357a6156f3565b600091825260209091206003600490920201015492915050565b6000546001600160a01b031633146135bf5760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b0316815481106135ff576135ff6156f3565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b031681548110613646576136466156f3565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c926137a3928791016159ad565b600060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b03191681556040805183815260208101909152909350915050805161383f916001840191602090910190614c91565b50805460ff60601b1916600160601b87151502178155845160028201556020850151600382015560408501516004808301919091556060860151600583015561388e9060068301908690614c53565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916138c1916001918891016159ad565b600060405180830381600087803b1580156138db57600080fd5b505af11580156138ef573d6000803e3d6000fd5b5050825487516020808a01516040808c015160608d0151825160008152948501928390526001600160601b039096169750600196507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d95613957958f959094938e91906159c6565b60405180910390a36117a96001806001613629565b6000806007836000015181548110613986576139866156f3565b906000526020600020906004020190506000816003018460200151815481106139b1576139b16156f3565b90600052602060002090600b02019050600060068260000154815481106139da576139da6156f3565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a8491906158f5565b9050612710811115613a9557506127105b6000612710613aa48382615738565b8560010154613ab39190615869565b613abd9190615896565b9050808760c001818151613ad191906158e2565b90525060e0870151600685018054600092908110613af157613af16156f3565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613b32918591879101615a90565b600060405180830381600087803b158015613b4c57600080fd5b505af1158015613b60573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c9250613b95918591879101615a90565b600060405180830381600087803b158015613baf57600080fd5b505af1158015613bc3573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e786613c0387615aa9565b60098b0154604051613c259392916000916001600160a01b0390911690615ac5565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613c8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cb0919061574b565b613d16576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e9991613ce391859101614e74565b600060405180830381600087803b158015613cfd57600080fd5b505af1158015613d11573d6000803e3d6000fd5b505050505b60018860600151613d279190615738565b8860e00151148015613d3b57506040880151155b15613e2c5760098501546001600160a01b0316613d84576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613dab565b60005460028601546009870154613da9926001600160a01b03918216929116906146fc565b505b60005460c0890151600254613dce926001600160a01b03918216929116906146fc565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613e2393909290916001600160a01b0390911690615ae9565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613e5657613e566156f3565b90600052602060002090600402019050600081600301836020015181548110613e8157613e816156f3565b90600052602060002090600b0201905060006006826000015481548110613eaa57613eaa6156f3565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ee991615b08565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f6d91906158f5565b9050612710811115613f7e57506127105b60008360060186606001518760e00151613f989190615b08565b81548110613fa857613fa86156f3565b600091825260208220015460018601546001600160a01b03909116925061271090613fd4908590615869565b613fde9190615896565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791614010918691869101615a90565b600060405180830381600087803b15801561402a57600080fd5b505af115801561403e573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f925061407191869101614e74565b602060405180830381865afa15801561408e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140b2919061574b565b6140cf576002546140cd906001600160a01b031683836146fc565b505b60006127108489604001518a60c001516140e99190615896565b6140f39190615869565b6140fd9190615896565b90508086600801600082825461411391906158e2565b925050819055506000612710858a6040015189600201546141349190615896565b61413e9190615869565b6141489190615896565b90508087600701600082825461415e91906158e2565b909155505060025461417a906001600160a01b031685846146fc565b5060098701546001600160a01b03166141b8576040516001600160a01b0385169082156108fc029083906000818181858888f19350505050506141d3565b60098701546141d1906001600160a01b031685836146fc565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e792614223928c928a928a9290911690615ac5565b60405180910390a460018960600151600261423e9190615869565b6142489190615738565b8960e001510361436a57600087600801548a60c001516142689190615738565b90506000886007015489600201546142809190615738565b90508115158061428f57508015155b156117a95781156142b9576000546002546142b7916001600160a01b039182169116846146fc565b505b80156143205760098901546001600160a01b03166142ff57600080546040516001600160a01b039091169183156108fc02918491818181858888f1935050505050614320565b60005460098a015461431e916001600160a01b039182169116836146fc565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf4916128a291879187916001600160a01b0390911690615ae9565b505050505050505050565b6000546001600160a01b031633146143a05760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b03851615806143c557506005546001600160601b038616115b156143dd576143d58260046147c9565b5060006134d0565b831580159061441857506005856001600160601b031681548110614403576144036156f3565b90600052602060002090600c02016002015484105b15614428576143d58260056147c9565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af115801561449b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144bf9190615b1c565b9194509250905060008160078111156144da576144da615196565b146144f5576144e985826147c9565b600093505050506134d0565b821561452257600254614513906001600160a01b03168a3086614599565b614522576144e98560016147c9565b811561454e5760025461453f906001600160a01b03168a846146fc565b61454e576144e98560026147c9565b50600198975050505050505050565b336000908152600a602052604081205460ff1661458d57604051630407618360e31b815260040160405180910390fd5b6134d085858585614837565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516145fe9190615932565b6000604051808303816000865af19150503d806000811461463b576040519150601f19603f3d011682016040523d82523d6000602084013e614640565b606091505b509150915081801561466a57508051158061466a57508080602001905181019061466a919061574b565b979650505050505050565b600080600060408451106146ea575050506020810151604082015160608301516001600160601b03831615806146b657506005546001600160601b03841610155b156146c057600192505b816000036146cd57600391505b8015806146dc57506006548110155b156146e5575060015b6146f5565b506001915060039050815b9193909250565b6000806000856001600160a01b0316858560405160240161471e929190615a90565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516147539190615932565b6000604051808303816000865af19150503d8060008114614790576040519150601f19603f3d011682016040523d82523d6000602084013e614795565b606091505b50915091508180156147bf5750805115806147bf5750808060200190518101906147bf919061574b565b9695505050505050565b6147d38282614b1e565b60068160078111156147e7576147e7615196565b0361480557604051636590e91560e01b815260040160405180910390fd5b600781600781111561481957614819615196565b03611b13576040516358859f1d60e01b815260040160405180910390fd5b600080600061484586614675565b92505091506005826001600160601b031681548110614866576148666156f3565b60009182526020808320848452600a600c90930201919091019052604090205460ff166148a65760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614931576149316156f3565b6000918252602082200154600580546001600160a01b039092169350906001600160601b038716908110614967576149676156f3565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a16156149b2576149ad8a846004015461110d565b6149b8565b82600401545b90506149c4818a615896565b6003808401919091558683558301546002840154612710916149e591615869565b6149ef9190615896565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b158015614a6257600080fd5b505af1158015614a76573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b8152600401614ab09493929190615a43565b600060405180830381600087803b158015614aca57600080fd5b505af1158015614ade573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6001826001811115614b3257614b32615196565b03614b3b575050565b6001816007811115614b4f57614b4f615196565b03614b6d57604051630f323ed960e11b815260040160405180910390fd5b6002816007811115614b8157614b81615196565b03614b9f5760405163e45e13a360e01b815260040160405180910390fd5b6003816007811115614bb357614bb3615196565b03614bd157604051631d91d0ed60e31b815260040160405180910390fd5b6004816007811115614be557614be5615196565b03614c03576040516321f1774b60e11b815260040160405180910390fd5b6005816007811115614c1757614c17615196565b03611b1357604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b8260048101928215614c81579160200282015b82811115614c81578251825591602001919060010190614c66565b50614c8d929150614ccb565b5090565b828054828255906000526020600020908101928215614c815791602002820182811115614c81578251825591602001919060010190614c66565b5b80821115614c8d5760008155600101614ccc565b6001600160a01b03811681146143a057600080fd5b8035614d0081614ce0565b919050565b600060208284031215614d1757600080fd5b8135614d2281614ce0565b9392505050565b80356001600160601b0381168114614d0057600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d7e57614d7e614d40565b604052919050565b600082601f830112614d9757600080fd5b813560206001600160401b03821115614db257614db2614d40565b8160051b614dc1828201614d56565b9283528481018201928281019087851115614ddb57600080fd5b83870192505b8483101561466a57823582529183019190830190614de1565b80151581146143a057600080fd5b8035614d0081614dfa565b600080600060608486031215614e2857600080fd5b614e3184614d29565b925060208401356001600160401b03811115614e4c57600080fd5b614e5886828701614d86565b9250506040840135614e6981614dfa565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614e9a57600080fd5b5035919050565b60008060408385031215614eb457600080fd5b8235614ebf81614ce0565b946020939093013593505050565b60008060408385031215614ee057600080fd5b8235614eeb81614ce0565b91506020830135614efb81614dfa565b809150509250929050565b600082601f830112614f1757600080fd5b604051608081018181106001600160401b0382111715614f3957614f39614d40565b604052806080840185811115614f4e57600080fd5b845b81811015614f68578035835260209283019201614f50565b509195945050505050565b600082601f830112614f8457600080fd5b81356001600160401b03811115614f9d57614f9d614d40565b614fb0601f8201601f1916602001614d56565b818152846020838601011115614fc557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e03121561500457600080fd5b8b3561500f81614ce0565b9a5060208c013561501f81614ce0565b995061502d60408d01614cf5565b985061503b60608d01614cf5565b975061504960808d01614cf5565b965061505760a08d01614e08565b95506150668d60c08e01614f06565b94506150768d6101408e01614f06565b93506101c08c01356001600160401b0381111561509257600080fd5b61509e8e828f01614f73565b9350506150ae6101e08d01614cf5565b91506150bd6102008d01614cf5565b90509295989b509295989b9093969950565b6000806000606084860312156150e457600080fd5b505081359360208301359350604090920135919050565b60006020828403121561510d57600080fd5b61115e82614d29565b8060005b6004811015610bd057815184526020938401939091019060010161511a565b608081016111618284615116565b6000806040838503121561515a57600080fd5b823561516581614ce0565b915060208301356001600160401b0381111561518057600080fd5b61518c85828601614f73565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b600581106151ca57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016151fa60408301866151ac565b9215156060820152608001529392505050565b60008060006060848603121561522257600080fd5b833561522d81614ce0565b92506020840135915060408401356001600160401b0381111561524f57600080fd5b61525b86828701614f73565b9150509250925092565b6000806040838503121561527857600080fd5b614ebf83614d29565b60008060006060848603121561529657600080fd5b83356152a181614ce0565b925060208401356001600160401b03811681146152bd57600080fd5b9150604084013560ff81168114614e6957600080fd5b6000806000806000806000610140888a0312156152ef57600080fd5b6152f888614d29565b9650602088013561530881614dfa565b955060408801359450606088013593506080880135925060a088013591506153338960c08a01614f06565b905092959891949750929550565b6000806040838503121561535457600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561539c5781516001600160a01b031687529582019590820190600101615377565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e0850152615402610180850183615363565b60e0860151610100868101919091528601516101208087019190915286015190925061014061543b818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561546b57600080fd5b6154748a614d29565b985060208a013561548481614dfa565b975060408a0135965060608a0135955060808a0135945060a08a013593506154af8b60c08c01614f06565b92506101408a01356001600160401b03808211156154cc57600080fd5b6154d88d838e01614f73565b93506101608c01359150808211156154ef57600080fd5b506154fc8c828d01614d86565b9150509295985092959850929598565b6000806040838503121561551f57600080fd5b8235915060208301356001600160401b0381111561518057600080fd5b60008060006060848603121561555157600080fd5b833592506020840135915060408401356001600160401b0381111561524f57600080fd5b60008083601f84011261558757600080fd5b5081356001600160401b0381111561559e57600080fd5b6020830191508360208285010111156155b657600080fd5b9250929050565b6000806000604084860312156155d257600080fd5b83356001600160401b038111156155e857600080fd5b6155f486828701615575565b9094509250506020840135614e6981614ce0565b60008060008060006080868803121561562057600080fd5b8535945060208601356001600160401b0381111561563d57600080fd5b61564988828901615575565b909550935050604086013561565d81614ce0565b949793965091946060013592915050565b60006020828403121561568057600080fd5b81356001600160401b0381111561569657600080fd5b61339e84828501614f73565b600080600080608085870312156156b857600080fd5b84356156c381614ce0565b93506156d160208601614d29565b92506040850135915060608501356156e881614dfa565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161573157615731615709565b5060010190565b8181038181111561116157611161615709565b60006020828403121561575d57600080fd5b8151614d2281614dfa565b6020810161116182846151ac565b600181815b808511156157b157816000190482111561579757615797615709565b808516156157a457918102915b93841c939080029061577b565b509250929050565b6000826157c857506001611161565b816157d557506000611161565b81600181146157eb57600281146157f557615811565b6001915050611161565b60ff84111561580657615806615709565b50506001821b611161565b5060208310610133831016604e8410600b8410161715615834575081810a611161565b61583e8383615776565b806000190482111561585257615852615709565b029392505050565b600061115e60ff8416836157b9565b808202811582820484141761116157611161615709565b634e487b7160e01b600052601260045260246000fd5b6000826158a5576158a5615880565b500490565b6000806000606084860312156158bf57600080fd5b8351925060208401516158d181614dfa565b6040850151909250614e6981614dfa565b8082018082111561116157611161615709565b60006020828403121561590757600080fd5b5051919050565b60005b83811015615929578181015183820152602001615911565b50506000910152565b6000825161594481846020870161590e565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261466a60a0830184615116565b6000815180845261599981602086016020860161590e565b601f01601f19169290920160200192915050565b82815260406020820152600061339e6040830184615981565b60006101408083018a1515845260208a818601528960408601528860608601528760808601526159f960a0860188615116565b6101208501929092528451908190526101608401918086019160005b81811015615a3157835185529382019392820192600101615a15565b50929c9b505050505050505050505050565b848152836020820152608060408201526000615a626080830185615981565b905082606083015295945050505050565b600060208284031215615a8557600080fd5b8151614d2281614ce0565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b8201615abe57615abe615709565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615b1757615b17615880565b500690565b600080600060608486031215615b3157600080fd5b8351925060208401519150604084015160088110614e6957600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212201f0b9f849845b8b65a615034f5f999cef3db03f8c4028737a0791e145cb079e964736f6c63430008120033", + "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\":\"AppealFeesNotEnough\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AppealPeriodNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitrableNotWhitelisted\",\"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\":\"GuardianOrGovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDisputKitParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidForkingCourtAsParent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MinStakeLowerThanParentCourt\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSupportDisputeKitClassic\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEligibleForStaking\",\"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\":\"StakingMoreThanMaxStakePerJuror\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StakingMoreThanMaxTotalStaked\",\"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\":\"WhenNotPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WhenPausedOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongDisputeKitIndex\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_accepted\",\"type\":\"bool\"}],\"name\":\"AcceptedFeeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealDecision\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"AppealPossible\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"CourtCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_fromCourtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"_toCourtID\",\"type\":\"uint96\"}],\"name\":\"CourtJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"CourtModified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"}],\"name\":\"DisputeCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"DisputeKitCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"DisputeKitEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromDisputeKitID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toDisputeKitID\",\"type\":\"uint256\"}],\"name\":\"DisputeKitJump\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_voteID\",\"type\":\"uint256\"}],\"name\":\"Draw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_pnkAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"LeftoverRewardSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"NewCurrencyRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"_period\",\"type\":\"uint8\"}],\"name\":\"NewPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrableV2\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_roundID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_degreeOfCoherency\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_pnkAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_feeAmount\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"TokenAndETHShift\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKitAddress\",\"type\":\"address\"}],\"name\":\"addNewDisputeKit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"appeal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"appealPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"arbitrableWhitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"address\",\"name\":\"_arbitrable\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"changeArbitrableWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"}],\"name\":\"changeCourtParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"_rateDecimals\",\"type\":\"uint8\"}],\"name\":\"changeCurrencyRates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"}],\"name\":\"changeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"_jurorNft\",\"type\":\"address\"}],\"name\":\"changeJurorNft\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"}],\"name\":\"changeJurorProsecutionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"}],\"name\":\"changePinakion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModule\",\"type\":\"address\"}],\"name\":\"changeSortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountInEth\",\"type\":\"uint256\"}],\"name\":\"convertEthToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"courts\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"disabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_parent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_alpha\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_feeForJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_jurorsForCourtJump\",\"type\":\"uint256\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_supportedDisputeKits\",\"type\":\"uint256[]\"}],\"name\":\"createCourt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numberOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"},{\"internalType\":\"contract IERC20\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeAmount\",\"type\":\"uint256\"}],\"name\":\"createDispute\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"currencyRates\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"feePaymentAccepted\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"rateInEth\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"rateDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"currentRuling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tied\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"overridden\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeKits\",\"outputs\":[{\"internalType\":\"contract IDisputeKit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"contract IArbitrableV2\",\"name\":\"arbitrated\",\"type\":\"address\"},{\"internalType\":\"enum KlerosCoreBase.Period\",\"name\":\"period\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"ruled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"lastPeriodChange\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256[]\",\"name\":\"_disputeKitIDs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableDisputeKits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeGovernorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"executeRuling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDisputeKitsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"disputeKitID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkAtStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesForJurors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"repartitions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkPenalties\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"drawnJurors\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"sumFeeRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumPnkRewardPaid\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"drawIterations\",\"type\":\"uint256\"}],\"internalType\":\"struct KlerosCoreBase.Round\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getTimesPerPeriod\",\"outputs\":[{\"internalType\":\"uint256[4]\",\"name\":\"timesPerPeriod\",\"type\":\"uint256[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"_pinakion\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jurorProsecutionModule\",\"type\":\"address\"},{\"internalType\":\"contract IDisputeKit\",\"name\":\"_disputeKit\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_hiddenVotes\",\"type\":\"bool\"},{\"internalType\":\"uint256[4]\",\"name\":\"_courtParameters\",\"type\":\"uint256[4]\"},{\"internalType\":\"uint256[4]\",\"name\":\"_timesPerPeriod\",\"type\":\"uint256[4]\"},{\"internalType\":\"bytes\",\"name\":\"_sortitionExtraData\",\"type\":\"bytes\"},{\"internalType\":\"contract ISortitionModule\",\"name\":\"_sortitionModuleAddress\",\"type\":\"address\"},{\"internalType\":\"contract IERC721\",\"name\":\"_jurorNft\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"isDisputeKitJumping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_disputeKitID\",\"type\":\"uint256\"}],\"name\":\"isSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorNft\",\"outputs\":[{\"internalType\":\"contract IERC721\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"jurorProsecutionModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"passPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pinakion\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"}],\"name\":\"setStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStakeBySortitionModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionModule\",\"outputs\":[{\"internalType\":\"contract ISortitionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"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.\"}},\"changeArbitrableWhitelist(address,bool)\":{\"details\":\"Adds or removes an arbitrable from whitelist.\",\"params\":{\"_allowed\":\"Whether add or remove permission.\",\"_arbitrable\":\"Arbitrable address.\"}},\"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.\"}},\"changeGuardian(address)\":{\"details\":\"Changes the `guardian` storage variable.\",\"params\":{\"_guardian\":\"The new value for the `guardian` storage variable.\"}},\"changeJurorNft(address)\":{\"details\":\"Changes the `jurorNft` storage variable.\",\"params\":{\"_jurorNft\":\"The new value for the `jurorNft` 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],bytes,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.\",\"_sortitionExtraData\":\"Extra data for sortition module.\",\"_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,uint256)\":{\"details\":\"Draws jurors for the dispute. Can be called in parts.\",\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_iterations\":\"The number of iterations to run.\"}},\"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. Note: Reward distributions are forbidden during pause.\",\"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],bytes,address,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.\",\"_guardian\":\"The guardian's address.\",\"_hiddenVotes\":\"The `hiddenVotes` property value of the general court.\",\"_jurorNft\":\"NFT contract to vet the jurors.\",\"_jurorProsecutionModule\":\"The address of the juror prosecution module.\",\"_pinakion\":\"The address of the token contract.\",\"_sortitionExtraData\":\"The extra data for sortition module.\",\"_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.\"}},\"pause()\":{\"details\":\"Pause staking and reward execution. Can only be done by guardian or governor.\"},\"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. Note: Staking and unstaking is forbidden during pause.\",\"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.\"}},\"unpause()\":{\"details\":\"Unpause staking and reward execution. Can only be done by governor.\"},\"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\":\"KlerosCoreNeo Core arbitrator contract for Kleros v2. Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.\",\"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/KlerosCoreNeo.sol\":\"KlerosCoreNeo\"},\"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\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x5dc63d1c6a12fe1b17793e1745877b2fcbe1964c3edfd0a482fac21ca8f18261\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\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\":\"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8\",\"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/KlerosCoreNeo.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\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\n/// @title KlerosCoreNeo\\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 KlerosCoreNeo is KlerosCoreBase, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n mapping(address => bool) public arbitrableWhitelist; // Arbitrable whitelist.\\n IERC721 public jurorNft; // Eligible jurors NFT.\\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 _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 _jurorNft NFT contract to vet 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 IERC721 _jurorNft\\n ) external reinitializer(2) {\\n super._initialize(\\n _governor,\\n _guardian,\\n _pinakion,\\n _jurorProsecutionModule,\\n _disputeKit,\\n _hiddenVotes,\\n _courtParameters,\\n _timesPerPeriod,\\n _sortitionExtraData,\\n _sortitionModuleAddress\\n );\\n jurorNft = _jurorNft;\\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 Changes the `jurorNft` storage variable.\\n /// @param _jurorNft The new value for the `jurorNft` storage variable.\\n function changeJurorNft(IERC721 _jurorNft) external onlyByGovernor {\\n jurorNft = _jurorNft;\\n }\\n\\n /// @dev 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 onlyByGovernor {\\n arbitrableWhitelist[_arbitrable] = _allowed;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the caller's stake in a court.\\n /// Note: Staking and unstaking is forbidden during pause.\\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 override whenNotPaused {\\n if (jurorNft.balanceOf(msg.sender) == 0) revert NotEligibleForStaking();\\n super._setStake(msg.sender, _courtID, _newStake, false, OnError.Revert);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n function _createDispute(\\n uint256 _numberOfChoices,\\n bytes memory _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) internal override returns (uint256 disputeID) {\\n if (!arbitrableWhitelist[msg.sender]) revert ArbitrableNotWhitelisted();\\n return super._createDispute(_numberOfChoices, _extraData, _feeToken, _feeAmount);\\n }\\n\\n function _stakingFailed(OnError _onError, StakingResult _result) internal pure override {\\n super._stakingFailed(_onError, _result);\\n if (_result == StakingResult.CannotStakeMoreThanMaxStakePerJuror) revert StakingMoreThanMaxStakePerJuror();\\n if (_result == StakingResult.CannotStakeMoreThanMaxTotalStaked) revert StakingMoreThanMaxTotalStaked();\\n }\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error NotEligibleForStaking();\\n error StakingMoreThanMaxStakePerJuror();\\n error StakingMoreThanMaxTotalStaked();\\n error ArbitrableNotWhitelisted();\\n}\\n\",\"keccak256\":\"0xe573d3a38f7193b6f5fca2285dbdbeedc414db1f876cacc9fddabc44368569df\",\"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": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051615b7a62000103600039600081816118f0015281816119190152611b100152615b7a6000f3fe6080604052600436106102c95760003560e01c806382d022371161017b578063c71f4253116100d7578063f6506db411610085578063f6506db414610968578063f7434ea914610988578063fbb519e7146109a8578063fbf405b0146109c8578063fc6f8f16146109e8578063fe4037e614610a08578063fe524c3914610a2857600080fd5b8063c71f425314610893578063cf0c38f8146108b3578063d07368bd146108d3578063d2b8035a146108f3578063d4d1d76a14610913578063d98493f614610928578063e4c0aaf41461094857600080fd5b8063acdbf51d11610134578063acdbf51d146107a8578063afe15cfb146107c8578063b0049637146107fd578063b44d573c1461081d578063c13517e11461084d578063c258bb1914610860578063c35699021461088057600080fd5b806382d02237146106e65780638456cb591461070657806386541b241461071b5780638a9bb02a1461073b5780638bb0487514610768578063a072b86c1461078857600080fd5b80632e2e936a1161022a57806352d1902d116101e357806352d1902d14610606578063564a565d1461061b57806359ec827e1461064c5780635c975abb1461066c578063751accd0146106865780637717a6e8146106a65780637934c0be146106c657600080fd5b80632e2e936a146105515780632fcb4f04146105715780633cfd1184146105915780633f4ba83a146105be578063452a9320146105d35780634f1ef286146105f357600080fd5b806319b815291161028757806319b81529146104035780631c3db16d146104335780631d7e6892146104705780631f5a0dd2146104905780632c053739146104f15780632d29a47b146105115780632e1daf2f1461053157600080fd5b8062f5822c146102ce5780630219da79146102f05780630b7414bc146103685780630c340a2414610388578063115d5376146103b55780631860592b146103d5575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004614cd8565b610a48565b005b3480156102fc57600080fd5b5061033b61030b366004614cd8565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037457600080fd5b506102ee610383366004614de6565b610a95565b34801561039457600080fd5b506000546103a8906001600160a01b031681565b60405161035f9190614e47565b3480156103c157600080fd5b506102ee6103d0366004614e5b565b610bcc565b3480156103e157600080fd5b506103f56103f0366004614e74565b611103565b60405190815260200161035f565b34801561040f57600080fd5b5061042361041e366004614e5b565b61115d565b604051901515815260200161035f565b34801561043f57600080fd5b5061045361044e366004614e5b565b611256565b60408051938452911515602084015215159082015260600161035f565b34801561047c57600080fd5b506102ee61048b366004614ea0565b611357565b34801561049c57600080fd5b506104b06104ab366004614e5b565b6113ad565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161035f565b3480156104fd57600080fd5b506102ee61050c366004614fb5565b61140c565b34801561051d57600080fd5b506102ee61052c3660046150a2565b611516565b34801561053d57600080fd5b506004546103a8906001600160a01b031681565b34801561055d57600080fd5b50600b546103a8906001600160a01b031681565b34801561057d57600080fd5b506102ee61058c366004614cd8565b6117a2565b34801561059d57600080fd5b506105b16105ac3660046150ce565b6117ef565b60405161035f919061510c565b3480156105ca57600080fd5b506102ee611859565b3480156105df57600080fd5b506001546103a8906001600160a01b031681565b6102ee61060136600461511a565b6118dc565b34801561061257600080fd5b506103f5611b03565b34801561062757600080fd5b5061063b610636366004614e5b565b611b61565b60405161035f9594939291906151a1565b34801561065857600080fd5b506103f5610667366004614e5b565b611bbd565b34801561067857600080fd5b506009546104239060ff1681565b34801561069257600080fd5b506102ee6106a13660046151e0565b611d12565b3480156106b257600080fd5b506102ee6106c1366004615238565b611dbc565b3480156106d257600080fd5b506102ee6106e1366004614ea0565b611e7f565b3480156106f257600080fd5b506102ee610701366004615254565b611efe565b34801561071257600080fd5b506102ee611fbb565b34801561072757600080fd5b506102ee6107363660046152a6565b61205b565b34801561074757600080fd5b5061075b610756366004615314565b612238565b60405161035f919061537b565b34801561077457600080fd5b506102ee610783366004614e5b565b6123c4565b34801561079457600080fd5b506102ee6107a3366004615420565b612528565b3480156107b457600080fd5b506103a86107c3366004614e5b565b61288a565b3480156107d457600080fd5b506107e86107e3366004614e5b565b6128b4565b6040805192835260208301919091520161035f565b34801561080957600080fd5b506102ee610818366004614cd8565b612960565b34801561082957600080fd5b50610423610838366004614cd8565b600a6020526000908152604090205460ff1681565b6103f561085b3660046154e0565b6129ad565b34801561086c57600080fd5b506102ee61087b366004614cd8565b6129e5565b6102ee61088e366004615510565b612a32565b34801561089f57600080fd5b506103f56108ae366004614e5b565b612f06565b3480156108bf57600080fd5b506003546103a8906001600160a01b031681565b3480156108df57600080fd5b506102ee6108ee366004614cd8565b612f6e565b3480156108ff57600080fd5b506102ee61090e366004615314565b613017565b34801561091f57600080fd5b506006546103f5565b34801561093457600080fd5b506103f5610943366004615591565b61332c565b34801561095457600080fd5b506102ee610963366004614cd8565b613379565b34801561097457600080fd5b506103f56109833660046155dc565b6133c6565b34801561099457600080fd5b506103f56109a3366004615642565b6134ac565b3480156109b457600080fd5b506102ee6109c3366004615676565b6134f8565b3480156109d457600080fd5b506002546103a8906001600160a01b031681565b3480156109f457600080fd5b506103f5610a03366004614e5b565b613538565b348015610a1457600080fd5b506102ee610a23366004614cd8565b613567565b348015610a3457600080fd5b50610423610a43366004615238565b6135b4565b6000546001600160a01b03163314610a735760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610ac05760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bc6578115610b5f57828181518110610ae457610ae46156c7565b602002602001015160001480610b1757506006548351849083908110610b0c57610b0c6156c7565b602002602001015110155b15610b3557604051633d58a98960e11b815260040160405180910390fd5b610b5a84848381518110610b4b57610b4b6156c7565b602002602001015160016135fc565b610bbe565b6001838281518110610b7357610b736156c7565b602002602001015103610b99576040516356d111fd60e11b815260040160405180910390fd5b610bbe84848381518110610baf57610baf6156c7565b602002602001015160006135fc565b600101610ac3565b50505050565b600060078281548110610be157610be16156c7565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c1457610c146156c7565b6000918252602082206003850154600c909202019250610c36906001906156f3565b90506000836003018281548110610c4f57610c4f6156c7565b600091825260208220600b909102019150600185015460ff166004811115610c7957610c79615169565b03610d545781158015610cc857506001840154600684019060ff166004811115610ca557610ca5615169565b60048110610cb557610cb56156c7565b01546002850154610cc690426156f3565b105b15610ce657604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d0e576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d25576002610d28565b60015b60018086018054909160ff1990911690836004811115610d4a57610d4a615169565b02179055506110b5565b60018085015460ff166004811115610d6e57610d6e615169565b03610e7e576001840154600684019060ff166004811115610d9157610d91615169565b60048110610da157610da16156c7565b01546002850154610db290426156f3565b108015610e4957506006816000015481548110610dd157610dd16156c7565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190615706565b155b15610e6757604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610d4a565b6002600185015460ff166004811115610e9957610e99615169565b03610fe7576001840154600684019060ff166004811115610ebc57610ebc615169565b60048110610ecc57610ecc6156c7565b01546002850154610edd90426156f3565b108015610f7457506006816000015481548110610efc57610efc6156c7565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f729190615706565b155b15610f9257604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36110b5565b6003600185015460ff16600481111561100257611002615169565b0361107c576001840154600684019060ff16600481111561102557611025615169565b60048110611035576110356156c7565b0154600285015461104690426156f3565b101561106557604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610d4a565b6004600185015460ff16600481111561109757611097615169565b036110b5576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110f49160ff1690615723565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061114090600160481b900460ff16600a615815565b61114a9084615824565b6111549190615851565b90505b92915050565b60008060078381548110611173576111736156c7565b6000918252602082206003600490920201908101805491935090611199906001906156f3565b815481106111a9576111a96156c7565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106111de576111de6156c7565b90600052602060002090600c0201905080600501548260030154101561120957506000949350505050565b80546005805490916001600160601b0316908110611229576112296156c7565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061126f5761126f6156c7565b6000918252602082206003600490920201908101805491935090611295906001906156f3565b815481106112a5576112a56156c7565b90600052602060002090600b02019050600060068260000154815481106112ce576112ce6156c7565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611323573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113479190615865565b9199909850909650945050505050565b6000546001600160a01b031633146113825760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b600581815481106113bd57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680611455575080546001600160401b03808416911610155b156114725760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556114a58d8d8d8d8d8d8d8d8d8d613684565b600b80546001600160a01b0319166001600160a01b038516179055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff161561153a57604051636f1dac1d60e01b815260040160405180910390fd5b60008060078581548110611550576115506156c7565b600091825260209091206004918202019150600182015460ff16600481111561157b5761157b615169565b1461159957604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106115ae576115ae6156c7565b6000918252602082206004600b909202019081015490935091506115d2848361589d565b60058401546006850154600286015492935090916000906115f4908390615851565b90506000866001015490506000806006896000015481548110611619576116196156c7565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611675573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169991906158b0565b915050806000036116b557838611156116b0578395505b6116d5565b6116c0846002615824565b8611156116d5576116d2846002615824565b95505b60048801869055865b868110156117815784811015611737576117306040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061393f565b9550611779565b6117796040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613e10565b6001016116de565b508488600501541461179557600588018590555b5050505050505050505050565b6000546001600160a01b031633146117cd5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6117f7614c08565b6005826001600160601b031681548110611813576118136156c7565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b81548152602001906001019080831161183a5750505050509050919050565b6000546001600160a01b031633146118845760405163c383977560e01b815260040160405180910390fd5b60095460ff166118a75760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6118e582614348565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061196357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611957600080516020615b258339815191525490565b6001600160a01b031614155b156119815760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119db575060408051601f3d908101601f191682019092526119d8918101906158b0565b60015b611a035781604051630c76093760e01b81526004016119fa9190614e47565b60405180910390fd5b600080516020615b258339815191528114611a3457604051632a87526960e21b8152600481018290526024016119fa565b600080516020615b258339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611afd576000836001600160a01b031683604051611a9b91906158ed565b600060405180830381855af49150503d8060008114611ad6576040519150601f19603f3d011682016040523d82523d6000602084013e611adb565b606091505b5050905080610bc6576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b4e5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615b2583398151915290565b60078181548110611b7157600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611bd357611bd36156c7565b6000918252602082206003600490920201908101805491935090611bf9906001906156f3565b81548110611c0957611c096156c7565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611c3e57611c3e6156c7565b90600052602060002090600c020190508060050154826003015410611cdd5782546001600160601b031660001901611c7f576001600160ff1b039350611d0a565b6003820154611c8f906002615824565b611c9a90600161589d565b81546005805490916001600160601b0316908110611cba57611cba6156c7565b90600052602060002090600c020160040154611cd69190615824565b9350611d0a565b6003820154611ced906002615824565b611cf890600161589d565b8160040154611d079190615824565b93505b505050919050565b6000546001600160a01b03163314611d3d5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611d5891906158ed565b60006040518083038185875af1925050503d8060008114611d95576040519150601f19603f3d011682016040523d82523d6000602084013e611d9a565b606091505b5050905080610bc6576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611de057604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611e10903390600401614e47565b602060405180830381865afa158015611e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5191906158b0565b600003611e71576040516326b551e560e11b815260040160405180910390fd5b611afd338383600080614376565b6000546001600160a01b03163314611eaa5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f295760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611fe157506000546001600160a01b03163314155b15611fff57604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561202357604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120865760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120a4576120a46156c7565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612106575080546005805488926001600160601b03169081106120f2576120f26156c7565b90600052602060002090600c020160020154115b1561212457604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561219f5786600583600101838154811061214b5761214b6156c7565b906000526020600020015481548110612166576121666156c7565b90600052602060002090600c020160020154101561219757604051639717078960e01b815260040160405180910390fd5b600101612127565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556121e29060068301908490614c26565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161222696959493929190615909565b60405180910390a25050505050505050565b61229e60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106122b1576122b16156c7565b906000526020600020906004020160030182815481106122d3576122d36156c7565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561238257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612364575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106123d9576123d96156c7565b600091825260209091206004918202019150600182015460ff16600481111561240457612404615169565b1461242257604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff161561244d5760405163c977f8d360e01b815260040160405180910390fd5b600061245883611256565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561250b57600080fd5b505af115801561251f573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125535760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b031681548110612570576125706156c7565b90600052602060002090600c02016002015411156125a157604051639717078960e01b815260040160405180910390fd5b80516000036125c35760405163402585f560e01b815260040160405180910390fd5b6001600160601b0389166125ea57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156126d95783818151811061263d5761263d6156c7565b60200260200101516000148061267057506006548451859083908110612665576126656156c7565b602002602001015110155b1561268e57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106126a8576126a86156c7565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612622565b5060016000908152600a8201602052604090205460ff1661270d576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c161781556040805160008152602081019182905251612745916001840191614c64565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127889060068301908790614c26565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916127ba918691899101615968565b600060405180830381600087803b1580156127d457600080fd5b505af11580156127e8573d6000803e3d6000fd5b5050505060058b6001600160601b031681548110612808576128086156c7565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612875908e908e908e908e908e908e908d90615981565b60405180910390a35050505050505050505050565b6006818154811061289a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106128cc576128cc6156c7565b6000918252602090912060049091020190506003600182015460ff1660048111156128f9576128f9615169565b03612951576002810154815460058054929550916001600160601b03909116908110612927576129276156c7565b600091825260209091206009600c909202010154600282015461294a919061589d565b915061295a565b60009250600091505b50915091565b6000546001600160a01b0316331461298b5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006129b8826134ac565b3410156129d857604051630e3360f160e21b815260040160405180910390fd5b6111548383600034614530565b6000546001600160a01b03163314612a105760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a3b83611bbd565b341015612a5b57604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612a7057612a706156c7565b6000918252602090912060049091020190506003600182015460ff166004811115612a9d57612a9d615169565b14612abb576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612ad1906001906156f3565b81548110612ae157612ae16156c7565b90600052602060002090600b020190506006816000015481548110612b0857612b086156c7565b6000918252602090912001546001600160a01b03163314612b3c5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612b7f57612b7f6156c7565b90600052602060002090600c020160050154846003015410612c88576005836001600160601b031681548110612bb757612bb76156c7565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612bea57612bea6156c7565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c1657600191505b84546001600160601b03848116911614612c8857845460038601546001600160601b0390911690612c49906001906156f3565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612ccb57612ccb6156c7565b90600052602060002090600c02019050806004015434612ceb9190615851565b826003018190555061271081600301548260020154612d0a9190615824565b612d149190615851565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d4b916156f3565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612d8957600080fd5b505af1158015612d9d573d6000803e3d6000fd5b505086548454149150612e8390505784546003870154612dbf906001906156f3565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e0d57612e0d6156c7565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612e50918d918d918d9190600401615a00565b600060405180830381600087803b158015612e6a57600080fd5b505af1158015612e7e573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612ef39190615723565b60405180910390a2505050505050505050565b60008060078381548110612f1c57612f1c6156c7565b906000526020600020906004020190508060030160018260030180549050612f4491906156f3565b81548110612f5457612f546156c7565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612f995760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b60006007838154811061302c5761302c6156c7565b9060005260206000209060040201905060006001826003018054905061305291906156f3565b9050600082600301828154811061306b5761306b6156c7565b600091825260208220600b909102019150600184015460ff16600481111561309557613095615169565b146130b357604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106130cc576130cc6156c7565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015613101575060038401546006850154105b156133095760006001600160a01b03841663d2b8035a8a8461312281615a30565b955061312e908761589d565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015613171573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131959190615a49565b90506001600160a01b0381166131ab57506130eb565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926131e1928692909101615a66565b600060405180830381600087803b1580156131fb57600080fd5b505af115801561320f573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b9161325c918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133035760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b1580156132ea57600080fd5b505af11580156132fe573d6000803e3d6000fd5b505050505b506130eb565b8084600a01600082825461331d919061589d565b90915550505050505050505050565b6000613371826103f086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134ac92505050565b949350505050565b6000546001600160a01b031633146133a45760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133ff5760405163e51cf7bf60e01b815260040160405180910390fd5b61340a85858561332c565b82101561342a57604051630e3360f160e21b815260040160405180910390fd5b61343f6001600160a01b03841633308561456c565b61345c576040516312171d8360e31b815260040160405180910390fd5b6134a08686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506145309050565b90505b95945050505050565b60008060006134ba84614648565b5091509150806005836001600160601b0316815481106134dc576134dc6156c7565b90600052602060002090600c0201600401546133719190615824565b6004546001600160a01b0316331461352357604051639d6cab9960e01b815260040160405180910390fd5b613531848484846001614376565b5050505050565b60006007828154811061354d5761354d6156c7565b600091825260209091206003600490920201015492915050565b6000546001600160a01b031633146135925760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b0316815481106135d2576135d26156c7565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b031681548110613619576136196156c7565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261377692879101615968565b600060405180830381600087803b15801561379057600080fd5b505af11580156137a4573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b031916815560408051838152602081019091529093509150508051613812916001840191602090910190614c64565b50805460ff60601b1916600160601b8715150217815584516002820155602085015160038201556040850151600480830191909155606086015160058301556138619060068301908690614c26565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161389491600191889101615968565b600060405180830381600087803b1580156138ae57600080fd5b505af11580156138c2573d6000803e3d6000fd5b5050825487516020808a01516040808c015160608d0151825160008152948501928390526001600160601b039096169750600196507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d9561392a958f959094938e9190615981565b60405180910390a361179560018060016135fc565b6000806007836000015181548110613959576139596156c7565b90600052602060002090600402019050600081600301846020015181548110613984576139846156c7565b90600052602060002090600b02019050600060068260000154815481106139ad576139ad6156c7565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a5791906158b0565b9050612710811115613a6857506127105b6000612710613a7783826156f3565b8560010154613a869190615824565b613a909190615851565b9050808760c001818151613aa4919061589d565b90525060e0870151600685018054600092908110613ac457613ac46156c7565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613b05918591879101615a66565b600060405180830381600087803b158015613b1f57600080fd5b505af1158015613b33573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c9250613b68918591879101615a66565b600060405180830381600087803b158015613b8257600080fd5b505af1158015613b96573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e786613bd687615a7f565b60098b0154604051613bf89392916000916001600160a01b0390911690615a9b565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c839190615706565b613ce9576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e9991613cb691859101614e47565b600060405180830381600087803b158015613cd057600080fd5b505af1158015613ce4573d6000803e3d6000fd5b505050505b60018860600151613cfa91906156f3565b8860e00151148015613d0e57506040880151155b15613dff5760098501546001600160a01b0316613d57576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613d7e565b60005460028601546009870154613d7c926001600160a01b03918216929116906146cf565b505b60005460c0890151600254613da1926001600160a01b03918216929116906146cf565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613df693909290916001600160a01b0390911690615abf565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613e2957613e296156c7565b90600052602060002090600402019050600081600301836020015181548110613e5457613e546156c7565b90600052602060002090600b0201905060006006826000015481548110613e7d57613e7d6156c7565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ebc91615ade565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613f1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f4091906158b0565b9050612710811115613f5157506127105b60008360060186606001518760e00151613f6b9190615ade565b81548110613f7b57613f7b6156c7565b600091825260208220015460018601546001600160a01b03909116925061271090613fa7908590615824565b613fb19190615851565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613fe3918691869101615a66565b600060405180830381600087803b158015613ffd57600080fd5b505af1158015614011573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f925061404491869101614e47565b602060405180830381865afa158015614061573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140859190615706565b6140a2576002546140a0906001600160a01b031683836146cf565b505b60006127108489604001518a60c001516140bc9190615851565b6140c69190615824565b6140d09190615851565b9050808660080160008282546140e6919061589d565b925050819055506000612710858a6040015189600201546141079190615851565b6141119190615824565b61411b9190615851565b905080876007016000828254614131919061589d565b909155505060025461414d906001600160a01b031685846146cf565b5060098701546001600160a01b031661418b576040516001600160a01b0385169082156108fc029083906000818181858888f19350505050506141a6565b60098701546141a4906001600160a01b031685836146cf565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7926141f6928c928a928a9290911690615a9b565b60405180910390a46001896060015160026142119190615824565b61421b91906156f3565b8960e001510361433d57600087600801548a60c0015161423b91906156f3565b905060008860070154896002015461425391906156f3565b90508115158061426257508015155b1561179557811561428c5760005460025461428a916001600160a01b039182169116846146cf565b505b80156142f35760098901546001600160a01b03166142d257600080546040516001600160a01b039091169183156108fc02918491818181858888f19350505050506142f3565b60005460098a01546142f1916001600160a01b039182169116836146cf565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49161287591879187916001600160a01b0390911690615abf565b505050505050505050565b6000546001600160a01b031633146143735760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b038516158061439857506005546001600160601b038616115b156143b0576143a882600461479c565b5060006134a3565b83158015906143eb57506005856001600160601b0316815481106143d6576143d66156c7565b90600052602060002090600c02016002015484105b156143fb576143a882600561479c565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af115801561446e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144929190615af2565b9194509250905060008160078111156144ad576144ad615169565b146144c8576144bc858261479c565b600093505050506134a3565b82156144f5576002546144e6906001600160a01b03168a308661456c565b6144f5576144bc85600161479c565b811561452157600254614512906001600160a01b03168a846146cf565b614521576144bc85600261479c565b50600198975050505050505050565b336000908152600a602052604081205460ff1661456057604051630407618360e31b815260040160405180910390fd5b6134a38585858561480a565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516145d191906158ed565b6000604051808303816000865af19150503d806000811461460e576040519150601f19603f3d011682016040523d82523d6000602084013e614613565b606091505b509150915081801561463d57508051158061463d57508080602001905181019061463d9190615706565b979650505050505050565b600080600060408451106146bd575050506020810151604082015160608301516001600160601b038316158061468957506005546001600160601b03841610155b1561469357600192505b816000036146a057600391505b8015806146af57506006548110155b156146b8575060015b6146c8565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016146f1929190615a66565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525161472691906158ed565b6000604051808303816000865af19150503d8060008114614763576040519150601f19603f3d011682016040523d82523d6000602084013e614768565b606091505b50915091508180156147925750805115806147925750808060200190518101906147929190615706565b9695505050505050565b6147a68282614af1565b60068160078111156147ba576147ba615169565b036147d857604051636590e91560e01b815260040160405180910390fd5b60078160078111156147ec576147ec615169565b03611aff576040516358859f1d60e01b815260040160405180910390fd5b600080600061481886614648565b92505091506005826001600160601b031681548110614839576148396156c7565b60009182526020808320848452600a600c90930201919091019052604090205460ff166148795760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614904576149046156c7565b6000918252602082200154600580546001600160a01b039092169350906001600160601b03871690811061493a5761493a6156c7565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614985576149808a8460040154611103565b61498b565b82600401545b9050614997818a615851565b6003808401919091558683558301546002840154612710916149b891615824565b6149c29190615851565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b158015614a3557600080fd5b505af1158015614a49573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b8152600401614a839493929190615a00565b600060405180830381600087803b158015614a9d57600080fd5b505af1158015614ab1573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6001826001811115614b0557614b05615169565b03614b0e575050565b6001816007811115614b2257614b22615169565b03614b4057604051630f323ed960e11b815260040160405180910390fd5b6002816007811115614b5457614b54615169565b03614b725760405163e45e13a360e01b815260040160405180910390fd5b6003816007811115614b8657614b86615169565b03614ba457604051631d91d0ed60e31b815260040160405180910390fd5b6004816007811115614bb857614bb8615169565b03614bd6576040516321f1774b60e11b815260040160405180910390fd5b6005816007811115614bea57614bea615169565b03611aff57604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b8260048101928215614c54579160200282015b82811115614c54578251825591602001919060010190614c39565b50614c60929150614c9e565b5090565b828054828255906000526020600020908101928215614c545791602002820182811115614c54578251825591602001919060010190614c39565b5b80821115614c605760008155600101614c9f565b6001600160a01b038116811461437357600080fd5b8035614cd381614cb3565b919050565b600060208284031215614cea57600080fd5b8135614cf581614cb3565b9392505050565b80356001600160601b0381168114614cd357600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d5157614d51614d13565b604052919050565b600082601f830112614d6a57600080fd5b813560206001600160401b03821115614d8557614d85614d13565b8160051b614d94828201614d29565b9283528481018201928281019087851115614dae57600080fd5b83870192505b8483101561463d57823582529183019190830190614db4565b801515811461437357600080fd5b8035614cd381614dcd565b600080600060608486031215614dfb57600080fd5b614e0484614cfc565b925060208401356001600160401b03811115614e1f57600080fd5b614e2b86828701614d59565b9250506040840135614e3c81614dcd565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614e6d57600080fd5b5035919050565b60008060408385031215614e8757600080fd5b8235614e9281614cb3565b946020939093013593505050565b60008060408385031215614eb357600080fd5b8235614ebe81614cb3565b91506020830135614ece81614dcd565b809150509250929050565b600082601f830112614eea57600080fd5b604051608081018181106001600160401b0382111715614f0c57614f0c614d13565b604052806080840185811115614f2157600080fd5b845b81811015614f3b578035835260209283019201614f23565b509195945050505050565b600082601f830112614f5757600080fd5b81356001600160401b03811115614f7057614f70614d13565b614f83601f8201601f1916602001614d29565b818152846020838601011115614f9857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e031215614fd757600080fd5b8b35614fe281614cb3565b9a5060208c0135614ff281614cb3565b995061500060408d01614cc8565b985061500e60608d01614cc8565b975061501c60808d01614cc8565b965061502a60a08d01614ddb565b95506150398d60c08e01614ed9565b94506150498d6101408e01614ed9565b93506101c08c01356001600160401b0381111561506557600080fd5b6150718e828f01614f46565b9350506150816101e08d01614cc8565b91506150906102008d01614cc8565b90509295989b509295989b9093969950565b6000806000606084860312156150b757600080fd5b505081359360208301359350604090920135919050565b6000602082840312156150e057600080fd5b61115482614cfc565b8060005b6004811015610bc65781518452602093840193909101906001016150ed565b6080810161115782846150e9565b6000806040838503121561512d57600080fd5b823561513881614cb3565b915060208301356001600160401b0381111561515357600080fd5b61515f85828601614f46565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b6005811061519d57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016151cd604083018661517f565b9215156060820152608001529392505050565b6000806000606084860312156151f557600080fd5b833561520081614cb3565b92506020840135915060408401356001600160401b0381111561522257600080fd5b61522e86828701614f46565b9150509250925092565b6000806040838503121561524b57600080fd5b614e9283614cfc565b60008060006060848603121561526957600080fd5b833561527481614cb3565b925060208401356001600160401b038116811461529057600080fd5b9150604084013560ff81168114614e3c57600080fd5b6000806000806000806000610140888a0312156152c257600080fd5b6152cb88614cfc565b965060208801356152db81614dcd565b955060408801359450606088013593506080880135925060a088013591506153068960c08a01614ed9565b905092959891949750929550565b6000806040838503121561532757600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156153705781516001600160a01b03168752958201959082019060010161534b565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e08501526153d6610180850183615336565b60e0860151610100868101919091528601516101208087019190915286015190925061014061540f818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561543f57600080fd5b6154488a614cfc565b985060208a013561545881614dcd565b975060408a0135965060608a0135955060808a0135945060a08a013593506154838b60c08c01614ed9565b92506101408a01356001600160401b03808211156154a057600080fd5b6154ac8d838e01614f46565b93506101608c01359150808211156154c357600080fd5b506154d08c828d01614d59565b9150509295985092959850929598565b600080604083850312156154f357600080fd5b8235915060208301356001600160401b0381111561515357600080fd5b60008060006060848603121561552557600080fd5b833592506020840135915060408401356001600160401b0381111561522257600080fd5b60008083601f84011261555b57600080fd5b5081356001600160401b0381111561557257600080fd5b60208301915083602082850101111561558a57600080fd5b9250929050565b6000806000604084860312156155a657600080fd5b83356001600160401b038111156155bc57600080fd5b6155c886828701615549565b9094509250506020840135614e3c81614cb3565b6000806000806000608086880312156155f457600080fd5b8535945060208601356001600160401b0381111561561157600080fd5b61561d88828901615549565b909550935050604086013561563181614cb3565b949793965091946060013592915050565b60006020828403121561565457600080fd5b81356001600160401b0381111561566a57600080fd5b61337184828501614f46565b6000806000806080858703121561568c57600080fd5b843561569781614cb3565b93506156a560208601614cfc565b92506040850135915060608501356156bc81614dcd565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611157576111576156dd565b60006020828403121561571857600080fd5b8151614cf581614dcd565b60208101611157828461517f565b600181815b8085111561576c578160001904821115615752576157526156dd565b8085161561575f57918102915b93841c9390800290615736565b509250929050565b60008261578357506001611157565b8161579057506000611157565b81600181146157a657600281146157b0576157cc565b6001915050611157565b60ff8411156157c1576157c16156dd565b50506001821b611157565b5060208310610133831016604e8410600b84101617156157ef575081810a611157565b6157f98383615731565b806000190482111561580d5761580d6156dd565b029392505050565b600061115460ff841683615774565b8082028115828204841417611157576111576156dd565b634e487b7160e01b600052601260045260246000fd5b6000826158605761586061583b565b500490565b60008060006060848603121561587a57600080fd5b83519250602084015161588c81614dcd565b6040850151909250614e3c81614dcd565b80820180821115611157576111576156dd565b6000602082840312156158c257600080fd5b5051919050565b60005b838110156158e45781810151838201526020016158cc565b50506000910152565b600082516158ff8184602087016158c9565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261463d60a08301846150e9565b600081518084526159548160208601602086016158c9565b601f01601f19169290920160200192915050565b828152604060208201526000613371604083018461593c565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526159b560a08601886150e9565b610120850192909252845190819052610160840191602086019160005b818110156159ee578351855293820193928201926001016159d2565b50929c9b505050505050505050505050565b848152836020820152608060408201526000615a1f608083018561593c565b905082606083015295945050505050565b600060018201615a4257615a426156dd565b5060010190565b600060208284031215615a5b57600080fd5b8151614cf581614cb3565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b8201615a9457615a946156dd565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615aed57615aed61583b565b500690565b600080600060608486031215615b0757600080fd5b8351925060208401519150604084015160088110614e3c57600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212207e56bd5d72076fd07742f9b3c9c63e51e4d470292bba69d3779fd205c4021e8564736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106102c95760003560e01c806382d022371161017b578063c71f4253116100d7578063f6506db411610085578063f6506db414610968578063f7434ea914610988578063fbb519e7146109a8578063fbf405b0146109c8578063fc6f8f16146109e8578063fe4037e614610a08578063fe524c3914610a2857600080fd5b8063c71f425314610893578063cf0c38f8146108b3578063d07368bd146108d3578063d2b8035a146108f3578063d4d1d76a14610913578063d98493f614610928578063e4c0aaf41461094857600080fd5b8063acdbf51d11610134578063acdbf51d146107a8578063afe15cfb146107c8578063b0049637146107fd578063b44d573c1461081d578063c13517e11461084d578063c258bb1914610860578063c35699021461088057600080fd5b806382d02237146106e65780638456cb591461070657806386541b241461071b5780638a9bb02a1461073b5780638bb0487514610768578063a072b86c1461078857600080fd5b80632e2e936a1161022a57806352d1902d116101e357806352d1902d14610606578063564a565d1461061b57806359ec827e1461064c5780635c975abb1461066c578063751accd0146106865780637717a6e8146106a65780637934c0be146106c657600080fd5b80632e2e936a146105515780632fcb4f04146105715780633cfd1184146105915780633f4ba83a146105be578063452a9320146105d35780634f1ef286146105f357600080fd5b806319b815291161028757806319b81529146104035780631c3db16d146104335780631d7e6892146104705780631f5a0dd2146104905780632c053739146104f15780632d29a47b146105115780632e1daf2f1461053157600080fd5b8062f5822c146102ce5780630219da79146102f05780630b7414bc146103685780630c340a2414610388578063115d5376146103b55780631860592b146103d5575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004614cd8565b610a48565b005b3480156102fc57600080fd5b5061033b61030b366004614cd8565b60086020526000908152604090205460ff808216916001600160401b0361010082041691600160481b9091041683565b6040805193151584526001600160401b03909216602084015260ff16908201526060015b60405180910390f35b34801561037457600080fd5b506102ee610383366004614de6565b610a95565b34801561039457600080fd5b506000546103a8906001600160a01b031681565b60405161035f9190614e47565b3480156103c157600080fd5b506102ee6103d0366004614e5b565b610bcc565b3480156103e157600080fd5b506103f56103f0366004614e74565b611103565b60405190815260200161035f565b34801561040f57600080fd5b5061042361041e366004614e5b565b61115d565b604051901515815260200161035f565b34801561043f57600080fd5b5061045361044e366004614e5b565b611256565b60408051938452911515602084015215159082015260600161035f565b34801561047c57600080fd5b506102ee61048b366004614ea0565b611357565b34801561049c57600080fd5b506104b06104ab366004614e5b565b6113ad565b604080516001600160601b0390981688529515156020880152948601939093526060850191909152608084015260a0830152151560c082015260e00161035f565b3480156104fd57600080fd5b506102ee61050c366004614fb5565b61140c565b34801561051d57600080fd5b506102ee61052c3660046150a2565b611516565b34801561053d57600080fd5b506004546103a8906001600160a01b031681565b34801561055d57600080fd5b50600b546103a8906001600160a01b031681565b34801561057d57600080fd5b506102ee61058c366004614cd8565b6117a2565b34801561059d57600080fd5b506105b16105ac3660046150ce565b6117ef565b60405161035f919061510c565b3480156105ca57600080fd5b506102ee611859565b3480156105df57600080fd5b506001546103a8906001600160a01b031681565b6102ee61060136600461511a565b6118dc565b34801561061257600080fd5b506103f5611b03565b34801561062757600080fd5b5061063b610636366004614e5b565b611b61565b60405161035f9594939291906151a1565b34801561065857600080fd5b506103f5610667366004614e5b565b611bbd565b34801561067857600080fd5b506009546104239060ff1681565b34801561069257600080fd5b506102ee6106a13660046151e0565b611d12565b3480156106b257600080fd5b506102ee6106c1366004615238565b611dbc565b3480156106d257600080fd5b506102ee6106e1366004614ea0565b611e7f565b3480156106f257600080fd5b506102ee610701366004615254565b611efe565b34801561071257600080fd5b506102ee611fbb565b34801561072757600080fd5b506102ee6107363660046152a6565b61205b565b34801561074757600080fd5b5061075b610756366004615314565b612238565b60405161035f919061537b565b34801561077457600080fd5b506102ee610783366004614e5b565b6123c4565b34801561079457600080fd5b506102ee6107a3366004615420565b612528565b3480156107b457600080fd5b506103a86107c3366004614e5b565b61288a565b3480156107d457600080fd5b506107e86107e3366004614e5b565b6128b4565b6040805192835260208301919091520161035f565b34801561080957600080fd5b506102ee610818366004614cd8565b612960565b34801561082957600080fd5b50610423610838366004614cd8565b600a6020526000908152604090205460ff1681565b6103f561085b3660046154e0565b6129ad565b34801561086c57600080fd5b506102ee61087b366004614cd8565b6129e5565b6102ee61088e366004615510565b612a32565b34801561089f57600080fd5b506103f56108ae366004614e5b565b612f06565b3480156108bf57600080fd5b506003546103a8906001600160a01b031681565b3480156108df57600080fd5b506102ee6108ee366004614cd8565b612f6e565b3480156108ff57600080fd5b506102ee61090e366004615314565b613017565b34801561091f57600080fd5b506006546103f5565b34801561093457600080fd5b506103f5610943366004615591565b61332c565b34801561095457600080fd5b506102ee610963366004614cd8565b613379565b34801561097457600080fd5b506103f56109833660046155dc565b6133c6565b34801561099457600080fd5b506103f56109a3366004615642565b6134ac565b3480156109b457600080fd5b506102ee6109c3366004615676565b6134f8565b3480156109d457600080fd5b506002546103a8906001600160a01b031681565b3480156109f457600080fd5b506103f5610a03366004614e5b565b613538565b348015610a1457600080fd5b506102ee610a23366004614cd8565b613567565b348015610a3457600080fd5b50610423610a43366004615238565b6135b4565b6000546001600160a01b03163314610a735760405163c383977560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610ac05760405163c383977560e01b815260040160405180910390fd5b60005b8251811015610bc6578115610b5f57828181518110610ae457610ae46156c7565b602002602001015160001480610b1757506006548351849083908110610b0c57610b0c6156c7565b602002602001015110155b15610b3557604051633d58a98960e11b815260040160405180910390fd5b610b5a84848381518110610b4b57610b4b6156c7565b602002602001015160016135fc565b610bbe565b6001838281518110610b7357610b736156c7565b602002602001015103610b99576040516356d111fd60e11b815260040160405180910390fd5b610bbe84848381518110610baf57610baf6156c7565b602002602001015160006135fc565b600101610ac3565b50505050565b600060078281548110610be157610be16156c7565b600091825260208220600490910201805460058054929450916001600160601b03909116908110610c1457610c146156c7565b6000918252602082206003850154600c909202019250610c36906001906156f3565b90506000836003018281548110610c4f57610c4f6156c7565b600091825260208220600b909102019150600185015460ff166004811115610c7957610c79615169565b03610d545781158015610cc857506001840154600684019060ff166004811115610ca557610ca5615169565b60048110610cb557610cb56156c7565b01546002850154610cc690426156f3565b105b15610ce657604051633e9727df60e01b815260040160405180910390fd5b6003810154600682015414610d0e576040516309e4486b60e41b815260040160405180910390fd5b8254600160601b900460ff16610d25576002610d28565b60015b60018086018054909160ff1990911690836004811115610d4a57610d4a615169565b02179055506110b5565b60018085015460ff166004811115610d6e57610d6e615169565b03610e7e576001840154600684019060ff166004811115610d9157610d91615169565b60048110610da157610da16156c7565b01546002850154610db290426156f3565b108015610e4957506006816000015481548110610dd157610dd16156c7565b600091825260209091200154604051630baa64d160e01b8152600481018790526001600160a01b0390911690630baa64d190602401602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190615706565b155b15610e6757604051634dfa578560e11b815260040160405180910390fd5b6001808501805460029260ff199091169083610d4a565b6002600185015460ff166004811115610e9957610e99615169565b03610fe7576001840154600684019060ff166004811115610ebc57610ebc615169565b60048110610ecc57610ecc6156c7565b01546002850154610edd90426156f3565b108015610f7457506006816000015481548110610efc57610efc6156c7565b6000918252602090912001546040516336a66c7560e11b8152600481018790526001600160a01b0390911690636d4cd8ea90602401602060405180830381865afa158015610f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f729190615706565b155b15610f9257604051631988dead60e31b815260040160405180910390fd5b600184018054600360ff199091161790558354604051600160601b9091046001600160a01b03169086907fa5d41b970d849372be1da1481ffd78d162bfe57a7aa2fe4e5fb73481fa5ac24f90600090a36110b5565b6003600185015460ff16600481111561100257611002615169565b0361107c576001840154600684019060ff16600481111561102557611025615169565b60048110611035576110356156c7565b0154600285015461104690426156f3565b101561106557604051632f4dfd8760e01b815260040160405180910390fd5b6001808501805460049260ff199091169083610d4a565b6004600185015460ff16600481111561109757611097615169565b036110b5576040516307f38c8f60e11b815260040160405180910390fd5b426002850155600184015460405186917f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b91916110f49160ff1690615723565b60405180910390a25050505050565b6001600160a01b03821660009081526008602052604081205461010081046001600160401b03169061114090600160481b900460ff16600a615815565b61114a9084615824565b6111549190615851565b90505b92915050565b60008060078381548110611173576111736156c7565b6000918252602082206003600490920201908101805491935090611199906001906156f3565b815481106111a9576111a96156c7565b600091825260208220845460058054600b909402909201945090916001600160601b039091169081106111de576111de6156c7565b90600052602060002090600c0201905080600501548260030154101561120957506000949350505050565b80546005805490916001600160601b0316908110611229576112296156c7565b6000918252602080832094548352600a600c9092029094010190925250604090205460ff16159392505050565b6000806000806007858154811061126f5761126f6156c7565b6000918252602082206003600490920201908101805491935090611295906001906156f3565b815481106112a5576112a56156c7565b90600052602060002090600b02019050600060068260000154815481106112ce576112ce6156c7565b600091825260209091200154604051631c3db16d60e01b8152600481018990526001600160a01b0390911691508190631c3db16d90602401606060405180830381865afa158015611323573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113479190615865565b9199909850909650945050505050565b6000546001600160a01b031633146113825760405163c383977560e01b815260040160405180910390fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b600581815481106113bd57600080fd5b60009182526020909120600c9091020180546002820154600383015460048401546005850154600b909501546001600160601b038516965060ff600160601b9095048516959394929391921687565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff1680611455575080546001600160401b03808416911610155b156114725760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556114a58d8d8d8d8d8d8d8d8d8d613684565b600b80546001600160a01b0319166001600160a01b038516179055805460ff60401b191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050505050565b60095460ff161561153a57604051636f1dac1d60e01b815260040160405180910390fd5b60008060078581548110611550576115506156c7565b600091825260209091206004918202019150600182015460ff16600481111561157b5761157b615169565b1461159957604051638794ce4b60e01b815260040160405180910390fd5b8060030184815481106115ae576115ae6156c7565b6000918252602082206004600b909202019081015490935091506115d2848361589d565b60058401546006850154600286015492935090916000906115f4908390615851565b90506000866001015490506000806006896000015481548110611619576116196156c7565b60009182526020909120015460405163368efae360e21b8152600481018e9052602481018d90526001600160a01b039091169150819063da3beb8c90604401602060405180830381865afa158015611675573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169991906158b0565b915050806000036116b557838611156116b0578395505b6116d5565b6116c0846002615824565b8611156116d5576116d2846002615824565b95505b60048801869055865b868110156117815784811015611737576117306040518061010001604052808e81526020018d81526020018481526020018781526020018681526020018581526020018881526020018381525061393f565b9550611779565b6117796040518061010001604052808e81526020018d815260200184815260200187815260200186815260200185815260200188815260200183815250613e10565b6001016116de565b508488600501541461179557600588018590555b5050505050505050505050565b6000546001600160a01b031633146117cd5760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6117f7614c08565b6005826001600160601b031681548110611813576118136156c7565b6000918252602090912060408051608081019182905292600c029091016006019060049082845b81548152602001906001019080831161183a5750505050509050919050565b6000546001600160a01b031633146118845760405163c383977560e01b815260040160405180910390fd5b60095460ff166118a75760405163b4143dc760e01b815260040160405180910390fd5b6009805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6118e582614348565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061196357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611957600080516020615b258339815191525490565b6001600160a01b031614155b156119815760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156119db575060408051601f3d908101601f191682019092526119d8918101906158b0565b60015b611a035781604051630c76093760e01b81526004016119fa9190614e47565b60405180910390fd5b600080516020615b258339815191528114611a3457604051632a87526960e21b8152600481018290526024016119fa565b600080516020615b258339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611afd576000836001600160a01b031683604051611a9b91906158ed565b600060405180830381855af49150503d8060008114611ad6576040519150601f19603f3d011682016040523d82523d6000602084013e611adb565b606091505b5050905080610bc6576040516339b21b5d60e11b815260040160405180910390fd5b505b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611b4e5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020615b2583398151915290565b60078181548110611b7157600080fd5b60009182526020909120600490910201805460018201546002909201546001600160601b0382169350600160601b9091046001600160a01b03169160ff80821692610100909204169085565b60008060078381548110611bd357611bd36156c7565b6000918252602082206003600490920201908101805491935090611bf9906001906156f3565b81548110611c0957611c096156c7565b600091825260208220845460058054600b909402909201945090916001600160601b03909116908110611c3e57611c3e6156c7565b90600052602060002090600c020190508060050154826003015410611cdd5782546001600160601b031660001901611c7f576001600160ff1b039350611d0a565b6003820154611c8f906002615824565b611c9a90600161589d565b81546005805490916001600160601b0316908110611cba57611cba6156c7565b90600052602060002090600c020160040154611cd69190615824565b9350611d0a565b6003820154611ced906002615824565b611cf890600161589d565b8160040154611d079190615824565b93505b505050919050565b6000546001600160a01b03163314611d3d5760405163c383977560e01b815260040160405180910390fd5b6000836001600160a01b03168383604051611d5891906158ed565b60006040518083038185875af1925050503d8060008114611d95576040519150601f19603f3d011682016040523d82523d6000602084013e611d9a565b606091505b5050905080610bc6576040516322092f2f60e11b815260040160405180910390fd5b60095460ff1615611de057604051636f1dac1d60e01b815260040160405180910390fd5b600b546040516370a0823160e01b81526001600160a01b03909116906370a0823190611e10903390600401614e47565b602060405180830381865afa158015611e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5191906158b0565b600003611e71576040516326b551e560e11b815260040160405180910390fd5b611afd338383600080614376565b6000546001600160a01b03163314611eaa5760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038216600081815260086020526040808220805460ff191685151590811790915590519092917f541615e167511d757a7067a700eb54431b256bb458dfdce0ac58bf2ed0aefd4491a35050565b6000546001600160a01b03163314611f295760405163c383977560e01b815260040160405180910390fd5b6001600160a01b038316600081815260086020908152604091829020805469ffffffffffffffffff0019166101006001600160401b03881690810260ff60481b191691909117600160481b60ff8816908102919091179092558351908152918201527fe6996b7f03e9bd02228b99d3d946932e3197f505f60542c4cfbc919441d8a4e6910160405180910390a2505050565b6001546001600160a01b03163314801590611fe157506000546001600160a01b03163314155b15611fff57604051636b29334f60e01b815260040160405180910390fd5b60095460ff161561202357604051636f1dac1d60e01b815260040160405180910390fd5b6009805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000546001600160a01b031633146120865760405163c383977560e01b815260040160405180910390fd5b60006005886001600160601b0316815481106120a4576120a46156c7565b90600052602060002090600c0201905060016001600160601b0316886001600160601b031614158015612106575080546005805488926001600160601b03169081106120f2576120f26156c7565b90600052602060002090600c020160020154115b1561212457604051639717078960e01b815260040160405180910390fd5b60005b600182015481101561219f5786600583600101838154811061214b5761214b6156c7565b906000526020600020015481548110612166576121666156c7565b90600052602060002090600c020160020154101561219757604051639717078960e01b815260040160405180910390fd5b600101612127565b5060028101869055805460ff60601b1916600160601b88151502178155600381018590556004808201859055600582018490556121e29060068301908490614c26565b50876001600160601b03167f709b1f5fda58af9a4f52dacd1ec404840a8148455700cce155a2bd8cf127ef1a88888888888860405161222696959493929190615909565b60405180910390a25050505050505050565b61229e60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600783815481106122b1576122b16156c7565b906000526020600020906004020160030182815481106122d3576122d36156c7565b90600052602060002090600b0201604051806101600160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820180548060200260200160405190810160405280929190818152602001828054801561238257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612364575b5050509183525050600782015460208201526008820154604082015260098201546001600160a01b03166060820152600a909101546080909101529392505050565b6000600782815481106123d9576123d96156c7565b600091825260209091206004918202019150600182015460ff16600481111561240457612404615169565b1461242257604051638794ce4b60e01b815260040160405180910390fd5b6001810154610100900460ff161561244d5760405163c977f8d360e01b815260040160405180910390fd5b600061245883611256565b505060018301805461010061ff001990911617905582546040518281529192508491600160601b9091046001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3815460405163188d362b60e11b81526004810185905260248101839052600160601b9091046001600160a01b03169063311a6c5690604401600060405180830381600087803b15801561250b57600080fd5b505af115801561251f573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146125535760405163c383977560e01b815260040160405180910390fd5b8660058a6001600160601b031681548110612570576125706156c7565b90600052602060002090600c02016002015411156125a157604051639717078960e01b815260040160405180910390fd5b80516000036125c35760405163402585f560e01b815260040160405180910390fd5b6001600160601b0389166125ea57604051631ef4f64960e01b815260040160405180910390fd5b60058054600181018255600091825290600c82027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001905b83518110156126d95783818151811061263d5761263d6156c7565b60200260200101516000148061267057506006548451859083908110612665576126656156c7565b602002602001015110155b1561268e57604051633d58a98960e11b815260040160405180910390fd5b600182600a0160008684815181106126a8576126a86156c7565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101612622565b5060016000908152600a8201602052604090205460ff1661270d576040516306351b3d60e31b815260040160405180910390fd5b80546001600160601b0319166001600160601b038c161781556040805160008152602081019182905251612745916001840191614c64565b50805460ff60601b1916600160601b8b15150217815560028101899055600381018890556004808201889055600582018790556127889060068301908790614c26565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c916127ba918691899101615968565b600060405180830381600087803b1580156127d457600080fd5b505af11580156127e8573d6000803e3d6000fd5b5050505060058b6001600160601b031681548110612808576128086156c7565b600091825260208083206001600c909302018201805492830181558352909120018290556040516001600160601b038c169083907f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d90612875908e908e908e908e908e908e908d90615981565b60405180910390a35050505050505050505050565b6006818154811061289a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000806000600784815481106128cc576128cc6156c7565b6000918252602090912060049091020190506003600182015460ff1660048111156128f9576128f9615169565b03612951576002810154815460058054929550916001600160601b03909116908110612927576129276156c7565b600091825260209091206009600c909202010154600282015461294a919061589d565b915061295a565b60009250600091505b50915091565b6000546001600160a01b0316331461298b5760405163c383977560e01b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60006129b8826134ac565b3410156129d857604051630e3360f160e21b815260040160405180910390fd5b6111548383600034614530565b6000546001600160a01b03163314612a105760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b612a3b83611bbd565b341015612a5b57604051633191f8f160e01b815260040160405180910390fd5b600060078481548110612a7057612a706156c7565b6000918252602090912060049091020190506003600182015460ff166004811115612a9d57612a9d615169565b14612abb576040516337cdefcb60e21b815260040160405180910390fd5b60038101805460009190612ad1906001906156f3565b81548110612ae157612ae16156c7565b90600052602060002090600b020190506006816000015481548110612b0857612b086156c7565b6000918252602090912001546001600160a01b03163314612b3c5760405163065f245f60e01b815260040160405180910390fd5b8154815460038401805460018101825560009182526020909120600580546001600160601b0390951694600b9093029091019184908110612b7f57612b7f6156c7565b90600052602060002090600c020160050154846003015410612c88576005836001600160601b031681548110612bb757612bb76156c7565b60009182526020909120600c9091020154600580546001600160601b0390921694509084908110612bea57612bea6156c7565b60009182526020808320858452600a600c90930201919091019052604090205460ff16612c1657600191505b84546001600160601b03848116911614612c8857845460038601546001600160601b0390911690612c49906001906156f3565b6040516001600160601b03861681528a907f736e3f52761298c8c0823e1ebf482ed3c5ecb304f743d2d91a7c006e8e8d7a1f9060200160405180910390a45b84546001600160601b0319166001600160601b038416908117865560018601805460ff1916905542600287015560058054600092908110612ccb57612ccb6156c7565b90600052602060002090600c02019050806004015434612ceb9190615851565b826003018190555061271081600301548260020154612d0a9190615824565b612d149190615851565b60018084019190915534600284015583835560045460038801546001600160a01b039091169163d09f392d918c91612d4b916156f3565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015612d8957600080fd5b505af1158015612d9d573d6000803e3d6000fd5b505086548454149150612e8390505784546003870154612dbf906001906156f3565b83546040519081528b907fcbe7939a71f0b369c7471d760a0a99b60b7bb010ee0406cba8a46679d1ea77569060200160405180910390a46006826000015481548110612e0d57612e0d6156c7565b60009182526020909120015460038301546040516302dbb79560e61b81526001600160a01b039092169163b6ede54091612e50918d918d918d9190600401615a00565b600060405180830381600087803b158015612e6a57600080fd5b505af1158015612e7e573d6000803e3d6000fd5b505050505b8554604051600160601b9091046001600160a01b0316908a907f9c9b64db9e130f48381bf697abf638e73117dbfbfd7a4484f2da3ba188f4187d90600090a3887f4e6f5cf43b95303e86aee81683df63992061723a829ee012db21dad388756b916000604051612ef39190615723565b60405180910390a2505050505050505050565b60008060078381548110612f1c57612f1c6156c7565b906000526020600020906004020190508060030160018260030180549050612f4491906156f3565b81548110612f5457612f546156c7565b90600052602060002090600b020160030154915050919050565b6000546001600160a01b03163314612f995760405163c383977560e01b815260040160405180910390fd5b6006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f810180546001600160a01b0319166001600160a01b0385169081179091556040519192909183917f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a35050565b60006007838154811061302c5761302c6156c7565b9060005260206000209060040201905060006001826003018054905061305291906156f3565b9050600082600301828154811061306b5761306b6156c7565b600091825260208220600b909102019150600184015460ff16600481111561309557613095615169565b146130b357604051638285c4ef60e01b815260040160405180910390fd5b600060068260000154815481106130cc576130cc6156c7565b6000918252602082200154600a8401546001600160a01b039091169250905b8681108015613101575060038401546006850154105b156133095760006001600160a01b03841663d2b8035a8a8461312281615a30565b955061312e908761589d565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016020604051808303816000875af1158015613171573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131959190615a49565b90506001600160a01b0381166131ab57506130eb565b6004805460018701546040516310f0b12f60e11b81526001600160a01b03909216926321e1625e926131e1928692909101615a66565b600060405180830381600087803b1580156131fb57600080fd5b505af115801561320f573d6000803e3d6000fd5b50505060068601546040518b92506001600160a01b038416917f6119cf536152c11e0a9a6c22f3953ce4ecc93ee54fa72ffa326ffabded21509b9161325c918b8252602082015260400190565b60405180910390a36006850180546001810182556000828152602090200180546001600160a01b0319166001600160a01b03841617905560038601549054036133035760048054604051632e96bc2360e11b81529182018b9052602482018890526001600160a01b031690635d2d784690604401600060405180830381600087803b1580156132ea57600080fd5b505af11580156132fe573d6000803e3d6000fd5b505050505b506130eb565b8084600a01600082825461331d919061589d565b90915550505050505050505050565b6000613371826103f086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134ac92505050565b949350505050565b6000546001600160a01b031633146133a45760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03821660009081526008602052604081205460ff166133ff5760405163e51cf7bf60e01b815260040160405180910390fd5b61340a85858561332c565b82101561342a57604051630e3360f160e21b815260040160405180910390fd5b61343f6001600160a01b03841633308561456c565b61345c576040516312171d8360e31b815260040160405180910390fd5b6134a08686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506145309050565b90505b95945050505050565b60008060006134ba84614648565b5091509150806005836001600160601b0316815481106134dc576134dc6156c7565b90600052602060002090600c0201600401546133719190615824565b6004546001600160a01b0316331461352357604051639d6cab9960e01b815260040160405180910390fd5b613531848484846001614376565b5050505050565b60006007828154811061354d5761354d6156c7565b600091825260209091206003600490920201015492915050565b6000546001600160a01b031633146135925760405163c383977560e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006005836001600160601b0316815481106135d2576135d26156c7565b60009182526020808320948352600c91909102909301600a0190925250604090205460ff16919050565b806005846001600160601b031681548110613619576136196156c7565b60009182526020808320868452600c92909202909101600a0190526040808220805460ff19169315159390931790925590518215159184916001600160601b038716917fb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc7991a4505050565b600080546001600160a01b03199081166001600160a01b038d81169190911783556001805483168d83161781556002805484168d84161781556003805485168d85161790556004805485168785161790556006805481875291820190557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40018054909316918a1691821790925560405190927f44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb291a36005805460010181556000908152600480546040516311de995760e21b81526001600160a01b039091169263477a655c9261377692879101615968565b600060405180830381600087803b15801561379057600080fd5b505af11580156137a4573d6000803e3d6000fd5b5050600580546001810182556000918252600c027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160601b031916815560408051838152602081019091529093509150508051613812916001840191602090910190614c64565b50805460ff60601b1916600160601b8715150217815584516002820155602085015160038201556040850151600480830191909155606086015160058301556138619060068301908690614c26565b50600480546040516311de995760e21b81526001600160a01b039091169163477a655c9161389491600191889101615968565b600060405180830381600087803b1580156138ae57600080fd5b505af11580156138c2573d6000803e3d6000fd5b5050825487516020808a01516040808c015160608d0151825160008152948501928390526001600160601b039096169750600196507f3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d9561392a958f959094938e9190615981565b60405180910390a361179560018060016135fc565b6000806007836000015181548110613959576139596156c7565b90600052602060002090600402019050600081600301846020015181548110613984576139846156c7565b90600052602060002090600b02019050600060068260000154815481106139ad576139ad6156c7565b60009182526020808320919091015487519188015160e089015160808a015160a08b01516040516333ac937b60e11b8152600481019690965260248601939093526044850191909152606484015260848301526001600160a01b03169250829063675926f69060a401602060405180830381865afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a5791906158b0565b9050612710811115613a6857506127105b6000612710613a7783826156f3565b8560010154613a869190615824565b613a909190615851565b9050808760c001818151613aa4919061589d565b90525060e0870151600685018054600092908110613ac457613ac46156c7565b6000918252602090912001546004805460405163965af6c760e01b81526001600160a01b03938416945092169163965af6c791613b05918591879101615a66565b600060405180830381600087803b158015613b1f57600080fd5b505af1158015613b33573d6000803e3d6000fd5b505060048054604051633c85b79360e21b81526001600160a01b03909116935063f216de4c9250613b68918591879101615a66565b600060405180830381600087803b158015613b8257600080fd5b505af1158015613b96573d6000803e3d6000fd5b50505050602088015188516001600160a01b0383167f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e786613bd687615a7f565b60098b0154604051613bf89392916000916001600160a01b0390911690615a9b565b60405180910390a48751602089015160e08a015160405163ba66fde760e01b81526004810193909352602483019190915260448201526001600160a01b0385169063ba66fde790606401602060405180830381865afa158015613c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c839190615706565b613ce9576004805460405163b5d69e9960e01b81526001600160a01b039091169163b5d69e9991613cb691859101614e47565b600060405180830381600087803b158015613cd057600080fd5b505af1158015613ce4573d6000803e3d6000fd5b505050505b60018860600151613cfa91906156f3565b8860e00151148015613d0e57506040880151155b15613dff5760098501546001600160a01b0316613d57576000805460028701546040516001600160a01b039092169281156108fc029290818181858888f1935050505050613d7e565b60005460028601546009870154613d7c926001600160a01b03918216929116906146cf565b505b60005460c0890151600254613da1926001600160a01b03918216929116906146cf565b506020880151885160c08a0151600288015460098901546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf493613df693909290916001600160a01b0390911690615abf565b60405180910390a35b50505060c090940151949350505050565b60006007826000015181548110613e2957613e296156c7565b90600052602060002090600402019050600081600301836020015181548110613e5457613e546156c7565b90600052602060002090600b0201905060006006826000015481548110613e7d57613e7d6156c7565b6000918252602080832090910154865191870151606088015160e08901516001600160a01b039093169550859363675926f693909291613ebc91615ade565b60808a015160a08b01516040516001600160e01b031960e088901b1681526004810195909552602485019390935260448401919091526064830152608482015260a401602060405180830381865afa158015613f1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f4091906158b0565b9050612710811115613f5157506127105b60008360060186606001518760e00151613f6b9190615ade565b81548110613f7b57613f7b6156c7565b600091825260208220015460018601546001600160a01b03909116925061271090613fa7908590615824565b613fb19190615851565b6004805460405163965af6c760e01b81529293506001600160a01b03169163965af6c791613fe3918691869101615a66565b600060405180830381600087803b158015613ffd57600080fd5b505af1158015614011573d6000803e3d6000fd5b505060048054604051636624192f60e01b81526001600160a01b039091169350636624192f925061404491869101614e47565b602060405180830381865afa158015614061573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140859190615706565b6140a2576002546140a0906001600160a01b031683836146cf565b505b60006127108489604001518a60c001516140bc9190615851565b6140c69190615824565b6140d09190615851565b9050808660080160008282546140e6919061589d565b925050819055506000612710858a6040015189600201546141079190615851565b6141119190615824565b61411b9190615851565b905080876007016000828254614131919061589d565b909155505060025461414d906001600160a01b031685846146cf565b5060098701546001600160a01b031661418b576040516001600160a01b0385169082156108fc029083906000818181858888f19350505050506141a6565b60098701546141a4906001600160a01b031685836146cf565b505b6020890151895160098901546040516001600160a01b03888116927f8975b837fe0d18616c65abb8b843726a32b552ee4feca009944fa658bbb282e7926141f6928c928a928a9290911690615a9b565b60405180910390a46001896060015160026142119190615824565b61421b91906156f3565b8960e001510361433d57600087600801548a60c0015161423b91906156f3565b905060008860070154896002015461425391906156f3565b90508115158061426257508015155b1561179557811561428c5760005460025461428a916001600160a01b039182169116846146cf565b505b80156142f35760098901546001600160a01b03166142d257600080546040516001600160a01b039091169183156108fc02918491818181858888f19350505050506142f3565b60005460098a01546142f1916001600160a01b039182169116836146cf565b505b60208b01518b5160098b01546040517f6cecfd3ec56289ccb16e30eb194f9a87dfdc12630b9abbc31fc69af5a0b0eaf49161287591879187916001600160a01b0390911690615abf565b505050505050505050565b6000546001600160a01b031633146143735760405163c383977560e01b815260040160405180910390fd5b50565b60006001600160601b038516158061439857506005546001600160601b038616115b156143b0576143a882600461479c565b5060006134a3565b83158015906143eb57506005856001600160601b0316815481106143d6576143d66156c7565b90600052602060002090600c02016002015484105b156143fb576143a882600561479c565b60048054604051630a5861b960e41b81526001600160a01b03898116938201939093526001600160601b03881660248201526044810187905285151560648201526000928392839291169063a5861b90906084016060604051808303816000875af115801561446e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144929190615af2565b9194509250905060008160078111156144ad576144ad615169565b146144c8576144bc858261479c565b600093505050506134a3565b82156144f5576002546144e6906001600160a01b03168a308661456c565b6144f5576144bc85600161479c565b811561452157600254614512906001600160a01b03168a846146cf565b614521576144bc85600261479c565b50600198975050505050505050565b336000908152600a602052604081205460ff1661456057604051630407618360e31b815260040160405180910390fd5b6134a38585858561480a565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516145d191906158ed565b6000604051808303816000865af19150503d806000811461460e576040519150601f19603f3d011682016040523d82523d6000602084013e614613565b606091505b509150915081801561463d57508051158061463d57508080602001905181019061463d9190615706565b979650505050505050565b600080600060408451106146bd575050506020810151604082015160608301516001600160601b038316158061468957506005546001600160601b03841610155b1561469357600192505b816000036146a057600391505b8015806146af57506006548110155b156146b8575060015b6146c8565b506001915060039050815b9193909250565b6000806000856001600160a01b031685856040516024016146f1929190615a66565b60408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525161472691906158ed565b6000604051808303816000865af19150503d8060008114614763576040519150601f19603f3d011682016040523d82523d6000602084013e614768565b606091505b50915091508180156147925750805115806147925750808060200190518101906147929190615706565b9695505050505050565b6147a68282614af1565b60068160078111156147ba576147ba615169565b036147d857604051636590e91560e01b815260040160405180910390fd5b60078160078111156147ec576147ec615169565b03611aff576040516358859f1d60e01b815260040160405180910390fd5b600080600061481886614648565b92505091506005826001600160601b031681548110614839576148396156c7565b60009182526020808320848452600a600c90930201919091019052604090205460ff166148795760405163b34eb75d60e01b815260040160405180910390fd5b600780546001810182556000918252600160601b33026001600160601b03851617600482027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101918255427fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a909101556006805492965090929184908110614904576149046156c7565b6000918252602082200154600580546001600160a01b039092169350906001600160601b03871690811061493a5761493a6156c7565b60009182526020808320600387018054600181018255908552918420600c909302019350600b0201906001600160a01b038a1615614985576149808a8460040154611103565b61498b565b82600401545b9050614997818a615851565b6003808401919091558683558301546002840154612710916149b891615824565b6149c29190615851565b6001830155600282018990556009820180546001600160a01b0319166001600160a01b038c8116919091179091556004805460405163d09f392d60e01b81529182018b9052600060248301529091169063d09f392d90604401600060405180830381600087803b158015614a3557600080fd5b505af1158015614a49573d6000803e3d6000fd5b50505050836001600160a01b031663b6ede540898e8e86600301546040518563ffffffff1660e01b8152600401614a839493929190615a00565b600060405180830381600087803b158015614a9d57600080fd5b505af1158015614ab1573d6000803e3d6000fd5b50506040513392508a91507f141dfc18aa6a56fc816f44f0e9e2f1ebc92b15ab167770e17db5b084c10ed99590600090a350505050505050949350505050565b6001826001811115614b0557614b05615169565b03614b0e575050565b6001816007811115614b2257614b22615169565b03614b4057604051630f323ed960e11b815260040160405180910390fd5b6002816007811115614b5457614b54615169565b03614b725760405163e45e13a360e01b815260040160405180910390fd5b6003816007811115614b8657614b86615169565b03614ba457604051631d91d0ed60e31b815260040160405180910390fd5b6004816007811115614bb857614bb8615169565b03614bd6576040516321f1774b60e11b815260040160405180910390fd5b6005816007811115614bea57614bea615169565b03611aff57604051630caac6b360e31b815260040160405180910390fd5b60405180608001604052806004906020820280368337509192915050565b8260048101928215614c54579160200282015b82811115614c54578251825591602001919060010190614c39565b50614c60929150614c9e565b5090565b828054828255906000526020600020908101928215614c545791602002820182811115614c54578251825591602001919060010190614c39565b5b80821115614c605760008155600101614c9f565b6001600160a01b038116811461437357600080fd5b8035614cd381614cb3565b919050565b600060208284031215614cea57600080fd5b8135614cf581614cb3565b9392505050565b80356001600160601b0381168114614cd357600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d5157614d51614d13565b604052919050565b600082601f830112614d6a57600080fd5b813560206001600160401b03821115614d8557614d85614d13565b8160051b614d94828201614d29565b9283528481018201928281019087851115614dae57600080fd5b83870192505b8483101561463d57823582529183019190830190614db4565b801515811461437357600080fd5b8035614cd381614dcd565b600080600060608486031215614dfb57600080fd5b614e0484614cfc565b925060208401356001600160401b03811115614e1f57600080fd5b614e2b86828701614d59565b9250506040840135614e3c81614dcd565b809150509250925092565b6001600160a01b0391909116815260200190565b600060208284031215614e6d57600080fd5b5035919050565b60008060408385031215614e8757600080fd5b8235614e9281614cb3565b946020939093013593505050565b60008060408385031215614eb357600080fd5b8235614ebe81614cb3565b91506020830135614ece81614dcd565b809150509250929050565b600082601f830112614eea57600080fd5b604051608081018181106001600160401b0382111715614f0c57614f0c614d13565b604052806080840185811115614f2157600080fd5b845b81811015614f3b578035835260209283019201614f23565b509195945050505050565b600082601f830112614f5757600080fd5b81356001600160401b03811115614f7057614f70614d13565b614f83601f8201601f1916602001614d29565b818152846020838601011115614f9857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060008060006102208c8e031215614fd757600080fd5b8b35614fe281614cb3565b9a5060208c0135614ff281614cb3565b995061500060408d01614cc8565b985061500e60608d01614cc8565b975061501c60808d01614cc8565b965061502a60a08d01614ddb565b95506150398d60c08e01614ed9565b94506150498d6101408e01614ed9565b93506101c08c01356001600160401b0381111561506557600080fd5b6150718e828f01614f46565b9350506150816101e08d01614cc8565b91506150906102008d01614cc8565b90509295989b509295989b9093969950565b6000806000606084860312156150b757600080fd5b505081359360208301359350604090920135919050565b6000602082840312156150e057600080fd5b61115482614cfc565b8060005b6004811015610bc65781518452602093840193909101906001016150ed565b6080810161115782846150e9565b6000806040838503121561512d57600080fd5b823561513881614cb3565b915060208301356001600160401b0381111561515357600080fd5b61515f85828601614f46565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b6005811061519d57634e487b7160e01b600052602160045260246000fd5b9052565b6001600160601b03861681526001600160a01b038516602082015260a081016151cd604083018661517f565b9215156060820152608001529392505050565b6000806000606084860312156151f557600080fd5b833561520081614cb3565b92506020840135915060408401356001600160401b0381111561522257600080fd5b61522e86828701614f46565b9150509250925092565b6000806040838503121561524b57600080fd5b614e9283614cfc565b60008060006060848603121561526957600080fd5b833561527481614cb3565b925060208401356001600160401b038116811461529057600080fd5b9150604084013560ff81168114614e3c57600080fd5b6000806000806000806000610140888a0312156152c257600080fd5b6152cb88614cfc565b965060208801356152db81614dcd565b955060408801359450606088013593506080880135925060a088013591506153068960c08a01614ed9565b905092959891949750929550565b6000806040838503121561532757600080fd5b50508035926020909101359150565b60008151808452602080850194506020840160005b838110156153705781516001600160a01b03168752958201959082019060010161534b565b509495945050505050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c0820152600060c08301516101608060e08501526153d6610180850183615336565b60e0860151610100868101919091528601516101208087019190915286015190925061014061540f818701836001600160a01b03169052565b959095015193019290925250919050565b60008060008060008060008060006101808a8c03121561543f57600080fd5b6154488a614cfc565b985060208a013561545881614dcd565b975060408a0135965060608a0135955060808a0135945060a08a013593506154838b60c08c01614ed9565b92506101408a01356001600160401b03808211156154a057600080fd5b6154ac8d838e01614f46565b93506101608c01359150808211156154c357600080fd5b506154d08c828d01614d59565b9150509295985092959850929598565b600080604083850312156154f357600080fd5b8235915060208301356001600160401b0381111561515357600080fd5b60008060006060848603121561552557600080fd5b833592506020840135915060408401356001600160401b0381111561522257600080fd5b60008083601f84011261555b57600080fd5b5081356001600160401b0381111561557257600080fd5b60208301915083602082850101111561558a57600080fd5b9250929050565b6000806000604084860312156155a657600080fd5b83356001600160401b038111156155bc57600080fd5b6155c886828701615549565b9094509250506020840135614e3c81614cb3565b6000806000806000608086880312156155f457600080fd5b8535945060208601356001600160401b0381111561561157600080fd5b61561d88828901615549565b909550935050604086013561563181614cb3565b949793965091946060013592915050565b60006020828403121561565457600080fd5b81356001600160401b0381111561566a57600080fd5b61337184828501614f46565b6000806000806080858703121561568c57600080fd5b843561569781614cb3565b93506156a560208601614cfc565b92506040850135915060608501356156bc81614dcd565b939692955090935050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611157576111576156dd565b60006020828403121561571857600080fd5b8151614cf581614dcd565b60208101611157828461517f565b600181815b8085111561576c578160001904821115615752576157526156dd565b8085161561575f57918102915b93841c9390800290615736565b509250929050565b60008261578357506001611157565b8161579057506000611157565b81600181146157a657600281146157b0576157cc565b6001915050611157565b60ff8411156157c1576157c16156dd565b50506001821b611157565b5060208310610133831016604e8410600b84101617156157ef575081810a611157565b6157f98383615731565b806000190482111561580d5761580d6156dd565b029392505050565b600061115460ff841683615774565b8082028115828204841417611157576111576156dd565b634e487b7160e01b600052601260045260246000fd5b6000826158605761586061583b565b500490565b60008060006060848603121561587a57600080fd5b83519250602084015161588c81614dcd565b6040850151909250614e3c81614dcd565b80820180821115611157576111576156dd565b6000602082840312156158c257600080fd5b5051919050565b60005b838110156158e45781810151838201526020016158cc565b50506000910152565b600082516158ff8184602087016158c9565b9190910192915050565b600061012082019050871515825286602083015285604083015284606083015283608083015261463d60a08301846150e9565b600081518084526159548160208601602086016158c9565b601f01601f19169290920160200192915050565b828152604060208201526000613371604083018461593c565b60006101408083018a1515845260208a60208601528960408601528860608601528760808601526159b560a08601886150e9565b610120850192909252845190819052610160840191602086019160005b818110156159ee578351855293820193928201926001016159d2565b50929c9b505050505050505050505050565b848152836020820152608060408201526000615a1f608083018561593c565b905082606083015295945050505050565b600060018201615a4257615a426156dd565b5060010190565b600060208284031215615a5b57600080fd5b8151614cf581614cb3565b6001600160a01b03929092168252602082015260400190565b6000600160ff1b8201615a9457615a946156dd565b5060000390565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091526001600160a01b0316604082015260600190565b600082615aed57615aed61583b565b500690565b600080600060608486031215615b0757600080fd5b8351925060208401519150604084015160088110614e3c57600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212207e56bd5d72076fd07742f9b3c9c63e51e4d470292bba69d3779fd205c4021e8564736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -2342,7 +2342,7 @@ "storageLayout": { "storage": [ { - "astId": 2024, + "astId": 7184, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "governor", "offset": 0, @@ -2350,7 +2350,7 @@ "type": "t_address" }, { - "astId": 2026, + "astId": 7186, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "guardian", "offset": 0, @@ -2358,15 +2358,15 @@ "type": "t_address" }, { - "astId": 2029, + "astId": 7189, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "pinakion", "offset": 0, "slot": "2", - "type": "t_contract(IERC20)293" + "type": "t_contract(IERC20)1229" }, { - "astId": 2031, + "astId": 7191, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "jurorProsecutionModule", "offset": 0, @@ -2374,47 +2374,47 @@ "type": "t_address" }, { - "astId": 2034, + "astId": 7194, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "sortitionModule", "offset": 0, "slot": "4", - "type": "t_contract(ISortitionModule)16042" + "type": "t_contract(ISortitionModule)23352" }, { - "astId": 2038, + "astId": 7198, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "courts", "offset": 0, "slot": "5", - "type": "t_array(t_struct(Court)1943_storage)dyn_storage" + "type": "t_array(t_struct(Court)7103_storage)dyn_storage" }, { - "astId": 2042, + "astId": 7202, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "disputeKits", "offset": 0, "slot": "6", - "type": "t_array(t_contract(IDisputeKit)15879)dyn_storage" + "type": "t_array(t_contract(IDisputeKit)23189)dyn_storage" }, { - "astId": 2046, + "astId": 7206, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "disputes", "offset": 0, "slot": "7", - "type": "t_array(t_struct(Dispute)1960_storage)dyn_storage" + "type": "t_array(t_struct(Dispute)7120_storage)dyn_storage" }, { - "astId": 2052, + "astId": 7212, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "currencyRates", "offset": 0, "slot": "8", - "type": "t_mapping(t_contract(IERC20)293,t_struct(CurrencyRate)2009_storage)" + "type": "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)7169_storage)" }, { - "astId": 2054, + "astId": 7214, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "paused", "offset": 0, @@ -2422,7 +2422,7 @@ "type": "t_bool" }, { - "astId": 5494, + "astId": 10654, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "arbitrableWhitelist", "offset": 0, @@ -2430,12 +2430,12 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 5497, + "astId": 10657, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "jurorNft", "offset": 0, "slot": "11", - "type": "t_contract(IERC721)409" + "type": "t_contract(IERC721)2375" } ], "types": { @@ -2450,26 +2450,26 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_contract(IDisputeKit)15879)dyn_storage": { - "base": "t_contract(IDisputeKit)15879", + "t_array(t_contract(IDisputeKit)23189)dyn_storage": { + "base": "t_contract(IDisputeKit)23189", "encoding": "dynamic_array", "label": "contract IDisputeKit[]", "numberOfBytes": "32" }, - "t_array(t_struct(Court)1943_storage)dyn_storage": { - "base": "t_struct(Court)1943_storage", + "t_array(t_struct(Court)7103_storage)dyn_storage": { + "base": "t_struct(Court)7103_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreBase.Court[]", "numberOfBytes": "32" }, - "t_array(t_struct(Dispute)1960_storage)dyn_storage": { - "base": "t_struct(Dispute)1960_storage", + "t_array(t_struct(Dispute)7120_storage)dyn_storage": { + "base": "t_struct(Dispute)7120_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreBase.Dispute[]", "numberOfBytes": "32" }, - "t_array(t_struct(Round)1985_storage)dyn_storage": { - "base": "t_struct(Round)1985_storage", + "t_array(t_struct(Round)7145_storage)dyn_storage": { + "base": "t_struct(Round)7145_storage", "encoding": "dynamic_array", "label": "struct KlerosCoreBase.Round[]", "numberOfBytes": "32" @@ -2491,32 +2491,32 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IArbitrableV2)15636": { + "t_contract(IArbitrableV2)22946": { "encoding": "inplace", "label": "contract IArbitrableV2", "numberOfBytes": "20" }, - "t_contract(IDisputeKit)15879": { + "t_contract(IDisputeKit)23189": { "encoding": "inplace", "label": "contract IDisputeKit", "numberOfBytes": "20" }, - "t_contract(IERC20)293": { + "t_contract(IERC20)1229": { "encoding": "inplace", "label": "contract IERC20", "numberOfBytes": "20" }, - "t_contract(IERC721)409": { + "t_contract(IERC721)2375": { "encoding": "inplace", "label": "contract IERC721", "numberOfBytes": "20" }, - "t_contract(ISortitionModule)16042": { + "t_contract(ISortitionModule)23352": { "encoding": "inplace", "label": "contract ISortitionModule", "numberOfBytes": "20" }, - "t_enum(Period)1917": { + "t_enum(Period)7077": { "encoding": "inplace", "label": "enum KlerosCoreBase.Period", "numberOfBytes": "1" @@ -2528,12 +2528,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_contract(IERC20)293,t_struct(CurrencyRate)2009_storage)": { + "t_mapping(t_contract(IERC20)1229,t_struct(CurrencyRate)7169_storage)": { "encoding": "mapping", - "key": "t_contract(IERC20)293", + "key": "t_contract(IERC20)1229", "label": "mapping(contract IERC20 => struct KlerosCoreBase.CurrencyRate)", "numberOfBytes": "32", - "value": "t_struct(CurrencyRate)2009_storage" + "value": "t_struct(CurrencyRate)7169_storage" }, "t_mapping(t_uint256,t_bool)": { "encoding": "mapping", @@ -2542,12 +2542,12 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_struct(Court)1943_storage": { + "t_struct(Court)7103_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.Court", "members": [ { - "astId": 1919, + "astId": 7079, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "parent", "offset": 0, @@ -2555,7 +2555,7 @@ "type": "t_uint96" }, { - "astId": 1921, + "astId": 7081, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "hiddenVotes", "offset": 12, @@ -2563,7 +2563,7 @@ "type": "t_bool" }, { - "astId": 1924, + "astId": 7084, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "children", "offset": 0, @@ -2571,7 +2571,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 1926, + "astId": 7086, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "minStake", "offset": 0, @@ -2579,7 +2579,7 @@ "type": "t_uint256" }, { - "astId": 1928, + "astId": 7088, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "alpha", "offset": 0, @@ -2587,7 +2587,7 @@ "type": "t_uint256" }, { - "astId": 1930, + "astId": 7090, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "feeForJuror", "offset": 0, @@ -2595,7 +2595,7 @@ "type": "t_uint256" }, { - "astId": 1932, + "astId": 7092, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "jurorsForCourtJump", "offset": 0, @@ -2603,7 +2603,7 @@ "type": "t_uint256" }, { - "astId": 1936, + "astId": 7096, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "timesPerPeriod", "offset": 0, @@ -2611,7 +2611,7 @@ "type": "t_array(t_uint256)4_storage" }, { - "astId": 1940, + "astId": 7100, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "supportedDisputeKits", "offset": 0, @@ -2619,7 +2619,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 1942, + "astId": 7102, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "disabled", "offset": 0, @@ -2629,12 +2629,12 @@ ], "numberOfBytes": "384" }, - "t_struct(CurrencyRate)2009_storage": { + "t_struct(CurrencyRate)7169_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.CurrencyRate", "members": [ { - "astId": 2004, + "astId": 7164, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "feePaymentAccepted", "offset": 0, @@ -2642,7 +2642,7 @@ "type": "t_bool" }, { - "astId": 2006, + "astId": 7166, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "rateInEth", "offset": 1, @@ -2650,7 +2650,7 @@ "type": "t_uint64" }, { - "astId": 2008, + "astId": 7168, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "rateDecimals", "offset": 9, @@ -2660,12 +2660,12 @@ ], "numberOfBytes": "32" }, - "t_struct(Dispute)1960_storage": { + "t_struct(Dispute)7120_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.Dispute", "members": [ { - "astId": 1945, + "astId": 7105, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "courtID", "offset": 0, @@ -2673,23 +2673,23 @@ "type": "t_uint96" }, { - "astId": 1948, + "astId": 7108, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "arbitrated", "offset": 12, "slot": "0", - "type": "t_contract(IArbitrableV2)15636" + "type": "t_contract(IArbitrableV2)22946" }, { - "astId": 1951, + "astId": 7111, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "period", "offset": 0, "slot": "1", - "type": "t_enum(Period)1917" + "type": "t_enum(Period)7077" }, { - "astId": 1953, + "astId": 7113, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "ruled", "offset": 1, @@ -2697,7 +2697,7 @@ "type": "t_bool" }, { - "astId": 1955, + "astId": 7115, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "lastPeriodChange", "offset": 0, @@ -2705,22 +2705,22 @@ "type": "t_uint256" }, { - "astId": 1959, + "astId": 7119, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "rounds", "offset": 0, "slot": "3", - "type": "t_array(t_struct(Round)1985_storage)dyn_storage" + "type": "t_array(t_struct(Round)7145_storage)dyn_storage" } ], "numberOfBytes": "128" }, - "t_struct(Round)1985_storage": { + "t_struct(Round)7145_storage": { "encoding": "inplace", "label": "struct KlerosCoreBase.Round", "members": [ { - "astId": 1962, + "astId": 7122, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "disputeKitID", "offset": 0, @@ -2728,7 +2728,7 @@ "type": "t_uint256" }, { - "astId": 1964, + "astId": 7124, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "pnkAtStakePerJuror", "offset": 0, @@ -2736,7 +2736,7 @@ "type": "t_uint256" }, { - "astId": 1966, + "astId": 7126, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "totalFeesForJurors", "offset": 0, @@ -2744,7 +2744,7 @@ "type": "t_uint256" }, { - "astId": 1968, + "astId": 7128, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "nbVotes", "offset": 0, @@ -2752,7 +2752,7 @@ "type": "t_uint256" }, { - "astId": 1970, + "astId": 7130, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "repartitions", "offset": 0, @@ -2760,7 +2760,7 @@ "type": "t_uint256" }, { - "astId": 1972, + "astId": 7132, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "pnkPenalties", "offset": 0, @@ -2768,7 +2768,7 @@ "type": "t_uint256" }, { - "astId": 1975, + "astId": 7135, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "drawnJurors", "offset": 0, @@ -2776,7 +2776,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 1977, + "astId": 7137, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "sumFeeRewardPaid", "offset": 0, @@ -2784,7 +2784,7 @@ "type": "t_uint256" }, { - "astId": 1979, + "astId": 7139, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "sumPnkRewardPaid", "offset": 0, @@ -2792,15 +2792,15 @@ "type": "t_uint256" }, { - "astId": 1982, + "astId": 7142, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "feeToken", "offset": 0, "slot": "9", - "type": "t_contract(IERC20)293" + "type": "t_contract(IERC20)1229" }, { - "astId": 1984, + "astId": 7144, "contract": "src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo", "label": "drawIterations", "offset": 0, diff --git a/contracts/deployments/arbitrum/KlerosCoreNeo_Proxy.json b/contracts/deployments/arbitrum/KlerosCoreNeo_Proxy.json index 56da04ecd..cd78726b2 100644 --- a/contracts/deployments/arbitrum/KlerosCoreNeo_Proxy.json +++ b/contracts/deployments/arbitrum/KlerosCoreNeo_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "abi": [ { "inputs": [ @@ -26,50 +26,50 @@ "type": "receive" } ], - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", - "transactionIndex": 1, - "gasUsed": "6872493", - "logsBloom": "0x00800000000000000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000020000000000000010000801402000000000000008000000000000000000000000000000080a00000000000000000000000080000000000000000000000000000000000008000000000000000000000200000000000000000000000000000000000000000000000000000000000000000004000000000000000060000000001201000000000000000000000000000000000000000000000000000000", - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594", - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", + "contractAddress": "0x991d2df165670b9cac3B022f4B68D65b664222ea", + "transactionIndex": 2, + "gasUsed": "836960", + "logsBloom": "0x00000002000200000000000020000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000420000000000000010000800402000000000000008000000000000000000000000000000000800000000000080000000000080000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000200000000004000000000000000060000000001001000000800000000000000000000000000000000000000000000000", + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247", + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0x44063d258760b98116d53815adbc906a56b3563e540148cc0fc2457f83b5eeb2", "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x000000000000000000000000b7c292cd9fd3d20de84a71ae1caf054eeb6374a9" + "0x00000000000000000000000070b464be85a547144c72485eba2577e5d3a45421" ], "data": "0x", - "logIndex": 0, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 1, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" }, { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0x3475f0ed7216dd7d453db663a1c3024e4f36cc925521d54edb9d13e022cbee3d", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 1, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 2, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" }, { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0xb47629acdf64971062d40984f77d3dee212d735b11e3e8c7a4222d9f0572cc79", "0x0000000000000000000000000000000000000000000000000000000000000001", @@ -77,51 +77,39 @@ "0x0000000000000000000000000000000000000000000000000000000000000001" ], "data": "0x", - "logIndex": 2, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 3, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" }, { - "transactionIndex": 1, - "blockNumber": 190274596, - "transactionHash": "0x964e8f3d8d9933941872cdc0598fc11352fdfa491c18d0d27bfe79d68ff07cb7", - "address": "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "transactionIndex": 2, + "blockNumber": 272063254, + "transactionHash": "0xe0d0da9c80fafb30319b9c919ab8275b1da2ef99da6587539f66e37851e13dbf", + "address": "0x991d2df165670b9cac3B022f4B68D65b664222ea", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 3, - "blockHash": "0xfe834fe86a0537e6dac3ff6454862875c740aeb8d8e3b4c91602a14bdb5ce594" + "logIndex": 4, + "blockHash": "0xf23b464db7b5abe21dc62ed552eeede438bad3ac2d3294e5863198cead1cf247" } ], - "blockNumber": 190274596, - "cumulativeGasUsed": "6872493", + "blockNumber": 272063254, + "cumulativeGasUsed": "918567", "status": 1, "byzantium": true }, "args": [ - "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", - "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b7c292cd9fd3d20de84a71ae1caf054eeb6374a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000220000000000000000000000000614498118850184c62f82d08261109334bfb050f000000000000000000000000fe34a72c55e512601e7d491a9c5b36373ce34d6300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" + "0x17c39AB53A7072b167A74a85D47b30385c98ae89", + "0x2c053739000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000330bd769382cfc6d50175903434ccc8d206dcae5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070b464be85a547144c72485eba2577e5d3a45421000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ad78ebc5ac62000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000022000000000000000000000000021a9402adb818744b296e1d1be58c804118dc03d000000000000000000000000fe34a72c55e512601e7d491a9c5b36373ce34d6300000000000000000000000000000000000000000000000000000000000000010500000000000000000000000000000000000000000000000000000000000000" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"KlerosCoreNeoProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206184205afef335e3929cbe6d07c51961f33c4cbe24e68a0b19e4f7ab6df6903064736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206184205afef335e3929cbe6d07c51961f33c4cbe24e68a0b19e4f7ab6df6903064736f6c63430008180033", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/PolicyRegistry.json b/contracts/deployments/arbitrum/PolicyRegistry.json index 7502d31df..499bdd197 100644 --- a/contracts/deployments/arbitrum/PolicyRegistry.json +++ b/contracts/deployments/arbitrum/PolicyRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x26c1980120F1C82cF611D666CE81D2b54d018547", + "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", "abi": [ { "stateMutability": "payable", @@ -231,66 +231,54 @@ "type": "constructor" } ], - "transactionHash": "0xb2c370c53d49714cf74d7ae82da3b5da160f22f97529e5f4d6c5786e4615f7eb", + "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x26c1980120F1C82cF611D666CE81D2b54d018547", - "transactionIndex": 1, - "gasUsed": "5300939", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080010000000000000000000000000000000000000000000000000000800000000000000000000000000000000010000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x419ba6ad860f99d54faacf3d36d879239522e20fad6adfa78cf12f278b385f3b", - "transactionHash": "0xb2c370c53d49714cf74d7ae82da3b5da160f22f97529e5f4d6c5786e4615f7eb", + "contractAddress": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", + "transactionIndex": 2, + "gasUsed": "353404", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000088000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000008000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db", + "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274403, - "transactionHash": "0xb2c370c53d49714cf74d7ae82da3b5da160f22f97529e5f4d6c5786e4615f7eb", - "address": "0x26c1980120F1C82cF611D666CE81D2b54d018547", + "transactionIndex": 2, + "blockNumber": 272063037, + "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", + "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0x419ba6ad860f99d54faacf3d36d879239522e20fad6adfa78cf12f278b385f3b" + "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db" } ], - "blockNumber": 190274403, - "cumulativeGasUsed": "5300939", + "blockNumber": 272063037, + "cumulativeGasUsed": "448355", "status": 1, "byzantium": true }, "args": [ - "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "0x15E5964C7751dF8563eA4bC000301582C79BC454", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"PolicyRegistryProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", "execute": { "methodName": "initialize", "args": [ "0xf1C7c037891525E360C59f708739Ac09A7670c59" ] }, - "implementation": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "implementation": "0x15E5964C7751dF8563eA4bC000301582C79BC454", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/PolicyRegistry_Implementation.json b/contracts/deployments/arbitrum/PolicyRegistry_Implementation.json index efda74ccb..d655ebbdb 100644 --- a/contracts/deployments/arbitrum/PolicyRegistry_Implementation.json +++ b/contracts/deployments/arbitrum/PolicyRegistry_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "address": "0x15E5964C7751dF8563eA4bC000301582C79BC454", "abi": [ { "inputs": [], @@ -212,41 +212,41 @@ "type": "function" } ], - "transactionHash": "0x7c6ce61603d007ae06bc34c3d5948daaed0cbfeb91b5a365745cda961d3d5e0b", + "transactionHash": "0x3d9ac44fd289680ee3424bd81f5e85f4804949e314867f703518becc2a97febd", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", - "transactionIndex": 3, - "gasUsed": "14058404", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000008000080000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000004000000000000000000000000000000000000000", - "blockHash": "0xe72d71e9c52704089606cc63d2d7e7910982fad2992e706428fa9cf780594f23", - "transactionHash": "0x7c6ce61603d007ae06bc34c3d5948daaed0cbfeb91b5a365745cda961d3d5e0b", + "contractAddress": "0x15E5964C7751dF8563eA4bC000301582C79BC454", + "transactionIndex": 13, + "gasUsed": "1181822", + "logsBloom": "0x00000000000000000000000000040000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd467354aaae0d73ec32ececbe4b0fb6e7de744f92da478ac703f621e8cc93182", + "transactionHash": "0x3d9ac44fd289680ee3424bd81f5e85f4804949e314867f703518becc2a97febd", "logs": [ { - "transactionIndex": 3, - "blockNumber": 190274392, - "transactionHash": "0x7c6ce61603d007ae06bc34c3d5948daaed0cbfeb91b5a365745cda961d3d5e0b", - "address": "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "transactionIndex": 13, + "blockNumber": 272063019, + "transactionHash": "0x3d9ac44fd289680ee3424bd81f5e85f4804949e314867f703518becc2a97febd", + "address": "0x15E5964C7751dF8563eA4bC000301582C79BC454", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0xe72d71e9c52704089606cc63d2d7e7910982fad2992e706428fa9cf780594f23" + "logIndex": 18, + "blockHash": "0xd467354aaae0d73ec32ececbe4b0fb6e7de744f92da478ac703f621e8cc93182" } ], - "blockNumber": 190274392, - "cumulativeGasUsed": "17366934", + "blockNumber": 272063019, + "cumulativeGasUsed": "3237688", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"PolicyUpdate\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"policies\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"setPolicy\",\"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\":\"A contract to maintain a policy for each court.\",\"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.\"},\"PolicyUpdate(uint256,string,string)\":{\"details\":\"Emitted when a policy is updated.\",\"params\":{\"_courtID\":\"The ID of the policy's court.\",\"_courtName\":\"The name of the policy's court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"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.\"},\"initialize(address)\":{\"details\":\"Constructs the `PolicyRegistry` contract.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"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.\"},\"setPolicy(uint256,string,string)\":{\"details\":\"Sets the policy for the specified court.\",\"params\":{\"_courtID\":\"The ID of the specified court.\",\"_courtName\":\"The name of the specified court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"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\":\"PolicyRegistry\",\"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/PolicyRegistry.sol\":\"PolicyRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/PolicyRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title PolicyRegistry\\n/// @dev A contract to maintain a policy for each court.\\ncontract PolicyRegistry is UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a policy is updated.\\n /// @param _courtID The ID of the policy's court.\\n /// @param _courtName The name of the policy's court.\\n /// @param _policy The URI of the policy JSON.\\n event PolicyUpdate(uint256 indexed _courtID, string _courtName, string _policy);\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor;\\n mapping(uint256 => string) public policies;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Requires that the sender is the governor.\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"No allowed: governor 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 Constructs the `PolicyRegistry` contract.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\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 /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the policy for the specified court.\\n /// @param _courtID The ID of the specified court.\\n /// @param _courtName The name of the specified court.\\n /// @param _policy The URI of the policy JSON.\\n function setPolicy(uint256 _courtID, string calldata _courtName, string calldata _policy) external onlyByGovernor {\\n policies[_courtID] = _policy;\\n emit PolicyUpdate(_courtID, _courtName, policies[_courtID]);\\n }\\n}\\n\",\"keccak256\":\"0x24154360b94aa45b0699b65d31087e475f9d43b42771c62440f3d5741f7419a4\",\"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.18;\\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\":\"0xcfffacf78b92e89a0123aff2c86188abc5327bb59b223f04e1cc1267234bd828\",\"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.18;\\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\":\"0xbac7476deeee8ebbfc895a42e8b50a01c7549164a48ee2ddb0e2307946ee35f9\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610b926100fc6000396000818161017b015281816101a401526103a10152610b926000f3fe6080604052600436106100605760003560e01c80630c340a24146100655780634f1ef286146100a257806352d1902d146100b7578063bdf73780146100da578063c4d66de8146100fa578063d3e894831461011a578063e4c0aaf414610147575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b56100b03660046106ba565b610167565b005b3480156100c357600080fd5b506100cc610394565b604051908152602001610099565b3480156100e657600080fd5b506100b56100f53660046107c5565b6103f2565b34801561010657600080fd5b506100b561011536600461083f565b61048b565b34801561012657600080fd5b5061013a610135366004610861565b610575565b604051610099919061089e565b34801561015357600080fd5b506100b561016236600461083f565b61060f565b6101708261065b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806101ee57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166101e2600080516020610b3d8339815191525490565b6001600160a01b031614155b1561020c5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610266575060408051601f3d908101601f19168201909252610263918101906108d1565b60015b61029357604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610b3d83398151915281146102c457604051632a87526960e21b81526004810182905260240161028a565b600080516020610b3d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561038f576000836001600160a01b03168360405161032b91906108ea565b600060405180830381855af49150503d8060008114610366576040519150601f19603f3d011682016040523d82523d6000602084013e61036b565b606091505b505090508061038d576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103df5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610b3d83398151915290565b6000546001600160a01b0316331461041c5760405162461bcd60e51b815260040161028a90610906565b60008581526001602052604090206104358284836109c1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161047c93929190610a82565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104d55750805467ffffffffffffffff808416911610155b156104f25760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6001602052600090815260409020805461058e90610939565b80601f01602080910402602001604051908101604052809291908181526020018280546105ba90610939565b80156106075780601f106105dc57610100808354040283529160200191610607565b820191906000526020600020905b8154815290600101906020018083116105ea57829003601f168201915b505050505081565b6000546001600160a01b031633146106395760405162461bcd60e51b815260040161028a90610906565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106855760405162461bcd60e51b815260040161028a90610906565b50565b80356001600160a01b038116811461069f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106cd57600080fd5b6106d683610688565b9150602083013567ffffffffffffffff808211156106f357600080fd5b818501915085601f83011261070757600080fd5b813581811115610719576107196106a4565b604051601f8201601f19908116603f01168101908382118183101715610741576107416106a4565b8160405282815288602084870101111561075a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008083601f84011261078e57600080fd5b50813567ffffffffffffffff8111156107a657600080fd5b6020830191508360208285010111156107be57600080fd5b9250929050565b6000806000806000606086880312156107dd57600080fd5b85359450602086013567ffffffffffffffff808211156107fc57600080fd5b61080889838a0161077c565b9096509450604088013591508082111561082157600080fd5b5061082e8882890161077c565b969995985093965092949392505050565b60006020828403121561085157600080fd5b61085a82610688565b9392505050565b60006020828403121561087357600080fd5b5035919050565b60005b8381101561089557818101518382015260200161087d565b50506000910152565b60208152600082518060208401526108bd81604085016020870161087a565b601f01601f19169190910160400192915050565b6000602082840312156108e357600080fd5b5051919050565b600082516108fc81846020870161087a565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c9082168061094d57607f821691505b60208210810361096d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561038f57600081815260208120601f850160051c8101602086101561099a5750805b601f850160051c820191505b818110156109b9578281556001016109a6565b505050505050565b67ffffffffffffffff8311156109d9576109d96106a4565b6109ed836109e78354610939565b83610973565b6000601f841160018114610a215760008515610a095750838201355b600019600387901b1c1916600186901b178355610a7b565b600083815260209020601f19861690835b82811015610a525786850135825560209485019460019092019101610a32565b5086821015610a6f5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f850116820160206060848303018185015260008554610ac181610939565b8060608601526080600180841660008114610ae35760018114610afd57610b2b565b60ff1985168884015283151560051b880183019550610b2b565b8a6000528660002060005b85811015610b235781548a8201860152908301908801610b08565b890184019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122013474a11eb4f083f97a82a4223662ae3b08f8ebecfcac55156e710f84b21048b64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a24146100655780634f1ef286146100a257806352d1902d146100b7578063bdf73780146100da578063c4d66de8146100fa578063d3e894831461011a578063e4c0aaf414610147575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b56100b03660046106ba565b610167565b005b3480156100c357600080fd5b506100cc610394565b604051908152602001610099565b3480156100e657600080fd5b506100b56100f53660046107c5565b6103f2565b34801561010657600080fd5b506100b561011536600461083f565b61048b565b34801561012657600080fd5b5061013a610135366004610861565b610575565b604051610099919061089e565b34801561015357600080fd5b506100b561016236600461083f565b61060f565b6101708261065b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806101ee57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166101e2600080516020610b3d8339815191525490565b6001600160a01b031614155b1561020c5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610266575060408051601f3d908101601f19168201909252610263918101906108d1565b60015b61029357604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610b3d83398151915281146102c457604051632a87526960e21b81526004810182905260240161028a565b600080516020610b3d8339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561038f576000836001600160a01b03168360405161032b91906108ea565b600060405180830381855af49150503d8060008114610366576040519150601f19603f3d011682016040523d82523d6000602084013e61036b565b606091505b505090508061038d576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103df5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610b3d83398151915290565b6000546001600160a01b0316331461041c5760405162461bcd60e51b815260040161028a90610906565b60008581526001602052604090206104358284836109c1565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161047c93929190610a82565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104d55750805467ffffffffffffffff808416911610155b156104f25760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6001602052600090815260409020805461058e90610939565b80601f01602080910402602001604051908101604052809291908181526020018280546105ba90610939565b80156106075780601f106105dc57610100808354040283529160200191610607565b820191906000526020600020905b8154815290600101906020018083116105ea57829003601f168201915b505050505081565b6000546001600160a01b031633146106395760405162461bcd60e51b815260040161028a90610906565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106855760405162461bcd60e51b815260040161028a90610906565b50565b80356001600160a01b038116811461069f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106cd57600080fd5b6106d683610688565b9150602083013567ffffffffffffffff808211156106f357600080fd5b818501915085601f83011261070757600080fd5b813581811115610719576107196106a4565b604051601f8201601f19908116603f01168101908382118183101715610741576107416106a4565b8160405282815288602084870101111561075a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008083601f84011261078e57600080fd5b50813567ffffffffffffffff8111156107a657600080fd5b6020830191508360208285010111156107be57600080fd5b9250929050565b6000806000806000606086880312156107dd57600080fd5b85359450602086013567ffffffffffffffff808211156107fc57600080fd5b61080889838a0161077c565b9096509450604088013591508082111561082157600080fd5b5061082e8882890161077c565b969995985093965092949392505050565b60006020828403121561085157600080fd5b61085a82610688565b9392505050565b60006020828403121561087357600080fd5b5035919050565b60005b8381101561089557818101518382015260200161087d565b50506000910152565b60208152600082518060208401526108bd81604085016020870161087a565b601f01601f19169190910160400192915050565b6000602082840312156108e357600080fd5b5051919050565b600082516108fc81846020870161087a565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c9082168061094d57607f821691505b60208210810361096d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561038f57600081815260208120601f850160051c8101602086101561099a5750805b601f850160051c820191505b818110156109b9578281556001016109a6565b505050505050565b67ffffffffffffffff8311156109d9576109d96106a4565b6109ed836109e78354610939565b83610973565b6000601f841160018114610a215760008515610a095750838201355b600019600387901b1c1916600186901b178355610a7b565b600083815260209020601f19861690835b82811015610a525786850135825560209485019460019092019101610a32565b5086821015610a6f5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f850116820160206060848303018185015260008554610ac181610939565b8060608601526080600180841660008114610ae35760018114610afd57610b2b565b60ff1985168884015283151560051b880183019550610b2b565b8a6000528660002060005b85811015610b235781548a8201860152908301908801610b08565b890184019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122013474a11eb4f083f97a82a4223662ae3b08f8ebecfcac55156e710f84b21048b64736f6c63430008120033", + "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\":true,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"PolicyUpdate\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"policies\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_courtName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_policy\",\"type\":\"string\"}],\"name\":\"setPolicy\",\"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\":\"A contract to maintain a policy for each court.\",\"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.\"},\"PolicyUpdate(uint256,string,string)\":{\"details\":\"Emitted when a policy is updated.\",\"params\":{\"_courtID\":\"The ID of the policy's court.\",\"_courtName\":\"The name of the policy's court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"Upgraded(address)\":{\"params\":{\"newImplementation\":\"Address of the new implementation the proxy is now forwarding calls to.\"}}},\"kind\":\"dev\",\"methods\":{\"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.\"},\"initialize(address)\":{\"details\":\"Constructs the `PolicyRegistry` contract.\",\"params\":{\"_governor\":\"The governor's address.\"}},\"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.\"},\"setPolicy(uint256,string,string)\":{\"details\":\"Sets the policy for the specified court.\",\"params\":{\"_courtID\":\"The ID of the specified court.\",\"_courtName\":\"The name of the specified court.\",\"_policy\":\"The URI of the policy JSON.\"}},\"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\":\"PolicyRegistry\",\"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/PolicyRegistry.sol\":\"PolicyRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/arbitration/PolicyRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.24;\\n\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title PolicyRegistry\\n/// @dev A contract to maintain a policy for each court.\\ncontract PolicyRegistry is UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Emitted when a policy is updated.\\n /// @param _courtID The ID of the policy's court.\\n /// @param _courtName The name of the policy's court.\\n /// @param _policy The URI of the policy JSON.\\n event PolicyUpdate(uint256 indexed _courtID, string _courtName, string _policy);\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor;\\n mapping(uint256 => string) public policies;\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n /// @dev Requires that the sender is the governor.\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"No allowed: governor 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 Constructs the `PolicyRegistry` contract.\\n /// @param _governor The governor's address.\\n function initialize(address _governor) external reinitializer(1) {\\n governor = _governor;\\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 /// @dev Changes the `governor` storage variable.\\n /// @param _governor The new value for the `governor` storage variable.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sets the policy for the specified court.\\n /// @param _courtID The ID of the specified court.\\n /// @param _courtName The name of the specified court.\\n /// @param _policy The URI of the policy JSON.\\n function setPolicy(uint256 _courtID, string calldata _courtName, string calldata _policy) external onlyByGovernor {\\n policies[_courtID] = _policy;\\n emit PolicyUpdate(_courtID, _courtName, policies[_courtID]);\\n }\\n}\\n\",\"keccak256\":\"0x25373389309c32b639d3a286a1d656750788afadf9d286ea1fa754058905f58a\",\"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": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610b996100fc6000396000818161017b015281816101a401526103a10152610b996000f3fe6080604052600436106100605760003560e01c80630c340a24146100655780634f1ef286146100a257806352d1902d146100b7578063bdf73780146100da578063c4d66de8146100fa578063d3e894831461011a578063e4c0aaf414610147575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b56100b03660046106ba565b610167565b005b3480156100c357600080fd5b506100cc610394565b604051908152602001610099565b3480156100e657600080fd5b506100b56100f53660046107c5565b6103f2565b34801561010657600080fd5b506100b561011536600461083f565b61048b565b34801561012657600080fd5b5061013a610135366004610861565b610575565b604051610099919061089e565b34801561015357600080fd5b506100b561016236600461083f565b61060f565b6101708261065b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806101ee57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166101e2600080516020610b448339815191525490565b6001600160a01b031614155b1561020c5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610266575060408051601f3d908101601f19168201909252610263918101906108d1565b60015b61029357604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610b4483398151915281146102c457604051632a87526960e21b81526004810182905260240161028a565b600080516020610b448339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561038f576000836001600160a01b03168360405161032b91906108ea565b600060405180830381855af49150503d8060008114610366576040519150601f19603f3d011682016040523d82523d6000602084013e61036b565b606091505b505090508061038d576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103df5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610b4483398151915290565b6000546001600160a01b0316331461041c5760405162461bcd60e51b815260040161028a90610906565b60008581526001602052604090206104358284836109c3565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161047c93929190610a84565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104d55750805467ffffffffffffffff808416911610155b156104f25760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6001602052600090815260409020805461058e90610939565b80601f01602080910402602001604051908101604052809291908181526020018280546105ba90610939565b80156106075780601f106105dc57610100808354040283529160200191610607565b820191906000526020600020905b8154815290600101906020018083116105ea57829003601f168201915b505050505081565b6000546001600160a01b031633146106395760405162461bcd60e51b815260040161028a90610906565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106855760405162461bcd60e51b815260040161028a90610906565b50565b80356001600160a01b038116811461069f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106cd57600080fd5b6106d683610688565b9150602083013567ffffffffffffffff808211156106f357600080fd5b818501915085601f83011261070757600080fd5b813581811115610719576107196106a4565b604051601f8201601f19908116603f01168101908382118183101715610741576107416106a4565b8160405282815288602084870101111561075a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008083601f84011261078e57600080fd5b50813567ffffffffffffffff8111156107a657600080fd5b6020830191508360208285010111156107be57600080fd5b9250929050565b6000806000806000606086880312156107dd57600080fd5b85359450602086013567ffffffffffffffff808211156107fc57600080fd5b61080889838a0161077c565b9096509450604088013591508082111561082157600080fd5b5061082e8882890161077c565b969995985093965092949392505050565b60006020828403121561085157600080fd5b61085a82610688565b9392505050565b60006020828403121561087357600080fd5b5035919050565b60005b8381101561089557818101518382015260200161087d565b50506000910152565b60208152600082518060208401526108bd81604085016020870161087a565b601f01601f19169190910160400192915050565b6000602082840312156108e357600080fd5b5051919050565b600082516108fc81846020870161087a565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c9082168061094d57607f821691505b60208210810361096d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561038f576000816000526020600020601f850160051c8101602086101561099c5750805b601f850160051c820191505b818110156109bb578281556001016109a8565b505050505050565b67ffffffffffffffff8311156109db576109db6106a4565b6109ef836109e98354610939565b83610973565b6000601f841160018114610a235760008515610a0b5750838201355b600019600387901b1c1916600186901b178355610a7d565b600083815260209020601f19861690835b82811015610a545786850135825560209485019460019092019101610a34565b5086821015610a715760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610ac481610939565b8060608601526080600180841660008114610ae65760018114610b0257610b32565b60ff1985166080890152608084151560051b8901019550610b32565b8a600052602060002060005b85811015610b295781548a8201860152908301908801610b0e565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212206476cf0efafdf5d430c5c6365fdd50915842587a711b1800304c1aa744ca9e8864736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100605760003560e01c80630c340a24146100655780634f1ef286146100a257806352d1902d146100b7578063bdf73780146100da578063c4d66de8146100fa578063d3e894831461011a578063e4c0aaf414610147575b600080fd5b34801561007157600080fd5b50600054610085906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b56100b03660046106ba565b610167565b005b3480156100c357600080fd5b506100cc610394565b604051908152602001610099565b3480156100e657600080fd5b506100b56100f53660046107c5565b6103f2565b34801561010657600080fd5b506100b561011536600461083f565b61048b565b34801561012657600080fd5b5061013a610135366004610861565b610575565b604051610099919061089e565b34801561015357600080fd5b506100b561016236600461083f565b61060f565b6101708261065b565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806101ee57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166101e2600080516020610b448339815191525490565b6001600160a01b031614155b1561020c5760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610266575060408051601f3d908101601f19168201909252610263918101906108d1565b60015b61029357604051630c76093760e01b81526001600160a01b03831660048201526024015b60405180910390fd5b600080516020610b4483398151915281146102c457604051632a87526960e21b81526004810182905260240161028a565b600080516020610b448339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a281511561038f576000836001600160a01b03168360405161032b91906108ea565b600060405180830381855af49150503d8060008114610366576040519150601f19603f3d011682016040523d82523d6000602084013e61036b565b606091505b505090508061038d576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103df5760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610b4483398151915290565b6000546001600160a01b0316331461041c5760405162461bcd60e51b815260040161028a90610906565b60008581526001602052604090206104358284836109c3565b50847f61f7110245e82eddd3b134d1e1607420d4a4dcdab30f5abdbbc9c3485b5dd2a48585600160008a815260200190815260200160002060405161047c93929190610a84565b60405180910390a25050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806104d55750805467ffffffffffffffff808416911610155b156104f25760405162dc149f60e41b815260040160405180910390fd5b8054600160401b67ffffffffffffffff841668ffffffffffffffffff199092168217178255600080546001600160a01b0319166001600160a01b038616179055815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b6001602052600090815260409020805461058e90610939565b80601f01602080910402602001604051908101604052809291908181526020018280546105ba90610939565b80156106075780601f106105dc57610100808354040283529160200191610607565b820191906000526020600020905b8154815290600101906020018083116105ea57829003601f168201915b505050505081565b6000546001600160a01b031633146106395760405162461bcd60e51b815260040161028a90610906565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106855760405162461bcd60e51b815260040161028a90610906565b50565b80356001600160a01b038116811461069f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106cd57600080fd5b6106d683610688565b9150602083013567ffffffffffffffff808211156106f357600080fd5b818501915085601f83011261070757600080fd5b813581811115610719576107196106a4565b604051601f8201601f19908116603f01168101908382118183101715610741576107416106a4565b8160405282815288602084870101111561075a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008083601f84011261078e57600080fd5b50813567ffffffffffffffff8111156107a657600080fd5b6020830191508360208285010111156107be57600080fd5b9250929050565b6000806000806000606086880312156107dd57600080fd5b85359450602086013567ffffffffffffffff808211156107fc57600080fd5b61080889838a0161077c565b9096509450604088013591508082111561082157600080fd5b5061082e8882890161077c565b969995985093965092949392505050565b60006020828403121561085157600080fd5b61085a82610688565b9392505050565b60006020828403121561087357600080fd5b5035919050565b60005b8381101561089557818101518382015260200161087d565b50506000910152565b60208152600082518060208401526108bd81604085016020870161087a565b601f01601f19169190910160400192915050565b6000602082840312156108e357600080fd5b5051919050565b600082516108fc81846020870161087a565b9190910192915050565b6020808252601990820152784e6f20616c6c6f7765643a20676f7665726e6f72206f6e6c7960381b604082015260600190565b600181811c9082168061094d57607f821691505b60208210810361096d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561038f576000816000526020600020601f850160051c8101602086101561099c5750805b601f850160051c820191505b818110156109bb578281556001016109a8565b505050505050565b67ffffffffffffffff8311156109db576109db6106a4565b6109ef836109e98354610939565b83610973565b6000601f841160018114610a235760008515610a0b5750838201355b600019600387901b1c1916600186901b178355610a7d565b600083815260209020601f19861690835b82811015610a545786850135825560209485019460019092019101610a34565b5086821015610a715760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152826040820152828460608301376000606084830101526000601f19601f85011682016020606084830301602085015260008554610ac481610939565b8060608601526080600180841660008114610ae65760018114610b0257610b32565b60ff1985166080890152608084151560051b8901019550610b32565b8a600052602060002060005b85811015610b295781548a8201860152908301908801610b0e565b89016080019650505b50939b9a505050505050505050505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212206476cf0efafdf5d430c5c6365fdd50915842587a711b1800304c1aa744ca9e8864736f6c63430008180033", "devdoc": { "details": "A contract to maintain a policy for each court.", "errors": { @@ -353,7 +353,7 @@ "storageLayout": { "storage": [ { - "astId": 10625, + "astId": 12203, "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", "label": "governor", "offset": 0, @@ -361,7 +361,7 @@ "type": "t_address" }, { - "astId": 10629, + "astId": 12207, "contract": "src/arbitration/PolicyRegistry.sol:PolicyRegistry", "label": "policies", "offset": 0, diff --git a/contracts/deployments/arbitrum/PolicyRegistry_Proxy.json b/contracts/deployments/arbitrum/PolicyRegistry_Proxy.json index 03135a8d1..933403b17 100644 --- a/contracts/deployments/arbitrum/PolicyRegistry_Proxy.json +++ b/contracts/deployments/arbitrum/PolicyRegistry_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x26c1980120F1C82cF611D666CE81D2b54d018547", + "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0xb2c370c53d49714cf74d7ae82da3b5da160f22f97529e5f4d6c5786e4615f7eb", + "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x26c1980120F1C82cF611D666CE81D2b54d018547", - "transactionIndex": 1, - "gasUsed": "5300939", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080010000000000000000000000000000000000000000000000000000800000000000000000000000000000000010000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x419ba6ad860f99d54faacf3d36d879239522e20fad6adfa78cf12f278b385f3b", - "transactionHash": "0xb2c370c53d49714cf74d7ae82da3b5da160f22f97529e5f4d6c5786e4615f7eb", + "contractAddress": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", + "transactionIndex": 2, + "gasUsed": "353404", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000088000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000008000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db", + "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274403, - "transactionHash": "0xb2c370c53d49714cf74d7ae82da3b5da160f22f97529e5f4d6c5786e4615f7eb", - "address": "0x26c1980120F1C82cF611D666CE81D2b54d018547", + "transactionIndex": 2, + "blockNumber": 272063037, + "transactionHash": "0x9673ba78958940e617dbf7e4c3fb79c23df574f7dac9979638387b38e9eb82ad", + "address": "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", "logIndex": 0, - "blockHash": "0x419ba6ad860f99d54faacf3d36d879239522e20fad6adfa78cf12f278b385f3b" + "blockHash": "0x813d680f913ac698f1004b8ecaef18f96f7f7962ac9103391c6ced97cf9039db" } ], - "blockNumber": 190274403, - "cumulativeGasUsed": "5300939", + "blockNumber": 272063037, + "cumulativeGasUsed": "448355", "status": 1, "byzantium": true }, "args": [ - "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + "0x15E5964C7751dF8563eA4bC000301582C79BC454", "0xc4d66de8000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"PolicyRegistryProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212203b3fd7b58d814daf56e8a98b5f03d35c3e25bc365afd21a0aa80ee883c5d3f1264736f6c63430008180033", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/RandomizerRNG.json b/contracts/deployments/arbitrum/RandomizerRNG.json index 8aa02a413..96fbbb05c 100644 --- a/contracts/deployments/arbitrum/RandomizerRNG.json +++ b/contracts/deployments/arbitrum/RandomizerRNG.json @@ -1,5 +1,5 @@ { - "address": "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", "abi": [ { "stateMutability": "payable", @@ -151,7 +151,7 @@ "inputs": [ { "internalType": "uint256", - "name": "", + "name": "requestId", "type": "uint256" } ], @@ -159,7 +159,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "number", "type": "uint256" } ], @@ -246,7 +246,7 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "requester", "type": "address" } ], @@ -254,7 +254,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "requestId", "type": "uint256" } ], @@ -322,44 +322,44 @@ "type": "constructor" } ], - "transactionHash": "0x844c158d67f22dc917fc3f60ae72ff48b6aa45af986bb9dce85872a6e4eeeba7", + "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", - "transactionIndex": 3, - "gasUsed": "5563050", - "logsBloom": "0x00000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000004000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xaf8bc1d36ade1d4cd71a13af8fe170a37a1a6ca161b36d800002b1dfea2c5d9d", - "transactionHash": "0x844c158d67f22dc917fc3f60ae72ff48b6aa45af986bb9dce85872a6e4eeeba7", + "contractAddress": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", + "transactionIndex": 11, + "gasUsed": "420417", + "logsBloom": "0x00000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000200000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8", + "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", "logs": [ { - "transactionIndex": 3, - "blockNumber": 190274480, - "transactionHash": "0x844c158d67f22dc917fc3f60ae72ff48b6aa45af986bb9dce85872a6e4eeeba7", - "address": "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + "transactionIndex": 11, + "blockNumber": 272063118, + "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", + "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 10, - "blockHash": "0xaf8bc1d36ade1d4cd71a13af8fe170a37a1a6ca161b36d800002b1dfea2c5d9d" + "logIndex": 37, + "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8" } ], - "blockNumber": 190274480, - "cumulativeGasUsed": "8678913", + "blockNumber": 272063118, + "cumulativeGasUsed": "3366631", "status": 1, "byzantium": true }, "args": [ - "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", "0x485cc9550000000000000000000000005b8bb80f2d72d0c85cab8fb169e8170a05c94baf000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"RandomizerRNGProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", "execute": { "methodName": "initialize", "args": [ @@ -367,22 +367,10 @@ "0xf1C7c037891525E360C59f708739Ac09A7670c59" ] }, - "implementation": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + "implementation": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/RandomizerRNG_Implementation.json b/contracts/deployments/arbitrum/RandomizerRNG_Implementation.json index e32a54f93..18fbcd074 100644 --- a/contracts/deployments/arbitrum/RandomizerRNG_Implementation.json +++ b/contracts/deployments/arbitrum/RandomizerRNG_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + "address": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", "abi": [ { "inputs": [], @@ -148,7 +148,7 @@ "inputs": [ { "internalType": "uint256", - "name": "", + "name": "requestId", "type": "uint256" } ], @@ -156,7 +156,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "number", "type": "uint256" } ], @@ -243,7 +243,7 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "requester", "type": "address" } ], @@ -251,7 +251,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "requestId", "type": "uint256" } ], @@ -303,41 +303,41 @@ "type": "function" } ], - "transactionHash": "0xbd583dfb978a2e401178bac24f3776dba1c28cc8603c1f622173e378154408b5", + "transactionHash": "0xa3e2215009913f71ca45453989465da40afe272f20c76b3f960fa0ac8315df16", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", - "transactionIndex": 3, - "gasUsed": "12553895", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400020000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xef7521fbc369332c5a84eebdee6026696805343881b40f6cdc7003cc69661437", - "transactionHash": "0xbd583dfb978a2e401178bac24f3776dba1c28cc8603c1f622173e378154408b5", + "contractAddress": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", + "transactionIndex": 1, + "gasUsed": "1153296", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004100000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xba092d35a051cde13ed281dd7d2491a5312ae73995780f9c5440e6c4c64d5d79", + "transactionHash": "0xa3e2215009913f71ca45453989465da40afe272f20c76b3f960fa0ac8315df16", "logs": [ { - "transactionIndex": 3, - "blockNumber": 190274469, - "transactionHash": "0xbd583dfb978a2e401178bac24f3776dba1c28cc8603c1f622173e378154408b5", - "address": "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + "transactionIndex": 1, + "blockNumber": 272063103, + "transactionHash": "0xa3e2215009913f71ca45453989465da40afe272f20c76b3f960fa0ac8315df16", + "address": "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 2, - "blockHash": "0xef7521fbc369332c5a84eebdee6026696805343881b40f6cdc7003cc69661437" + "logIndex": 0, + "blockHash": "0xba092d35a051cde13ed281dd7d2491a5312ae73995780f9c5440e6c4c64d5d79" } ], - "blockNumber": 190274469, - "cumulativeGasUsed": "18235579", + "blockNumber": 272063103, + "cumulativeGasUsed": "1153296", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"callbackGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"contract IRandomizer\",\"name\":\"_randomizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomizer\",\"outputs\":[{\"internalType\":\"contract IRandomizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_value\",\"type\":\"bytes32\"}],\"name\":\"randomizerCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"randomizerWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"requesterToID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_callbackGasLimit\",\"type\":\"uint256\"}],\"name\":\"setCallbackGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_randomizer\",\"type\":\"address\"}],\"name\":\"setRandomizer\",\"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\":{\"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\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"initialize(address,address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the contract.\",\"_randomizer\":\"Randomizer 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.\"},\"randomizerCallback(uint256,bytes32)\":{\"details\":\"Callback function called by the randomizer contract when the random value is generated.\"},\"randomizerWithdraw(uint256)\":{\"details\":\"Allows the governor to withdraw randomizer funds.\",\"params\":{\"_amount\":\"Amount to withdraw in wei.\"}},\"receiveRandomness(uint256)\":{\"details\":\"Return the random number.\",\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number. The id of the request is tied to the sender.\"},\"setCallbackGasLimit(uint256)\":{\"details\":\"Change the Randomizer callback gas limit.\",\"params\":{\"_callbackGasLimit\":\"the new limit.\"}},\"setRandomizer(address)\":{\"details\":\"Change the Randomizer address.\",\"params\":{\"_randomizer\":\"the new Randomizer address.\"}},\"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\":\"Random Number Generator that uses Randomizer.ai https://randomizer.ai/\",\"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/rng/RandomizerRNG.sol\":\"RandomizerRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xcfffacf78b92e89a0123aff2c86188abc5327bb59b223f04e1cc1267234bd828\",\"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.18;\\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\":\"0xbac7476deeee8ebbfc895a42e8b50a01c7549164a48ee2ddb0e2307946ee35f9\",\"license\":\"MIT\"},\"src/rng/IRandomizer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\n// Randomizer protocol interface\\ninterface IRandomizer {\\n function request(uint256 callbackGasLimit) external returns (uint256);\\n\\n function clientWithdrawTo(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xe71bbdd9470eeb89f5d10aee07fda95b6ccc13aa845c0d8c0bc7a9ec20b6356e\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x5afe7121f49aebe72218df356bd91b66c2171b9ad15e7945a15a091784291a43\",\"license\":\"MIT\"},\"src/rng/RandomizerRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./RNG.sol\\\";\\nimport \\\"./IRandomizer.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title Random Number Generator that uses Randomizer.ai\\n/// https://randomizer.ai/\\ncontract RandomizerRNG is RNG, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The address that can withdraw funds.\\n uint256 public callbackGasLimit; // Gas limit for the randomizer callback\\n IRandomizer public randomizer; // Randomizer address.\\n mapping(uint256 => uint256) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise.\\n mapping(address => uint256) public requesterToID; // Maps the requester to his latest request ID.\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor 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\\n /// @param _randomizer Randomizer contract.\\n /// @param _governor Governor of the contract.\\n function initialize(IRandomizer _randomizer, address _governor) external reinitializer(1) {\\n randomizer = _randomizer;\\n governor = _governor;\\n callbackGasLimit = 50000;\\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 /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Change the Randomizer callback gas limit.\\n /// @param _callbackGasLimit the new limit.\\n function setCallbackGasLimit(uint256 _callbackGasLimit) external onlyByGovernor {\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n /// @dev Change the Randomizer address.\\n /// @param _randomizer the new Randomizer address.\\n function setRandomizer(address _randomizer) external onlyByGovernor {\\n randomizer = IRandomizer(_randomizer);\\n }\\n\\n /// @dev Allows the governor to withdraw randomizer funds.\\n /// @param _amount Amount to withdraw in wei.\\n function randomizerWithdraw(uint256 _amount) external onlyByGovernor {\\n randomizer.clientWithdrawTo(msg.sender, _amount);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Request a random number. The id of the request is tied to the sender.\\n function requestRandomness(uint256 /*_block*/) external override {\\n uint256 id = randomizer.request(callbackGasLimit);\\n requesterToID[msg.sender] = id;\\n }\\n\\n /// @dev Callback function called by the randomizer contract when the random value is generated.\\n function randomizerCallback(uint256 _id, bytes32 _value) external {\\n require(msg.sender == address(randomizer), \\\"Randomizer only\\\");\\n randomNumbers[_id] = uint256(_value);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Return the random number.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 /*_block*/) external view override returns (uint256 randomNumber) {\\n // Get the latest request ID for this requester.\\n uint256 id = requesterToID[msg.sender];\\n randomNumber = randomNumbers[id];\\n }\\n}\\n\",\"keccak256\":\"0x4285391be2975df0c7d1fa2fcdcd8abe8458e3228961ba32dec1e97325598df0\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610b396100fc600039600081816104a1015281816104ca01526106c20152610b396000f3fe6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220aec03dad51a46b09534bed3ffa73b065bf3cda8ee37f8b3126efdc48f7db06ed64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220aec03dad51a46b09534bed3ffa73b065bf3cda8ee37f8b3126efdc48f7db06ed64736f6c63430008120033", + "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\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"callbackGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"contract IRandomizer\",\"name\":\"_randomizer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomizer\",\"outputs\":[{\"internalType\":\"contract IRandomizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_value\",\"type\":\"bytes32\"}],\"name\":\"randomizerCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"randomizerWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"name\":\"requesterToID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_callbackGasLimit\",\"type\":\"uint256\"}],\"name\":\"setCallbackGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_randomizer\",\"type\":\"address\"}],\"name\":\"setRandomizer\",\"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\":{\"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\":{\"changeGovernor(address)\":{\"details\":\"Changes the governor of the contract.\",\"params\":{\"_governor\":\"The new governor.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"initialize(address,address)\":{\"details\":\"Initializer\",\"params\":{\"_governor\":\"Governor of the contract.\",\"_randomizer\":\"Randomizer 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.\"},\"randomizerCallback(uint256,bytes32)\":{\"details\":\"Callback function called by the randomizer contract when the random value is generated.\"},\"randomizerWithdraw(uint256)\":{\"details\":\"Allows the governor to withdraw randomizer funds.\",\"params\":{\"_amount\":\"Amount to withdraw in wei.\"}},\"receiveRandomness(uint256)\":{\"details\":\"Return the random number.\",\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number. The id of the request is tied to the sender.\"},\"setCallbackGasLimit(uint256)\":{\"details\":\"Change the Randomizer callback gas limit.\",\"params\":{\"_callbackGasLimit\":\"the new limit.\"}},\"setRandomizer(address)\":{\"details\":\"Change the Randomizer address.\",\"params\":{\"_randomizer\":\"the new Randomizer address.\"}},\"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\":\"Random Number Generator that uses Randomizer.ai https://randomizer.ai/\",\"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/rng/RandomizerRNG.sol\":\"RandomizerRNG\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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\"},\"src/rng/IRandomizer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n// Randomizer protocol interface\\ninterface IRandomizer {\\n function request(uint256 callbackGasLimit) external returns (uint256);\\n\\n function clientWithdrawTo(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xc2f92fb0decde8e9c09b1617ff58fae69b052ad1e8aa4a4fed25867b6bb329c1\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"},\"src/rng/RandomizerRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./RNG.sol\\\";\\nimport \\\"./IRandomizer.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title Random Number Generator that uses Randomizer.ai\\n/// https://randomizer.ai/\\ncontract RandomizerRNG is RNG, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public governor; // The address that can withdraw funds.\\n uint256 public callbackGasLimit; // Gas limit for the randomizer callback\\n IRandomizer public randomizer; // Randomizer address.\\n mapping(uint256 requestId => uint256 number) public randomNumbers; // randomNumbers[requestID] is the random number for this request id, 0 otherwise.\\n mapping(address requester => uint256 requestId) public requesterToID; // Maps the requester to his latest request ID.\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n require(governor == msg.sender, \\\"Governor 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\\n /// @param _randomizer Randomizer contract.\\n /// @param _governor Governor of the contract.\\n function initialize(IRandomizer _randomizer, address _governor) external reinitializer(1) {\\n randomizer = _randomizer;\\n governor = _governor;\\n callbackGasLimit = 50000;\\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 /// @dev Changes the governor of the contract.\\n /// @param _governor The new governor.\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n /// @dev Change the Randomizer callback gas limit.\\n /// @param _callbackGasLimit the new limit.\\n function setCallbackGasLimit(uint256 _callbackGasLimit) external onlyByGovernor {\\n callbackGasLimit = _callbackGasLimit;\\n }\\n\\n /// @dev Change the Randomizer address.\\n /// @param _randomizer the new Randomizer address.\\n function setRandomizer(address _randomizer) external onlyByGovernor {\\n randomizer = IRandomizer(_randomizer);\\n }\\n\\n /// @dev Allows the governor to withdraw randomizer funds.\\n /// @param _amount Amount to withdraw in wei.\\n function randomizerWithdraw(uint256 _amount) external onlyByGovernor {\\n randomizer.clientWithdrawTo(msg.sender, _amount);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Request a random number. The id of the request is tied to the sender.\\n function requestRandomness(uint256 /*_block*/) external override {\\n uint256 id = randomizer.request(callbackGasLimit);\\n requesterToID[msg.sender] = id;\\n }\\n\\n /// @dev Callback function called by the randomizer contract when the random value is generated.\\n function randomizerCallback(uint256 _id, bytes32 _value) external {\\n require(msg.sender == address(randomizer), \\\"Randomizer only\\\");\\n randomNumbers[_id] = uint256(_value);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Return the random number.\\n /// @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n function receiveRandomness(uint256 /*_block*/) external view override returns (uint256 randomNumber) {\\n // Get the latest request ID for this requester.\\n uint256 id = requesterToID[msg.sender];\\n randomNumber = randomNumbers[id];\\n }\\n}\\n\",\"keccak256\":\"0x84d5dc50531aac4976948b2898b44630febefd95b54fdeee026190ba675a57dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff16156100715760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610b396100fc600039600081816104a1015281816104ca01526106c20152610b396000f3fe6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220721afbaa690caa7b92bcb9018e5c4d2ecece02ca01c80c470d74bec052f7ae9264736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106100c85760003560e01c806352d1902d1161007a57806352d1902d146101ec57806371d4b00b146102015780637363ae1f1461022e578063767bcab51461024e5780638a54942f1461026e578063e4c0aaf41461028e578063ebe93caf146102ae578063f10fb584146102ce57600080fd5b80630c340a24146100cd57806313cf90541461010a57806324f7469714610154578063485cc9551461016a5780634e07c9391461018c5780634f1ef286146101ac5780635257cd90146101bf575b600080fd5b3480156100d957600080fd5b506000546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561011657600080fd5b506101466101253660046108ed565b50336000908152600460209081526040808320548352600390915290205490565b604051908152602001610101565b34801561016057600080fd5b5061014660015481565b34801561017657600080fd5b5061018a61018536600461091b565b6102ee565b005b34801561019857600080fd5b5061018a6101a73660046108ed565b6103f3565b61018a6101ba36600461096a565b61048d565b3480156101cb57600080fd5b506101466101da3660046108ed565b60036020526000908152604090205481565b3480156101f857600080fd5b506101466106b5565b34801561020d57600080fd5b5061014661021c366004610a2e565b60046020526000908152604090205481565b34801561023a57600080fd5b5061018a6102493660046108ed565b610713565b34801561025a57600080fd5b5061018a610269366004610a2e565b61079b565b34801561027a57600080fd5b5061018a6102893660046108ed565b6107e7565b34801561029a57600080fd5b5061018a6102a9366004610a2e565b610816565b3480156102ba57600080fd5b5061018a6102c9366004610a52565b610862565b3480156102da57600080fd5b506002546100ed906001600160a01b031681565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460019190600160401b900460ff16806103385750805467ffffffffffffffff808416911610155b156103555760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff8316908117600160401b178255600280546001600160a01b038781166001600160a01b031992831617909255600080549287169290911691909117905561c350600155815460ff60401b191682556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90610a74565b60405180910390fd5b600254604051632465f8f560e01b8152336004820152602481018390526001600160a01b0390911690632465f8f590604401600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b5050505050565b610496826108c0565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061051457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610508600080516020610ae48339815191525490565b6001600160a01b031614155b156105325760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561058c575060408051601f3d908101601f1916820190925261058991810190610a9b565b60015b6105b457604051630c76093760e01b81526001600160a01b038316600482015260240161041d565b600080516020610ae483398151915281146105e557604051632a87526960e21b81526004810182905260240161041d565b600080516020610ae48339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28151156106b0576000836001600160a01b03168360405161064c9190610ab4565b600060405180830381855af49150503d8060008114610687576040519150601f19603f3d011682016040523d82523d6000602084013e61068c565b606091505b50509050806106ae576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107005760405163703e46dd60e11b815260040160405180910390fd5b50600080516020610ae483398151915290565b60025460015460405163d845a4b360e01b815260048101919091526000916001600160a01b03169063d845a4b3906024016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610a9b565b336000908152600460205260409020555050565b6000546001600160a01b031633146107c55760405162461bcd60e51b815260040161041d90610a74565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108115760405162461bcd60e51b815260040161041d90610a74565b600155565b6000546001600160a01b031633146108405760405162461bcd60e51b815260040161041d90610a74565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146108ae5760405162461bcd60e51b815260206004820152600f60248201526e52616e646f6d697a6572206f6e6c7960881b604482015260640161041d565b60009182526003602052604090912055565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161041d90610a74565b50565b6000602082840312156108ff57600080fd5b5035919050565b6001600160a01b03811681146108ea57600080fd5b6000806040838503121561092e57600080fd5b823561093981610906565b9150602083013561094981610906565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561097d57600080fd5b823561098881610906565b9150602083013567ffffffffffffffff808211156109a557600080fd5b818501915085601f8301126109b957600080fd5b8135818111156109cb576109cb610954565b604051601f8201601f19908116603f011681019083821181831017156109f3576109f3610954565b81604052828152886020848701011115610a0c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610a4057600080fd5b8135610a4b81610906565b9392505050565b60008060408385031215610a6557600080fd5b50508035926020909101359150565b6020808252600d908201526c476f7665726e6f72206f6e6c7960981b604082015260600190565b600060208284031215610aad57600080fd5b5051919050565b6000825160005b81811015610ad55760208186018101518583015201610abb565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220721afbaa690caa7b92bcb9018e5c4d2ecece02ca01c80c470d74bec052f7ae9264736f6c63430008180033", "devdoc": { "errors": { "AlreadyInitialized()": [ @@ -458,7 +458,7 @@ "storageLayout": { "storage": [ { - "astId": 31004, + "astId": 34952, "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", "label": "governor", "offset": 0, @@ -466,7 +466,7 @@ "type": "t_address" }, { - "astId": 31006, + "astId": 34954, "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", "label": "callbackGasLimit", "offset": 0, @@ -474,15 +474,15 @@ "type": "t_uint256" }, { - "astId": 31009, + "astId": 34957, "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", "label": "randomizer", "offset": 0, "slot": "2", - "type": "t_contract(IRandomizer)30932" + "type": "t_contract(IRandomizer)34880" }, { - "astId": 31013, + "astId": 34961, "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", "label": "randomNumbers", "offset": 0, @@ -490,7 +490,7 @@ "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 31017, + "astId": 34965, "contract": "src/rng/RandomizerRNG.sol:RandomizerRNG", "label": "requesterToID", "offset": 0, @@ -504,7 +504,7 @@ "label": "address", "numberOfBytes": "20" }, - "t_contract(IRandomizer)30932": { + "t_contract(IRandomizer)34880": { "encoding": "inplace", "label": "contract IRandomizer", "numberOfBytes": "20" diff --git a/contracts/deployments/arbitrum/RandomizerRNG_Proxy.json b/contracts/deployments/arbitrum/RandomizerRNG_Proxy.json index 1272a7293..a18214647 100644 --- a/contracts/deployments/arbitrum/RandomizerRNG_Proxy.json +++ b/contracts/deployments/arbitrum/RandomizerRNG_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0x844c158d67f22dc917fc3f60ae72ff48b6aa45af986bb9dce85872a6e4eeeba7", + "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", - "transactionIndex": 3, - "gasUsed": "5563050", - "logsBloom": "0x00000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000004000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xaf8bc1d36ade1d4cd71a13af8fe170a37a1a6ca161b36d800002b1dfea2c5d9d", - "transactionHash": "0x844c158d67f22dc917fc3f60ae72ff48b6aa45af986bb9dce85872a6e4eeeba7", + "contractAddress": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", + "transactionIndex": 11, + "gasUsed": "420417", + "logsBloom": "0x00000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000200000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8", + "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", "logs": [ { - "transactionIndex": 3, - "blockNumber": 190274480, - "transactionHash": "0x844c158d67f22dc917fc3f60ae72ff48b6aa45af986bb9dce85872a6e4eeeba7", - "address": "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + "transactionIndex": 11, + "blockNumber": 272063118, + "transactionHash": "0x2aa9e7ceedeff87f9029f63cdd19f7faa5b9e1dbddbb43d54ec0178cfa0ecf47", + "address": "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 10, - "blockHash": "0xaf8bc1d36ade1d4cd71a13af8fe170a37a1a6ca161b36d800002b1dfea2c5d9d" + "logIndex": 37, + "blockHash": "0xddff904a7835f247225000014a5301fa9462a1fd8f68da0f0dcdc3a9c70d34c8" } ], - "blockNumber": 190274480, - "cumulativeGasUsed": "8678913", + "blockNumber": 272063118, + "cumulativeGasUsed": "3366631", "status": 1, "byzantium": true }, "args": [ - "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", "0x485cc9550000000000000000000000005b8bb80f2d72d0c85cab8fb169e8170a05c94baf000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"RandomizerRNGProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212206e4bfb3b93f88c05da2e7790f3420dc92a7e92440e2c63e66223920b337be18264736f6c63430008180033", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/SortitionModuleNeo.json b/contracts/deployments/arbitrum/SortitionModuleNeo.json index 4813d0b21..6f56c606a 100644 --- a/contracts/deployments/arbitrum/SortitionModuleNeo.json +++ b/contracts/deployments/arbitrum/SortitionModuleNeo.json @@ -1,5 +1,5 @@ { - "address": "0x614498118850184c62f82d08261109334bFB050f", + "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", "abi": [ { "stateMutability": "payable", @@ -591,7 +591,7 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], @@ -628,12 +628,12 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "jurorAccount", "type": "address" }, { "internalType": "uint96", - "name": "", + "name": "courtId", "type": "uint96" } ], @@ -1023,79 +1023,61 @@ "type": "constructor" } ], - "transactionHash": "0x4dad2ef2209d6c819bdbc3704034bb913fd74ca1b20e8b187c34baf634b006a0", + "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x614498118850184c62f82d08261109334bFB050f", - "transactionIndex": 5, - "gasUsed": "6154647", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000002000000000000000000000000000000000000000000000000", - "blockHash": "0xfec7cddde35e0d9bb2699727a0d38cdcd0c4ed98a9309943a606d02cbfb9ad96", - "transactionHash": "0x4dad2ef2209d6c819bdbc3704034bb913fd74ca1b20e8b187c34baf634b006a0", + "contractAddress": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", + "transactionIndex": 7, + "gasUsed": "595244", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba", + "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", "logs": [ { - "transactionIndex": 5, - "blockNumber": 190274557, - "transactionHash": "0x4dad2ef2209d6c819bdbc3704034bb913fd74ca1b20e8b187c34baf634b006a0", - "address": "0x614498118850184c62f82d08261109334bFB050f", + "transactionIndex": 7, + "blockNumber": 272063201, + "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", + "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 20, - "blockHash": "0xfec7cddde35e0d9bb2699727a0d38cdcd0c4ed98a9309943a606d02cbfb9ad96" + "logIndex": 18, + "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba" } ], - "blockNumber": 190274557, - "cumulativeGasUsed": "17302456", + "blockNumber": 272063201, + "cumulativeGasUsed": "1884235", "status": 1, "byzantium": true }, "args": [ - "0xf327200420F21BAafce8F1C03B1EEdF926074B95", - "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000cd415c03dfa85b02646c7e2977f22a480c4354f100000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000708000000000000000000000000c3db344755b15c8edfd834db79af4f8860029fb4000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" + "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", + "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000708000000000000000000000000044afe0069c0fd641bc5f90d9a4218ef0b2fa9d3000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"SortitionModuleNeoProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204bceea1b46a095339c0faa0cacdfde8401f8237d6ebe71f92eacd5fa95b7ec3864736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204bceea1b46a095339c0faa0cacdfde8401f8237d6ebe71f92eacd5fa95b7ec3864736f6c63430008180033", "execute": { "methodName": "initialize", "args": [ "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + "0x991d2df165670b9cac3B022f4B68D65b664222ea", 1800, 1800, - "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", 20, - { - "type": "BigNumber", - "hex": "0x6c6b935b8bbd400000" - }, - { - "type": "BigNumber", - "hex": "0x01a784379d99db42000000" - } + "2000000000000000000000", + "2000000000000000000000000" ] }, - "implementation": "0xf327200420F21BAafce8F1C03B1EEdF926074B95", + "implementation": "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/arbitrum/SortitionModuleNeo_Implementation.json b/contracts/deployments/arbitrum/SortitionModuleNeo_Implementation.json index 135b2b471..3ad17ff42 100644 --- a/contracts/deployments/arbitrum/SortitionModuleNeo_Implementation.json +++ b/contracts/deployments/arbitrum/SortitionModuleNeo_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0xf327200420F21BAafce8F1C03B1EEdF926074B95", + "address": "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", "abi": [ { "inputs": [], @@ -588,7 +588,7 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], @@ -625,12 +625,12 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "jurorAccount", "type": "address" }, { "internalType": "uint96", - "name": "", + "name": "courtId", "type": "uint96" } ], @@ -1004,41 +1004,41 @@ "type": "function" } ], - "transactionHash": "0x3f08513b7ba4a0a94f692ed916416203fb03220223ee597c1b2878dac148619e", + "transactionHash": "0x6294424ab71ebe7986966fd16b34220fab759a5a5060ad4bcb30a11d75181a97", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0xf327200420F21BAafce8F1C03B1EEdF926074B95", - "transactionIndex": 1, - "gasUsed": "46053192", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000100000000000400000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x86d583ef34ea61771081fceb06a6e853924d79a318915dd16d6e661b4c0c8ce2", - "transactionHash": "0x3f08513b7ba4a0a94f692ed916416203fb03220223ee597c1b2878dac148619e", + "contractAddress": "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", + "transactionIndex": 8, + "gasUsed": "4480911", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000040000000000000000000000000", + "blockHash": "0xb5e2f9c6c00e7d55224fcb8e44b3ef661da654e78565352d551425c437ed5f8a", + "transactionHash": "0x6294424ab71ebe7986966fd16b34220fab759a5a5060ad4bcb30a11d75181a97", "logs": [ { - "transactionIndex": 1, - "blockNumber": 190274547, - "transactionHash": "0x3f08513b7ba4a0a94f692ed916416203fb03220223ee597c1b2878dac148619e", - "address": "0xf327200420F21BAafce8F1C03B1EEdF926074B95", + "transactionIndex": 8, + "blockNumber": 272063185, + "transactionHash": "0x6294424ab71ebe7986966fd16b34220fab759a5a5060ad4bcb30a11d75181a97", + "address": "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", - "logIndex": 0, - "blockHash": "0x86d583ef34ea61771081fceb06a6e853924d79a318915dd16d6e661b4c0c8ce2" + "logIndex": 10, + "blockHash": "0xb5e2f9c6c00e7d55224fcb8e44b3ef661da654e78565352d551425c437ed5f8a" } ], - "blockNumber": 190274547, - "cumulativeGasUsed": "46053192", + "blockNumber": 272063185, + "cumulativeGasUsed": "5522842", "status": 1, "byzantium": true }, "args": [], "numDeployments": 1, - "solcInputHash": "47a03c54c72f5d4984b62ca6f84025dc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedAlreadyTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedAlreadyTransferredWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedNotTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxStakePerJuror\",\"type\":\"uint256\"}],\"name\":\"changeMaxStakePerJuror\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxTotalStaked\",\"type\":\"uint256\"}],\"name\":\"changeMaxTotalStaked\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxTotalStaked\",\"type\":\"uint256\"}],\"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\":\"\",\"type\":\"address\"}],\"name\":\"jurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"stakedPnk\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedPnk\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxStakePerJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxTotalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"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\":{\"changeMaxDrawingTime(uint256)\":{\"details\":\"Changes the `maxDrawingTime` storage variable.\",\"params\":{\"_maxDrawingTime\":\"The new value for the `maxDrawingTime` storage variable.\"}},\"changeMinStakingTime(uint256)\":{\"details\":\"Changes the `minStakingTime` storage variable.\",\"params\":{\"_minStakingTime\":\"The new value for the `minStakingTime` storage variable.\"}},\"changeRandomNumberGenerator(address,uint256)\":{\"details\":\"Changes the `_rng` and `_rngLookahead` storage variables.\",\"params\":{\"_rng\":\"The new value for the `RNGenerator` storage variable.\",\"_rngLookahead\":\"The new value for the `rngLookahead` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createTree(bytes32,bytes)\":{\"details\":\"Create a sortition sum tree at the specified key.\",\"params\":{\"_extraData\":\"Extra data that contains the number of children each node in the tree should have.\",\"_key\":\"The key of the new tree.\"}},\"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.\",\"params\":{\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\",\"_key\":\"The key of the tree.\",\"_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.\"}},\"executeDelayedStakes(uint256)\":{\"details\":\"Executes the next delayed stakes.\",\"params\":{\"_iterations\":\"The number of delayed stakes to execute.\"}},\"getJurorCourtIDs(address)\":{\"details\":\"Gets the court identifiers where a specific `_juror` has staked.\",\"params\":{\"_juror\":\"The address of the juror.\"}},\"initialize(address,address,uint256,uint256,address,uint256,uint256,uint256)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_maxStakePerJuror\":\"The maximum amount of PNK a juror can stake in a court.\",\"_maxTotalStaked\":\"The maximum amount of PNK that can be staked in all courts.\",\"_minStakingTime\":\"Minimal time to stake\",\"_rng\":\"The random number generator.\",\"_rngLookahead\":\"Lookahead value for rng.\"}},\"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.\"}},\"stakeOf(address,uint96)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"_0\":\"value The stake of the juror in the court.\"}},\"stakeOf(bytes32,bytes32)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_ID\":\"The stake path ID, corresponding to a juror.\",\"_key\":\"The key of the tree, corresponding to a court.\"},\"returns\":{\"_0\":\"The stake of the juror in the court.\"}},\"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\":\"SortitionModuleNeo\",\"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/SortitionModuleNeo.sol\":\"SortitionModuleNeo\"},\"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 v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\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 amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` 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 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` 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 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"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.18;\\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\":\"0x347240e5b541bb5df305e4e6ec8ab324a04effa722af31db03cd1d9fdcd039ec\",\"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.18;\\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 => 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\":\"0x53eb90e3209b47a218bd9eb25bd64bcff4edca51829cb7bfff35ed68f9cee05c\",\"license\":\"MIT\"},\"src/arbitration/SortitionModuleBase.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.18;\\n\\nimport \\\"./KlerosCore.sol\\\";\\nimport \\\"./interfaces/ISortitionModule.sol\\\";\\nimport \\\"./interfaces/IDisputeKit.sol\\\";\\nimport \\\"../rng/RNG.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleBase\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\nabstract contract SortitionModuleBase is ISortitionModule {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum PreStakeHookResult {\\n ok, // Correct phase. All checks are passed.\\n stakeDelayedAlreadyTransferred, // Wrong phase but stake is increased, so transfer the tokens without updating the drawing chance.\\n stakeDelayedNotTransferred, // Wrong phase and stake is decreased. Delay the token transfer and drawing chance update.\\n failed // Checks didn't pass. Do no changes.\\n }\\n\\n struct SortitionSumTree {\\n uint256 K; // The maximum number of children per node.\\n // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.\\n uint256[] stack;\\n uint256[] nodes;\\n // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.\\n mapping(bytes32 => uint256) IDsToNodeIndexes;\\n mapping(uint256 => bytes32) nodeIndexesToIDs;\\n }\\n\\n struct DelayedStake {\\n address account; // The address of the juror.\\n uint96 courtID; // The ID of the court.\\n uint256 stake; // The new stake.\\n bool alreadyTransferred; // True if tokens were already transferred before delayed stake's execution.\\n }\\n\\n struct Juror {\\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 KlerosCore public core; // The core arbitrator contract.\\n Phase public phase; // The current phase.\\n uint256 public minStakingTime; // The time after which the phase can be switched to Drawing if there are open disputes.\\n uint256 public maxDrawingTime; // The time after which the phase can be switched back to Staking.\\n uint256 public lastPhaseChange; // The last time the phase was changed.\\n uint256 public randomNumberRequestBlock; // Number of the block when RNG request was made.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n RNG public rng; // The random number generator.\\n uint256 public randomNumber; // Random number returned by RNG.\\n uint256 public rngLookahead; // Minimal block distance between requesting and obtaining a random number.\\n uint256 public delayedStakeWriteIndex; // The index of the last `delayedStake` item that was written to the array. 0 index is skipped.\\n uint256 public delayedStakeReadIndex; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped.\\n mapping(bytes32 => SortitionSumTree) sortitionSumTrees; // The mapping trees by keys.\\n mapping(address => Juror) public jurors; // The jurors.\\n mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Drawing phase, to update them when the phase is switched to Staking.\\n mapping(address => mapping(uint96 => uint256)) public latestDelayedStakeIndex; // Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID].\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeDelayedNotTransferred(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeDelayedAlreadyTransferred(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeDelayedAlreadyTransferredWithdrawn(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function _initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal {\\n governor = _governor;\\n core = _core;\\n minStakingTime = _minStakingTime;\\n maxDrawingTime = _maxDrawingTime;\\n lastPhaseChange = block.timestamp;\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n delayedStakeReadIndex = 1;\\n }\\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 // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the `minStakingTime` storage variable.\\n /// @param _minStakingTime The new value for the `minStakingTime` storage variable.\\n function changeMinStakingTime(uint256 _minStakingTime) external onlyByGovernor {\\n minStakingTime = _minStakingTime;\\n }\\n\\n /// @dev Changes the `maxDrawingTime` storage variable.\\n /// @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable.\\n function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByGovernor {\\n maxDrawingTime = _maxDrawingTime;\\n }\\n\\n /// @dev Changes the `_rng` and `_rngLookahead` storage variables.\\n /// @param _rng The new value for the `RNGenerator` storage variable.\\n /// @param _rngLookahead The new value for the `rngLookahead` storage variable.\\n function changeRandomNumberGenerator(RNG _rng, uint256 _rngLookahead) external onlyByGovernor {\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n if (phase == Phase.generating) {\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function passPhase() external {\\n if (phase == Phase.staking) {\\n require(\\n block.timestamp - lastPhaseChange >= minStakingTime,\\n \\\"The minimum staking time has not passed yet.\\\"\\n );\\n require(disputesWithoutJurors > 0, \\\"There are no disputes that need jurors.\\\");\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n phase = Phase.generating;\\n } else if (phase == Phase.generating) {\\n randomNumber = rng.receiveRandomness(randomNumberRequestBlock + rngLookahead);\\n require(randomNumber != 0, \\\"Random number is not ready yet\\\");\\n phase = Phase.drawing;\\n } else if (phase == Phase.drawing) {\\n require(\\n disputesWithoutJurors == 0 || block.timestamp - lastPhaseChange >= maxDrawingTime,\\n \\\"There are still disputes without jurors and the maximum drawing time has not passed yet.\\\"\\n );\\n phase = Phase.staking;\\n }\\n\\n lastPhaseChange = block.timestamp;\\n emit NewPhase(phase);\\n }\\n\\n /// @dev Create a sortition sum tree at the specified key.\\n /// @param _key The key of the new tree.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(bytes32 _key, bytes memory _extraData) external override onlyByCore {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 K = _extraDataToTreeK(_extraData);\\n require(tree.K == 0, \\\"Tree already exists.\\\");\\n require(K > 1, \\\"K must be greater than one.\\\");\\n tree.K = K;\\n tree.nodes.push(0);\\n }\\n\\n /// @dev Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external {\\n require(phase == Phase.staking, \\\"Should be in Staking phase.\\\");\\n require(delayedStakeWriteIndex >= delayedStakeReadIndex, \\\"No delayed stake to execute.\\\");\\n\\n uint256 actualIterations = (delayedStakeReadIndex + _iterations) - 1 > delayedStakeWriteIndex\\n ? (delayedStakeWriteIndex - delayedStakeReadIndex) + 1\\n : _iterations;\\n uint256 newDelayedStakeReadIndex = delayedStakeReadIndex + actualIterations;\\n\\n for (uint256 i = delayedStakeReadIndex; i < newDelayedStakeReadIndex; i++) {\\n DelayedStake storage delayedStake = delayedStakes[i];\\n // Delayed stake could've been manually removed already. In this case simply move on to the next item.\\n if (delayedStake.account != address(0)) {\\n core.setStakeBySortitionModule(\\n delayedStake.account,\\n delayedStake.courtID,\\n delayedStake.stake,\\n delayedStake.alreadyTransferred\\n );\\n delete latestDelayedStakeIndex[delayedStake.account][delayedStake.courtID];\\n delete delayedStakes[i];\\n }\\n }\\n delayedStakeReadIndex = newDelayedStakeReadIndex;\\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 (pnkDeposit, pnkWithdrawal, stakingResult) = _setStake(_account, _courtID, _newStake, _alreadyTransferred);\\n }\\n\\n /// @dev Sets the specified juror's stake in a court.\\n /// Note: no state changes should be made when returning `succeeded` = false, otherwise delayed stakes might break invariants.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) internal virtual 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 (phase != Phase.staking) {\\n pnkWithdrawal = _deleteDelayedStake(_courtID, _account);\\n\\n // Store the stake change as delayed, to be applied when the phase switches back to Staking.\\n DelayedStake storage delayedStake = delayedStakes[++delayedStakeWriteIndex];\\n delayedStake.account = _account;\\n delayedStake.courtID = _courtID;\\n delayedStake.stake = _newStake;\\n latestDelayedStakeIndex[_account][_courtID] = delayedStakeWriteIndex;\\n if (_newStake > currentStake) {\\n // PNK deposit: tokens are transferred now.\\n delayedStake.alreadyTransferred = true;\\n pnkDeposit = _increaseStake(juror, _courtID, _newStake, currentStake);\\n emit StakeDelayedAlreadyTransferred(_account, _courtID, _newStake);\\n } else {\\n // PNK withdrawal: tokens are not transferred yet.\\n emit StakeDelayedNotTransferred(_account, _courtID, _newStake);\\n }\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n // Current phase is Staking: set normal stakes or delayed stakes (which may have been already transferred).\\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 // Update the sortition sum tree.\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_account, _courtID);\\n bool finished = false;\\n uint96 currenCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n _set(bytes32(uint256(currenCourtID)), _newStake, stakePathID);\\n if (currenCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currenCourtID, , , , , , ) = core.courts(currenCourtID); // Get the parent court.\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n /// @dev Checks if there is already a delayed stake. In this case consider it irrelevant and remove it.\\n /// @param _courtID ID of the court.\\n /// @param _juror Juror whose stake to check.\\n function _deleteDelayedStake(uint96 _courtID, address _juror) internal returns (uint256 actualAmountToWithdraw) {\\n uint256 latestIndex = latestDelayedStakeIndex[_juror][_courtID];\\n if (latestIndex != 0) {\\n DelayedStake storage delayedStake = delayedStakes[latestIndex];\\n if (delayedStake.alreadyTransferred) {\\n // Sortition stake represents the stake value that was last updated during Staking phase.\\n uint256 sortitionStake = stakeOf(_juror, _courtID);\\n\\n // Withdraw the tokens that were added with the latest delayed stake.\\n uint256 amountToWithdraw = delayedStake.stake - sortitionStake;\\n actualAmountToWithdraw = amountToWithdraw;\\n Juror storage juror = jurors[_juror];\\n if (juror.stakedPnk <= actualAmountToWithdraw) {\\n actualAmountToWithdraw = juror.stakedPnk;\\n }\\n\\n // StakePnk can become lower because of penalty.\\n juror.stakedPnk -= actualAmountToWithdraw;\\n emit StakeDelayedAlreadyTransferredWithdrawn(_juror, _courtID, amountToWithdraw);\\n\\n if (sortitionStake == 0) {\\n // Cleanup: delete the court otherwise it will be duplicated after staking.\\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 delete delayedStakes[latestIndex];\\n delete latestDelayedStakeIndex[_juror][_courtID];\\n }\\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 // 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 // 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 /// @param _key The key of the tree.\\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 /// `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(\\n bytes32 _key,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) public view override returns (address drawnAddress) {\\n require(phase == Phase.drawing, \\\"Wrong phase.\\\");\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n if (tree.nodes[0] == 0) {\\n return address(0); // No jurors staked.\\n }\\n\\n uint256 currentDrawnNumber = uint256(keccak256(abi.encodePacked(randomNumber, _coreDisputeID, _nonce))) %\\n tree.nodes[0];\\n\\n // While it still has children\\n uint256 treeIndex = 0;\\n while ((tree.K * treeIndex) + 1 < tree.nodes.length) {\\n for (uint256 i = 1; i <= tree.K; i++) {\\n // Loop over children.\\n uint256 nodeIndex = (tree.K * treeIndex) + i;\\n uint256 nodeValue = tree.nodes[nodeIndex];\\n\\n if (currentDrawnNumber >= nodeValue) {\\n // Go to the next child.\\n currentDrawnNumber -= nodeValue;\\n } else {\\n // Pick this child.\\n treeIndex = nodeIndex;\\n break;\\n }\\n }\\n }\\n drawnAddress = _stakePathIDToAccount(tree.nodeIndexesToIDs[treeIndex]);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return value The stake of the juror in the court.\\n function stakeOf(address _juror, uint96 _courtID) public view returns (uint256) {\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_juror, _courtID);\\n return stakeOf(bytes32(uint256(_courtID)), stakePathID);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _key The key of the tree, corresponding to a court.\\n /// @param _ID The stake path ID, corresponding to a juror.\\n /// @return The stake of the juror in the court.\\n function stakeOf(bytes32 _key, bytes32 _ID) public view returns (uint256) {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n if (treeIndex == 0) {\\n return 0;\\n }\\n return tree.nodes[treeIndex];\\n }\\n\\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 stakedInCourt = stakeOf(_juror, _courtID);\\n nbCourts = juror.courtIDs.length;\\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 Update all the parents of a node.\\n /// @param _key The key of the tree to update.\\n /// @param _treeIndex The index of the node to start from.\\n /// @param _plusOrMinus Whether to add (true) or substract (false).\\n /// @param _value The value to add or substract.\\n /// `O(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 _updateParents(bytes32 _key, uint256 _treeIndex, bool _plusOrMinus, uint256 _value) private {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n uint256 parentIndex = _treeIndex;\\n while (parentIndex != 0) {\\n parentIndex = (parentIndex - 1) / tree.K;\\n tree.nodes[parentIndex] = _plusOrMinus\\n ? tree.nodes[parentIndex] + _value\\n : tree.nodes[parentIndex] - _value;\\n }\\n }\\n\\n /// @dev Retrieves a juror's address from the stake path ID.\\n /// @param _stakePathID The stake path ID to unpack.\\n /// @return account The account.\\n function _stakePathIDToAccount(bytes32 _stakePathID) internal pure returns (address account) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(add(ptr, 0x0c), i), byte(i, _stakePathID))\\n }\\n account := mload(ptr)\\n }\\n }\\n\\n function _extraDataToTreeK(bytes memory _extraData) internal pure returns (uint256 K) {\\n if (_extraData.length >= 32) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n K := mload(add(_extraData, 0x20))\\n }\\n } else {\\n K = DEFAULT_K;\\n }\\n }\\n\\n /// @dev Set a value in a tree.\\n /// @param _key The key of the tree.\\n /// @param _value The new value.\\n /// @param _ID The ID of the value.\\n /// `O(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 _set(bytes32 _key, uint256 _value, bytes32 _ID) internal {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) {\\n // No existing node.\\n if (_value != 0) {\\n // Non zero value.\\n // Append.\\n // Add node.\\n if (tree.stack.length == 0) {\\n // No vacant spots.\\n // Get the index and append the value.\\n treeIndex = tree.nodes.length;\\n tree.nodes.push(_value);\\n\\n // Potentially append a new node and make the parent a sum node.\\n if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) {\\n // Is first child.\\n uint256 parentIndex = treeIndex / tree.K;\\n bytes32 parentID = tree.nodeIndexesToIDs[parentIndex];\\n uint256 newIndex = treeIndex + 1;\\n tree.nodes.push(tree.nodes[parentIndex]);\\n delete tree.nodeIndexesToIDs[parentIndex];\\n tree.IDsToNodeIndexes[parentID] = newIndex;\\n tree.nodeIndexesToIDs[newIndex] = parentID;\\n }\\n } else {\\n // Some vacant spot.\\n // Pop the stack and append the value.\\n treeIndex = tree.stack[tree.stack.length - 1];\\n tree.stack.pop();\\n tree.nodes[treeIndex] = _value;\\n }\\n\\n // Add label.\\n tree.IDsToNodeIndexes[_ID] = treeIndex;\\n tree.nodeIndexesToIDs[treeIndex] = _ID;\\n\\n _updateParents(_key, treeIndex, true, _value);\\n }\\n } else {\\n // Existing node.\\n if (_value == 0) {\\n // Zero value.\\n // Remove.\\n // Remember value and set to 0.\\n uint256 value = tree.nodes[treeIndex];\\n tree.nodes[treeIndex] = 0;\\n\\n // Push to stack.\\n tree.stack.push(treeIndex);\\n\\n // Clear label.\\n delete tree.IDsToNodeIndexes[_ID];\\n delete tree.nodeIndexesToIDs[treeIndex];\\n\\n _updateParents(_key, treeIndex, false, value);\\n } else if (_value != tree.nodes[treeIndex]) {\\n // New, non zero value.\\n // Set.\\n bool plusOrMinus = tree.nodes[treeIndex] <= _value;\\n uint256 plusOrMinusValue = plusOrMinus\\n ? _value - tree.nodes[treeIndex]\\n : tree.nodes[treeIndex] - _value;\\n tree.nodes[treeIndex] = _value;\\n\\n _updateParents(_key, treeIndex, plusOrMinus, plusOrMinusValue);\\n }\\n }\\n }\\n\\n /// @dev Packs an account and a court ID into a stake path ID.\\n /// @param _account The address of the juror to pack.\\n /// @param _courtID The court ID to pack.\\n /// @return stakePathID The stake path ID.\\n function _accountAndCourtIDToStakePathID(\\n address _account,\\n uint96 _courtID\\n ) internal pure returns (bytes32 stakePathID) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(add(0x0c, i), _account))\\n }\\n for {\\n let i := 0x14\\n } lt(i, 0x20) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(i, _courtID))\\n }\\n stakePathID := mload(ptr)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7b525db5494a064f8d6de3ce7c1e2a7612bb5107036064222cfd796924a02dfe\",\"license\":\"MIT\"},\"src/arbitration/SortitionModuleNeo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @custom:authors: [@jaybuidl, @unknownunknown1]\\n * @custom:reviewers: []\\n * @custom:auditors: []\\n * @custom:bounties: []\\n * @custom:deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./SortitionModuleBase.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title SortitionModuleNeo\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModuleNeo is SortitionModuleBase, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public maxStakePerJuror;\\n uint256 public maxTotalStaked;\\n uint256 public totalStaked;\\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.\\n /// @param _core The KlerosCore.\\n /// @param _minStakingTime Minimal time to stake\\n /// @param _maxDrawingTime Time after which the drawing phase can be switched\\n /// @param _rng The random number generator.\\n /// @param _rngLookahead Lookahead value for rng.\\n /// @param _maxStakePerJuror The maximum amount of PNK a juror can stake in a court.\\n /// @param _maxTotalStaked The maximum amount of PNK that can be staked in all courts.\\n function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead,\\n uint256 _maxStakePerJuror,\\n uint256 _maxTotalStaked\\n ) external reinitializer(2) {\\n super._initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n maxStakePerJuror = _maxStakePerJuror;\\n maxTotalStaked = _maxTotalStaked;\\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 function changeMaxStakePerJuror(uint256 _maxStakePerJuror) external onlyByGovernor {\\n maxStakePerJuror = _maxStakePerJuror;\\n }\\n\\n function changeMaxTotalStaked(uint256 _maxTotalStaked) external onlyByGovernor {\\n maxTotalStaked = _maxTotalStaked;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) internal override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n uint256 currentStake = stakeOf(_account, _courtID);\\n bool stakeIncrease = _newStake > currentStake;\\n uint256 stakeChange = stakeIncrease ? _newStake - currentStake : currentStake - _newStake;\\n Juror storage juror = jurors[_account];\\n if (stakeIncrease && !_alreadyTransferred) {\\n if (juror.stakedPnk + stakeChange > maxStakePerJuror) {\\n return (0, 0, StakingResult.CannotStakeMoreThanMaxStakePerJuror);\\n }\\n if (totalStaked + stakeChange > maxTotalStaked) {\\n return (0, 0, StakingResult.CannotStakeMoreThanMaxTotalStaked);\\n }\\n }\\n if (phase == Phase.staking) {\\n if (stakeIncrease) {\\n totalStaked += stakeChange;\\n } else {\\n totalStaked -= stakeChange;\\n }\\n }\\n (pnkDeposit, pnkWithdrawal, stakingResult) = super._setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n }\\n}\\n\",\"keccak256\":\"0x112a8c221aadb71c98f6422b590f190c16d489658fae71a35c90faa32fe01670\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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 _arbitrableDisputeID The identifier of the dispute in the Arbitrable 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 _arbitrableDisputeID,\\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\":\"0x7babeb6a4180e75dc50a42762f449b32ad0a67cf58a3cb6bf3e5306ac9364507\",\"license\":\"MIT\"},\"src/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"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.18;\\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\":\"0x72cdf621c11d1d84b851edb1ef7607ac950ba7038154c85005ccc86cdd43e71b\",\"license\":\"MIT\"},\"src/arbitration/interfaces/ISortitionModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\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\":\"0x47960dd772c9dafeefa2e6b9414c7045b5dcc68df735c1fccda6af48ca089858\",\"license\":\"MIT\"},\"src/libraries/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\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\":\"0xdc648a85f2816fa323e9f7f4accac3d9384187d0123bdfb1f9b89ce25ea64679\",\"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.18;\\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\":\"0x37a19df56a98cd466fb6e70b8c56e13bfc439221bfabd8c5108d36d0e3ffc0e5\",\"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.18;\\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\":\"0xcfffacf78b92e89a0123aff2c86188abc5327bb59b223f04e1cc1267234bd828\",\"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.18;\\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\":\"0xbac7476deeee8ebbfc895a42e8b50a01c7549164a48ee2ddb0e2307946ee35f9\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x5afe7121f49aebe72218df356bd91b66c2171b9ad15e7945a15a091784291a43\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516131686200010360003960008181611481015281816114aa01526116a201526131686000f3fe6080604052600436106102675760003560e01c80637dc38f1411610144578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b014610731578063dd5e5cb51461077d578063e534710d1461079d578063f216de4c146107d5578063f2f4eb26146107f5578063f6b4d82d1461081557600080fd5b8063c157261814610685578063ccbac9f51461069b578063d09f392d146106b1578063d1c1df48146106d1578063d605787b1461071157600080fd5b8063a2473cc111610108578063a2473cc1146105bc578063a5861b90146105dc578063b1c9fe6e1461060b578063b5d69e9914610639578063b888adfa14610659578063c057eca71461066f57600080fd5b80637dc38f1414610530578063817b1cd214610546578063823cfd701461055c5780638d3771bb1461057c578063965af6c71461059c57600080fd5b8063498c752c116101dd578063543f8a36116101a1578063543f8a361461044c57806356acb050146104795780635a68c1541461048f5780635d2d7846146104a55780636624192f146104c557806376fa9fc51461051057600080fd5b8063498c752c146103c45780634c70a0d6146103e45780634dbbebbc146104045780634f1ef2861461042457806352d1902d1461043757600080fd5b80631b92bbbe1161022f5780631b92bbbe1461031a57806321e1625e1461033057806321ea9b3f1461035057806323f61de41461036e57806335975f4a14610384578063477a655c146103a457600080fd5b8063034327441461026c57806306dfc967146102955780630b274f2e146102b75780630c340a24146102cc5780630e083ec914610304575b600080fd5b34801561027857600080fd5b5061028260065481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b506102b56102b0366004612af8565b61087f565b005b3480156102c357600080fd5b506102b56108b7565b3480156102d857600080fd5b506000546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161028c565b34801561031057600080fd5b50610282600a5481565b34801561032657600080fd5b5061028260035481565b34801561033c57600080fd5b506102b561034b366004612b26565b610c8a565b34801561035c57600080fd5b506102b561036b366004612af8565b50565b34801561037a57600080fd5b5061028260105481565b34801561039057600080fd5b506102b561039f366004612af8565b610d2d565b3480156103b057600080fd5b506102b56103bf366004612bf5565b610f6f565b3480156103d057600080fd5b506102b56103df366004612c3c565b611066565b3480156103f057600080fd5b506102ec6103ff366004612cb4565b6111a0565b34801561041057600080fd5b506102b561041f366004612b26565b611384565b6102b5610432366004612ce0565b61146d565b34801561044357600080fd5b50610282611695565b34801561045857600080fd5b5061046c610467366004612d1a565b6116f3565b60405161028c9190612d37565b34801561048557600080fd5b50610282600b5481565b34801561049b57600080fd5b5061028260115481565b3480156104b157600080fd5b506102b56104c0366004612d84565b611791565b3480156104d157600080fd5b506105006104e0366004612d1a565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161028c565b34801561051c57600080fd5b5061028261052b366004612d84565b6117d4565b34801561053c57600080fd5b5061028260095481565b34801561055257600080fd5b5061028260125481565b34801561056857600080fd5b506102b5610577366004612af8565b61182f565b34801561058857600080fd5b506102b5610597366004612af8565b61185e565b3480156105a857600080fd5b506102b56105b7366004612b26565b61188d565b3480156105c857600080fd5b506102826105d7366004612dbb565b611928565b3480156105e857600080fd5b506105fc6105f7366004612e02565b611952565b60405161028c93929190612e6b565b34801561061757600080fd5b5060015461062c90600160a01b900460ff1681565b60405161028c9190612e97565b34801561064557600080fd5b506102b5610654366004612d1a565b61199f565b34801561066557600080fd5b5061028260045481565b34801561067b57600080fd5b5061028260025481565b34801561069157600080fd5b5061028260055481565b3480156106a757600080fd5b5061028260085481565b3480156106bd57600080fd5b506102b56106cc366004612d84565b611a81565b3480156106dd57600080fd5b506106f16106ec366004612dbb565b611abb565b60408051948552602085019390935291830152606082015260800161028c565b34801561071d57600080fd5b506007546102ec906001600160a01b031681565b34801561073d57600080fd5b5061076861074c366004612d1a565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161028c565b34801561078957600080fd5b506102b5610798366004612af8565b611afa565b3480156107a957600080fd5b506102826107b8366004612dbb565b600f60209081526000928352604080842090915290825290205481565b3480156107e157600080fd5b506102b56107f0366004612b26565b611b29565b34801561080157600080fd5b506001546102ec906001600160a01b031681565b34801561082157600080fd5b5061086f610830366004612af8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161028c9493929190612eb1565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016108a990612ee2565b60405180910390fd5b601055565b6000600154600160a01b900460ff1660028111156108d7576108d7612e55565b03610a45576002546004546108ec9042612f3a565b101561094f5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016108a9565b6000600654116109b15760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a9565b6007546009546001600160a01b0390911690637363ae1f906109d39043612f4d565b6040518263ffffffff1660e01b81526004016109f191815260200190565b600060405180830381600087803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c3f565b60018054600160a01b900460ff166002811115610a6457610a64612e55565b03610b5c576007546009546005546001600160a01b03909216916313cf905491610a8d91612f4d565b6040518263ffffffff1660e01b8152600401610aab91815260200190565b6020604051808303816000875af1158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190612f60565b6008819055600003610b425760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a9565b600180546002919060ff60a01b1916600160a01b83610a3b565b6002600154600160a01b900460ff166002811115610b7c57610b7c612e55565b03610c3f576006541580610b9e5750600354600454610b9b9042612f3a565b10155b610c315760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a9565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c8091600160a01b90910460ff1690612e97565b60405180910390a1565b6001546001600160a01b03163314610cb45760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d602052604081206002018054839290610cdf908490612f4d565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610d4d57610d4d612e55565b14610d9a5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a9565b600b54600a541015610dee5760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108a9565b6000600a54600183600b54610e039190612f4d565b610e0d9190612f3a565b11610e185781610e33565b600b54600a54610e289190612f3a565b610e33906001612f4d565b9050600081600b54610e459190612f4d565b600b549091505b81811015610f67576000818152600e6020526040902080546001600160a01b031615610f545760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610ec89490821693600160a01b9092046001600160601b031692909160ff1690600401612eb1565b600060405180830381600087803b158015610ee257600080fd5b505af1158015610ef6573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b5080610f5f81612fbd565b915050610e4c565b50600b555050565b6001546001600160a01b03163314610f995760405162461bcd60e51b81526004016108a990612f79565b6000828152600c6020526040812090610fb183611ba1565b825490915015610ffa5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a9565b6001811161104a5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a9565b8155600201805460018101825560009182526020822001555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806110b05750805467ffffffffffffffff808416911610155b156110cd5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038c81166001600160a01b031992831617909255600180548c841690831617815560028b905560038a90554260045560078054938a16939092169290921790556009869055600b5560108490556011839055805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff1660028111156111c2576111c2612e55565b146111fe5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a9565b6000848152600c602052604081206002810180549192909161122257611222612fd6565b906000526020600020015460000361123e57600091505061137d565b60008160020160008154811061125657611256612fd6565b90600052602060002001546008548686604051602001611289939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6112ac9190613002565b905060005b600283015483546112c3908390613016565b6112ce906001612f4d565b101561135d5760015b83548111611357576000818386600001546112f29190613016565b6112fc9190612f4d565b9050600085600201828154811061131557611315612fd6565b9060005260206000200154905080851061133a576113338186612f3a565b9450611342565b509150611357565b5050808061134f90612fbd565b9150506112d7565b506112b1565b600081815260048401602052604090205461137790611bbc565b93505050505b9392505050565b6000546001600160a01b031633146113ae5760405162461bcd60e51b81526004016108a990612ee2565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156113ed576113ed612e55565b03611469576007546009546001600160a01b0390911690637363ae1f906114149043612f4d565b6040518263ffffffff1660e01b815260040161143291815260200190565b600060405180830381600087803b15801561144c57600080fd5b505af1158015611460573d6000803e3d6000fd5b50504360055550505b5050565b61147682611be7565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114f457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114e86000805160206131138339815191525490565b6001600160a01b031614155b156115125760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561156c575060408051601f3d908101601f1916820190925261156991810190612f60565b60015b61159457604051630c76093760e01b81526001600160a01b03831660048201526024016108a9565b60008051602061311383398151915281146115c557604051632a87526960e21b8152600481018290526024016108a9565b6000805160206131138339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611690576000836001600160a01b03168360405161162c919061302d565b600060405180830381855af49150503d8060008114611667576040519150601f19603f3d011682016040523d82523d6000602084013e61166c565b606091505b505090508061168e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116e05760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061311383398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561178557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116117425790505b50505050509050919050565b6001546001600160a01b031633146117bb5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb8361305c565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361180457600092505050611829565b81600201818154811061181957611819612fd6565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146118595760405162461bcd60e51b81526004016108a990612ee2565b600255565b6000546001600160a01b031633146118885760405162461bcd60e51b81526004016108a990612ee2565b601155565b6001546001600160a01b031633146118b75760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040812060020180548392906118e2908490612f3a565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610d21565b6000806119358484611c11565b905061194a6001600160601b038416826117d4565b949350505050565b600154600090819081906001600160a01b031633146119835760405162461bcd60e51b81526004016108a990612f79565b61198f87878787611c59565b9199909850909650945050505050565b6001546001600160a01b031633146119c95760405162461bcd60e51b81526004016108a990612f79565b60006119d4826116f3565b80519091505b801561169057600180546001600160a01b03169063fbb519e79085908590611a029086612f3a565b81518110611a1257611a12612fd6565b60200260200101516000806040518563ffffffff1660e01b8152600401611a3c9493929190612eb1565b600060405180830381600087803b158015611a5657600080fd5b505af1158015611a6a573d6000803e3d6000fd5b505050508080611a799061305c565b9150506119da565b6001546001600160a01b03163314611aab5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb83612fbd565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611aed8787611928565b9054949793965094505050565b6000546001600160a01b03163314611b245760405162461bcd60e51b81526004016108a990612ee2565b600355565b6001546001600160a01b03163314611b535760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040902060018101548211611b955781816001016000828254611b8a9190612f3a565b909155506116909050565b60006001820155505050565b60006020825110611bb457506020015190565b506006919050565b600060405160005b6014811015611bdf5783811a81600c84010153600101611bc4565b505192915050565b6000546001600160a01b0316331461036b5760405162461bcd60e51b81526004016108a990612ee2565b600060405160005b6014811015611c34578481600c011a81830153600101611c19565b5060145b6020811015611c505783811a81830153600101611c38565b50519392505050565b600154600090819081906001600160a01b03163314611c8a5760405162461bcd60e51b81526004016108a990612f79565b6000611c968888611928565b9050808611600081611cb157611cac8884612f3a565b611cbb565b611cbb8389612f3a565b6001600160a01b038b166000908152600d60205260409020909150828015611ce1575087155b15611d3e57601054828260010154611cf99190612f4d565b1115611d1357600080600696509650965050505050611db6565b60115482601254611d249190612f4d565b1115611d3e57600080600796509650965050505050611db6565b6000600154600160a01b900460ff166002811115611d5e57611d5e612e55565b03611d9e578215611d86578160126000828254611d7b9190612f4d565b90915550611d9e9050565b8160126000828254611d989190612f3a565b90915550505b611daa8b8b8b8b611dc0565b91985096509450505050505b9450945094915050565b6001600160a01b0384166000908152600d602052604081208190819081611de78989611928565b825490915087158015611e035750600481101580611e03575081155b15611e1b576000806003955095509550505050611db6565b6000600154600160a01b900460ff166002811115611e3b57611e3b612e55565b14611ff557611e4a898b612159565b94506000600e6000600a60008154611e6190612fbd565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611f995760028101805460ff19166001179055611f44848b8b86612410565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611fe7565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611db692505050565b81881061201557866120105761200d838a8a85612410565b95505b61202e565b612021838a8a856124f0565b61202b9086612f4d565b94505b600061203a8b8b611c11565b905060008a5b816120f8576120596001600160601b0382168c856126e7565b6000196001600160601b038216016120745760019150612040565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa1580156120c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e99190613073565b50949550612040945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050509450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b03861684529091528120548015612409576000818152600e60205260409020600281015460ff16156123bc5760006121b38587611928565b905060008183600101546121c79190612f3a565b6001600160a01b0387166000908152600d6020526040902060018101549196508692509082106121f957806001015495505b8581600101600082825461220d9190612f3a565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036123b85780545b80156123b6576001600160601b03891682612282600184612f3a565b8154811061229257612292612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123a457815482906122ce90600190612f3a565b815481106122de576122de612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123129084612f3a565b8154811061232257612322612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508160000180548061236e5761236e6130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123b6565b806123ae8161305c565b915050612266565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561242a57600061243e565b8560010154866002015461243e9190612f3a565b905061244a8184612f4d565b84101561245857600061246d565b806124638486612f3a565b61246d9190612f3a565b9150826000036124b2578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124c457836124df565b838387600101546124d59190612f3a565b6124df9190612f4d565b866001018190555050949350505050565b60028401546000906125028484612f3a565b61250c9190612f4d565b856001015410612527576125208383612f3a565b905061254d565b846002015485600101541061254d578460020154856001015461254a9190612f3a565b90505b826000036126aa5784545b80156126a8576001600160601b03851686612574600184612f3a565b8154811061258457612584612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361269657855486906125c090600190612f3a565b815481106125d0576125d0612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906126049084612f3a565b8154811061261457612614612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555085600001805480612660576126606130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556126a8565b806126a08161305c565b915050612558565b505b81856001015410156126bc57826126d7565b828286600101546126cd9190612f3a565b6126d79190612f4d565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128b45783156128af57600182015460000361280257506002810180546001808201835560009283526020909220810185905590811480159061276157508154612755600183612f3a565b61275f9190613002565b155b156127fd57815460009061277590836130fe565b6000818152600485016020526040812054919250612794846001612f4d565b9050846002018560020184815481106127af576127af612fd6565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b61287d565b60018083018054909161281491612f3a565b8154811061282457612824612fd6565b9060005260206000200154905081600101805480612844576128446130e8565b600190038181906000526020600020016000905590558382600201828154811061287057612870612fd6565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556128af8582600187612a3b565b612a34565b836000036129525760008260020182815481106128d3576128d3612fd6565b9060005260206000200154905060008360020183815481106128f7576128f7612fd6565b600091825260208083209091019290925560018086018054918201815582528282200184905585815260038501825260408082208290558482526004860190925290812081905561294c908790849084612a3b565b50612a34565b81600201818154811061296757612967612fd6565b90600052602060002001548414612a345760008483600201838154811061299057612990612fd6565b9060005260206000200154111590506000816129d657858460020184815481106129bc576129bc612fd6565b90600052602060002001546129d19190612f3a565b612a01565b8360020183815481106129eb576129eb612fd6565b906000526020600020015486612a019190612f3a565b905085846002018481548110612a1957612a19612fd6565b600091825260209091200155612a3187848484612a3b565b50505b5050505050565b6000848152600c60205260409020835b8015612af0578154612a5e600183612f3a565b612a6891906130fe565b905083612a9f5782826002018281548110612a8557612a85612fd6565b9060005260206000200154612a9a9190612f3a565b612aca565b82826002018281548110612ab557612ab5612fd6565b9060005260206000200154612aca9190612f4d565b826002018281548110612adf57612adf612fd6565b600091825260209091200155612a4b565b505050505050565b600060208284031215612b0a57600080fd5b5035919050565b6001600160a01b038116811461036b57600080fd5b60008060408385031215612b3957600080fd5b8235612b4481612b11565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612b7957600080fd5b813567ffffffffffffffff80821115612b9457612b94612b52565b604051601f8301601f19908116603f01168101908282118183101715612bbc57612bbc612b52565b81604052838152866020858801011115612bd557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c0857600080fd5b82359150602083013567ffffffffffffffff811115612c2657600080fd5b612c3285828601612b68565b9150509250929050565b600080600080600080600080610100898b031215612c5957600080fd5b8835612c6481612b11565b97506020890135612c7481612b11565b965060408901359550606089013594506080890135612c9281612b11565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612cc957600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612cf357600080fd5b8235612cfe81612b11565b9150602083013567ffffffffffffffff811115612c2657600080fd5b600060208284031215612d2c57600080fd5b813561137d81612b11565b6020808252825182820181905260009190848201906040850190845b81811015612d785783516001600160601b031683529284019291840191600101612d53565b50909695505050505050565b60008060408385031215612d9757600080fd5b50508035926020909101359150565b6001600160601b038116811461036b57600080fd5b60008060408385031215612dce57600080fd5b8235612dd981612b11565b91506020830135612de981612da6565b809150509250929050565b801515811461036b57600080fd5b60008060008060808587031215612e1857600080fd5b8435612e2381612b11565b93506020850135612e3381612da6565b9250604085013591506060850135612e4a81612df4565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612e8957612e89612e55565b826040830152949350505050565b6020810160038310612eab57612eab612e55565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182957611829612f24565b8082018082111561182957611829612f24565b600060208284031215612f7257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b600060018201612fcf57612fcf612f24565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261301157613011612fec565b500690565b808202811582820484141761182957611829612f24565b6000825160005b8181101561304e5760208186018101518583015201613034565b506000920191825250919050565b60008161306b5761306b612f24565b506000190190565b600080600080600080600060e0888a03121561308e57600080fd5b875161309981612da6565b60208901519097506130aa81612df4565b8096505060408801519450606088015193506080880151925060a0880151915060c08801516130d881612df4565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b60008261310d5761310d612fec565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122070cafa237d94a0a535845c96380de621aebe98feb13953eda208afcadd3e163a64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102675760003560e01c80637dc38f1411610144578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b014610731578063dd5e5cb51461077d578063e534710d1461079d578063f216de4c146107d5578063f2f4eb26146107f5578063f6b4d82d1461081557600080fd5b8063c157261814610685578063ccbac9f51461069b578063d09f392d146106b1578063d1c1df48146106d1578063d605787b1461071157600080fd5b8063a2473cc111610108578063a2473cc1146105bc578063a5861b90146105dc578063b1c9fe6e1461060b578063b5d69e9914610639578063b888adfa14610659578063c057eca71461066f57600080fd5b80637dc38f1414610530578063817b1cd214610546578063823cfd701461055c5780638d3771bb1461057c578063965af6c71461059c57600080fd5b8063498c752c116101dd578063543f8a36116101a1578063543f8a361461044c57806356acb050146104795780635a68c1541461048f5780635d2d7846146104a55780636624192f146104c557806376fa9fc51461051057600080fd5b8063498c752c146103c45780634c70a0d6146103e45780634dbbebbc146104045780634f1ef2861461042457806352d1902d1461043757600080fd5b80631b92bbbe1161022f5780631b92bbbe1461031a57806321e1625e1461033057806321ea9b3f1461035057806323f61de41461036e57806335975f4a14610384578063477a655c146103a457600080fd5b8063034327441461026c57806306dfc967146102955780630b274f2e146102b75780630c340a24146102cc5780630e083ec914610304575b600080fd5b34801561027857600080fd5b5061028260065481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b506102b56102b0366004612af8565b61087f565b005b3480156102c357600080fd5b506102b56108b7565b3480156102d857600080fd5b506000546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161028c565b34801561031057600080fd5b50610282600a5481565b34801561032657600080fd5b5061028260035481565b34801561033c57600080fd5b506102b561034b366004612b26565b610c8a565b34801561035c57600080fd5b506102b561036b366004612af8565b50565b34801561037a57600080fd5b5061028260105481565b34801561039057600080fd5b506102b561039f366004612af8565b610d2d565b3480156103b057600080fd5b506102b56103bf366004612bf5565b610f6f565b3480156103d057600080fd5b506102b56103df366004612c3c565b611066565b3480156103f057600080fd5b506102ec6103ff366004612cb4565b6111a0565b34801561041057600080fd5b506102b561041f366004612b26565b611384565b6102b5610432366004612ce0565b61146d565b34801561044357600080fd5b50610282611695565b34801561045857600080fd5b5061046c610467366004612d1a565b6116f3565b60405161028c9190612d37565b34801561048557600080fd5b50610282600b5481565b34801561049b57600080fd5b5061028260115481565b3480156104b157600080fd5b506102b56104c0366004612d84565b611791565b3480156104d157600080fd5b506105006104e0366004612d1a565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161028c565b34801561051c57600080fd5b5061028261052b366004612d84565b6117d4565b34801561053c57600080fd5b5061028260095481565b34801561055257600080fd5b5061028260125481565b34801561056857600080fd5b506102b5610577366004612af8565b61182f565b34801561058857600080fd5b506102b5610597366004612af8565b61185e565b3480156105a857600080fd5b506102b56105b7366004612b26565b61188d565b3480156105c857600080fd5b506102826105d7366004612dbb565b611928565b3480156105e857600080fd5b506105fc6105f7366004612e02565b611952565b60405161028c93929190612e6b565b34801561061757600080fd5b5060015461062c90600160a01b900460ff1681565b60405161028c9190612e97565b34801561064557600080fd5b506102b5610654366004612d1a565b61199f565b34801561066557600080fd5b5061028260045481565b34801561067b57600080fd5b5061028260025481565b34801561069157600080fd5b5061028260055481565b3480156106a757600080fd5b5061028260085481565b3480156106bd57600080fd5b506102b56106cc366004612d84565b611a81565b3480156106dd57600080fd5b506106f16106ec366004612dbb565b611abb565b60408051948552602085019390935291830152606082015260800161028c565b34801561071d57600080fd5b506007546102ec906001600160a01b031681565b34801561073d57600080fd5b5061076861074c366004612d1a565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161028c565b34801561078957600080fd5b506102b5610798366004612af8565b611afa565b3480156107a957600080fd5b506102826107b8366004612dbb565b600f60209081526000928352604080842090915290825290205481565b3480156107e157600080fd5b506102b56107f0366004612b26565b611b29565b34801561080157600080fd5b506001546102ec906001600160a01b031681565b34801561082157600080fd5b5061086f610830366004612af8565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161028c9493929190612eb1565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016108a990612ee2565b60405180910390fd5b601055565b6000600154600160a01b900460ff1660028111156108d7576108d7612e55565b03610a45576002546004546108ec9042612f3a565b101561094f5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016108a9565b6000600654116109b15760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a9565b6007546009546001600160a01b0390911690637363ae1f906109d39043612f4d565b6040518263ffffffff1660e01b81526004016109f191815260200190565b600060405180830381600087803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c3f565b60018054600160a01b900460ff166002811115610a6457610a64612e55565b03610b5c576007546009546005546001600160a01b03909216916313cf905491610a8d91612f4d565b6040518263ffffffff1660e01b8152600401610aab91815260200190565b6020604051808303816000875af1158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190612f60565b6008819055600003610b425760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a9565b600180546002919060ff60a01b1916600160a01b83610a3b565b6002600154600160a01b900460ff166002811115610b7c57610b7c612e55565b03610c3f576006541580610b9e5750600354600454610b9b9042612f3a565b10155b610c315760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a9565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c8091600160a01b90910460ff1690612e97565b60405180910390a1565b6001546001600160a01b03163314610cb45760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d602052604081206002018054839290610cdf908490612f4d565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610d4d57610d4d612e55565b14610d9a5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a9565b600b54600a541015610dee5760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108a9565b6000600a54600183600b54610e039190612f4d565b610e0d9190612f3a565b11610e185781610e33565b600b54600a54610e289190612f3a565b610e33906001612f4d565b9050600081600b54610e459190612f4d565b600b549091505b81811015610f67576000818152600e6020526040902080546001600160a01b031615610f545760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610ec89490821693600160a01b9092046001600160601b031692909160ff1690600401612eb1565b600060405180830381600087803b158015610ee257600080fd5b505af1158015610ef6573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b5080610f5f81612fbd565b915050610e4c565b50600b555050565b6001546001600160a01b03163314610f995760405162461bcd60e51b81526004016108a990612f79565b6000828152600c6020526040812090610fb183611ba1565b825490915015610ffa5760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a9565b6001811161104a5760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a9565b8155600201805460018101825560009182526020822001555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806110b05750805467ffffffffffffffff808416911610155b156110cd5760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038c81166001600160a01b031992831617909255600180548c841690831617815560028b905560038a90554260045560078054938a16939092169290921790556009869055600b5560108490556011839055805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff1660028111156111c2576111c2612e55565b146111fe5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a9565b6000848152600c602052604081206002810180549192909161122257611222612fd6565b906000526020600020015460000361123e57600091505061137d565b60008160020160008154811061125657611256612fd6565b90600052602060002001546008548686604051602001611289939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6112ac9190613002565b905060005b600283015483546112c3908390613016565b6112ce906001612f4d565b101561135d5760015b83548111611357576000818386600001546112f29190613016565b6112fc9190612f4d565b9050600085600201828154811061131557611315612fd6565b9060005260206000200154905080851061133a576113338186612f3a565b9450611342565b509150611357565b5050808061134f90612fbd565b9150506112d7565b506112b1565b600081815260048401602052604090205461137790611bbc565b93505050505b9392505050565b6000546001600160a01b031633146113ae5760405162461bcd60e51b81526004016108a990612ee2565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156113ed576113ed612e55565b03611469576007546009546001600160a01b0390911690637363ae1f906114149043612f4d565b6040518263ffffffff1660e01b815260040161143291815260200190565b600060405180830381600087803b15801561144c57600080fd5b505af1158015611460573d6000803e3d6000fd5b50504360055550505b5050565b61147682611be7565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114f457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114e86000805160206131138339815191525490565b6001600160a01b031614155b156115125760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561156c575060408051601f3d908101601f1916820190925261156991810190612f60565b60015b61159457604051630c76093760e01b81526001600160a01b03831660048201526024016108a9565b60008051602061311383398151915281146115c557604051632a87526960e21b8152600481018290526024016108a9565b6000805160206131138339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611690576000836001600160a01b03168360405161162c919061302d565b600060405180830381855af49150503d8060008114611667576040519150601f19603f3d011682016040523d82523d6000602084013e61166c565b606091505b505090508061168e576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116e05760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061311383398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561178557602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116117425790505b50505050509050919050565b6001546001600160a01b031633146117bb5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb8361305c565b91905055505050565b6000828152600c602090815260408083208484526003810190925282205480830361180457600092505050611829565b81600201818154811061181957611819612fd6565b9060005260206000200154925050505b92915050565b6000546001600160a01b031633146118595760405162461bcd60e51b81526004016108a990612ee2565b600255565b6000546001600160a01b031633146118885760405162461bcd60e51b81526004016108a990612ee2565b601155565b6001546001600160a01b031633146118b75760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040812060020180548392906118e2908490612f3a565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610d21565b6000806119358484611c11565b905061194a6001600160601b038416826117d4565b949350505050565b600154600090819081906001600160a01b031633146119835760405162461bcd60e51b81526004016108a990612f79565b61198f87878787611c59565b9199909850909650945050505050565b6001546001600160a01b031633146119c95760405162461bcd60e51b81526004016108a990612f79565b60006119d4826116f3565b80519091505b801561169057600180546001600160a01b03169063fbb519e79085908590611a029086612f3a565b81518110611a1257611a12612fd6565b60200260200101516000806040518563ffffffff1660e01b8152600401611a3c9493929190612eb1565b600060405180830381600087803b158015611a5657600080fd5b505af1158015611a6a573d6000803e3d6000fd5b505050508080611a799061305c565b9150506119da565b6001546001600160a01b03163314611aab5760405162461bcd60e51b81526004016108a990612f79565b600680549060006117cb83612fbd565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611aed8787611928565b9054949793965094505050565b6000546001600160a01b03163314611b245760405162461bcd60e51b81526004016108a990612ee2565b600355565b6001546001600160a01b03163314611b535760405162461bcd60e51b81526004016108a990612f79565b6001600160a01b0382166000908152600d6020526040902060018101548211611b955781816001016000828254611b8a9190612f3a565b909155506116909050565b60006001820155505050565b60006020825110611bb457506020015190565b506006919050565b600060405160005b6014811015611bdf5783811a81600c84010153600101611bc4565b505192915050565b6000546001600160a01b0316331461036b5760405162461bcd60e51b81526004016108a990612ee2565b600060405160005b6014811015611c34578481600c011a81830153600101611c19565b5060145b6020811015611c505783811a81830153600101611c38565b50519392505050565b600154600090819081906001600160a01b03163314611c8a5760405162461bcd60e51b81526004016108a990612f79565b6000611c968888611928565b9050808611600081611cb157611cac8884612f3a565b611cbb565b611cbb8389612f3a565b6001600160a01b038b166000908152600d60205260409020909150828015611ce1575087155b15611d3e57601054828260010154611cf99190612f4d565b1115611d1357600080600696509650965050505050611db6565b60115482601254611d249190612f4d565b1115611d3e57600080600796509650965050505050611db6565b6000600154600160a01b900460ff166002811115611d5e57611d5e612e55565b03611d9e578215611d86578160126000828254611d7b9190612f4d565b90915550611d9e9050565b8160126000828254611d989190612f3a565b90915550505b611daa8b8b8b8b611dc0565b91985096509450505050505b9450945094915050565b6001600160a01b0384166000908152600d602052604081208190819081611de78989611928565b825490915087158015611e035750600481101580611e03575081155b15611e1b576000806003955095509550505050611db6565b6000600154600160a01b900460ff166002811115611e3b57611e3b612e55565b14611ff557611e4a898b612159565b94506000600e6000600a60008154611e6190612fbd565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611f995760028101805460ff19166001179055611f44848b8b86612410565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611fe7565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611db692505050565b81881061201557866120105761200d838a8a85612410565b95505b61202e565b612021838a8a856124f0565b61202b9086612f4d565b94505b600061203a8b8b611c11565b905060008a5b816120f8576120596001600160601b0382168c856126e7565b6000196001600160601b038216016120745760019150612040565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa1580156120c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e99190613073565b50949550612040945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050509450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b03861684529091528120548015612409576000818152600e60205260409020600281015460ff16156123bc5760006121b38587611928565b905060008183600101546121c79190612f3a565b6001600160a01b0387166000908152600d6020526040902060018101549196508692509082106121f957806001015495505b8581600101600082825461220d9190612f3a565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036123b85780545b80156123b6576001600160601b03891682612282600184612f3a565b8154811061229257612292612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b0316036123a457815482906122ce90600190612f3a565b815481106122de576122de612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123129084612f3a565b8154811061232257612322612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b031602179055508160000180548061236e5761236e6130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123b6565b806123ae8161305c565b915050612266565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b60008085600101548660020154101561242a57600061243e565b8560010154866002015461243e9190612f3a565b905061244a8184612f4d565b84101561245857600061246d565b806124638486612f3a565b61246d9190612f3a565b9150826000036124b2578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124c457836124df565b838387600101546124d59190612f3a565b6124df9190612f4d565b866001018190555050949350505050565b60028401546000906125028484612f3a565b61250c9190612f4d565b856001015410612527576125208383612f3a565b905061254d565b846002015485600101541061254d578460020154856001015461254a9190612f3a565b90505b826000036126aa5784545b80156126a8576001600160601b03851686612574600184612f3a565b8154811061258457612584612fd6565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361269657855486906125c090600190612f3a565b815481106125d0576125d0612fd6565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906126049084612f3a565b8154811061261457612614612fd6565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555085600001805480612660576126606130e8565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556126a8565b806126a08161305c565b915050612558565b505b81856001015410156126bc57826126d7565b828286600101546126cd9190612f3a565b6126d79190612f4d565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128b45783156128af57600182015460000361280257506002810180546001808201835560009283526020909220810185905590811480159061276157508154612755600183612f3a565b61275f9190613002565b155b156127fd57815460009061277590836130fe565b6000818152600485016020526040812054919250612794846001612f4d565b9050846002018560020184815481106127af576127af612fd6565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b61287d565b60018083018054909161281491612f3a565b8154811061282457612824612fd6565b9060005260206000200154905081600101805480612844576128446130e8565b600190038181906000526020600020016000905590558382600201828154811061287057612870612fd6565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556128af8582600187612a3b565b612a34565b836000036129525760008260020182815481106128d3576128d3612fd6565b9060005260206000200154905060008360020183815481106128f7576128f7612fd6565b600091825260208083209091019290925560018086018054918201815582528282200184905585815260038501825260408082208290558482526004860190925290812081905561294c908790849084612a3b565b50612a34565b81600201818154811061296757612967612fd6565b90600052602060002001548414612a345760008483600201838154811061299057612990612fd6565b9060005260206000200154111590506000816129d657858460020184815481106129bc576129bc612fd6565b90600052602060002001546129d19190612f3a565b612a01565b8360020183815481106129eb576129eb612fd6565b906000526020600020015486612a019190612f3a565b905085846002018481548110612a1957612a19612fd6565b600091825260209091200155612a3187848484612a3b565b50505b5050505050565b6000848152600c60205260409020835b8015612af0578154612a5e600183612f3a565b612a6891906130fe565b905083612a9f5782826002018281548110612a8557612a85612fd6565b9060005260206000200154612a9a9190612f3a565b612aca565b82826002018281548110612ab557612ab5612fd6565b9060005260206000200154612aca9190612f4d565b826002018281548110612adf57612adf612fd6565b600091825260209091200155612a4b565b505050505050565b600060208284031215612b0a57600080fd5b5035919050565b6001600160a01b038116811461036b57600080fd5b60008060408385031215612b3957600080fd5b8235612b4481612b11565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612b7957600080fd5b813567ffffffffffffffff80821115612b9457612b94612b52565b604051601f8301601f19908116603f01168101908282118183101715612bbc57612bbc612b52565b81604052838152866020858801011115612bd557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612c0857600080fd5b82359150602083013567ffffffffffffffff811115612c2657600080fd5b612c3285828601612b68565b9150509250929050565b600080600080600080600080610100898b031215612c5957600080fd5b8835612c6481612b11565b97506020890135612c7481612b11565b965060408901359550606089013594506080890135612c9281612b11565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612cc957600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612cf357600080fd5b8235612cfe81612b11565b9150602083013567ffffffffffffffff811115612c2657600080fd5b600060208284031215612d2c57600080fd5b813561137d81612b11565b6020808252825182820181905260009190848201906040850190845b81811015612d785783516001600160601b031683529284019291840191600101612d53565b50909695505050505050565b60008060408385031215612d9757600080fd5b50508035926020909101359150565b6001600160601b038116811461036b57600080fd5b60008060408385031215612dce57600080fd5b8235612dd981612b11565b91506020830135612de981612da6565b809150509250929050565b801515811461036b57600080fd5b60008060008060808587031215612e1857600080fd5b8435612e2381612b11565b93506020850135612e3381612da6565b9250604085013591506060850135612e4a81612df4565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612e8957612e89612e55565b826040830152949350505050565b6020810160038310612eab57612eab612e55565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182957611829612f24565b8082018082111561182957611829612f24565b600060208284031215612f7257600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b600060018201612fcf57612fcf612f24565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261301157613011612fec565b500690565b808202811582820484141761182957611829612f24565b6000825160005b8181101561304e5760208186018101518583015201613034565b506000920191825250919050565b60008161306b5761306b612f24565b506000190190565b600080600080600080600060e0888a03121561308e57600080fd5b875161309981612da6565b60208901519097506130aa81612df4565b8096505060408801519450606088015193506080880151925060a0880151915060c08801516130d881612df4565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b60008261310d5761310d612fec565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122070cafa237d94a0a535845c96380de621aebe98feb13953eda208afcadd3e163a64736f6c63430008120033", + "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\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedAlreadyTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedAlreadyTransferredWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeDelayedNotTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_unlock\",\"type\":\"bool\"}],\"name\":\"StakeLocked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_courtID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"StakeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"}],\"name\":\"changeMaxDrawingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxStakePerJuror\",\"type\":\"uint256\"}],\"name\":\"changeMaxStakePerJuror\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxTotalStaked\",\"type\":\"uint256\"}],\"name\":\"changeMaxTotalStaked\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"}],\"name\":\"changeMinStakingTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"}],\"name\":\"changeRandomNumberGenerator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contract KlerosCore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"createDisputeHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"createTree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeReadIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedStakeWriteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delayedStakes\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"alreadyTransferred\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disputesWithoutJurors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_coreDisputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"draw\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"drawnAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_iterations\",\"type\":\"uint256\"}],\"name\":\"executeDelayedStakes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"getJurorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLocked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakedInCourt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nbCourts\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"}],\"name\":\"getJurorCourtIDs\",\"outputs\":[{\"internalType\":\"uint96[]\",\"name\":\"\",\"type\":\"uint96[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"contract KlerosCore\",\"name\":\"_core\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minStakingTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDrawingTime\",\"type\":\"uint256\"},{\"internalType\":\"contract RNG\",\"name\":\"_rng\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rngLookahead\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxStakePerJuror\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxTotalStaked\",\"type\":\"uint256\"}],\"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\":[],\"name\":\"lastPhaseChange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"jurorAccount\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"courtId\",\"type\":\"uint96\"}],\"name\":\"latestDelayedStakeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"lockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDrawingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxStakePerJuror\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxTotalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStakingTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_randomNumber\",\"type\":\"uint256\"}],\"name\":\"notifyRandomNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"passPhase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"penalizeStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"phase\",\"outputs\":[{\"internalType\":\"enum ISortitionModule.Phase\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"postDrawHook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"randomNumberRequestBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rng\",\"outputs\":[{\"internalType\":\"contract RNG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngLookahead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"setJurorInactive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"_newStake\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_alreadyTransferred\",\"type\":\"bool\"}],\"name\":\"setStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pnkDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pnkWithdrawal\",\"type\":\"uint256\"},{\"internalType\":\"enum StakingResult\",\"name\":\"stakingResult\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_ID\",\"type\":\"bytes32\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_juror\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_courtID\",\"type\":\"uint96\"}],\"name\":\"stakeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_relativeAmount\",\"type\":\"uint256\"}],\"name\":\"unlockStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"A factory of trees that keeps track of staked values for sortition.\",\"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\":{\"changeMaxDrawingTime(uint256)\":{\"details\":\"Changes the `maxDrawingTime` storage variable.\",\"params\":{\"_maxDrawingTime\":\"The new value for the `maxDrawingTime` storage variable.\"}},\"changeMinStakingTime(uint256)\":{\"details\":\"Changes the `minStakingTime` storage variable.\",\"params\":{\"_minStakingTime\":\"The new value for the `minStakingTime` storage variable.\"}},\"changeRandomNumberGenerator(address,uint256)\":{\"details\":\"Changes the `_rng` and `_rngLookahead` storage variables.\",\"params\":{\"_rng\":\"The new value for the `RNGenerator` storage variable.\",\"_rngLookahead\":\"The new value for the `rngLookahead` storage variable.\"}},\"constructor\":{\"details\":\"Constructor, initializing the implementation to reduce attack surface.\"},\"createTree(bytes32,bytes)\":{\"details\":\"Create a sortition sum tree at the specified key.\",\"params\":{\"_extraData\":\"Extra data that contains the number of children each node in the tree should have.\",\"_key\":\"The key of the new tree.\"}},\"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.\",\"params\":{\"_coreDisputeID\":\"Index of the dispute in Kleros Core.\",\"_key\":\"The key of the tree.\",\"_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.\"}},\"executeDelayedStakes(uint256)\":{\"details\":\"Executes the next delayed stakes.\",\"params\":{\"_iterations\":\"The number of delayed stakes to execute.\"}},\"getJurorCourtIDs(address)\":{\"details\":\"Gets the court identifiers where a specific `_juror` has staked.\",\"params\":{\"_juror\":\"The address of the juror.\"}},\"initialize(address,address,uint256,uint256,address,uint256,uint256,uint256)\":{\"details\":\"Initializer (constructor equivalent for upgradable contracts).\",\"params\":{\"_core\":\"The KlerosCore.\",\"_governor\":\"The governor.\",\"_maxDrawingTime\":\"Time after which the drawing phase can be switched\",\"_maxStakePerJuror\":\"The maximum amount of PNK a juror can stake in a court.\",\"_maxTotalStaked\":\"The maximum amount of PNK that can be staked in all courts.\",\"_minStakingTime\":\"Minimal time to stake\",\"_rng\":\"The random number generator.\",\"_rngLookahead\":\"Lookahead value for rng.\"}},\"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.\"}},\"stakeOf(address,uint96)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_courtID\":\"The ID of the court.\",\"_juror\":\"The address of the juror.\"},\"returns\":{\"_0\":\"value The stake of the juror in the court.\"}},\"stakeOf(bytes32,bytes32)\":{\"details\":\"Get the stake of a juror in a court.\",\"params\":{\"_ID\":\"The stake path ID, corresponding to a juror.\",\"_key\":\"The key of the tree, corresponding to a court.\"},\"returns\":{\"_0\":\"The stake of the juror in the court.\"}},\"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\":\"SortitionModuleNeo\",\"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/SortitionModuleNeo.sol\":\"SortitionModuleNeo\"},\"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/SortitionModuleBase.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 \\\"./KlerosCore.sol\\\";\\nimport \\\"./interfaces/ISortitionModule.sol\\\";\\nimport \\\"./interfaces/IDisputeKit.sol\\\";\\nimport \\\"../rng/RNG.sol\\\";\\nimport \\\"../libraries/Constants.sol\\\";\\n\\n/// @title SortitionModuleBase\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\nabstract contract SortitionModuleBase is ISortitionModule {\\n // ************************************* //\\n // * Enums / Structs * //\\n // ************************************* //\\n\\n enum PreStakeHookResult {\\n ok, // Correct phase. All checks are passed.\\n stakeDelayedAlreadyTransferred, // Wrong phase but stake is increased, so transfer the tokens without updating the drawing chance.\\n stakeDelayedNotTransferred, // Wrong phase and stake is decreased. Delay the token transfer and drawing chance update.\\n failed // Checks didn't pass. Do no changes.\\n }\\n\\n struct SortitionSumTree {\\n uint256 K; // The maximum number of children per node.\\n // We use this to keep track of vacant positions in the tree after removing a leaf. This is for keeping the tree as balanced as possible without spending gas on moving nodes around.\\n uint256[] stack;\\n uint256[] nodes;\\n // Two-way mapping of IDs to node indexes. Note that node index 0 is reserved for the root node, and means the ID does not have a node.\\n mapping(bytes32 => uint256) IDsToNodeIndexes;\\n mapping(uint256 => bytes32) nodeIndexesToIDs;\\n }\\n\\n struct DelayedStake {\\n address account; // The address of the juror.\\n uint96 courtID; // The ID of the court.\\n uint256 stake; // The new stake.\\n bool alreadyTransferred; // True if tokens were already transferred before delayed stake's execution.\\n }\\n\\n struct Juror {\\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 KlerosCore public core; // The core arbitrator contract.\\n Phase public phase; // The current phase.\\n uint256 public minStakingTime; // The time after which the phase can be switched to Drawing if there are open disputes.\\n uint256 public maxDrawingTime; // The time after which the phase can be switched back to Staking.\\n uint256 public lastPhaseChange; // The last time the phase was changed.\\n uint256 public randomNumberRequestBlock; // Number of the block when RNG request was made.\\n uint256 public disputesWithoutJurors; // The number of disputes that have not finished drawing jurors.\\n RNG public rng; // The random number generator.\\n uint256 public randomNumber; // Random number returned by RNG.\\n uint256 public rngLookahead; // Minimal block distance between requesting and obtaining a random number.\\n uint256 public delayedStakeWriteIndex; // The index of the last `delayedStake` item that was written to the array. 0 index is skipped.\\n uint256 public delayedStakeReadIndex; // The index of the next `delayedStake` item that should be processed. Starts at 1 because 0 index is skipped.\\n mapping(bytes32 treeHash => SortitionSumTree) sortitionSumTrees; // The mapping trees by keys.\\n mapping(address account => Juror) public jurors; // The jurors.\\n mapping(uint256 => DelayedStake) public delayedStakes; // Stores the stakes that were changed during Drawing phase, to update them when the phase is switched to Staking.\\n mapping(address jurorAccount => mapping(uint96 courtId => uint256)) public latestDelayedStakeIndex; // Maps the juror to its latest delayed stake. If there is already a delayed stake for this juror then it'll be replaced. latestDelayedStakeIndex[juror][courtID].\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n event StakeSet(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeDelayedNotTransferred(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeDelayedAlreadyTransferred(address indexed _address, uint256 _courtID, uint256 _amount);\\n event StakeDelayedAlreadyTransferredWithdrawn(address indexed _address, uint96 indexed _courtID, uint256 _amount);\\n event StakeLocked(address indexed _address, uint256 _relativeAmount, bool _unlock);\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n function _initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead\\n ) internal {\\n governor = _governor;\\n core = _core;\\n minStakingTime = _minStakingTime;\\n maxDrawingTime = _maxDrawingTime;\\n lastPhaseChange = block.timestamp;\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n delayedStakeReadIndex = 1;\\n }\\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 // * Governance * //\\n // ************************************* //\\n\\n /// @dev Changes the `minStakingTime` storage variable.\\n /// @param _minStakingTime The new value for the `minStakingTime` storage variable.\\n function changeMinStakingTime(uint256 _minStakingTime) external onlyByGovernor {\\n minStakingTime = _minStakingTime;\\n }\\n\\n /// @dev Changes the `maxDrawingTime` storage variable.\\n /// @param _maxDrawingTime The new value for the `maxDrawingTime` storage variable.\\n function changeMaxDrawingTime(uint256 _maxDrawingTime) external onlyByGovernor {\\n maxDrawingTime = _maxDrawingTime;\\n }\\n\\n /// @dev Changes the `_rng` and `_rngLookahead` storage variables.\\n /// @param _rng The new value for the `RNGenerator` storage variable.\\n /// @param _rngLookahead The new value for the `rngLookahead` storage variable.\\n function changeRandomNumberGenerator(RNG _rng, uint256 _rngLookahead) external onlyByGovernor {\\n rng = _rng;\\n rngLookahead = _rngLookahead;\\n if (phase == Phase.generating) {\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function passPhase() external {\\n if (phase == Phase.staking) {\\n require(\\n block.timestamp - lastPhaseChange >= minStakingTime,\\n \\\"The minimum staking time has not passed yet.\\\"\\n );\\n require(disputesWithoutJurors > 0, \\\"There are no disputes that need jurors.\\\");\\n rng.requestRandomness(block.number + rngLookahead);\\n randomNumberRequestBlock = block.number;\\n phase = Phase.generating;\\n } else if (phase == Phase.generating) {\\n randomNumber = rng.receiveRandomness(randomNumberRequestBlock + rngLookahead);\\n require(randomNumber != 0, \\\"Random number is not ready yet\\\");\\n phase = Phase.drawing;\\n } else if (phase == Phase.drawing) {\\n require(\\n disputesWithoutJurors == 0 || block.timestamp - lastPhaseChange >= maxDrawingTime,\\n \\\"There are still disputes without jurors and the maximum drawing time has not passed yet.\\\"\\n );\\n phase = Phase.staking;\\n }\\n\\n lastPhaseChange = block.timestamp;\\n emit NewPhase(phase);\\n }\\n\\n /// @dev Create a sortition sum tree at the specified key.\\n /// @param _key The key of the new tree.\\n /// @param _extraData Extra data that contains the number of children each node in the tree should have.\\n function createTree(bytes32 _key, bytes memory _extraData) external override onlyByCore {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 K = _extraDataToTreeK(_extraData);\\n require(tree.K == 0, \\\"Tree already exists.\\\");\\n require(K > 1, \\\"K must be greater than one.\\\");\\n tree.K = K;\\n tree.nodes.push(0);\\n }\\n\\n /// @dev Executes the next delayed stakes.\\n /// @param _iterations The number of delayed stakes to execute.\\n function executeDelayedStakes(uint256 _iterations) external {\\n require(phase == Phase.staking, \\\"Should be in Staking phase.\\\");\\n require(delayedStakeWriteIndex >= delayedStakeReadIndex, \\\"No delayed stake to execute.\\\");\\n\\n uint256 actualIterations = (delayedStakeReadIndex + _iterations) - 1 > delayedStakeWriteIndex\\n ? (delayedStakeWriteIndex - delayedStakeReadIndex) + 1\\n : _iterations;\\n uint256 newDelayedStakeReadIndex = delayedStakeReadIndex + actualIterations;\\n\\n for (uint256 i = delayedStakeReadIndex; i < newDelayedStakeReadIndex; i++) {\\n DelayedStake storage delayedStake = delayedStakes[i];\\n // Delayed stake could've been manually removed already. In this case simply move on to the next item.\\n if (delayedStake.account != address(0)) {\\n core.setStakeBySortitionModule(\\n delayedStake.account,\\n delayedStake.courtID,\\n delayedStake.stake,\\n delayedStake.alreadyTransferred\\n );\\n delete latestDelayedStakeIndex[delayedStake.account][delayedStake.courtID];\\n delete delayedStakes[i];\\n }\\n }\\n delayedStakeReadIndex = newDelayedStakeReadIndex;\\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 (pnkDeposit, pnkWithdrawal, stakingResult) = _setStake(_account, _courtID, _newStake, _alreadyTransferred);\\n }\\n\\n /// @dev Sets the specified juror's stake in a court.\\n /// Note: no state changes should be made when returning `succeeded` = false, otherwise delayed stakes might break invariants.\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) internal virtual 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 (phase != Phase.staking) {\\n pnkWithdrawal = _deleteDelayedStake(_courtID, _account);\\n\\n // Store the stake change as delayed, to be applied when the phase switches back to Staking.\\n DelayedStake storage delayedStake = delayedStakes[++delayedStakeWriteIndex];\\n delayedStake.account = _account;\\n delayedStake.courtID = _courtID;\\n delayedStake.stake = _newStake;\\n latestDelayedStakeIndex[_account][_courtID] = delayedStakeWriteIndex;\\n if (_newStake > currentStake) {\\n // PNK deposit: tokens are transferred now.\\n delayedStake.alreadyTransferred = true;\\n pnkDeposit = _increaseStake(juror, _courtID, _newStake, currentStake);\\n emit StakeDelayedAlreadyTransferred(_account, _courtID, _newStake);\\n } else {\\n // PNK withdrawal: tokens are not transferred yet.\\n emit StakeDelayedNotTransferred(_account, _courtID, _newStake);\\n }\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n // Current phase is Staking: set normal stakes or delayed stakes (which may have been already transferred).\\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 // Update the sortition sum tree.\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_account, _courtID);\\n bool finished = false;\\n uint96 currenCourtID = _courtID;\\n while (!finished) {\\n // Tokens are also implicitly staked in parent courts through sortition module to increase the chance of being drawn.\\n _set(bytes32(uint256(currenCourtID)), _newStake, stakePathID);\\n if (currenCourtID == GENERAL_COURT) {\\n finished = true;\\n } else {\\n (currenCourtID, , , , , , ) = core.courts(currenCourtID); // Get the parent court.\\n }\\n }\\n emit StakeSet(_account, _courtID, _newStake);\\n return (pnkDeposit, pnkWithdrawal, StakingResult.Successful);\\n }\\n\\n /// @dev Checks if there is already a delayed stake. In this case consider it irrelevant and remove it.\\n /// @param _courtID ID of the court.\\n /// @param _juror Juror whose stake to check.\\n function _deleteDelayedStake(uint96 _courtID, address _juror) internal returns (uint256 actualAmountToWithdraw) {\\n uint256 latestIndex = latestDelayedStakeIndex[_juror][_courtID];\\n if (latestIndex != 0) {\\n DelayedStake storage delayedStake = delayedStakes[latestIndex];\\n if (delayedStake.alreadyTransferred) {\\n // Sortition stake represents the stake value that was last updated during Staking phase.\\n uint256 sortitionStake = stakeOf(_juror, _courtID);\\n\\n // Withdraw the tokens that were added with the latest delayed stake.\\n uint256 amountToWithdraw = delayedStake.stake - sortitionStake;\\n actualAmountToWithdraw = amountToWithdraw;\\n Juror storage juror = jurors[_juror];\\n if (juror.stakedPnk <= actualAmountToWithdraw) {\\n actualAmountToWithdraw = juror.stakedPnk;\\n }\\n\\n // StakePnk can become lower because of penalty.\\n juror.stakedPnk -= actualAmountToWithdraw;\\n emit StakeDelayedAlreadyTransferredWithdrawn(_juror, _courtID, amountToWithdraw);\\n\\n if (sortitionStake == 0) {\\n // Cleanup: delete the court otherwise it will be duplicated after staking.\\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 delete delayedStakes[latestIndex];\\n delete latestDelayedStakeIndex[_juror][_courtID];\\n }\\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 // 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 // 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 /// @param _key The key of the tree.\\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 /// `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(\\n bytes32 _key,\\n uint256 _coreDisputeID,\\n uint256 _nonce\\n ) public view override returns (address drawnAddress) {\\n require(phase == Phase.drawing, \\\"Wrong phase.\\\");\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n if (tree.nodes[0] == 0) {\\n return address(0); // No jurors staked.\\n }\\n\\n uint256 currentDrawnNumber = uint256(keccak256(abi.encodePacked(randomNumber, _coreDisputeID, _nonce))) %\\n tree.nodes[0];\\n\\n // While it still has children\\n uint256 treeIndex = 0;\\n while ((tree.K * treeIndex) + 1 < tree.nodes.length) {\\n for (uint256 i = 1; i <= tree.K; i++) {\\n // Loop over children.\\n uint256 nodeIndex = (tree.K * treeIndex) + i;\\n uint256 nodeValue = tree.nodes[nodeIndex];\\n\\n if (currentDrawnNumber >= nodeValue) {\\n // Go to the next child.\\n currentDrawnNumber -= nodeValue;\\n } else {\\n // Pick this child.\\n treeIndex = nodeIndex;\\n break;\\n }\\n }\\n }\\n drawnAddress = _stakePathIDToAccount(tree.nodeIndexesToIDs[treeIndex]);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _juror The address of the juror.\\n /// @param _courtID The ID of the court.\\n /// @return value The stake of the juror in the court.\\n function stakeOf(address _juror, uint96 _courtID) public view returns (uint256) {\\n bytes32 stakePathID = _accountAndCourtIDToStakePathID(_juror, _courtID);\\n return stakeOf(bytes32(uint256(_courtID)), stakePathID);\\n }\\n\\n /// @dev Get the stake of a juror in a court.\\n /// @param _key The key of the tree, corresponding to a court.\\n /// @param _ID The stake path ID, corresponding to a juror.\\n /// @return The stake of the juror in the court.\\n function stakeOf(bytes32 _key, bytes32 _ID) public view returns (uint256) {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint treeIndex = tree.IDsToNodeIndexes[_ID];\\n if (treeIndex == 0) {\\n return 0;\\n }\\n return tree.nodes[treeIndex];\\n }\\n\\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 stakedInCourt = stakeOf(_juror, _courtID);\\n nbCourts = juror.courtIDs.length;\\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 Update all the parents of a node.\\n /// @param _key The key of the tree to update.\\n /// @param _treeIndex The index of the node to start from.\\n /// @param _plusOrMinus Whether to add (true) or substract (false).\\n /// @param _value The value to add or substract.\\n /// `O(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 _updateParents(bytes32 _key, uint256 _treeIndex, bool _plusOrMinus, uint256 _value) private {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n\\n uint256 parentIndex = _treeIndex;\\n while (parentIndex != 0) {\\n parentIndex = (parentIndex - 1) / tree.K;\\n tree.nodes[parentIndex] = _plusOrMinus\\n ? tree.nodes[parentIndex] + _value\\n : tree.nodes[parentIndex] - _value;\\n }\\n }\\n\\n /// @dev Retrieves a juror's address from the stake path ID.\\n /// @param _stakePathID The stake path ID to unpack.\\n /// @return account The account.\\n function _stakePathIDToAccount(bytes32 _stakePathID) internal pure returns (address account) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(add(ptr, 0x0c), i), byte(i, _stakePathID))\\n }\\n account := mload(ptr)\\n }\\n }\\n\\n function _extraDataToTreeK(bytes memory _extraData) internal pure returns (uint256 K) {\\n if (_extraData.length >= 32) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n K := mload(add(_extraData, 0x20))\\n }\\n } else {\\n K = DEFAULT_K;\\n }\\n }\\n\\n /// @dev Set a value in a tree.\\n /// @param _key The key of the tree.\\n /// @param _value The new value.\\n /// @param _ID The ID of the value.\\n /// `O(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 _set(bytes32 _key, uint256 _value, bytes32 _ID) internal {\\n SortitionSumTree storage tree = sortitionSumTrees[_key];\\n uint256 treeIndex = tree.IDsToNodeIndexes[_ID];\\n\\n if (treeIndex == 0) {\\n // No existing node.\\n if (_value != 0) {\\n // Non zero value.\\n // Append.\\n // Add node.\\n if (tree.stack.length == 0) {\\n // No vacant spots.\\n // Get the index and append the value.\\n treeIndex = tree.nodes.length;\\n tree.nodes.push(_value);\\n\\n // Potentially append a new node and make the parent a sum node.\\n if (treeIndex != 1 && (treeIndex - 1) % tree.K == 0) {\\n // Is first child.\\n uint256 parentIndex = treeIndex / tree.K;\\n bytes32 parentID = tree.nodeIndexesToIDs[parentIndex];\\n uint256 newIndex = treeIndex + 1;\\n tree.nodes.push(tree.nodes[parentIndex]);\\n delete tree.nodeIndexesToIDs[parentIndex];\\n tree.IDsToNodeIndexes[parentID] = newIndex;\\n tree.nodeIndexesToIDs[newIndex] = parentID;\\n }\\n } else {\\n // Some vacant spot.\\n // Pop the stack and append the value.\\n treeIndex = tree.stack[tree.stack.length - 1];\\n tree.stack.pop();\\n tree.nodes[treeIndex] = _value;\\n }\\n\\n // Add label.\\n tree.IDsToNodeIndexes[_ID] = treeIndex;\\n tree.nodeIndexesToIDs[treeIndex] = _ID;\\n\\n _updateParents(_key, treeIndex, true, _value);\\n }\\n } else {\\n // Existing node.\\n if (_value == 0) {\\n // Zero value.\\n // Remove.\\n // Remember value and set to 0.\\n uint256 value = tree.nodes[treeIndex];\\n tree.nodes[treeIndex] = 0;\\n\\n // Push to stack.\\n tree.stack.push(treeIndex);\\n\\n // Clear label.\\n delete tree.IDsToNodeIndexes[_ID];\\n delete tree.nodeIndexesToIDs[treeIndex];\\n\\n _updateParents(_key, treeIndex, false, value);\\n } else if (_value != tree.nodes[treeIndex]) {\\n // New, non zero value.\\n // Set.\\n bool plusOrMinus = tree.nodes[treeIndex] <= _value;\\n uint256 plusOrMinusValue = plusOrMinus\\n ? _value - tree.nodes[treeIndex]\\n : tree.nodes[treeIndex] - _value;\\n tree.nodes[treeIndex] = _value;\\n\\n _updateParents(_key, treeIndex, plusOrMinus, plusOrMinusValue);\\n }\\n }\\n }\\n\\n /// @dev Packs an account and a court ID into a stake path ID.\\n /// @param _account The address of the juror to pack.\\n /// @param _courtID The court ID to pack.\\n /// @return stakePathID The stake path ID.\\n function _accountAndCourtIDToStakePathID(\\n address _account,\\n uint96 _courtID\\n ) internal pure returns (bytes32 stakePathID) {\\n assembly {\\n // solium-disable-line security/no-inline-assembly\\n let ptr := mload(0x40)\\n for {\\n let i := 0x00\\n } lt(i, 0x14) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(add(0x0c, i), _account))\\n }\\n for {\\n let i := 0x14\\n } lt(i, 0x20) {\\n i := add(i, 0x01)\\n } {\\n mstore8(add(ptr, i), byte(i, _courtID))\\n }\\n stakePathID := mload(ptr)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x616034e5cac36bdc57fb088727461f38d940e92e870ac09da2b0f6c075628f72\",\"license\":\"MIT\"},\"src/arbitration/SortitionModuleNeo.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @custom:authors: [@jaybuidl, @unknownunknown1]\\n * @custom:reviewers: []\\n * @custom:auditors: []\\n * @custom:bounties: []\\n * @custom:deployments: []\\n */\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./SortitionModuleBase.sol\\\";\\nimport \\\"../proxy/UUPSProxiable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/// @title SortitionModuleNeo\\n/// @dev A factory of trees that keeps track of staked values for sortition.\\ncontract SortitionModuleNeo is SortitionModuleBase, UUPSProxiable, Initializable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public maxStakePerJuror;\\n uint256 public maxTotalStaked;\\n uint256 public totalStaked;\\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.\\n /// @param _core The KlerosCore.\\n /// @param _minStakingTime Minimal time to stake\\n /// @param _maxDrawingTime Time after which the drawing phase can be switched\\n /// @param _rng The random number generator.\\n /// @param _rngLookahead Lookahead value for rng.\\n /// @param _maxStakePerJuror The maximum amount of PNK a juror can stake in a court.\\n /// @param _maxTotalStaked The maximum amount of PNK that can be staked in all courts.\\n function initialize(\\n address _governor,\\n KlerosCore _core,\\n uint256 _minStakingTime,\\n uint256 _maxDrawingTime,\\n RNG _rng,\\n uint256 _rngLookahead,\\n uint256 _maxStakePerJuror,\\n uint256 _maxTotalStaked\\n ) external reinitializer(2) {\\n super._initialize(_governor, _core, _minStakingTime, _maxDrawingTime, _rng, _rngLookahead);\\n maxStakePerJuror = _maxStakePerJuror;\\n maxTotalStaked = _maxTotalStaked;\\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 function changeMaxStakePerJuror(uint256 _maxStakePerJuror) external onlyByGovernor {\\n maxStakePerJuror = _maxStakePerJuror;\\n }\\n\\n function changeMaxTotalStaked(uint256 _maxTotalStaked) external onlyByGovernor {\\n maxTotalStaked = _maxTotalStaked;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function _setStake(\\n address _account,\\n uint96 _courtID,\\n uint256 _newStake,\\n bool _alreadyTransferred\\n ) internal override onlyByCore returns (uint256 pnkDeposit, uint256 pnkWithdrawal, StakingResult stakingResult) {\\n uint256 currentStake = stakeOf(_account, _courtID);\\n bool stakeIncrease = _newStake > currentStake;\\n uint256 stakeChange = stakeIncrease ? _newStake - currentStake : currentStake - _newStake;\\n Juror storage juror = jurors[_account];\\n if (stakeIncrease && !_alreadyTransferred) {\\n if (juror.stakedPnk + stakeChange > maxStakePerJuror) {\\n return (0, 0, StakingResult.CannotStakeMoreThanMaxStakePerJuror);\\n }\\n if (totalStaked + stakeChange > maxTotalStaked) {\\n return (0, 0, StakingResult.CannotStakeMoreThanMaxTotalStaked);\\n }\\n }\\n if (phase == Phase.staking) {\\n if (stakeIncrease) {\\n totalStaked += stakeChange;\\n } else {\\n totalStaked -= stakeChange;\\n }\\n }\\n (pnkDeposit, pnkWithdrawal, stakingResult) = super._setStake(\\n _account,\\n _courtID,\\n _newStake,\\n _alreadyTransferred\\n );\\n }\\n}\\n\",\"keccak256\":\"0x157fcc07b6209d91859cf3c47a01246592874e692bd4c7350b0aa5cfae03a810\",\"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\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\n\\n /// @dev Receive the random number.\\n /// @param _block Block the random number is linked to.\\n /// @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0xf92e0cf768afefc5cc6ef786c263b67dd00c021aa5753213dbbc33014adb68c5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000d9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805468010000000000000000900460ff1615620000765760405162dc149f60e41b815260040160405180910390fd5b80546001600160401b0390811614620000d65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161315e6200010360003960008181611477015281816114a00152611698015261315e6000f3fe6080604052600436106102675760003560e01c80637dc38f1411610144578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b014610731578063dd5e5cb51461077d578063e534710d1461079d578063f216de4c146107d5578063f2f4eb26146107f5578063f6b4d82d1461081557600080fd5b8063c157261814610685578063ccbac9f51461069b578063d09f392d146106b1578063d1c1df48146106d1578063d605787b1461071157600080fd5b8063a2473cc111610108578063a2473cc1146105bc578063a5861b90146105dc578063b1c9fe6e1461060b578063b5d69e9914610639578063b888adfa14610659578063c057eca71461066f57600080fd5b80637dc38f1414610530578063817b1cd214610546578063823cfd701461055c5780638d3771bb1461057c578063965af6c71461059c57600080fd5b8063498c752c116101dd578063543f8a36116101a1578063543f8a361461044c57806356acb050146104795780635a68c1541461048f5780635d2d7846146104a55780636624192f146104c557806376fa9fc51461051057600080fd5b8063498c752c146103c45780634c70a0d6146103e45780634dbbebbc146104045780634f1ef2861461042457806352d1902d1461043757600080fd5b80631b92bbbe1161022f5780631b92bbbe1461031a57806321e1625e1461033057806321ea9b3f1461035057806323f61de41461036e57806335975f4a14610384578063477a655c146103a457600080fd5b8063034327441461026c57806306dfc967146102955780630b274f2e146102b75780630c340a24146102cc5780630e083ec914610304575b600080fd5b34801561027857600080fd5b5061028260065481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b506102b56102b0366004612aee565b61087f565b005b3480156102c357600080fd5b506102b56108b7565b3480156102d857600080fd5b506000546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161028c565b34801561031057600080fd5b50610282600a5481565b34801561032657600080fd5b5061028260035481565b34801561033c57600080fd5b506102b561034b366004612b1c565b610c8a565b34801561035c57600080fd5b506102b561036b366004612aee565b50565b34801561037a57600080fd5b5061028260105481565b34801561039057600080fd5b506102b561039f366004612aee565b610d2d565b3480156103b057600080fd5b506102b56103bf366004612beb565b610f65565b3480156103d057600080fd5b506102b56103df366004612c32565b61105c565b3480156103f057600080fd5b506102ec6103ff366004612caa565b611196565b34801561041057600080fd5b506102b561041f366004612b1c565b61137a565b6102b5610432366004612cd6565b611463565b34801561044357600080fd5b5061028261168b565b34801561045857600080fd5b5061046c610467366004612d10565b6116e9565b60405161028c9190612d2d565b34801561048557600080fd5b50610282600b5481565b34801561049b57600080fd5b5061028260115481565b3480156104b157600080fd5b506102b56104c0366004612d7a565b611787565b3480156104d157600080fd5b506105006104e0366004612d10565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161028c565b34801561051c57600080fd5b5061028261052b366004612d7a565b6117ca565b34801561053c57600080fd5b5061028260095481565b34801561055257600080fd5b5061028260125481565b34801561056857600080fd5b506102b5610577366004612aee565b611825565b34801561058857600080fd5b506102b5610597366004612aee565b611854565b3480156105a857600080fd5b506102b56105b7366004612b1c565b611883565b3480156105c857600080fd5b506102826105d7366004612db1565b61191e565b3480156105e857600080fd5b506105fc6105f7366004612df8565b611948565b60405161028c93929190612e61565b34801561061757600080fd5b5060015461062c90600160a01b900460ff1681565b60405161028c9190612e8d565b34801561064557600080fd5b506102b5610654366004612d10565b611995565b34801561066557600080fd5b5061028260045481565b34801561067b57600080fd5b5061028260025481565b34801561069157600080fd5b5061028260055481565b3480156106a757600080fd5b5061028260085481565b3480156106bd57600080fd5b506102b56106cc366004612d7a565b611a77565b3480156106dd57600080fd5b506106f16106ec366004612db1565b611ab1565b60408051948552602085019390935291830152606082015260800161028c565b34801561071d57600080fd5b506007546102ec906001600160a01b031681565b34801561073d57600080fd5b5061076861074c366004612d10565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161028c565b34801561078957600080fd5b506102b5610798366004612aee565b611af0565b3480156107a957600080fd5b506102826107b8366004612db1565b600f60209081526000928352604080842090915290825290205481565b3480156107e157600080fd5b506102b56107f0366004612b1c565b611b1f565b34801561080157600080fd5b506001546102ec906001600160a01b031681565b34801561082157600080fd5b5061086f610830366004612aee565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161028c9493929190612ea7565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016108a990612ed8565b60405180910390fd5b601055565b6000600154600160a01b900460ff1660028111156108d7576108d7612e4b565b03610a45576002546004546108ec9042612f30565b101561094f5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016108a9565b6000600654116109b15760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a9565b6007546009546001600160a01b0390911690637363ae1f906109d39043612f43565b6040518263ffffffff1660e01b81526004016109f191815260200190565b600060405180830381600087803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c3f565b60018054600160a01b900460ff166002811115610a6457610a64612e4b565b03610b5c576007546009546005546001600160a01b03909216916313cf905491610a8d91612f43565b6040518263ffffffff1660e01b8152600401610aab91815260200190565b6020604051808303816000875af1158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190612f56565b6008819055600003610b425760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a9565b600180546002919060ff60a01b1916600160a01b83610a3b565b6002600154600160a01b900460ff166002811115610b7c57610b7c612e4b565b03610c3f576006541580610b9e5750600354600454610b9b9042612f30565b10155b610c315760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a9565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c8091600160a01b90910460ff1690612e8d565b60405180910390a1565b6001546001600160a01b03163314610cb45760405162461bcd60e51b81526004016108a990612f6f565b6001600160a01b0382166000908152600d602052604081206002018054839290610cdf908490612f43565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610d4d57610d4d612e4b565b14610d9a5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a9565b600b54600a541015610dee5760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108a9565b6000600a54600183600b54610e039190612f43565b610e0d9190612f30565b11610e185781610e33565b600b54600a54610e289190612f30565b610e33906001612f43565b9050600081600b54610e459190612f43565b600b549091505b81811015610f5d576000818152600e6020526040902080546001600160a01b031615610f545760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610ec89490821693600160a01b9092046001600160601b031692909160ff1690600401612ea7565b600060405180830381600087803b158015610ee257600080fd5b505af1158015610ef6573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b50600101610e4c565b50600b555050565b6001546001600160a01b03163314610f8f5760405162461bcd60e51b81526004016108a990612f6f565b6000828152600c6020526040812090610fa783611b97565b825490915015610ff05760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a9565b600181116110405760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a9565b8155600201805460018101825560009182526020822001555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806110a65750805467ffffffffffffffff808416911610155b156110c35760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038c81166001600160a01b031992831617909255600180548c841690831617815560028b905560038a90554260045560078054938a16939092169290921790556009869055600b5560108490556011839055805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff1660028111156111b8576111b8612e4b565b146111f45760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a9565b6000848152600c602052604081206002810180549192909161121857611218612fb3565b9060005260206000200154600003611234576000915050611373565b60008160020160008154811061124c5761124c612fb3565b9060005260206000200154600854868660405160200161127f939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6112a29190612fdf565b905060005b600283015483546112b9908390612ff3565b6112c4906001612f43565b10156113535760015b8354811161134d576000818386600001546112e89190612ff3565b6112f29190612f43565b9050600085600201828154811061130b5761130b612fb3565b90600052602060002001549050808510611330576113298186612f30565b9450611338565b50915061134d565b505080806113459061300a565b9150506112cd565b506112a7565b600081815260048401602052604090205461136d90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146113a45760405162461bcd60e51b81526004016108a990612ed8565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156113e3576113e3612e4b565b0361145f576007546009546001600160a01b0390911690637363ae1f9061140a9043612f43565b6040518263ffffffff1660e01b815260040161142891815260200190565b600060405180830381600087803b15801561144257600080fd5b505af1158015611456573d6000803e3d6000fd5b50504360055550505b5050565b61146c82611bdd565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114ea57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114de6000805160206131098339815191525490565b6001600160a01b031614155b156115085760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611562575060408051601f3d908101601f1916820190925261155f91810190612f56565b60015b61158a57604051630c76093760e01b81526001600160a01b03831660048201526024016108a9565b60008051602061310983398151915281146115bb57604051632a87526960e21b8152600481018290526024016108a9565b6000805160206131098339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611686576000836001600160a01b0316836040516116229190613023565b600060405180830381855af49150503d806000811461165d576040519150601f19603f3d011682016040523d82523d6000602084013e611662565b606091505b5050905080611684576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116d65760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061310983398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561177b57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116117385790505b50505050509050919050565b6001546001600160a01b031633146117b15760405162461bcd60e51b81526004016108a990612f6f565b600680549060006117c183613052565b91905055505050565b6000828152600c60209081526040808320848452600381019092528220548083036117fa5760009250505061181f565b81600201818154811061180f5761180f612fb3565b9060005260206000200154925050505b92915050565b6000546001600160a01b0316331461184f5760405162461bcd60e51b81526004016108a990612ed8565b600255565b6000546001600160a01b0316331461187e5760405162461bcd60e51b81526004016108a990612ed8565b601155565b6001546001600160a01b031633146118ad5760405162461bcd60e51b81526004016108a990612f6f565b6001600160a01b0382166000908152600d6020526040812060020180548392906118d8908490612f30565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610d21565b60008061192b8484611c07565b90506119406001600160601b038416826117ca565b949350505050565b600154600090819081906001600160a01b031633146119795760405162461bcd60e51b81526004016108a990612f6f565b61198587878787611c4f565b9199909850909650945050505050565b6001546001600160a01b031633146119bf5760405162461bcd60e51b81526004016108a990612f6f565b60006119ca826116e9565b80519091505b801561168657600180546001600160a01b03169063fbb519e790859085906119f89086612f30565b81518110611a0857611a08612fb3565b60200260200101516000806040518563ffffffff1660e01b8152600401611a329493929190612ea7565b600060405180830381600087803b158015611a4c57600080fd5b505af1158015611a60573d6000803e3d6000fd5b505050508080611a6f90613052565b9150506119d0565b6001546001600160a01b03163314611aa15760405162461bcd60e51b81526004016108a990612f6f565b600680549060006117c18361300a565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611ae3878761191e565b9054949793965094505050565b6000546001600160a01b03163314611b1a5760405162461bcd60e51b81526004016108a990612ed8565b600355565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108a990612f6f565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612f30565b909155506116869050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b0316331461036b5760405162461bcd60e51b81526004016108a990612ed8565b600060405160005b6014811015611c2a578481600c011a81830153600101611c0f565b5060145b6020811015611c465783811a81830153600101611c2e565b50519392505050565b600154600090819081906001600160a01b03163314611c805760405162461bcd60e51b81526004016108a990612f6f565b6000611c8c888861191e565b9050808611600081611ca757611ca28884612f30565b611cb1565b611cb18389612f30565b6001600160a01b038b166000908152600d60205260409020909150828015611cd7575087155b15611d3457601054828260010154611cef9190612f43565b1115611d0957600080600696509650965050505050611dac565b60115482601254611d1a9190612f43565b1115611d3457600080600796509650965050505050611dac565b6000600154600160a01b900460ff166002811115611d5457611d54612e4b565b03611d94578215611d7c578160126000828254611d719190612f43565b90915550611d949050565b8160126000828254611d8e9190612f30565b90915550505b611da08b8b8b8b611db6565b91985096509450505050505b9450945094915050565b6001600160a01b0384166000908152600d602052604081208190819081611ddd898961191e565b825490915087158015611df95750600481101580611df9575081155b15611e11576000806003955095509550505050611dac565b6000600154600160a01b900460ff166002811115611e3157611e31612e4b565b14611feb57611e40898b61214f565b94506000600e6000600a60008154611e579061300a565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611f8f5760028101805460ff19166001179055611f3a848b8b86612406565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611fdd565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611dac92505050565b81881061200b578661200657612003838a8a85612406565b95505b612024565b612017838a8a856124e6565b6120219086612f43565b94505b60006120308b8b611c07565b905060008a5b816120ee5761204f6001600160601b0382168c856126dd565b6000196001600160601b0382160161206a5760019150612036565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa1580156120bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120df9190613069565b50949550612036945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050509450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b038616845290915281205480156123ff576000818152600e60205260409020600281015460ff16156123b25760006121a9858761191e565b905060008183600101546121bd9190612f30565b6001600160a01b0387166000908152600d6020526040902060018101549196508692509082106121ef57806001015495505b858160010160008282546122039190612f30565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036123ae5780545b80156123ac576001600160601b03891682612278600184612f30565b8154811061228857612288612fb3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361239a57815482906122c490600190612f30565b815481106122d4576122d4612fb3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123089084612f30565b8154811061231857612318612fb3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555081600001805480612364576123646130de565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123ac565b806123a481613052565b91505061225c565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b600080856001015486600201541015612420576000612434565b856001015486600201546124349190612f30565b90506124408184612f43565b84101561244e576000612463565b806124598486612f30565b6124639190612f30565b9150826000036124a8578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124ba57836124d5565b838387600101546124cb9190612f30565b6124d59190612f43565b866001018190555050949350505050565b60028401546000906124f88484612f30565b6125029190612f43565b85600101541061251d576125168383612f30565b9050612543565b846002015485600101541061254357846002015485600101546125409190612f30565b90505b826000036126a05784545b801561269e576001600160601b0385168661256a600184612f30565b8154811061257a5761257a612fb3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361268c57855486906125b690600190612f30565b815481106125c6576125c6612fb3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125fa9084612f30565b8154811061260a5761260a612fb3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555085600001805480612656576126566130de565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561269e565b8061269681613052565b91505061254e565b505b81856001015410156126b257826126cd565b828286600101546126c39190612f30565b6126cd9190612f43565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128aa5783156128a55760018201546000036127f85750600281018054600180820183556000928352602090922081018590559081148015906127575750815461274b600183612f30565b6127559190612fdf565b155b156127f357815460009061276b90836130f4565b600081815260048501602052604081205491925061278a846001612f43565b9050846002018560020184815481106127a5576127a5612fb3565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b612873565b60018083018054909161280a91612f30565b8154811061281a5761281a612fb3565b906000526020600020015490508160010180548061283a5761283a6130de565b600190038181906000526020600020016000905590558382600201828154811061286657612866612fb3565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556128a58582600187612a31565b612a2a565b836000036129485760008260020182815481106128c9576128c9612fb3565b9060005260206000200154905060008360020183815481106128ed576128ed612fb3565b6000918252602080832090910192909255600180860180549182018155825282822001849055858152600385018252604080822082905584825260048601909252908120819055612942908790849084612a31565b50612a2a565b81600201818154811061295d5761295d612fb3565b90600052602060002001548414612a2a5760008483600201838154811061298657612986612fb3565b9060005260206000200154111590506000816129cc57858460020184815481106129b2576129b2612fb3565b90600052602060002001546129c79190612f30565b6129f7565b8360020183815481106129e1576129e1612fb3565b9060005260206000200154866129f79190612f30565b905085846002018481548110612a0f57612a0f612fb3565b600091825260209091200155612a2787848484612a31565b50505b5050505050565b6000848152600c60205260409020835b8015612ae6578154612a54600183612f30565b612a5e91906130f4565b905083612a955782826002018281548110612a7b57612a7b612fb3565b9060005260206000200154612a909190612f30565b612ac0565b82826002018281548110612aab57612aab612fb3565b9060005260206000200154612ac09190612f43565b826002018281548110612ad557612ad5612fb3565b600091825260209091200155612a41565b505050505050565b600060208284031215612b0057600080fd5b5035919050565b6001600160a01b038116811461036b57600080fd5b60008060408385031215612b2f57600080fd5b8235612b3a81612b07565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612b6f57600080fd5b813567ffffffffffffffff80821115612b8a57612b8a612b48565b604051601f8301601f19908116603f01168101908282118183101715612bb257612bb2612b48565b81604052838152866020858801011115612bcb57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612bfe57600080fd5b82359150602083013567ffffffffffffffff811115612c1c57600080fd5b612c2885828601612b5e565b9150509250929050565b600080600080600080600080610100898b031215612c4f57600080fd5b8835612c5a81612b07565b97506020890135612c6a81612b07565b965060408901359550606089013594506080890135612c8881612b07565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612cbf57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612ce957600080fd5b8235612cf481612b07565b9150602083013567ffffffffffffffff811115612c1c57600080fd5b600060208284031215612d2257600080fd5b813561137381612b07565b6020808252825182820181905260009190848201906040850190845b81811015612d6e5783516001600160601b031683529284019291840191600101612d49565b50909695505050505050565b60008060408385031215612d8d57600080fd5b50508035926020909101359150565b6001600160601b038116811461036b57600080fd5b60008060408385031215612dc457600080fd5b8235612dcf81612b07565b91506020830135612ddf81612d9c565b809150509250929050565b801515811461036b57600080fd5b60008060008060808587031215612e0e57600080fd5b8435612e1981612b07565b93506020850135612e2981612d9c565b9250604085013591506060850135612e4081612dea565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612e7f57612e7f612e4b565b826040830152949350505050565b6020810160038310612ea157612ea1612e4b565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561181f5761181f612f1a565b8082018082111561181f5761181f612f1a565b600060208284031215612f6857600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612fee57612fee612fc9565b500690565b808202811582820484141761181f5761181f612f1a565b60006001820161301c5761301c612f1a565b5060010190565b6000825160005b81811015613044576020818601810151858301520161302a565b506000920191825250919050565b60008161306157613061612f1a565b506000190190565b600080600080600080600060e0888a03121561308457600080fd5b875161308f81612d9c565b60208901519097506130a081612dea565b8096505060408801519450606088015193506080880151925060a0880151915060c08801516130ce81612dea565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b60008261310357613103612fc9565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e3e6fa942713de791234a73f2074378f6f3c05a290a495a7d9b8ab6881ec8f7564736f6c63430008180033", + "deployedBytecode": "0x6080604052600436106102675760003560e01c80637dc38f1411610144578063c1572618116100b6578063dca5f6b01161007a578063dca5f6b014610731578063dd5e5cb51461077d578063e534710d1461079d578063f216de4c146107d5578063f2f4eb26146107f5578063f6b4d82d1461081557600080fd5b8063c157261814610685578063ccbac9f51461069b578063d09f392d146106b1578063d1c1df48146106d1578063d605787b1461071157600080fd5b8063a2473cc111610108578063a2473cc1146105bc578063a5861b90146105dc578063b1c9fe6e1461060b578063b5d69e9914610639578063b888adfa14610659578063c057eca71461066f57600080fd5b80637dc38f1414610530578063817b1cd214610546578063823cfd701461055c5780638d3771bb1461057c578063965af6c71461059c57600080fd5b8063498c752c116101dd578063543f8a36116101a1578063543f8a361461044c57806356acb050146104795780635a68c1541461048f5780635d2d7846146104a55780636624192f146104c557806376fa9fc51461051057600080fd5b8063498c752c146103c45780634c70a0d6146103e45780634dbbebbc146104045780634f1ef2861461042457806352d1902d1461043757600080fd5b80631b92bbbe1161022f5780631b92bbbe1461031a57806321e1625e1461033057806321ea9b3f1461035057806323f61de41461036e57806335975f4a14610384578063477a655c146103a457600080fd5b8063034327441461026c57806306dfc967146102955780630b274f2e146102b75780630c340a24146102cc5780630e083ec914610304575b600080fd5b34801561027857600080fd5b5061028260065481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b506102b56102b0366004612aee565b61087f565b005b3480156102c357600080fd5b506102b56108b7565b3480156102d857600080fd5b506000546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161028c565b34801561031057600080fd5b50610282600a5481565b34801561032657600080fd5b5061028260035481565b34801561033c57600080fd5b506102b561034b366004612b1c565b610c8a565b34801561035c57600080fd5b506102b561036b366004612aee565b50565b34801561037a57600080fd5b5061028260105481565b34801561039057600080fd5b506102b561039f366004612aee565b610d2d565b3480156103b057600080fd5b506102b56103bf366004612beb565b610f65565b3480156103d057600080fd5b506102b56103df366004612c32565b61105c565b3480156103f057600080fd5b506102ec6103ff366004612caa565b611196565b34801561041057600080fd5b506102b561041f366004612b1c565b61137a565b6102b5610432366004612cd6565b611463565b34801561044357600080fd5b5061028261168b565b34801561045857600080fd5b5061046c610467366004612d10565b6116e9565b60405161028c9190612d2d565b34801561048557600080fd5b50610282600b5481565b34801561049b57600080fd5b5061028260115481565b3480156104b157600080fd5b506102b56104c0366004612d7a565b611787565b3480156104d157600080fd5b506105006104e0366004612d10565b6001600160a01b03166000908152600d6020526040902060010154151590565b604051901515815260200161028c565b34801561051c57600080fd5b5061028261052b366004612d7a565b6117ca565b34801561053c57600080fd5b5061028260095481565b34801561055257600080fd5b5061028260125481565b34801561056857600080fd5b506102b5610577366004612aee565b611825565b34801561058857600080fd5b506102b5610597366004612aee565b611854565b3480156105a857600080fd5b506102b56105b7366004612b1c565b611883565b3480156105c857600080fd5b506102826105d7366004612db1565b61191e565b3480156105e857600080fd5b506105fc6105f7366004612df8565b611948565b60405161028c93929190612e61565b34801561061757600080fd5b5060015461062c90600160a01b900460ff1681565b60405161028c9190612e8d565b34801561064557600080fd5b506102b5610654366004612d10565b611995565b34801561066557600080fd5b5061028260045481565b34801561067b57600080fd5b5061028260025481565b34801561069157600080fd5b5061028260055481565b3480156106a757600080fd5b5061028260085481565b3480156106bd57600080fd5b506102b56106cc366004612d7a565b611a77565b3480156106dd57600080fd5b506106f16106ec366004612db1565b611ab1565b60408051948552602085019390935291830152606082015260800161028c565b34801561071d57600080fd5b506007546102ec906001600160a01b031681565b34801561073d57600080fd5b5061076861074c366004612d10565b600d602052600090815260409020600181015460029091015482565b6040805192835260208301919091520161028c565b34801561078957600080fd5b506102b5610798366004612aee565b611af0565b3480156107a957600080fd5b506102826107b8366004612db1565b600f60209081526000928352604080842090915290825290205481565b3480156107e157600080fd5b506102b56107f0366004612b1c565b611b1f565b34801561080157600080fd5b506001546102ec906001600160a01b031681565b34801561082157600080fd5b5061086f610830366004612aee565b600e602052600090815260409020805460018201546002909201546001600160a01b03821692600160a01b9092046001600160601b0316919060ff1684565b60405161028c9493929190612ea7565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016108a990612ed8565b60405180910390fd5b601055565b6000600154600160a01b900460ff1660028111156108d7576108d7612e4b565b03610a45576002546004546108ec9042612f30565b101561094f5760405162461bcd60e51b815260206004820152602c60248201527f546865206d696e696d756d207374616b696e672074696d6520686173206e6f7460448201526b103830b9b9b2b2103cb2ba1760a11b60648201526084016108a9565b6000600654116109b15760405162461bcd60e51b815260206004820152602760248201527f546865726520617265206e6f2064697370757465732074686174206e65656420604482015266353ab937b9399760c91b60648201526084016108a9565b6007546009546001600160a01b0390911690637363ae1f906109d39043612f43565b6040518263ffffffff1660e01b81526004016109f191815260200190565b600060405180830381600087803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b505043600555505060018054819060ff60a01b1916600160a01b825b0217905550610c3f565b60018054600160a01b900460ff166002811115610a6457610a64612e4b565b03610b5c576007546009546005546001600160a01b03909216916313cf905491610a8d91612f43565b6040518263ffffffff1660e01b8152600401610aab91815260200190565b6020604051808303816000875af1158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190612f56565b6008819055600003610b425760405162461bcd60e51b815260206004820152601e60248201527f52616e646f6d206e756d626572206973206e6f7420726561647920796574000060448201526064016108a9565b600180546002919060ff60a01b1916600160a01b83610a3b565b6002600154600160a01b900460ff166002811115610b7c57610b7c612e4b565b03610c3f576006541580610b9e5750600354600454610b9b9042612f30565b10155b610c315760405162461bcd60e51b815260206004820152605860248201527f546865726520617265207374696c6c20646973707574657320776974686f757460448201527f206a75726f727320616e6420746865206d6178696d756d2064726177696e67206064820152773a34b6b2903430b9903737ba103830b9b9b2b2103cb2ba1760411b608482015260a4016108a9565b6001805460ff60a01b191690555b426004556001546040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b9391610c8091600160a01b90910460ff1690612e8d565b60405180910390a1565b6001546001600160a01b03163314610cb45760405162461bcd60e51b81526004016108a990612f6f565b6001600160a01b0382166000908152600d602052604081206002018054839290610cdf908490612f43565b909155505060408051828152600060208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b091015b60405180910390a25050565b6000600154600160a01b900460ff166002811115610d4d57610d4d612e4b565b14610d9a5760405162461bcd60e51b815260206004820152601b60248201527f53686f756c6420626520696e205374616b696e672070686173652e000000000060448201526064016108a9565b600b54600a541015610dee5760405162461bcd60e51b815260206004820152601c60248201527f4e6f2064656c61796564207374616b6520746f20657865637574652e0000000060448201526064016108a9565b6000600a54600183600b54610e039190612f43565b610e0d9190612f30565b11610e185781610e33565b600b54600a54610e289190612f30565b610e33906001612f43565b9050600081600b54610e459190612f43565b600b549091505b81811015610f5d576000818152600e6020526040902080546001600160a01b031615610f545760018054825491830154600284015460405163fbb519e760e01b81526001600160a01b039384169463fbb519e794610ec89490821693600160a01b9092046001600160601b031692909160ff1690600401612ea7565b600060405180830381600087803b158015610ee257600080fd5b505af1158015610ef6573d6000803e3d6000fd5b505082546001600160a01b0381166000908152600f60209081526040808320600160a01b9094046001600160601b03168352928152828220829055868252600e90529081208181556001810191909155600201805460ff1916905550505b50600101610e4c565b50600b555050565b6001546001600160a01b03163314610f8f5760405162461bcd60e51b81526004016108a990612f6f565b6000828152600c6020526040812090610fa783611b97565b825490915015610ff05760405162461bcd60e51b81526020600482015260146024820152732a3932b29030b63932b0b23c9032bc34b9ba399760611b60448201526064016108a9565b600181116110405760405162461bcd60e51b815260206004820152601b60248201527f4b206d7573742062652067726561746572207468616e206f6e652e000000000060448201526064016108a9565b8155600201805460018101825560009182526020822001555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0e805460029190600160401b900460ff16806110a65750805467ffffffffffffffff808416911610155b156110c35760405162dc149f60e41b815260040160405180910390fd5b805468ffffffffffffffffff191667ffffffffffffffff831617600160401b178155600080546001600160a01b038c81166001600160a01b031992831617909255600180548c841690831617815560028b905560038a90554260045560078054938a16939092169290921790556009869055600b5560108490556011839055805460ff60401b1916815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050505050565b60006002600154600160a01b900460ff1660028111156111b8576111b8612e4b565b146111f45760405162461bcd60e51b815260206004820152600c60248201526b2bb937b73390383430b9b29760a11b60448201526064016108a9565b6000848152600c602052604081206002810180549192909161121857611218612fb3565b9060005260206000200154600003611234576000915050611373565b60008160020160008154811061124c5761124c612fb3565b9060005260206000200154600854868660405160200161127f939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6112a29190612fdf565b905060005b600283015483546112b9908390612ff3565b6112c4906001612f43565b10156113535760015b8354811161134d576000818386600001546112e89190612ff3565b6112f29190612f43565b9050600085600201828154811061130b5761130b612fb3565b90600052602060002001549050808510611330576113298186612f30565b9450611338565b50915061134d565b505080806113459061300a565b9150506112cd565b506112a7565b600081815260048401602052604090205461136d90611bb2565b93505050505b9392505050565b6000546001600160a01b031633146113a45760405162461bcd60e51b81526004016108a990612ed8565b600780546001600160a01b0319166001600160a01b038416179055600981905560018054600160a01b900460ff1660028111156113e3576113e3612e4b565b0361145f576007546009546001600160a01b0390911690637363ae1f9061140a9043612f43565b6040518263ffffffff1660e01b815260040161142891815260200190565b600060405180830381600087803b15801561144257600080fd5b505af1158015611456573d6000803e3d6000fd5b50504360055550505b5050565b61146c82611bdd565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806114ea57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166114de6000805160206131098339815191525490565b6001600160a01b031614155b156115085760405163703e46dd60e11b815260040160405180910390fd5b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611562575060408051601f3d908101601f1916820190925261155f91810190612f56565b60015b61158a57604051630c76093760e01b81526001600160a01b03831660048201526024016108a9565b60008051602061310983398151915281146115bb57604051632a87526960e21b8152600481018290526024016108a9565b6000805160206131098339815191528390556040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2815115611686576000836001600160a01b0316836040516116229190613023565b600060405180830381855af49150503d806000811461165d576040519150601f19603f3d011682016040523d82523d6000602084013e611662565b606091505b5050905080611684576040516339b21b5d60e11b815260040160405180910390fd5b505b505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116d65760405163703e46dd60e11b815260040160405180910390fd5b5060008051602061310983398151915290565b6001600160a01b0381166000908152600d602090815260409182902080548351818402810184019094528084526060939283018282801561177b57602002820191906000526020600020906000905b82829054906101000a90046001600160601b03166001600160601b0316815260200190600c0190602082600b010492830192600103820291508084116117385790505b50505050509050919050565b6001546001600160a01b031633146117b15760405162461bcd60e51b81526004016108a990612f6f565b600680549060006117c183613052565b91905055505050565b6000828152600c60209081526040808320848452600381019092528220548083036117fa5760009250505061181f565b81600201818154811061180f5761180f612fb3565b9060005260206000200154925050505b92915050565b6000546001600160a01b0316331461184f5760405162461bcd60e51b81526004016108a990612ed8565b600255565b6000546001600160a01b0316331461187e5760405162461bcd60e51b81526004016108a990612ed8565b601155565b6001546001600160a01b031633146118ad5760405162461bcd60e51b81526004016108a990612f6f565b6001600160a01b0382166000908152600d6020526040812060020180548392906118d8908490612f30565b909155505060408051828152600160208201526001600160a01b038416917f7a81a4ef419d50dbb5deb116fb983bf6ca7716bcbc84cd1cd2be81ccea9078b09101610d21565b60008061192b8484611c07565b90506119406001600160601b038416826117ca565b949350505050565b600154600090819081906001600160a01b031633146119795760405162461bcd60e51b81526004016108a990612f6f565b61198587878787611c4f565b9199909850909650945050505050565b6001546001600160a01b031633146119bf5760405162461bcd60e51b81526004016108a990612f6f565b60006119ca826116e9565b80519091505b801561168657600180546001600160a01b03169063fbb519e790859085906119f89086612f30565b81518110611a0857611a08612fb3565b60200260200101516000806040518563ffffffff1660e01b8152600401611a329493929190612ea7565b600060405180830381600087803b158015611a4c57600080fd5b505af1158015611a60573d6000803e3d6000fd5b505050508080611a6f90613052565b9150506119d0565b6001546001600160a01b03163314611aa15760405162461bcd60e51b81526004016108a990612f6f565b600680549060006117c18361300a565b6001600160a01b0382166000908152600d6020526040812060018101546002820154909290918190611ae3878761191e565b9054949793965094505050565b6000546001600160a01b03163314611b1a5760405162461bcd60e51b81526004016108a990612ed8565b600355565b6001546001600160a01b03163314611b495760405162461bcd60e51b81526004016108a990612f6f565b6001600160a01b0382166000908152600d6020526040902060018101548211611b8b5781816001016000828254611b809190612f30565b909155506116869050565b60006001820155505050565b60006020825110611baa57506020015190565b506006919050565b600060405160005b6014811015611bd55783811a81600c84010153600101611bba565b505192915050565b6000546001600160a01b0316331461036b5760405162461bcd60e51b81526004016108a990612ed8565b600060405160005b6014811015611c2a578481600c011a81830153600101611c0f565b5060145b6020811015611c465783811a81830153600101611c2e565b50519392505050565b600154600090819081906001600160a01b03163314611c805760405162461bcd60e51b81526004016108a990612f6f565b6000611c8c888861191e565b9050808611600081611ca757611ca28884612f30565b611cb1565b611cb18389612f30565b6001600160a01b038b166000908152600d60205260409020909150828015611cd7575087155b15611d3457601054828260010154611cef9190612f43565b1115611d0957600080600696509650965050505050611dac565b60115482601254611d1a9190612f43565b1115611d3457600080600796509650965050505050611dac565b6000600154600160a01b900460ff166002811115611d5457611d54612e4b565b03611d94578215611d7c578160126000828254611d719190612f43565b90915550611d949050565b8160126000828254611d8e9190612f30565b90915550505b611da08b8b8b8b611db6565b91985096509450505050505b9450945094915050565b6001600160a01b0384166000908152600d602052604081208190819081611ddd898961191e565b825490915087158015611df95750600481101580611df9575081155b15611e11576000806003955095509550505050611dac565b6000600154600160a01b900460ff166002811115611e3157611e31612e4b565b14611feb57611e40898b61214f565b94506000600e6000600a60008154611e579061300a565b919050819055815260200190815260200160002090508a8160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550898160000160146101000a8154816001600160601b0302191690836001600160601b03160217905550888160010181905550600a54600f60008d6001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160601b03166001600160601b031681526020019081526020016000208190555082891115611f8f5760028101805460ff19166001179055611f3a848b8b86612406565b604080516001600160601b038d168152602081018c90529198506001600160a01b038d16917f792235ed84e4d70219b4fc973c509bbbdc2d3e22578dceea671f48829db949b0910160405180910390a2611fdd565b604080516001600160601b038c168152602081018b90526001600160a01b038d16917fe9a844153bbed760d95005e769b4ef97fab26f7b01305c7028a0493b833bdbae910160405180910390a25b5060009350611dac92505050565b81881061200b578661200657612003838a8a85612406565b95505b612024565b612017838a8a856124e6565b6120219086612f43565b94505b60006120308b8b611c07565b905060008a5b816120ee5761204f6001600160601b0382168c856126dd565b6000196001600160601b0382160161206a5760019150612036565b600154604051630fad06e960e11b81526001600160601b03831660048201526001600160a01b0390911690631f5a0dd29060240160e060405180830381865afa1580156120bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120df9190613069565b50949550612036945050505050565b604080516001600160601b038e168152602081018d90526001600160a01b038f16917f4732545d01e38980276a17e6d394f01577ba63f2fea5eba41af0757d9c060c5c910160405180910390a2506000955050505050509450945094915050565b6001600160a01b0381166000908152600f602090815260408083206001600160601b038616845290915281205480156123ff576000818152600e60205260409020600281015460ff16156123b25760006121a9858761191e565b905060008183600101546121bd9190612f30565b6001600160a01b0387166000908152600d6020526040902060018101549196508692509082106121ef57806001015495505b858160010160008282546122039190612f30565b90915550506040518281526001600160601b038916906001600160a01b038916907f1222c35b9c82812f1fda75e2b299043b079c0bb3b53d44aee1ae96a97263ca699060200160405180910390a3826000036123ae5780545b80156123ac576001600160601b03891682612278600184612f30565b8154811061228857612288612fb3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361239a57815482906122c490600190612f30565b815481106122d4576122d4612fb3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169083906123089084612f30565b8154811061231857612318612fb3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555081600001805480612364576123646130de565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a021916905590556123ac565b806123a481613052565b91505061225c565b505b5050505b506000818152600e6020908152604080832083815560018101849055600201805460ff191690556001600160a01b0386168352600f82528083206001600160601b03881684529091528120555b5092915050565b600080856001015486600201541015612420576000612434565b856001015486600201546124349190612f30565b90506124408184612f43565b84101561244e576000612463565b806124598486612f30565b6124639190612f30565b9150826000036124a8578554600180820188556000888152602090206002830401805491909216600c026101000a6001600160601b0381810219909216918816021790555b82866001015410156124ba57836124d5565b838387600101546124cb9190612f30565b6124d59190612f43565b866001018190555050949350505050565b60028401546000906124f88484612f30565b6125029190612f43565b85600101541061251d576125168383612f30565b9050612543565b846002015485600101541061254357846002015485600101546125409190612f30565b90505b826000036126a05784545b801561269e576001600160601b0385168661256a600184612f30565b8154811061257a5761257a612fb3565b600091825260209091206002820401546001909116600c026101000a90046001600160601b03160361268c57855486906125b690600190612f30565b815481106125c6576125c6612fb3565b600091825260209091206002820401546001918216600c026101000a90046001600160601b03169087906125fa9084612f30565b8154811061260a5761260a612fb3565b9060005260206000209060029182820401919006600c026101000a8154816001600160601b0302191690836001600160601b0316021790555085600001805480612656576126566130de565b60008281526020902060026000199092019182040180546001600160601b03600c60018516026101000a0219169055905561269e565b8061269681613052565b91505061254e565b505b81856001015410156126b257826126cd565b828286600101546126c39190612f30565b6126cd9190612f43565b8560010181905550949350505050565b6000838152600c602090815260408083208484526003810190925282205490918190036128aa5783156128a55760018201546000036127f85750600281018054600180820183556000928352602090922081018590559081148015906127575750815461274b600183612f30565b6127559190612fdf565b155b156127f357815460009061276b90836130f4565b600081815260048501602052604081205491925061278a846001612f43565b9050846002018560020184815481106127a5576127a5612fb3565b60009182526020808320909101548354600181018555938352818320909301929092559384526004860180825260408086208690558486526003880183528086208490559285529052909120555b612873565b60018083018054909161280a91612f30565b8154811061281a5761281a612fb3565b906000526020600020015490508160010180548061283a5761283a6130de565b600190038181906000526020600020016000905590558382600201828154811061286657612866612fb3565b6000918252602090912001555b600083815260038301602090815260408083208490558383526004850190915290208390556128a58582600187612a31565b612a2a565b836000036129485760008260020182815481106128c9576128c9612fb3565b9060005260206000200154905060008360020183815481106128ed576128ed612fb3565b6000918252602080832090910192909255600180860180549182018155825282822001849055858152600385018252604080822082905584825260048601909252908120819055612942908790849084612a31565b50612a2a565b81600201818154811061295d5761295d612fb3565b90600052602060002001548414612a2a5760008483600201838154811061298657612986612fb3565b9060005260206000200154111590506000816129cc57858460020184815481106129b2576129b2612fb3565b90600052602060002001546129c79190612f30565b6129f7565b8360020183815481106129e1576129e1612fb3565b9060005260206000200154866129f79190612f30565b905085846002018481548110612a0f57612a0f612fb3565b600091825260209091200155612a2787848484612a31565b50505b5050505050565b6000848152600c60205260409020835b8015612ae6578154612a54600183612f30565b612a5e91906130f4565b905083612a955782826002018281548110612a7b57612a7b612fb3565b9060005260206000200154612a909190612f30565b612ac0565b82826002018281548110612aab57612aab612fb3565b9060005260206000200154612ac09190612f43565b826002018281548110612ad557612ad5612fb3565b600091825260209091200155612a41565b505050505050565b600060208284031215612b0057600080fd5b5035919050565b6001600160a01b038116811461036b57600080fd5b60008060408385031215612b2f57600080fd5b8235612b3a81612b07565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612b6f57600080fd5b813567ffffffffffffffff80821115612b8a57612b8a612b48565b604051601f8301601f19908116603f01168101908282118183101715612bb257612bb2612b48565b81604052838152866020858801011115612bcb57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612bfe57600080fd5b82359150602083013567ffffffffffffffff811115612c1c57600080fd5b612c2885828601612b5e565b9150509250929050565b600080600080600080600080610100898b031215612c4f57600080fd5b8835612c5a81612b07565b97506020890135612c6a81612b07565b965060408901359550606089013594506080890135612c8881612b07565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600080600060608486031215612cbf57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612ce957600080fd5b8235612cf481612b07565b9150602083013567ffffffffffffffff811115612c1c57600080fd5b600060208284031215612d2257600080fd5b813561137381612b07565b6020808252825182820181905260009190848201906040850190845b81811015612d6e5783516001600160601b031683529284019291840191600101612d49565b50909695505050505050565b60008060408385031215612d8d57600080fd5b50508035926020909101359150565b6001600160601b038116811461036b57600080fd5b60008060408385031215612dc457600080fd5b8235612dcf81612b07565b91506020830135612ddf81612d9c565b809150509250929050565b801515811461036b57600080fd5b60008060008060808587031215612e0e57600080fd5b8435612e1981612b07565b93506020850135612e2981612d9c565b9250604085013591506060850135612e4081612dea565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b838152602081018390526060810160088310612e7f57612e7f612e4b565b826040830152949350505050565b6020810160038310612ea157612ea1612e4b565b91905290565b6001600160a01b039490941684526001600160601b0392909216602084015260408301521515606082015260800190565b60208082526022908201527f416363657373206e6f7420616c6c6f7765643a20476f7665726e6f72206f6e6c6040820152613c9760f11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561181f5761181f612f1a565b8082018082111561181f5761181f612f1a565b600060208284031215612f6857600080fd5b5051919050565b60208082526024908201527f416363657373206e6f7420616c6c6f7765643a204b6c65726f73436f7265206f60408201526337363c9760e11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082612fee57612fee612fc9565b500690565b808202811582820484141761181f5761181f612f1a565b60006001820161301c5761301c612f1a565b5060010190565b6000825160005b81811015613044576020818601810151858301520161302a565b506000920191825250919050565b60008161306157613061612f1a565b506000190190565b600080600080600080600060e0888a03121561308457600080fd5b875161308f81612d9c565b60208901519097506130a081612dea565b8096505060408801519450606088015193506080880151925060a0880151915060c08801516130ce81612dea565b8091505092959891949750929550565b634e487b7160e01b600052603160045260246000fd5b60008261310357613103612fc9565b50049056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220e3e6fa942713de791234a73f2074378f6f3c05a290a495a7d9b8ab6881ec8f7564736f6c63430008180033", "devdoc": { "details": "A factory of trees that keeps track of staked values for sortition.", "errors": { @@ -1225,7 +1225,7 @@ "storageLayout": { "storage": [ { - "astId": 7190, + "astId": 12408, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "governor", "offset": 0, @@ -1233,23 +1233,23 @@ "type": "t_address" }, { - "astId": 7193, + "astId": 12411, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "core", "offset": 0, "slot": "1", - "type": "t_contract(KlerosCore)1891" + "type": "t_contract(KlerosCore)7051" }, { - "astId": 7196, + "astId": 12414, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "phase", "offset": 20, "slot": "1", - "type": "t_enum(Phase)15925" + "type": "t_enum(Phase)23235" }, { - "astId": 7198, + "astId": 12416, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "minStakingTime", "offset": 0, @@ -1257,7 +1257,7 @@ "type": "t_uint256" }, { - "astId": 7200, + "astId": 12418, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "maxDrawingTime", "offset": 0, @@ -1265,7 +1265,7 @@ "type": "t_uint256" }, { - "astId": 7202, + "astId": 12420, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "lastPhaseChange", "offset": 0, @@ -1273,7 +1273,7 @@ "type": "t_uint256" }, { - "astId": 7204, + "astId": 12422, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "randomNumberRequestBlock", "offset": 0, @@ -1281,7 +1281,7 @@ "type": "t_uint256" }, { - "astId": 7206, + "astId": 12424, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "disputesWithoutJurors", "offset": 0, @@ -1289,15 +1289,15 @@ "type": "t_uint256" }, { - "astId": 7209, + "astId": 12427, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "rng", "offset": 0, "slot": "7", - "type": "t_contract(RNG)26598" + "type": "t_contract(RNG)34937" }, { - "astId": 7211, + "astId": 12429, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "randomNumber", "offset": 0, @@ -1305,7 +1305,7 @@ "type": "t_uint256" }, { - "astId": 7213, + "astId": 12431, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "rngLookahead", "offset": 0, @@ -1313,7 +1313,7 @@ "type": "t_uint256" }, { - "astId": 7215, + "astId": 12433, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "delayedStakeWriteIndex", "offset": 0, @@ -1321,7 +1321,7 @@ "type": "t_uint256" }, { - "astId": 7217, + "astId": 12435, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "delayedStakeReadIndex", "offset": 0, @@ -1329,31 +1329,31 @@ "type": "t_uint256" }, { - "astId": 7222, + "astId": 12440, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "sortitionSumTrees", "offset": 0, "slot": "12", - "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)7171_storage)" + "type": "t_mapping(t_bytes32,t_struct(SortitionSumTree)12389_storage)" }, { - "astId": 7227, + "astId": 12445, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "jurors", "offset": 0, "slot": "13", - "type": "t_mapping(t_address,t_struct(Juror)7188_storage)" + "type": "t_mapping(t_address,t_struct(Juror)12406_storage)" }, { - "astId": 7232, + "astId": 12450, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "delayedStakes", "offset": 0, "slot": "14", - "type": "t_mapping(t_uint256,t_struct(DelayedStake)7180_storage)" + "type": "t_mapping(t_uint256,t_struct(DelayedStake)12398_storage)" }, { - "astId": 7238, + "astId": 12456, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "latestDelayedStakeIndex", "offset": 0, @@ -1361,7 +1361,7 @@ "type": "t_mapping(t_address,t_mapping(t_uint96,t_uint256))" }, { - "astId": 9139, + "astId": 14357, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "maxStakePerJuror", "offset": 0, @@ -1369,7 +1369,7 @@ "type": "t_uint256" }, { - "astId": 9141, + "astId": 14359, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "maxTotalStaked", "offset": 0, @@ -1377,7 +1377,7 @@ "type": "t_uint256" }, { - "astId": 9143, + "astId": 14361, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "totalStaked", "offset": 0, @@ -1413,17 +1413,17 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(KlerosCore)1891": { + "t_contract(KlerosCore)7051": { "encoding": "inplace", "label": "contract KlerosCore", "numberOfBytes": "20" }, - "t_contract(RNG)26598": { + "t_contract(RNG)34937": { "encoding": "inplace", "label": "contract RNG", "numberOfBytes": "20" }, - "t_enum(Phase)15925": { + "t_enum(Phase)23235": { "encoding": "inplace", "label": "enum ISortitionModule.Phase", "numberOfBytes": "1" @@ -1435,19 +1435,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_uint96,t_uint256)" }, - "t_mapping(t_address,t_struct(Juror)7188_storage)": { + "t_mapping(t_address,t_struct(Juror)12406_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct SortitionModuleBase.Juror)", "numberOfBytes": "32", - "value": "t_struct(Juror)7188_storage" + "value": "t_struct(Juror)12406_storage" }, - "t_mapping(t_bytes32,t_struct(SortitionSumTree)7171_storage)": { + "t_mapping(t_bytes32,t_struct(SortitionSumTree)12389_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct SortitionModuleBase.SortitionSumTree)", "numberOfBytes": "32", - "value": "t_struct(SortitionSumTree)7171_storage" + "value": "t_struct(SortitionSumTree)12389_storage" }, "t_mapping(t_bytes32,t_uint256)": { "encoding": "mapping", @@ -1463,12 +1463,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(DelayedStake)7180_storage)": { + "t_mapping(t_uint256,t_struct(DelayedStake)12398_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct SortitionModuleBase.DelayedStake)", "numberOfBytes": "32", - "value": "t_struct(DelayedStake)7180_storage" + "value": "t_struct(DelayedStake)12398_storage" }, "t_mapping(t_uint96,t_uint256)": { "encoding": "mapping", @@ -1477,12 +1477,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(DelayedStake)7180_storage": { + "t_struct(DelayedStake)12398_storage": { "encoding": "inplace", "label": "struct SortitionModuleBase.DelayedStake", "members": [ { - "astId": 7173, + "astId": 12391, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "account", "offset": 0, @@ -1490,7 +1490,7 @@ "type": "t_address" }, { - "astId": 7175, + "astId": 12393, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "courtID", "offset": 20, @@ -1498,7 +1498,7 @@ "type": "t_uint96" }, { - "astId": 7177, + "astId": 12395, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "stake", "offset": 0, @@ -1506,7 +1506,7 @@ "type": "t_uint256" }, { - "astId": 7179, + "astId": 12397, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "alreadyTransferred", "offset": 0, @@ -1516,12 +1516,12 @@ ], "numberOfBytes": "96" }, - "t_struct(Juror)7188_storage": { + "t_struct(Juror)12406_storage": { "encoding": "inplace", "label": "struct SortitionModuleBase.Juror", "members": [ { - "astId": 7183, + "astId": 12401, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "courtIDs", "offset": 0, @@ -1529,7 +1529,7 @@ "type": "t_array(t_uint96)dyn_storage" }, { - "astId": 7185, + "astId": 12403, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "stakedPnk", "offset": 0, @@ -1537,7 +1537,7 @@ "type": "t_uint256" }, { - "astId": 7187, + "astId": 12405, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "lockedPnk", "offset": 0, @@ -1547,12 +1547,12 @@ ], "numberOfBytes": "96" }, - "t_struct(SortitionSumTree)7171_storage": { + "t_struct(SortitionSumTree)12389_storage": { "encoding": "inplace", "label": "struct SortitionModuleBase.SortitionSumTree", "members": [ { - "astId": 7156, + "astId": 12374, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "K", "offset": 0, @@ -1560,7 +1560,7 @@ "type": "t_uint256" }, { - "astId": 7159, + "astId": 12377, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "stack", "offset": 0, @@ -1568,7 +1568,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 7162, + "astId": 12380, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "nodes", "offset": 0, @@ -1576,7 +1576,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 7166, + "astId": 12384, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "IDsToNodeIndexes", "offset": 0, @@ -1584,7 +1584,7 @@ "type": "t_mapping(t_bytes32,t_uint256)" }, { - "astId": 7170, + "astId": 12388, "contract": "src/arbitration/SortitionModuleNeo.sol:SortitionModuleNeo", "label": "nodeIndexesToIDs", "offset": 0, diff --git a/contracts/deployments/arbitrum/SortitionModuleNeo_Proxy.json b/contracts/deployments/arbitrum/SortitionModuleNeo_Proxy.json index 69e59cbe8..692134e76 100644 --- a/contracts/deployments/arbitrum/SortitionModuleNeo_Proxy.json +++ b/contracts/deployments/arbitrum/SortitionModuleNeo_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x614498118850184c62f82d08261109334bFB050f", + "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", "abi": [ { "inputs": [ @@ -26,59 +26,47 @@ "type": "receive" } ], - "transactionHash": "0x4dad2ef2209d6c819bdbc3704034bb913fd74ca1b20e8b187c34baf634b006a0", + "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x614498118850184c62f82d08261109334bFB050f", - "transactionIndex": 5, - "gasUsed": "6154647", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000002000000000000000000000000000000000000000000000000", - "blockHash": "0xfec7cddde35e0d9bb2699727a0d38cdcd0c4ed98a9309943a606d02cbfb9ad96", - "transactionHash": "0x4dad2ef2209d6c819bdbc3704034bb913fd74ca1b20e8b187c34baf634b006a0", + "contractAddress": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", + "transactionIndex": 7, + "gasUsed": "595244", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba", + "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", "logs": [ { - "transactionIndex": 5, - "blockNumber": 190274557, - "transactionHash": "0x4dad2ef2209d6c819bdbc3704034bb913fd74ca1b20e8b187c34baf634b006a0", - "address": "0x614498118850184c62f82d08261109334bFB050f", + "transactionIndex": 7, + "blockNumber": 272063201, + "transactionHash": "0x64c943ff11d3c7afafa6d5520c093d07d2f79e518e6adf9d3a72081fd937c7c3", + "address": "0x21A9402aDb818744B296e1d1BE58C804118DC03D", "topics": [ "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000002", - "logIndex": 20, - "blockHash": "0xfec7cddde35e0d9bb2699727a0d38cdcd0c4ed98a9309943a606d02cbfb9ad96" + "logIndex": 18, + "blockHash": "0xd0b7f441a69fe8a34febf4998ba3ad138790bfba81f486df83208c393801a7ba" } ], - "blockNumber": 190274557, - "cumulativeGasUsed": "17302456", + "blockNumber": 272063201, + "cumulativeGasUsed": "1884235", "status": 1, "byzantium": true }, "args": [ - "0xf327200420F21BAafce8F1C03B1EEdF926074B95", - "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000cd415c03dfa85b02646c7e2977f22a480c4354f100000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000708000000000000000000000000c3db344755b15c8edfd834db79af4f8860029fb4000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" + "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", + "0x498c752c000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c59000000000000000000000000991d2df165670b9cac3b022f4b68d65b664222ea00000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000708000000000000000000000000044afe0069c0fd641bc5f90d9a4218ef0b2fa9d3000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000006c6b935b8bbd40000000000000000000000000000000000000000000000001a784379d99db42000000" ], "numDeployments": 1, - "solcInputHash": "195c5418e632c38d356fdcef349d5799", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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\":{\"author\":\"Simon Malatrait \",\"details\":\"This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\"}},\"stateVariables\":{\"IMPLEMENTATION_SLOT\":{\"details\":\"Storage slot with the address of the current implementation. This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\"}},\"title\":\"UUPS Proxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/UUPSProxy.sol\":\"UUPSProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"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.18;\\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\":\"0xb42b4da7d7d4de880da62538361fe7ca2aca28577880e53bafa8d07eb9a08c48\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516102fe3803806102fe83398101604081905261002f9161014d565b817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010c576000826001600160a01b031682604051610075919061021b565b600060405180830381855af49150503d80600081146100b0576040519150601f19603f3d011682016040523d82523d6000602084013e6100b5565b606091505b505090508061010a5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050610237565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561014457818101518382015260200161012c565b50506000910152565b6000806040838503121561016057600080fd5b82516001600160a01b038116811461017757600080fd5b60208401519092506001600160401b038082111561019457600080fd5b818501915085601f8301126101a857600080fd5b8151818111156101ba576101ba610113565b604051601f8201601f19908116603f011681019083821181831017156101e2576101e2610113565b816040528281528860208487010111156101fb57600080fd5b61020c836020830160208801610129565b80955050505050509250929050565b6000825161022d818460208701610129565b9190910192915050565b60b9806102456000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", - "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212207d50a904496089f6052d7370a78231ed4755a18daf824e0c243ac9c9c2a3b9ae64736f6c63430008120033", + "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\":\"SortitionModuleNeoProxy\"},\"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": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204bceea1b46a095339c0faa0cacdfde8401f8237d6ebe71f92eacd5fa95b7ec3864736f6c63430008180033", + "deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea26469706673582212204bceea1b46a095339c0faa0cacdfde8401f8237d6ebe71f92eacd5fa95b7ec3864736f6c63430008180033", "devdoc": { - "author": "Simon Malatrait ", - "details": "This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.We refer to the Proxiable contract (as per ERC-1822) with `implementation`.", "kind": "dev", - "methods": { - "constructor": { - "details": "Initializes the upgradeable proxy with an initial implementation specified by `_implementation`. If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor." - } - }, - "stateVariables": { - "IMPLEMENTATION_SLOT": { - "details": "Storage slot with the address of the current implementation. This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is validated in the constructor. NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)" - } - }, - "title": "UUPS Proxy", + "methods": {}, "version": 1 }, "userdoc": { diff --git a/contracts/deployments/mainnet.viem.ts b/contracts/deployments/mainnet.viem.ts index 2d98e36a5..48389fec5 100644 --- a/contracts/deployments/mainnet.viem.ts +++ b/contracts/deployments/mainnet.viem.ts @@ -265,7 +265,7 @@ export const daiConfig = { address: daiAddress, abi: daiAbi } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ export const disputeKitClassicNeoAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -797,14 +797,14 @@ export const disputeKitClassicNeoAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ export const disputeKitClassicNeoAddress = { - 42161: "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ export const disputeKitClassicNeoConfig = { address: disputeKitClassicNeoAddress, @@ -816,7 +816,7 @@ export const disputeKitClassicNeoConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) */ export const disputeKitClassicNeoImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -1339,14 +1339,14 @@ export const disputeKitClassicNeoImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) */ export const disputeKitClassicNeoImplementationAddress = { - 42161: "0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3", + 42161: "0xAF0325dbBFa812a574743Bb5A085266D31e3e03a", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xAF0325dbBFa812a574743Bb5A085266D31e3e03a) */ export const disputeKitClassicNeoImplementationConfig = { address: disputeKitClassicNeoImplementationAddress, @@ -1358,7 +1358,7 @@ export const disputeKitClassicNeoImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ export const disputeKitClassicNeoProxyAbi = [ { @@ -1374,14 +1374,14 @@ export const disputeKitClassicNeoProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ export const disputeKitClassicNeoProxyAddress = { - 42161: "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9", + 42161: "0x70B464be85A547144C72485eBa2577E5D3A45421", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x70B464be85A547144C72485eBa2577E5D3A45421) */ export const disputeKitClassicNeoProxyConfig = { address: disputeKitClassicNeoProxyAddress, @@ -1393,7 +1393,7 @@ export const disputeKitClassicNeoProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3645F9e08D80E47c82aD9E33fCB4EA703822C831) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) */ export const disputeResolverNeoAbi = [ { @@ -1609,14 +1609,14 @@ export const disputeResolverNeoAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3645F9e08D80E47c82aD9E33fCB4EA703822C831) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) */ export const disputeResolverNeoAddress = { - 42161: "0x3645F9e08D80E47c82aD9E33fCB4EA703822C831", + 42161: "0xb5526D022962A1fFf6eD32C93e8b714c901F4323", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x3645F9e08D80E47c82aD9E33fCB4EA703822C831) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xb5526D022962A1fFf6eD32C93e8b714c901F4323) */ export const disputeResolverNeoConfig = { address: disputeResolverNeoAddress, @@ -1628,7 +1628,7 @@ export const disputeResolverNeoConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) */ export const disputeTemplateRegistryAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -1771,14 +1771,14 @@ export const disputeTemplateRegistryAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) */ export const disputeTemplateRegistryAddress = { - 42161: "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) */ export const disputeTemplateRegistryConfig = { address: disputeTemplateRegistryAddress, @@ -1790,7 +1790,7 @@ export const disputeTemplateRegistryConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) */ export const disputeTemplateRegistryImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -1924,14 +1924,14 @@ export const disputeTemplateRegistryImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) */ export const disputeTemplateRegistryImplementationAddress = { - 42161: "0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb", + 42161: "0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x57EfD43DAfCeb6C58Df57932b2B299f46fef5c87) */ export const disputeTemplateRegistryImplementationConfig = { address: disputeTemplateRegistryImplementationAddress, @@ -1943,7 +1943,7 @@ export const disputeTemplateRegistryImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) */ export const disputeTemplateRegistryProxyAbi = [ { @@ -1959,14 +1959,14 @@ export const disputeTemplateRegistryProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) */ export const disputeTemplateRegistryProxyAddress = { - 42161: "0x52c9f5634361eD3641016e5d9783310f9EFf9e25", + 42161: "0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0cFBaCA5C72e7Ca5fFABE768E135654fB3F2a5A2) */ export const disputeTemplateRegistryProxyConfig = { address: disputeTemplateRegistryProxyAddress, @@ -1978,7 +1978,7 @@ export const disputeTemplateRegistryProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) */ export const evidenceModuleAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -2100,14 +2100,14 @@ export const evidenceModuleAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) */ export const evidenceModuleAddress = { - 42161: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) */ export const evidenceModuleConfig = { address: evidenceModuleAddress, @@ -2119,7 +2119,7 @@ export const evidenceModuleConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x827411b3e98bAe8c441efBf26842A1670f8f378F) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) */ export const evidenceModuleImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -2232,14 +2232,14 @@ export const evidenceModuleImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x827411b3e98bAe8c441efBf26842A1670f8f378F) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) */ export const evidenceModuleImplementationAddress = { - 42161: "0x827411b3e98bAe8c441efBf26842A1670f8f378F", + 42161: "0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x827411b3e98bAe8c441efBf26842A1670f8f378F) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xE22500Fa27f696d06702367246bd17Bd2C8a4c5d) */ export const evidenceModuleImplementationConfig = { address: evidenceModuleImplementationAddress, @@ -2251,7 +2251,7 @@ export const evidenceModuleImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) */ export const evidenceModuleProxyAbi = [ { @@ -2267,14 +2267,14 @@ export const evidenceModuleProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) */ export const evidenceModuleProxyAddress = { - 42161: "0xe62B776498F48061ef9425fCEf30F3d1370DB005", + 42161: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3) */ export const evidenceModuleProxyConfig = { address: evidenceModuleProxyAddress, @@ -2543,7 +2543,7 @@ export const iHomeGatewayAbi = [ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) */ export const klerosCoreNeoAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -3698,14 +3698,14 @@ export const klerosCoreNeoAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) */ export const klerosCoreNeoAddress = { - 42161: "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) */ export const klerosCoreNeoConfig = { address: klerosCoreNeoAddress, @@ -3717,7 +3717,7 @@ export const klerosCoreNeoConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) */ export const klerosCoreNeoImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -4863,14 +4863,14 @@ export const klerosCoreNeoImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) */ export const klerosCoreNeoImplementationAddress = { - 42161: "0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284", + 42161: "0x17c39AB53A7072b167A74a85D47b30385c98ae89", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x17c39AB53A7072b167A74a85D47b30385c98ae89) */ export const klerosCoreNeoImplementationConfig = { address: klerosCoreNeoImplementationAddress, @@ -4882,7 +4882,7 @@ export const klerosCoreNeoImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) */ export const klerosCoreNeoProxyAbi = [ { @@ -4898,14 +4898,14 @@ export const klerosCoreNeoProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) */ export const klerosCoreNeoProxyAddress = { - 42161: "0xCd415C03dfa85B02646C7e2977F22a480c4354F1", + 42161: "0x991d2df165670b9cac3B022f4B68D65b664222ea", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x991d2df165670b9cac3B022f4B68D65b664222ea) */ export const klerosCoreNeoProxyConfig = { address: klerosCoreNeoProxyAddress, @@ -5742,7 +5742,7 @@ export const pinakionConfig = { /** * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9d494768936b6bDaabc46733b8D53A937A6c6D7e) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) */ export const policyRegistryAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -5880,16 +5880,16 @@ export const policyRegistryAbi = [ /** * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9d494768936b6bDaabc46733b8D53A937A6c6D7e) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) */ export const policyRegistryAddress = { 100: "0x9d494768936b6bDaabc46733b8D53A937A6c6D7e", - 42161: "0x26c1980120F1C82cF611D666CE81D2b54d018547", + 42161: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", } as const; /** * - [__View Contract on Gnosis Gnosisscan__](https://gnosisscan.io/address/0x9d494768936b6bDaabc46733b8D53A937A6c6D7e) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) */ export const policyRegistryConfig = { address: policyRegistryAddress, @@ -5901,7 +5901,7 @@ export const policyRegistryConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x15E5964C7751dF8563eA4bC000301582C79BC454) */ export const policyRegistryImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -6029,14 +6029,14 @@ export const policyRegistryImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x15E5964C7751dF8563eA4bC000301582C79BC454) */ export const policyRegistryImplementationAddress = { - 42161: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da", + 42161: "0x15E5964C7751dF8563eA4bC000301582C79BC454", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x15E5964C7751dF8563eA4bC000301582C79BC454) */ export const policyRegistryImplementationConfig = { address: policyRegistryImplementationAddress, @@ -6048,7 +6048,7 @@ export const policyRegistryImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) */ export const policyRegistryProxyAbi = [ { @@ -6064,14 +6064,14 @@ export const policyRegistryProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) */ export const policyRegistryProxyAddress = { - 42161: "0x26c1980120F1C82cF611D666CE81D2b54d018547", + 42161: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c) */ export const policyRegistryProxyConfig = { address: policyRegistryProxyAddress, @@ -6107,7 +6107,7 @@ export const randomizerOracleConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) */ export const randomizerRngAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -6196,9 +6196,9 @@ export const randomizerRngAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], name: "randomNumbers", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { @@ -6241,9 +6241,9 @@ export const randomizerRngAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "requester", internalType: "address", type: "address" }], name: "requesterToID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { @@ -6281,14 +6281,14 @@ export const randomizerRngAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) */ export const randomizerRngAddress = { - 42161: "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + 42161: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) */ export const randomizerRngConfig = { address: randomizerRngAddress, @@ -6300,7 +6300,7 @@ export const randomizerRngConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) */ export const randomizerRngImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -6388,9 +6388,9 @@ export const randomizerRngImplementationAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], name: "randomNumbers", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + outputs: [{ name: "number", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { @@ -6433,9 +6433,9 @@ export const randomizerRngImplementationAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "requester", internalType: "address", type: "address" }], name: "requesterToID", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + outputs: [{ name: "requestId", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { @@ -6465,14 +6465,14 @@ export const randomizerRngImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) */ export const randomizerRngImplementationAddress = { - 42161: "0xA995C172d286f8F4eE137CC662e2844E59Cf4836", + 42161: "0xF1a7Cd3115F5852966430f8E3877D2221F074A2e", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF1a7Cd3115F5852966430f8E3877D2221F074A2e) */ export const randomizerRngImplementationConfig = { address: randomizerRngImplementationAddress, @@ -6484,7 +6484,7 @@ export const randomizerRngImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) */ export const randomizerRngProxyAbi = [ { @@ -6500,14 +6500,14 @@ export const randomizerRngProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) */ export const randomizerRngProxyAddress = { - 42161: "0xC3dB344755b15c8Edfd834db79af4f8860029FB4", + 42161: "0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x044AfE0069C0fd641BC5f90d9A4218eF0b2Fa9d3) */ export const randomizerRngProxyConfig = { address: randomizerRngProxyAddress, @@ -6519,7 +6519,7 @@ export const randomizerRngProxyConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) */ export const sortitionModuleNeoAbi = [ { type: "fallback", stateMutability: "payable" }, @@ -6867,7 +6867,7 @@ export const sortitionModuleNeoAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "account", internalType: "address", type: "address" }], name: "jurors", outputs: [ { name: "stakedPnk", internalType: "uint256", type: "uint256" }, @@ -6885,8 +6885,8 @@ export const sortitionModuleNeoAbi = [ { type: "function", inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint96", type: "uint96" }, + { name: "jurorAccount", internalType: "address", type: "address" }, + { name: "courtId", internalType: "uint96", type: "uint96" }, ], name: "latestDelayedStakeIndex", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -7091,14 +7091,14 @@ export const sortitionModuleNeoAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) */ export const sortitionModuleNeoAddress = { - 42161: "0x614498118850184c62f82d08261109334bFB050f", + 42161: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) */ export const sortitionModuleNeoConfig = { address: sortitionModuleNeoAddress, @@ -7110,7 +7110,7 @@ export const sortitionModuleNeoConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xf327200420F21BAafce8F1C03B1EEdF926074B95) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851) */ export const sortitionModuleNeoImplementationAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, @@ -7457,7 +7457,7 @@ export const sortitionModuleNeoImplementationAbi = [ }, { type: "function", - inputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "account", internalType: "address", type: "address" }], name: "jurors", outputs: [ { name: "stakedPnk", internalType: "uint256", type: "uint256" }, @@ -7475,8 +7475,8 @@ export const sortitionModuleNeoImplementationAbi = [ { type: "function", inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint96", type: "uint96" }, + { name: "jurorAccount", internalType: "address", type: "address" }, + { name: "courtId", internalType: "uint96", type: "uint96" }, ], name: "latestDelayedStakeIndex", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -7673,14 +7673,14 @@ export const sortitionModuleNeoImplementationAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xf327200420F21BAafce8F1C03B1EEdF926074B95) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851) */ export const sortitionModuleNeoImplementationAddress = { - 42161: "0xf327200420F21BAafce8F1C03B1EEdF926074B95", + 42161: "0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xf327200420F21BAafce8F1C03B1EEdF926074B95) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x7E13f295536FD6c48Ba792CFdEF691d592Fa0851) */ export const sortitionModuleNeoImplementationConfig = { address: sortitionModuleNeoImplementationAddress, @@ -7692,7 +7692,7 @@ export const sortitionModuleNeoImplementationConfig = { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) */ export const sortitionModuleNeoProxyAbi = [ { @@ -7708,14 +7708,14 @@ export const sortitionModuleNeoProxyAbi = [ ] as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) */ export const sortitionModuleNeoProxyAddress = { - 42161: "0x614498118850184c62f82d08261109334bFB050f", + 42161: "0x21A9402aDb818744B296e1d1BE58C804118DC03D", } as const; /** - * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f) + * [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x21A9402aDb818744B296e1d1BE58C804118DC03D) */ export const sortitionModuleNeoProxyConfig = { address: sortitionModuleNeoProxyAddress, diff --git a/contracts/package.json b/contracts/package.json index e7a63dc77..07ce9b2b7 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@kleros/kleros-v2-contracts", - "version": "0.6.0", + "version": "0.7.0", "description": "Smart contracts for Kleros version 2", "main": "typechain-types/index.ts", "repository": "git@github.com:kleros/kleros-v2.git", diff --git a/contracts/scripts/populateCourts.ts b/contracts/scripts/populateCourts.ts index 6c06343a0..4b232f75e 100644 --- a/contracts/scripts/populateCourts.ts +++ b/contracts/scripts/populateCourts.ts @@ -5,6 +5,7 @@ import courtsV1Mainnet from "../config/courts.v1.mainnet.json"; import courtsV1GnosisChain from "../config/courts.v1.gnosischain.json"; import courtsV2ArbitrumTestnet from "../config/courts.v2.testnet.json"; import courtsV2ArbitrumDevnet from "../config/courts.v2.devnet.json"; +import courtsV2MainnetNeo from "../config/courts.v2.mainnet-neo.json"; import { isDevnet } from "../deploy/utils"; enum HomeChains { @@ -18,6 +19,7 @@ enum Sources { V1_GNOSIS, V2_DEVNET, V2_TESTNET, + V2_MAINNET_NEO, } enum Cores { @@ -45,7 +47,7 @@ const TEN_THOUSAND_GWEI = 10n ** 13n; task("populate:courts", "Populates the courts and their parameters") .addOptionalParam( "from", - "The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet (default: auto depending on the network)", + "The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo (default: auto depending on the network)", undefined ) .addOptionalParam( @@ -78,7 +80,7 @@ task("populate:courts", "Populates the courts and their parameters") if (taskArgs.from) { from = Sources[taskArgs.from.toUpperCase() as keyof typeof Sources]; if (from === undefined) { - console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet"); + console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo"); return; } } else { @@ -138,6 +140,10 @@ task("populate:courts", "Populates the courts and their parameters") courtsV2 = courtsV2ArbitrumTestnet; break; } + case Sources.V2_MAINNET_NEO: { + courtsV2 = courtsV2MainnetNeo; + break; + } default: throw new Error("Unknown source"); } diff --git a/contracts/scripts/populatePolicyRegistry.ts b/contracts/scripts/populatePolicyRegistry.ts index de574295b..9967c4863 100644 --- a/contracts/scripts/populatePolicyRegistry.ts +++ b/contracts/scripts/populatePolicyRegistry.ts @@ -4,6 +4,7 @@ import policiesV1Mainnet from "../config/policies.v1.mainnet.json"; import policiesV1GnosisChain from "../config/policies.v1.gnosischain.json"; import policiesV2ArbitrumTestnet from "../config/policies.v2.testnet.json"; import policiesV2ArbitrumDevnet from "../config/policies.v2.devnet.json"; +import policiesV2MainnetNeo from "../config/policies.v2.mainnet-neo.json"; import { isDevnet } from "../deploy/utils"; enum HomeChains { @@ -17,12 +18,13 @@ enum Sources { V1_GNOSIS, V2_DEVNET, V2_TESTNET, + V2_MAINNET_NEO, } task("populate:policy-registry", "Populates the policy registry for each court") .addOptionalParam( "from", - "The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet (default: auto depending on the network)", + "The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo (default: auto depending on the network)", undefined ) .addOptionalParam( @@ -49,7 +51,7 @@ task("populate:policy-registry", "Populates the policy registry for each court") if (taskArgs.from) { from = Sources[taskArgs.from.toUpperCase() as keyof typeof Sources]; if (from === undefined) { - console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet"); + console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo"); return; } } else { @@ -84,6 +86,10 @@ task("populate:policy-registry", "Populates the policy registry for each court") policiesV2 = policiesV2ArbitrumTestnet; break; } + case Sources.V2_MAINNET_NEO: { + policiesV2 = policiesV2MainnetNeo; + break; + } default: return; }